Upload
flux7
View
106
Download
1
Embed Size (px)
DESCRIPTION
Flux7's implementation of developer workflows using Docker in conjunction with Chef.
Citation preview
Developer Workflow using Docker
Aater Suleman, Flux7 Labs
Docker Austin Meetup - March 13, 2014
ApplicationsVyScale -- python flask + MySQL
flux7.com -- php +MySQL
client1 -- python + Cassandra (multi-tenant)
client2 -- Ruby on Rails + MySQL + Redis
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
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
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
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
QAJenkins polls the repo for pushes
Uses the same script to run the tests using containers
Code delivery Existing containers are destroyed (can be better)
New containers are built and started
Chef recipe update devenv rebuilddevenv push
Behind the scenes:
1. create new containers by running chef recipes
2. commit contains to the master registry
Add/remove a service/tierChange devenv script