Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

Modernize your application architectures with microservices and APIs with best practices from this free virtual summit series. Brought to you in partnership with CA Technologies.

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.

The Integration Zone is proudly sponsored by CA Technologies. Learn from expert microservices and API presentations at the Modernizing Application Architectures Virtual Summit Series.

Topics:
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.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}