DevOps with Docker
Geoff Bowers
@modius
Daemon Internet Consultants
September 2015
pipeline
Continuous Delivery
Characterised by frequent, smaller releases.
- Accelerated time to market
- Building it right: customer feedback loop
- Improved productivity and efficiency through automation
- Reliable releases; repeatable deployment process
- Improved product quality; little things are easy to fix
- Improved customer satisfaction
Developers
QA
System Operations
DevOps
culture shock

version control
Easy Branching
- Distributed Version Control System
- GIT or Mercurial
- Devs comfortable with branching
- Repo visible to infrastructure
For example; Git Flow
Versioning Drives Infrastructure Management
developer environments
vagrantup.com
Not Quite Ops
- Model solutions locally
- Windows, OSX, Linux
- Learn how servers are put together
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config variables
VAGRANTFILE_API_VERSION = "2"
WEB_SERVER = "192.168.3.33"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
config.vm.define "web" do |web|
web.ssh.forward_agent = true
web.vm.hostname = "read.bob"
web.vm.network :private_network, ip: WEB_SERVER
web.hostmanager.aliases = %w(app.bob api.bob)
# web.hostmanager.aliases = IO.readlines("provisioning/aliases.txt").collect(&:strip)
config.vm.network "forwarded_port", guest: 80, host: 8080
web.vm.synced_folder "project/", "/opt/www/projects/boxofbooks", mount_options: ["dmode=0777", "fmode=0777"], create: true
web.vm.synced_folder "core/", "/opt/www/core", mount_options: ["dmode=0777", "fmode=0777"], create: true
web.vm.synced_folder "logs/", "/logs", mount_options: ["dmode=0777", "fmode=0777"], create: true
web.vm.provision :shell, :path => "provisioning/ansible-run.sh", :args => "/vagrant/provisioning/vagrant.yml"
web.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024", "--natdnshostresolver1", "on"]
end
end
endProvisioning Services
- Chef Recipies (Ruby)
- Shell scripts
- Ansible Playbooks (Python)
Not to forget... Puppet, Salt, etc
PaaS
Platform as a Service
- Java WAR files; Cloudbees
- Focus on isolating services
- no file system
- no control of web server
- beautiful for horizontal scaling
- brilliant for simple apps
Heroku.com
- Darling of the Rails movement
- Buildpacks; Lucee now available
- Postgres; other options available
Ultimately, our requirements were too complex.
(but i like the look of Heroku for simpler lucee apps)
scriptable servers
Moving Into Ops
- running scripts to build servers
- linux based
- monolithic installs; but still great
- leap to make more complex set ups
Convergence of several strategies to make the next step...

separate
app & infrastructure
12factor.net
Adam Wiggins, Heroku Co-Founder


Isolating Apps
disposable servers
config via environment
microservices route
Treat commodity SaaS solutions as 1st class citizens
AWS OpsWorks




DEV
STAGE
PROD








OpsWorks
- Framework for complex solutions
- Chef as a Service
- Plenty of work to do...
Collossus - the app we built to orchestrate the app.
containers
containerisation



Docker, Docker, Docker!
https://www.docker.com/
with Rocket as a 50:1 long shot
https://coreos.com/blog/rocket/
Why containers?
- takes 20-30 mins to bring up an EC2 instance
- containers can be "versioned"
- testing & code progression options
Why not containers?
- Mesos; Marathon, Zookeeper
- 10 servers for a production environment
- 20 servers for multi AZ
- Landscape changes daily
Watching Amazon ECS, DEIS, Flynn, Tutum, Docker's own ecosystem
tl;dr
Short Version
- version control
- development/test environments with vagrant
- choose a provisioner (eg. Ansible)
- isolate app from infrastructure
- AWS OpsWorks
- containers (everywhere.. soon)
"a journey from release quagmire to continuous deployment nirvana..."
Bog Snorkelling
Thanks.
Geoff Bowers
modius@daemon.com.au
@modius
http://www.daemon.com.au/
devops with docker
By Geoff Bowers
devops with docker
Orchestrating deployments, and managing development pipelines can feel like a maze of infrastructure plumbing. Fear of leaks, or a burst mains leaves the team paralysed, and reluctant to release code as early as possible. Join Geoff Bowers (Daemon Internet Consultants) on a journey from release quagmire to continuous deployment nirvana.
- 811