In previous articles we have seen how to setup a Jenkins CI system on top of docker and leverage docker in order to create a continuous integration pipeline. As part of that we used docker to create a centrally managed build environment which can be rolled out to any number of machines. We then setup the environment in Jenkins CI and automated the continuous building, packaging and testing of the source.
Over the last year we have written about getting several application stacks running on top of docker, e.g. Magento, Jenkins, Prometheus and so forth. However, containerized deployment can be useful for more than just defining application stacks. In this series of articles we would like to cover an end-to-end development pipeline and discuss how to leverage Docker and Rancher in its’ various stages. Specifically, we’re going to cover; building code, running tests, packaging artifacts, continuous integration and deployment, as well as managing an application stack in production.
Containerization brings several benefits to traditional CI platforms where builds share hosts: build dependencies can be isolated, applications can be tested against multiple environments (testing a Java app against multiple versions of JVM), on-demand build environments can be created with minimal stickiness to ensure test fidelity, Docker Compose can be used to quickly bring up environments which mirror development environments. Lastly, the inherent isolation offered by Docker Compose-based stacks allow for concurrent builds -- a sticking point for traditional build environments with shared components.
Running Drone as a Rancher Service for Dockerizing Builds On August 13th, Darren Shepherd and Shannon Williams hosted an online meetup demonstrating how our team at Rancher uses Drone.io, Docker and Rancher to build a scalable CI platform for builds and test environments. Rancher engineer Bill Maxwell gave a demonstration of how he built Rancher’s CI platform, and provided a Docker Compose file for anyone interested in deploying it themselves.
During the meetup Darren Shepherd demonstrated how to deploy a complete container stack On July 15th, Darren Shepherd and Shannon Williams hosted an online meetup demonstrating how to deploy a pilot Docker Service, and teaching attendees how to implement an integrated stack that included DockerHub, GitHub, Rancher, Jenkins and Prometheus. We’ve recorded the meeting and shared it below. You can register for our next online meetup on our events page.
Since I started playing with Docker I have been thinking that its network implementation is something that will need to be improved before I could really use it in production. It is based on container links and service discovery but it only works for host-local containers. This creates issues for a few use cases, for example when you are setting up services that need advanced network features like broadcasting/multicasting for clustering.
One of the exciting things about RancherOS is the concept of running system services as containers. It offers the chance to clearly delineate between containers running an application, and containers running agents and operating system services. This has some interesting potential implications for managing operations, such as making patching and upgrading system services simpler, setting app and organizational policies for required services, and prioritizing which services have access to system resources.
In the first part of this post, I created a full Node.js application stack using MongoDB as the application’s database and Nginx as a load balancer that distributed incoming requests to two Node.js application servers. I created the environment on Rancher and using Docker containers. In this post I will go through setting up Rancher authentication with GitHub, and creating a webhook with GitHub for automatic deployments. Rancher Access Control Starting from version 0.
So last week I finally got out from my “tech” comfort zone, and tried to set up a Node.js application which uses a MongoDB database, and to add an extra layer of fun I used Rancher to set up the whole application stack using Docker containers. I designed a small application with Node, its only function is to calculate the number of hits on the website, you can find the code at Github