Over a million developers have joined DZone.

Deployments of Hybrid Applications as Docker Containers with IBM UrbanCode on Bluemix

DZone's Guide to

Deployments of Hybrid Applications as Docker Containers with IBM UrbanCode on Bluemix

Trying to deploy hybrid app Docker containers with UrbanCode on Bluemix? Learn how with this hefty guide.

· Integration Zone
Free Resource

Learn how API management supports better integration in Achieving Enterprise Agility with Microservices and API Management, brought to you in partnership with 3scale

IBM Bluemix provides built in DevOps services to manage source code and to build, test and deploy applications to Bluemix. This works well for many scenarios, esp. when deploying single applications to Bluemix via delivery pipelines. For more complex scenarios IBM provides the Continuous Delivery toolset UrbanCode to deploy hybrid applications to the cloud and on-premises and to deploy composite applications with multiple components or microservices. 

In this blog entry I focus on how to deploy hybrid applications as Docker containers to Bluemix and an on-premises. My colleagues Sanjay Nayak, Noel Richard Nihill and Mike S. Samano have written an excellent article "Deploy Docker containers in hybrid clouds that use IBM UrbanCode" (part 1part 2) where they explain how to deploy a sample store application. The store application uses one container on Bluemix which connects via the Secure Gateway to three containers running in a Docker Swarm cluster on premises. Rather than repeating the article here, I focus below on, as I think, the most interesting part which is how to link between the different containers and services. 

On the on-premises Swarm cluster three containers are run. A container running a Java application (hosting REST APIs) accesses the two database containers DB2 and MySQL. To define multi-container Docker applications typically Docker Compose is used and the sample store application comes with a docker-compose.yml file. With UrbanCode you can essentially use the same information in the configuration of the containers to expose it as environment variables at runtime. The following screenshot shows the configuration of the container with the Java application. 


In order to deploy containers to Bluemix you need to define configuration data like the Bluemix user name, organization, password, etc. 


Rather than defining this data in multiple component definitions, they are defined once globally. 

 In the configuration of the container which is deployed to Bluemix the name of the Cloud Foundry bridge application is defined so that the container can access the credentials of the secure gateway service via the environment variable VCAP_SERVICES. 


To find out more about UrbanCode check out the Developer Center and watch the videos UrbanCode Deploy and Docker Containers Connect the DotsHybrid Deployment of Docker Containers using IBM UrbanCode Deploy and IBM UrbanCode Deploy with IBM Bluemix.

Unleash the power of your APIs with future-proof API management - Create your account and start your free trial today, brought to you in partnership with 3scale.

devops ,docker ,hybrid apps ,integration

Published at DZone with permission of Niklas Heidloff, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}