Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Deploy Web Apps with Docker
1. How to Deploy Web Apps with Docker
Daniël van Gils / Developer Advocate
daniel@cloud66.com
@foldingbeauty
2. I like to build stuff
Tinkering with tech
Create great UX
3. agenda
• Introduction + setting up development machine - 30’
• Hands-on ‘dev-x’ session - 30’
• Comfort break - 10’
• Docker in production using Cloud 66 - 10’
• Hands-on ‘x-ops’ session - 45’
• Wrap-up & Q+A - 10’
4. housekeeping notes
For the workshop, you’ll need:
• A laptop or pair-workshopping
• Your Github login
• Your Cloud 66 account
• A DigitalOcean account
(Please use Promo Code: CLOUD66, to receive a $10 Credit)
Toilets around the counter left and take a right ;-)
11. setting up the your
development machine in
the cloud
• Steps 1 - 7 (building takes 10 minutes)
12. Step1:
create DigitalOcean account
go to https://cloud.digitalocean.com/registrations/new
and create a new account
Please use Promo Code: CLOUD66, to receive a $10 Credit.
13. Step 2:
create Cloud 66 account
go to https://app.cloud66.com/users/sign_up
and create a new account
14. Step 3:
create a remote
development machine
go to https://cloud.digitalocean.com/droplets/new
use the One-click App tab
choose Docker 1.10.3 on 14:04
choose size $40/month
region London
press create
you’ll get the login information mailed to you
15. Step 4:
log into development
machine
ssh to your new server
open terminal
use the password in the DigitalOcean email
you will be asked to change your password
$ssh root@<your ip>
17. Step 6:
fork the bakery example
and pull the code
go to Github.com
fork https://github.com/cloud66-samples/microservices_101
create a a home-directory for the app
pull the code
$mkdir /home/app
$cd /home/app
$git clone https://github.com/<your github account>/microservices_101
18.
go to the bakery/bricksandmortar folder
and change the IP address (of your new server) of the API to be used
Step 6½:
change the ip
$vi /home/app/microservices_101/bakery/bricksandmortar/Dockerfile.development
ENV COUNTER_ADDRESS <your ip address>:8000
19. Step 7:
build all the images
$ cd /home/app/microservices_101/bakery
go to the bakery folder
build all the images (takes approx. 10 minutes)
$docker-compose build
22. Who we Are?
• Founded in 2011
• Specialist in DevOps-as-a-Service
• Help developers build, deploy & manage apps
• Any server and any cloud provider of choice
• A single, integrated toolkit (UI and CLI)
• 7k developers, 8k companies, 4k apps, 78 data centres
2 products:
Cloud 66 for Docker + Cloud 66 for Rails
23. Cloud 66 for Docker
in production
• Running Docker in production for customers since Jan 2015
• Cloud 66 for Docker used by >500 companies
• 870 Docker production servers
• 1,176 Docker production stacks
24. is Docker in
production hard?
security
monitoring
datasources
backups
storage
orchestration
scaling
clustering
automation
service discovery
25.
26.
27.
28. note
• We use service.yml (looks like docker-compose.yml) to tell which
services need to be running on our Docker cluster.
• We have a tool called starter to ‘containerize’ existing codebases or use
the bakery example as a starting point.
• http://help.cloud66.com/building-your-stack/cloud-66-starter
29. wrap-up
• Thanks for your attention
• And thanks to Digital Ocean for sponsoring some CPU power
• And thanks to WeWork for the nice workshop space
• Any questions?
• Don’t forget about your running servers ;-)