himanshu vyas
himanshu vyas

Reputation: 13

How can I connect my container group (scalable container) to my mongodb container (single node) on Bluemix?

On Bluemix, I created a mongodb container (single node) with the help of mongodb image from docker hub; then I wanted to create liberty container from ibmliberty official image and link it to my mongodb container. but when I run the command it igives me the following error-

$ cf ic group create --anti --auto --desired 1 -e "ACMEAIR_PROPERTIES=/opt/ibm/
wlp/usr/servers/defaultServer/Prop" -m 256 --name acme-main -p 9080 -n acme-mai
n -d mybluemix.net --volume acmemain:/opt/ibm/wlp/usr/servers/defaultServer/Pro
p --link lc-mongo:mongo registry.ng.bluemix.net/ibmliberty:javaee7

flag provided but not defined: -link

The same thing worked perfectly when I tried to connect my liberty container (single node) to my mongodb container (single node).

Upvotes: 0

Views: 75

Answers (1)

N Fritze
N Fritze

Reputation: 431

The -link parameter isn't supported on groups, only on single containers. With -link, if the linked-to container goes away (i.e. crashes or redeployed) and is replaced by a new instance, you need to redeploy the linked-from container (in this case group) as well, increasing chance of overall failure.

I think the intention is to use something like service discovery/service proxy (now deprecated in favor of amalgam8.io) so that, if the linked to container/service has to be replaced, you don't have to redeploy the whole group as well - the new one will automatically be picked up as the new instance of that microservice.

Upvotes: 2

Related Questions