Bluemix create container group linking to another container

Viewed 142

We have a Java application running with MongoDB, each one in a different Bluemix container. Both are SINGLE Bluemix containers.

We want to serve the Java app using one of our subdomains: https://subdomain.mydomain.com, which is already pointing to Bluemix. How can we do it?

OUR APPROACH

Because the Java container needs to link to the Mongo container, we created both containers programmatically (we didn't find in the UI a way to link a container to another container) like this:

sudo bluemix ic run --name mongo-container -p 27017 -m 128 registry.eu-gb.bluemix.net/mycompany/mongo

sudo bluemix ic run --name java-container --link mongo-container:mongo -p 8080 -m 128 registry.eu-gb.bluemix.net/mycompany/java

This works well, but the Java app is only accessible through an ugly Blumix IP, not through https://subdomain.mydomain.com as we want.

What about using a Bluemix container GROUP (SCALABLE container in the UI)?

Again, we don't know how to link containers from the UI, so it should be something like

sudo bluemix ic group-create --auto --name java-scalable -p 8080 -m 128 --hostname subdomain --domain mydomain.com registry.eu-gb.bluemix.net/mycompany/java

BUT according to the documentation we cannot link a container group to a container, since there is no --link parameter.

Back to the original question. How can we serve the Java app using https://subdomain.mydomain.com?

2 Answers
Related