Automated deploys with Docker Hub and Nirmata

Automated deploys with Docker Hub and Nirmata

As companies strive to attain achieve software development agility, they are looking to automate each phase of their software development pipeline. The ultimate goal is to fully automate the deployment of code to production, triggered when a developer checks in a fix or a feature. Companies such as Netflix have built extensive tooling to enable their developers to achieve this level of sophisticated automation [1]. In this post, I will describe how deployments of containerized applications can be completely automated with GitHub, Docker Hub and Nirmata.

Docker Hub has built-in integration with GitHub and Bitbucket to automatically build a Docker image when change is committed to a GitHub repository that has automated builds enabled [2]. The only requirement is that a Dockerfile be placed in that repository. This is very convenient!

dockerhubintegration-ppt

Now that Docker image builds are automated, the next step is to automate the deployment of these builds. This can be done using Docker Hub webhooks [3] and Nirmata. Nirmata is a SaaS for deployment and operation of application containers. To trigger automated deployments of your application follow these steps.

  1. Log in to Nirmata and create a blueprint for your application.
  2. Add your cloud resources (VMs) to Nirmata. These resources will be used to deploy your application containers.
  3. Deploy your application to an environment. Environment is the runtime instantiation of your application and contains your running application containers
  4. Now, go to Docker Hub and add webhooks for your image repositories that should trigger automated deploys. The URL is displayed below:
http://www.nirmata.io/imageregistry/api/dockerhub/notify/<tenant-id>

You can find the tenant-id on the Settings->Account page in Nirmata web interface.

Thats it! You have now setup an automated deployment pipeline. Whenever a change is committed to your GitHub repository, a Docker image will be automatically build and deployed to your running environment in Nirmata. Complete operation may take a few minutes depending on how long it takes to build the container image as well as your Update Policy settings [4] in Nirmata.

edit-update-policy

Nirmata provides an option to automatically deploy new Docker images, or simply create a notification when a new image is available so that it can be manually deployed. In case your application contains multiple containers running the same image, then a rolling upgrade is performed based on preconfigured policy settings so that downtime is minimized.

auto-image-update

While this level of automation is great, there are several other capabilities needed to achieve the level of automation companies such as Netflix have built. At Nirmata, our mission is to bring these capabilities to our customers to help them achieve the software DevOps agility they need to be successful.  Stay tuned for more exciting features we will be announcing!

-Ritesh
Nirmata

Try out Docker Hub Integration now!

For more updates and news follow us at:  social-1_logo-linkedin   social-1_logo-twitter

 

[1] From Code to Monkeys: Continuous Delivery at Netflix – http://www.infoq.com/presentations/netflix-continuous-delivery
[2] Automated Builds on Docker Hub – https://docs.docker.com/docker-hub/builds/
[3] Docker Hub Webhooks – https://docs.docker.com/docker-hub/builds/#webhooks
[4] Nirmata Update Policy – https://docs.nirmata.io/en/latest/Environments.html#edit-update-policy

 

Managing Zookeeper Clusters with Docker and Nirmata
Microservices Networking with Nirmata and Docker
No Comments

Sorry, the comment form is closed at this time.