DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Join us tomorrow at 1 PM EST: "3-Step Approach to Comprehensive Runtime Application Security"
Save your seat
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Deployments of Hybrid Applications as Docker Containers with IBM UrbanCode on Bluemix

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.

Niklas Heidloff user avatar by
Niklas Heidloff
CORE ·
Nov. 13, 15 · Tutorial
Like (2)
Save
Tweet
Share
3.22K Views

Join the DZone community and get the full member experience.

Join For Free

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 1, part 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 Dots, Hybrid Deployment of Docker Containers using IBM UrbanCode Deploy and IBM UrbanCode Deploy with IBM Bluemix.

Docker (software) application Bluemix

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

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Real-Time Supply Chain Control Tower Powered by Kafka
  • Type Variance in Java and Kotlin
  • Using JSON Web Encryption (JWE)
  • Unleashing the Power of JavaScript Modules: A Beginner’s Guide

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: