Rancher is a powerful platform for running large clusters and deploying complex apps into production. But a growing number of users are starting to run it locally on developer machines as a fully-contained DevOps platform. In our May meetup, we discussed some of the benefits to developers of running Rancher locally.
In this meetup we demonstrated:
Building a local implementation of Rancher
Leveraging CI to run local builds
Deploying complex applications locally for testing
The benefits of isolating dev environments
Our discussion and demonstration was led by Chris Urwin, Rancher's UK DevOps Lead. We were also joined by Mark Matthews, principal at ARKM Enterprise, who discussed how he has implemented Rancher on developer machines at one of the world's largest health care organizations.
Delivery manager, devops lead
Reliable
Repeatable
tested consistently
minimal compromise
Representative data is key.
Dockerieze all for dev
Apps as close as possible i.e. version
1- Desktop Machines
2- Virtualisation layer
3- 3 VM’s spinning 1, rancher Server, mirror and a Development VM
4- In the development VM we are going to run a rancher agent container and a Jenkins container
5- We are going to share some data through into the Jenkins server via the shared folders feature
6- We are going to run our app stack in here (this can be anything you like, limited only by resources)
During Jenkins Build- make run-Jenkins 1m 10
This could be any CI, so longs as it can be run in a container and everyone can build in a consistent way then it doesn’t matter what its doing.
As part of this build it could be executing unit tests etc
I’ve mapped through the drive but you could just as easily have it git pull into the container, my instance monitors the remote git repo and then builds it from the mapped drive. There are pros and cons to both, I like this as I can make changes and run a manual build without needing to check in all the time.
Jenkins git build – 5 mins
Running multiple hosts locally causes pain as it means you need a repository or a means to get the built containers between the hosts. Overlay network also doesn’t currently work in boot2docker
People like pictures
Ba’s can demo even if not technical
Can be scripted so all the same and easy to set up
Catalog, easily give people access to a version of your app locally
Docker voting app
Front end – Python
Redis queue
Java worker
Postrgres DB
Restults App Nodejs
Spin up demo app stack, edit a couple of files, watch Jenkins pick up and rebuild
Perform an upgrade to voting app to show rolling upgrade
Show roll back – discuss benefits
Show upgrade to both voting and result app
After check in to git, Jenkins and docker build automated
Nothing stopping having rancher automated too
Every laptop becomes a build system
Representative data is key.
Dockerieze all for dev
Apps as close as possible i.e. version