0

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).

ralphearle
  • 1,696
  • 13
  • 18

1 Answers1

2

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.

N Fritze
  • 431
  • 3
  • 9
  • Thank you Fritze. In the mean time i also come to know that -link doesn't work with container groups. and yes I am working on micro-services but not using Service discovery as its bit difficult to configure and also now its going to deprecate from bluemix. so for service redirection of different micro-services I am using nginx. – himanshu vyas Nov 14 '16 at 10:50