10
Developer Workflow using Docker Aater Suleman, Flux7 Labs Docker Austin Meetup - March 13, 2014

Docker Dev Work flow - Docker Austin Meetup

  • Upload
    flux7

  • View
    106

  • Download
    1

Embed Size (px)

DESCRIPTION

Flux7's implementation of developer workflows using Docker in conjunction with Chef.

Citation preview

Page 1: Docker Dev Work flow - Docker Austin Meetup

Developer Workflow using Docker

Aater Suleman, Flux7 Labs

Docker Austin Meetup - March 13, 2014

Page 2: Docker Dev Work flow - Docker Austin Meetup

ApplicationsVyScale -- python flask + MySQL

flux7.com -- php +MySQL

client1 -- python + Cassandra (multi-tenant)

client2 -- Ruby on Rails + MySQL + Redis

Page 3: Docker Dev Work flow - Docker Austin Meetup

Web App

DB

LogStashMem$

HTTP

SSH

Vbox

App Code

Laptop

Scripts for convenience

Docker Registry in

AWS or Docker.com

Dev edits code in their favorite editor

Page 4: Docker Dev Work flow - Docker Austin Meetup

New Hire/New laptop Install Vagrant

git pull <code repository>

devenv setup

devenv start

Behind the scenes: 1. Download the Vbox image2. Run VM to share a folder + expose the ports + static IP 3. Build containers4. Start containers in the right order and exposing the right ports (DB ??)5. Copy log volumes in the /vagrant/log folder6. Setup /etc/hosts to point to the VM7. Print URL to access the application

Page 5: Docker Dev Work flow - Docker Austin Meetup

Debug flowEdit code (in the editor of your choice, be able to use all your aliases and commands)

// Restart the server (can be automated using unicorn)devenv load

// check the logs in top/logs folder

Page 6: Docker Dev Work flow - Docker Austin Meetup

Code commit devenv commit -t <tag> ← for debugging later

git push

Behind the scenes:

1. Commit all docker containers

2. Save versions for future use

Page 7: Docker Dev Work flow - Docker Austin Meetup

QAJenkins polls the repo for pushes

Uses the same script to run the tests using containers

Page 8: Docker Dev Work flow - Docker Austin Meetup

Code delivery Existing containers are destroyed (can be better)

New containers are built and started

Page 9: Docker Dev Work flow - Docker Austin Meetup

Chef recipe update devenv rebuilddevenv push

Behind the scenes:

1. create new containers by running chef recipes

2. commit contains to the master registry

Page 10: Docker Dev Work flow - Docker Austin Meetup

Add/remove a service/tierChange devenv script