Tutum is a SaaS Container platform that can be used to build, deploy and manage Docker Containers. Docker acquired Tutum in October 2015. I have been playing with Tutum for the past few weeks and I will share some basics of Tutum and my experiences with Tutum in this blog.
- Very easy to get started and create Containers and multi-Container applications
- Works with majority of cloud providers like AWS, GCE and our own node can also be used.
- Hides orchestration, networking and storage complexity.
- Provides GUI, CLI as well as api access
- Gives own private repository within Tutum per user, other repositories can also be used
- Logging, monitoring, Scaling and HA is built-in
- Does rolling upgrade automatically
- Suited for CI, CD Usecases
What can we do with Tutum?
- Build Docker images from Dockerfiles
- Have a private repository in Tutum for storing Docker images and also interact with already existing repositories
- Deploy single container and multi-container application in cloud provider or in our own machine
- Integrate with Github for automatic Container image build and deploy Containers automatically using rolling upgrade
- Monitor, debug, manage and upgrade Containers and Services
- Need Tutum account – Free at this point since Tutum is still in Beta
- Cloud provider account or own node
- Repositories – Repositories are where Docker images are stored. This can either be Tutum private registry or Docker hub or third-party registry. Repositories can be built from Github.
- Node clusters – Node clusters are where the Docker Container runs. This can be nodes from any Cloud providers or own Linux node. Tutum installs Tutum agent in every node it manages.
- Services – Service is a group of Containers with same image tag. For example, 4 Container instances of nginx serving a single application is a Service. Both Service and Containers have endpoints which expose the service.
- Stacks – Stack is a multi-container application. Tutum allows us to specify a stackfile that is similar to Docker compose file for specifying details of multi-container application (https://stackfiles.io/)
Workflow for deploying simple service or stack
- Create node cluster from cloud provider or with our own node.
- Create Service or Stack and deploy.
Workflow for creating new application
- Checkin code in Github
- Create repository in Tutum linking to Github. The repository needs to have a Dockerfile and the build will be triggered when there are changes to Github.
- Use the repository in stack or service creation.
- The stack or service will be redeployed automatically when the repository is rebuilt.
Example applications that I tried
I created WordPress application using 2 approaches.
- Using 3 services: haproxy, wordpress and mysql. In this case, haproxy is loadbalancing between wordpress container and wordpress service is talking to mysql backend.
- Using a Stackfile. Stackfile describes the multi-container application along with its dependencies and environment variables. Stackfile is similar to docker-compose.
Following video walks through Tutum Overview along with deploying WordPress application:
Tutum installs Tutum agent in each node Tutum manages. Tutum agent is composed of multiple Containers. Following output shows the lists of Containers running in each Tutum agent as soon as a node is added to Tutum.
root@ip-10-77-46-220:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 34ee4cec3750 tutum/logrotate:latest "crond -f" 2 hours ago Up 2 hours logrotate-66477.a986a94d d12ec595dc30 tutum/events:latest "/events" 2 hours ago Up 2 hours events-77249.b7e20e33 24c446bda63d weaveworks/weave:1.4.1 "/home/weave/weaver -" 2 hours ago Up 2 hours weave e657487303dd tutum/cleanup:latest "/run.sh" 2 hours ago Up 2 hours cleanup-89924.73c7ad5e b5ae1086e390 tutum/metrics:latest "/metrics" 2 hours ago Up 2 hours metrics-65307.0782d190 fbb5e1d51590 tutum/ntpd:latest "/run.sh" 2 hours ago Up 2 hours ntpd-73458.5d03cc3b 63675017e46c tutum/weave-daemon:1.9.1-cs2 "/run.sh" 2 hours ago Up 2 hours
ssh to individual Tutum node
Please follow this link to ssh to the individual nodes that Tutum manages. The steps involve creating a public, private key pair and creating a Tutum service that installs the public key into the Tutum node. This Tutum service automatically starts when new node is added is added to cluster.
Difference between Tutum and UCP
Docker also has Universal control plane (UCP) currently in Beta phase targeting similar build, manage and deploy Container use case. Following are some differences that I could understand between Tutum and UCP:
- UCP is more enterprise focused and has integrations with LDAP, RBAC.
- UCP is targeted as on-premise solution and Tutum will remain as SaaS
- Tutum does not use Swarm, Compose and Docker native networking like UCP. This comes from the fact that Tutum was a recent acquisition from Docker
- Tutum uses stackfile to describe multi-Container applications while UCP uses Compose. Both formats are pretty similar
Working with own node
There is an option to add our new nodes to Tutum cluster. This is useful for scenarios where we want Tutum to manage local data center. I had some issues with removing and adding my own nodes and I have raised this issue here.
Installing Tutum CLI
Tutum CLI can be installed using the link here. Following output shows the node list using Tutum CLI.
smakam14@jungle1:~$ tutum node list UUID FQDN LASTSEEN STATUS CLUSTER DOCKER_VER f46c69ff f46c69ff-smakam.node.tutum.io 471107 microseconds ago ▶ Deployed 1.9.1-cs2 b25c4a85 b25c4a85-smakam.node.tutum.io 58 seconds ago ▶ Deployed myaws 1.9.1-cs2 7469d928 7469d928-smakam.node.tutum.io 6 seconds ago ▶ Deployed myaws 1.9.1-cs2
Tutum is pretty powerful and is very easy to get started with. I would like to see the following in Tutum:
- Currently, Tutum has its own Orchestration and Networking approach. Would like Tutum to use native Docker integration in long term.
- Get stackfile to be compatible with docker-compose file.
- Have Tutum as an On-premise solution as well.