There is a huge buzz around Docker these days, and we are huge fans of it at Cloud-A. Docker is an essential component of our Continuous Integration System and it also runs Cloud-A’s management plane. We get lots of questions from customers about how they can run their containers on Cloud-A. Here is a look at how you can use Cloud 66 DevOps-as-a-service to deploy, scale and product your doctor container on Cloud-A.
Introduction to Docker
Docker is an open-source project that helps developers publish applications inside containers. There are many benefits to using Docker:
Separation of Dev and Ops
It has previously been difficult to seperate the responsibility between Dev and Ops. With Docker deployments, Devs simply put their code into a container (which they can verify works as expected), and Ops take responsibility for rolling it out and managing it.
Instead of running monolithic applications, we are now seeing an increasing amount of micro-services, whereby complex applications are composed of smaller components which speak with each other. Being able to run multiple micro-services on the same server (multi-tenancy) is easy with Docker.
Docker containers make it a lot easier to achieve immutable infrastructure, as the main logic of your application isn’t tied to a specific server.
You can now achieve consistency across environments – that is, you can replicate your production environment locally if needed.
As long as you can put it in a container, you can deploy it to any cloud with Cloud 66. You will still benefit from the many features previously only available to Ruby stacks, as well as numerous features built specifically for Docker deployments.
Cloud 66 Docker support
Cloud 66 builds Docker stacks in two ways:
Pulling your code from Git
This option uses Cloud 66 BuildGrid to build your Docker image, so that you don’t have to. You just need to provide a Dockerfile that specifies how you’d like us to build the image. Once your image is ready, it is pushed to your servers and managed. We also version the image and allow you to download it if needed.
You provide a Docker image that you’ve built, which we push to your servers and manage.
We provide a set of tools and practices to help you run a full end to end production Docker based stack. Cloud 66 Docker includes the following:
Container lifecycle management
Rolling out your Docker images to your servers, scaling, load balancing, port forwarding, lifecycle management, graceful draining and shutdown of workers, deployment rollbacks.
An internal Weave network that runs across all of your servers, allowing each server and container to have an internal IP address (on the 184.108.40.206 subnet). For example:
Server 1 (220.127.116.11) has Container 1 (18.104.22.168)
Server 2 (22.214.171.124) has Container 1 (126.96.36.199) and Container 2 (188.8.131.52)
Server 3 (184.108.40.206) has Container 1 (220.127.116.11) and Container 2 (18.104.22.168)
Containers can communicate with each other using the private address (on any port), regardless of the physical server the other container resides on. In other words, containers can communicate as if they were on the same server. The networking layer transparently maps between the two.
An internal DNS service which assigns a DNS record to each of your Docker services and servers. For example, you can connect to your MySQL instance on mysql.cloud66.local, and this record will update automatically in case you switch your server. Services can be found at service_name.cloud66.local, and will use round-robin if you have more than one container for a service.
When building your Docker stack, you can either provide us with your own image, or let us create them for you with our powerful cluster of servers called BuildGrid. Your image is created based on your source code and a Dockerfile, which specifies how you want it to be created.
Using BuildGrid lets you focus on what you do best and avoids you having to create internal processes to output Docker images. You can even integrate your CI solution, so that new images are built and pushed to your servers once all your tests pass.
Any images created with BuildGrid are made available through Registry.
Docker-based stacks enjoy the same benefits as other Cloud 66 stacks, including:
- Deployed and managed databases (MySQL, PostgreSQL, MongoDB, Redis as well as non-database
- components like ElasticSearch and RabbitMQ)
- Database managed and verified backups and replication
- Nginx and load balancing
- Firewall management and brute force protection for web and SSH
- Team and organisations (ACL)
- Fast response 100% SLA DNS layer (Failover groups) for quick traffic switch overs
- Server vital sign metrics
- Intuitive UI
- API and command line