SlideShare a Scribd company logo
ZERO DOWNTIME DEPLOYMENT WITH ANSIBLE 
OPEN
SLIDES & REPO 
http://steinim.github.io/slides/zero-downtime-ansible 
https://github.com/steinim/zero-downtime-ansible
WHAT'S A PROVISIONING FRAMEWORK? 
Automated setup of servers 
Configuration as code
EXAMPLES 
Create users 
Install software 
Generate and manipulate config files 
Start/stop/restart processes 
Set up dependencies between operations
DESCRIBE WHAT TO DO 
#!/bin/bash 
if $( command -v vim >/dev/null 2>&1 ); then 
echo "vim is already installed." 
else 
apt-get install vim 
fi 
if $( grep -Fxq "filetype indent off" /etc/vim/vimrc ); then 
echo "set filetype indent off is already in /etc/vim/vimrc." 
else 
echo "filetype indent off" >> /etc/vim/vimrc 
# TODO: Do not continue if this fails. 
fi 
# TODO: Rollback if something fails.
DESCRIBE STATE 
- name: ensure installed vim 
apt: pkg=vim state=installed 
- name: set filetype indent off for vim 
lineinfile: 
dest=/etc/vim/vimrc 
line='filetype indent off' 
state=present
ANSIBLE 
SSH-based 
Client only (no server) 
YAML configuration 
Push (and pull) 
Supports more than setup and provisioning: 
Application deployment 
Remote command execution
BRING UP THE BOXES 
vagrant up
LAYOUT 
├── ansible.cfg 
├── hosts 
├── site.yml 
├── group_vars 
│ └── <group name> 
├── host_vars 
│ └── <host name> 
├── roles 
│ ├── <role> 
│ │ ├── files 
│ │ └── <file> 
│ │ └── templates 
│ │ └── <template>.j2 
│ │ ├── handlers 
│ │ │ └── main.yml 
│ │ ├── tasks 
│ │ │ └── main.yml
PLAY! 
ansible-playbook site.yml
FACTS 
Ansible by default gathers “facts” about the machines under 
management. 
These facts can be accessed in Playbooks and in templates. 
ansible -m setup app1.local
THE TASK 
An app user 'devops', with: 
Home directory: /home/devops 
ssh-key 
A PostgresSQL database. 
Nginx as a reverse proxy. 
An init script installed as a service. 
Deploy an application that uses the provisioned infrastructure.
Zero Downtime Deployment with Ansible
HELP! 
http://docs.ansible.com/list_of_all_modules.html
TASK1: INSTALL AND CONFIGURE SOFTWARE 
git checkout start 
Modify roles/common/tasks/apt.yml. 
Install Vim. 
Insert the line 'filetype indent off' in /etc/vim/vimrc 
Help: 
http://docs.ansible.com/apt_module.html 
http://docs.ansible.com/lineinfile_module.html 
git checkout task1_help
TASK1: SOLUTION 
git diff HEAD origin/task1 
git checkout task1 # or keep your own solution 
ansible-playbook site.yml --tags apt,vim 
ProTip: Use '--tags', '--skip-tags', '--limit' and/or 'gather_facts: False' 
to reduce execution time.
PROGRESS 
Installed software 
Manipulated files
VARIABLES 
Ansible uses variables (a lot!). 
Inventory 
group_vars and host_vars 
Playbook 
Facts 
Command line 
Access variables from playbooks: "{{ variable }}" 
http://docs.ansible.com/playbooks_variables.html
TASK2: CREATE AN APPLICATION USER 
Create roles/users/tasks/main.yml 
Home directory: /home/devops 
ssh-key 
Use variables! (group_vars) 
Help: 
http://docs.ansible.com/group_module.html 
http://docs.ansible.com/user_module.html 
http://docs.ansible.com/file_module.html 
(copy ssh-key) 
http://docs.ansible.com/lineinfile_module.html 
(.ssh/authorized_keys) 
http://docs.ansible.com/playbooks_best_practices.html#group-and-host-variables 
git checkout task2_help
TASK2: SOLUTION 
git diff HEAD origin/task2 
git checkout task2 # or keep your own solution 
ansible-playbook site.yml --limit appservers --skip-tags apt,vim,java 
ssh devops@app1.local
PROGRESS 
Installed software 
Manipulated files 
Created a user and set up a ssh-key
TASK3: INSTALL AND CONFIGURE POSTGRESQL 
roles/postgresql 
├── files 
│ ├── ACCC4CF8.asc 
│ └── postgresql.conf 
├── handlers 
│ └── main.yml 
├── tasks 
│ ├── main.yml 
│ └── ... 
└── templates 
└── pg_hba.conf.j2 
Use variables (group_vars/all and/or group_vars/dbservers). 
Use handler to restart postgresql upon notification 
Template: git checkout master -- roles/postgresql/templates/pg_hba.conf.j2 
Help: 
http://docs.ansible.com/template_module.html 
(pg_hba.conf.j2) 
http://docs.ansible.com/postgresql_user_module.html 
http://docs.ansible.com/postgresql_db_module.html 
http://docs.ansible.com/playbooks_intro.html#handlers-running-operations-on-change 
http://docs.ansible.com/playbooks_best_practices.html#group-and-host-variables
TASK3: SOLUTION 
git diff HEAD origin/task3 
git checkout task3 # or keep your own solution 
ansible-playbook site.yml --limit dbservers --tags pg_install 
$ vagrant ssh db 
vagrant@db:~$ psql -d devops -U devops -W 
devops=> q
PROGRESS 
Installed software 
Manipulated files 
Created a user and set up a ssh-key 
Installed and configured a database and a db user
TASK4: DEPLOY! 
roles/app 
├── files 
│ └── init.sh 
├── tasks 
│ └── main.yml 
└── templates 
└── config.properties.j2 
NB! Use variables (./hosts). 
Set 'serial: 1' for appservers in site.yml. 
Help: 
http://docs.ansible.com/service_module.html
TASK4: SOLUTION 
Browse to http://app1.local:1234/ 
git diff HEAD origin/task4 
git checkout task4 # or keep your own solution 
ansible-playbook site.yml --limit appservers --tags deploy
WHAT JUST HAPPENED? 
/home/devops 
├── config.properties 
├── current -> /home/devops/devops_1416228023.jar 
├── previous -> /home/devops/devops_1416221573.jar 
├── devops_1416221573.jar 
├── devops_1416228023.jar 
└── logs 
├── stderr.log 
└── stdout.log 
/etc/init.d 
└── devops
PROGRESS 
Installed software 
Manipulated files 
Created a user and set up a ssh-key 
Installed and configured a database and a db user 
Deployed an application to two appservers and enabled it as a 
service
TASK5: DEPLOY DATABASE 
roles/db 
├── files 
│ └── migrate_db.sql 
└── tasks 
└── main.yml 
Help: 
http://docs.ansible.com/command_module.html 
psql -d {{ db.name }} -q -f /tmp/migrate_db.sql 
sudo_user: postgres
TASK5: SOLUTION 
Browse to http://app1.local:1234/ 
git diff HEAD origin/task5 
git checkout task5 # or keep your own solution 
ansible-playbook site.yml --limit dbservers --tags deploy 
$ vagrant ssh db 
vagrant@db:~$ psql -d devops -U devops -W 
devops=> dt 
devops=> select * from hello; 
devops=> q
PROGRESS 
Installed software 
Manipulated files 
Created a user and set up a ssh-key 
Installed and configured a database and a db user 
Deployed an application to two appservers and enabled it as a 
service 
Migrated the database schema and fetched data from it through the 
application
TASK6: SET UP PROXY 
roles/nginx 
├── handlers 
│ └── main.yml 
├── tasks 
│ ├── config_nginx.yml 
│ ├── install_nginx.yml 
│ └── main.yml 
└── templates 
└── devops.conf.j2 
Help: 
http://wsgiarea.pocoo.org/jinja/docs/loops.html
TASK6: SOLUTION 
Browse to # refresh http://proxy.local/ me many times 
git diff HEAD origin/task6 
git checkout task6 # or keep your own solution 
ansible-playbook site.yml --limit proxies --tags nginx
PROGRESS 
Installed software 
Manipulated files 
Created a user and set up a ssh-key 
Installed and configured a database and a db user 
Deployed an application to two appservers and enabled it as a 
service 
Migrated the database schema and fetched data from it through the 
application 
Set up a reverse proxy for automatic failover between the two 
appservers
THE EXPAND/CONTRACT PATTERN 
Expand Contract 
Add tables 
Add columns 
Tweak indexes 
Remove tables 
Remove columns 
Remove/add constraints
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
PLAY TIME :-) 
Suggestions: 
Change database table name from HELLO to MESSAGES and 
deploy a new version without downtime. 
Implement automated rollback.
I HAVE BEEN PLAYING :-) 
git checkout play 
ansible-playbook site.yml --limit appservers,dbservers --tags deploy 
ansible-playbook site.yml --limit appservers,dbservers --tags rollback
THANK YOU! 
@steinim 
stein.inge.morisbak@BEKK.no
Ad

More Related Content

What's hot (20)

Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點
William Yeh
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
Paolo Tonin
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
Soshi Nemoto
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
Derek Willian Stavis
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Puppet
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Puppet
 
The Challenges of Container Configuration
The Challenges of Container ConfigurationThe Challenges of Container Configuration
The Challenges of Container Configuration
Gareth Rushgrove
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
Soshi Nemoto
 
Frontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the likeFrontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the like
Damien Seguin
 
CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)
Soshi Nemoto
 
Django deployment best practices
Django deployment best practicesDjango deployment best practices
Django deployment best practices
Erik LaBianca
 
Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014
Puppet
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year later
Christian Ortner
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Puppet
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
Ortus Solutions, Corp
 
Zero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google CloudZero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google Cloud
James Heggs
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environment
Soshi Nemoto
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
Antons Kranga
 
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Julian Dunn
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.
Łukasz Proszek
 
Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點
William Yeh
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
Paolo Tonin
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
Soshi Nemoto
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
Derek Willian Stavis
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Puppet
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Puppet
 
The Challenges of Container Configuration
The Challenges of Container ConfigurationThe Challenges of Container Configuration
The Challenges of Container Configuration
Gareth Rushgrove
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
Soshi Nemoto
 
Frontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the likeFrontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the like
Damien Seguin
 
CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)
Soshi Nemoto
 
Django deployment best practices
Django deployment best practicesDjango deployment best practices
Django deployment best practices
Erik LaBianca
 
Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014
Puppet
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year later
Christian Ortner
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Puppet
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
Ortus Solutions, Corp
 
Zero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google CloudZero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google Cloud
James Heggs
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environment
Soshi Nemoto
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
Antons Kranga
 
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Julian Dunn
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.
Łukasz Proszek
 

Viewers also liked (20)

Continuous Delivery and Zero Downtime
Continuous Delivery and Zero DowntimeContinuous Delivery and Zero Downtime
Continuous Delivery and Zero Downtime
Axel Fontaine
 
Moving Towards Zero Downtime
Moving Towards Zero DowntimeMoving Towards Zero Downtime
Moving Towards Zero Downtime
BCM Institute
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE Architectures
Alexander Penev
 
Roadshow presentation 2012
Roadshow presentation 2012Roadshow presentation 2012
Roadshow presentation 2012
bluebuilding
 
Palestraconatedu
PalestraconateduPalestraconatedu
Palestraconatedu
Karine Pinheiro
 
Компьютерные курсы для пожилых людей. Занятия 1 4
Компьютерные курсы для пожилых людей. Занятия 1 4Компьютерные курсы для пожилых людей. Занятия 1 4
Компьютерные курсы для пожилых людей. Занятия 1 4
Ilya Novikov
 
20 Tips to Improve Your Government Career - From Networking to Branding and More
20 Tips to Improve Your Government Career - From Networking to Branding and More20 Tips to Improve Your Government Career - From Networking to Branding and More
20 Tips to Improve Your Government Career - From Networking to Branding and More
Steve Ressler
 
Presentation Pablo Ruiz Bangkok 2012
Presentation Pablo Ruiz Bangkok 2012Presentation Pablo Ruiz Bangkok 2012
Presentation Pablo Ruiz Bangkok 2012
Pablo Ruiz Amo
 
The new new new thing
The new new new thingThe new new new thing
The new new new thing
Simon Jones
 
How to Build the Perfect LinkedIn Profile
How to Build the Perfect LinkedIn ProfileHow to Build the Perfect LinkedIn Profile
How to Build the Perfect LinkedIn Profile
Cara Barone
 
Zombie Lead Hunter Webinar: How to immunize your lead management from zombie ...
Zombie Lead Hunter Webinar: How to immunize your lead management from zombie ...Zombie Lead Hunter Webinar: How to immunize your lead management from zombie ...
Zombie Lead Hunter Webinar: How to immunize your lead management from zombie ...
MarketStar Corp
 
Projeto prnto para o blog
Projeto prnto para o blogProjeto prnto para o blog
Projeto prnto para o blog
Diego Mendes
 
Emeief prof
Emeief profEmeief prof
Emeief prof
Diego Mendes
 
Acre test and catholic schools
Acre test and catholic schoolsAcre test and catholic schools
Acre test and catholic schools
marmartin6
 
Présentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Présentation Gradle au LyonJUG par Grégory Boissinot - ZenikaPrésentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Présentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Zenika
 
Lousa Digital
Lousa DigitalLousa Digital
Lousa Digital
Diego Mendes
 
06 mark hindmarsh csl guidance.ppt
06  mark hindmarsh csl guidance.ppt06  mark hindmarsh csl guidance.ppt
06 mark hindmarsh csl guidance.ppt
bluebuilding
 
20091109 EC Gaal Broadcasting Tvi
20091109 EC Gaal Broadcasting Tvi20091109 EC Gaal Broadcasting Tvi
20091109 EC Gaal Broadcasting Tvi
gaalnorb
 
fisiogramas
fisiogramasfisiogramas
fisiogramas
mulanci
 
Continuous Delivery and Zero Downtime
Continuous Delivery and Zero DowntimeContinuous Delivery and Zero Downtime
Continuous Delivery and Zero Downtime
Axel Fontaine
 
Moving Towards Zero Downtime
Moving Towards Zero DowntimeMoving Towards Zero Downtime
Moving Towards Zero Downtime
BCM Institute
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE Architectures
Alexander Penev
 
Roadshow presentation 2012
Roadshow presentation 2012Roadshow presentation 2012
Roadshow presentation 2012
bluebuilding
 
Компьютерные курсы для пожилых людей. Занятия 1 4
Компьютерные курсы для пожилых людей. Занятия 1 4Компьютерные курсы для пожилых людей. Занятия 1 4
Компьютерные курсы для пожилых людей. Занятия 1 4
Ilya Novikov
 
20 Tips to Improve Your Government Career - From Networking to Branding and More
20 Tips to Improve Your Government Career - From Networking to Branding and More20 Tips to Improve Your Government Career - From Networking to Branding and More
20 Tips to Improve Your Government Career - From Networking to Branding and More
Steve Ressler
 
Presentation Pablo Ruiz Bangkok 2012
Presentation Pablo Ruiz Bangkok 2012Presentation Pablo Ruiz Bangkok 2012
Presentation Pablo Ruiz Bangkok 2012
Pablo Ruiz Amo
 
The new new new thing
The new new new thingThe new new new thing
The new new new thing
Simon Jones
 
How to Build the Perfect LinkedIn Profile
How to Build the Perfect LinkedIn ProfileHow to Build the Perfect LinkedIn Profile
How to Build the Perfect LinkedIn Profile
Cara Barone
 
Zombie Lead Hunter Webinar: How to immunize your lead management from zombie ...
Zombie Lead Hunter Webinar: How to immunize your lead management from zombie ...Zombie Lead Hunter Webinar: How to immunize your lead management from zombie ...
Zombie Lead Hunter Webinar: How to immunize your lead management from zombie ...
MarketStar Corp
 
Projeto prnto para o blog
Projeto prnto para o blogProjeto prnto para o blog
Projeto prnto para o blog
Diego Mendes
 
Acre test and catholic schools
Acre test and catholic schoolsAcre test and catholic schools
Acre test and catholic schools
marmartin6
 
Présentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Présentation Gradle au LyonJUG par Grégory Boissinot - ZenikaPrésentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Présentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Zenika
 
06 mark hindmarsh csl guidance.ppt
06  mark hindmarsh csl guidance.ppt06  mark hindmarsh csl guidance.ppt
06 mark hindmarsh csl guidance.ppt
bluebuilding
 
20091109 EC Gaal Broadcasting Tvi
20091109 EC Gaal Broadcasting Tvi20091109 EC Gaal Broadcasting Tvi
20091109 EC Gaal Broadcasting Tvi
gaalnorb
 
fisiogramas
fisiogramasfisiogramas
fisiogramas
mulanci
 
Ad

Similar to Zero Downtime Deployment with Ansible (20)

Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
Sylvain Rayé
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Dana Luther
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
Омские ИТ-субботники
 
One click deployment
One click deploymentOne click deployment
One click deployment
Alex Su
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
Dana Luther
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
Cédric Delgehier
 
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
Ivelina Dimova
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
DrupalDay
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Leo Lorieri
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
Subhas Kumar Ghosh
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
Salesforce Developers
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
kmsa
 
Oracle11g on fedora14
Oracle11g on fedora14Oracle11g on fedora14
Oracle11g on fedora14
Khalid Matar Albuflasah
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
Pablo Godel
 
Workshop 3: JavaScript build tools
Workshop 3: JavaScript build toolsWorkshop 3: JavaScript build tools
Workshop 3: JavaScript build tools
Visual Engineering
 
Chef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureChef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructure
Michaël Lopez
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
adrian_nye
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
家榮 吳
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Aleksey Tkachenko
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
Soshi Nemoto
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
Sylvain Rayé
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Dana Luther
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
Омские ИТ-субботники
 
One click deployment
One click deploymentOne click deployment
One click deployment
Alex Su
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
Dana Luther
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
Cédric Delgehier
 
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
Ivelina Dimova
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
DrupalDay
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Leo Lorieri
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
Subhas Kumar Ghosh
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
Salesforce Developers
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
kmsa
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
Pablo Godel
 
Workshop 3: JavaScript build tools
Workshop 3: JavaScript build toolsWorkshop 3: JavaScript build tools
Workshop 3: JavaScript build tools
Visual Engineering
 
Chef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureChef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructure
Michaël Lopez
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
adrian_nye
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
家榮 吳
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Aleksey Tkachenko
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
Soshi Nemoto
 
Ad

More from Stein Inge Morisbak (10)

Orkestrering av IT-utvikling i Store Organisasjoner
Orkestrering av IT-utvikling i Store OrganisasjonerOrkestrering av IT-utvikling i Store Organisasjoner
Orkestrering av IT-utvikling i Store Organisasjoner
Stein Inge Morisbak
 
Slutt med IT-prosjekter!
Slutt med IT-prosjekter!Slutt med IT-prosjekter!
Slutt med IT-prosjekter!
Stein Inge Morisbak
 
Devops or die!
Devops or die!Devops or die!
Devops or die!
Stein Inge Morisbak
 
Devops eller dø!
Devops eller dø!Devops eller dø!
Devops eller dø!
Stein Inge Morisbak
 
Verdien av kontinuerlige leveranser
Verdien av kontinuerlige leveranserVerdien av kontinuerlige leveranser
Verdien av kontinuerlige leveranser
Stein Inge Morisbak
 
Du kan ikke levere kontinuerlig om du har nedetid
Du kan ikke levere kontinuerlig om du har nedetidDu kan ikke levere kontinuerlig om du har nedetid
Du kan ikke levere kontinuerlig om du har nedetid
Stein Inge Morisbak
 
Er du moden for å levere kontinuerlig?
Er du moden for å levere kontinuerlig?Er du moden for å levere kontinuerlig?
Er du moden for å levere kontinuerlig?
Stein Inge Morisbak
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
Stein Inge Morisbak
 
Hvis du ikke leverer kontinuerlig, så er du ikke smidig!
Hvis du ikke leverer kontinuerlig, så er du ikke smidig!Hvis du ikke leverer kontinuerlig, så er du ikke smidig!
Hvis du ikke leverer kontinuerlig, så er du ikke smidig!
Stein Inge Morisbak
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
Stein Inge Morisbak
 
Orkestrering av IT-utvikling i Store Organisasjoner
Orkestrering av IT-utvikling i Store OrganisasjonerOrkestrering av IT-utvikling i Store Organisasjoner
Orkestrering av IT-utvikling i Store Organisasjoner
Stein Inge Morisbak
 
Verdien av kontinuerlige leveranser
Verdien av kontinuerlige leveranserVerdien av kontinuerlige leveranser
Verdien av kontinuerlige leveranser
Stein Inge Morisbak
 
Du kan ikke levere kontinuerlig om du har nedetid
Du kan ikke levere kontinuerlig om du har nedetidDu kan ikke levere kontinuerlig om du har nedetid
Du kan ikke levere kontinuerlig om du har nedetid
Stein Inge Morisbak
 
Er du moden for å levere kontinuerlig?
Er du moden for å levere kontinuerlig?Er du moden for å levere kontinuerlig?
Er du moden for å levere kontinuerlig?
Stein Inge Morisbak
 
Hvis du ikke leverer kontinuerlig, så er du ikke smidig!
Hvis du ikke leverer kontinuerlig, så er du ikke smidig!Hvis du ikke leverer kontinuerlig, så er du ikke smidig!
Hvis du ikke leverer kontinuerlig, så er du ikke smidig!
Stein Inge Morisbak
 

Recently uploaded (20)

EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 

Zero Downtime Deployment with Ansible

  • 1. ZERO DOWNTIME DEPLOYMENT WITH ANSIBLE OPEN
  • 2. SLIDES & REPO http://steinim.github.io/slides/zero-downtime-ansible https://github.com/steinim/zero-downtime-ansible
  • 3. WHAT'S A PROVISIONING FRAMEWORK? Automated setup of servers Configuration as code
  • 4. EXAMPLES Create users Install software Generate and manipulate config files Start/stop/restart processes Set up dependencies between operations
  • 5. DESCRIBE WHAT TO DO #!/bin/bash if $( command -v vim >/dev/null 2>&1 ); then echo "vim is already installed." else apt-get install vim fi if $( grep -Fxq "filetype indent off" /etc/vim/vimrc ); then echo "set filetype indent off is already in /etc/vim/vimrc." else echo "filetype indent off" >> /etc/vim/vimrc # TODO: Do not continue if this fails. fi # TODO: Rollback if something fails.
  • 6. DESCRIBE STATE - name: ensure installed vim apt: pkg=vim state=installed - name: set filetype indent off for vim lineinfile: dest=/etc/vim/vimrc line='filetype indent off' state=present
  • 7. ANSIBLE SSH-based Client only (no server) YAML configuration Push (and pull) Supports more than setup and provisioning: Application deployment Remote command execution
  • 8. BRING UP THE BOXES vagrant up
  • 9. LAYOUT ├── ansible.cfg ├── hosts ├── site.yml ├── group_vars │ └── <group name> ├── host_vars │ └── <host name> ├── roles │ ├── <role> │ │ ├── files │ │ └── <file> │ │ └── templates │ │ └── <template>.j2 │ │ ├── handlers │ │ │ └── main.yml │ │ ├── tasks │ │ │ └── main.yml
  • 11. FACTS Ansible by default gathers “facts” about the machines under management. These facts can be accessed in Playbooks and in templates. ansible -m setup app1.local
  • 12. THE TASK An app user 'devops', with: Home directory: /home/devops ssh-key A PostgresSQL database. Nginx as a reverse proxy. An init script installed as a service. Deploy an application that uses the provisioned infrastructure.
  • 15. TASK1: INSTALL AND CONFIGURE SOFTWARE git checkout start Modify roles/common/tasks/apt.yml. Install Vim. Insert the line 'filetype indent off' in /etc/vim/vimrc Help: http://docs.ansible.com/apt_module.html http://docs.ansible.com/lineinfile_module.html git checkout task1_help
  • 16. TASK1: SOLUTION git diff HEAD origin/task1 git checkout task1 # or keep your own solution ansible-playbook site.yml --tags apt,vim ProTip: Use '--tags', '--skip-tags', '--limit' and/or 'gather_facts: False' to reduce execution time.
  • 17. PROGRESS Installed software Manipulated files
  • 18. VARIABLES Ansible uses variables (a lot!). Inventory group_vars and host_vars Playbook Facts Command line Access variables from playbooks: "{{ variable }}" http://docs.ansible.com/playbooks_variables.html
  • 19. TASK2: CREATE AN APPLICATION USER Create roles/users/tasks/main.yml Home directory: /home/devops ssh-key Use variables! (group_vars) Help: http://docs.ansible.com/group_module.html http://docs.ansible.com/user_module.html http://docs.ansible.com/file_module.html (copy ssh-key) http://docs.ansible.com/lineinfile_module.html (.ssh/authorized_keys) http://docs.ansible.com/playbooks_best_practices.html#group-and-host-variables git checkout task2_help
  • 20. TASK2: SOLUTION git diff HEAD origin/task2 git checkout task2 # or keep your own solution ansible-playbook site.yml --limit appservers --skip-tags apt,vim,java ssh [email protected]
  • 21. PROGRESS Installed software Manipulated files Created a user and set up a ssh-key
  • 22. TASK3: INSTALL AND CONFIGURE POSTGRESQL roles/postgresql ├── files │ ├── ACCC4CF8.asc │ └── postgresql.conf ├── handlers │ └── main.yml ├── tasks │ ├── main.yml │ └── ... └── templates └── pg_hba.conf.j2 Use variables (group_vars/all and/or group_vars/dbservers). Use handler to restart postgresql upon notification Template: git checkout master -- roles/postgresql/templates/pg_hba.conf.j2 Help: http://docs.ansible.com/template_module.html (pg_hba.conf.j2) http://docs.ansible.com/postgresql_user_module.html http://docs.ansible.com/postgresql_db_module.html http://docs.ansible.com/playbooks_intro.html#handlers-running-operations-on-change http://docs.ansible.com/playbooks_best_practices.html#group-and-host-variables
  • 23. TASK3: SOLUTION git diff HEAD origin/task3 git checkout task3 # or keep your own solution ansible-playbook site.yml --limit dbservers --tags pg_install $ vagrant ssh db vagrant@db:~$ psql -d devops -U devops -W devops=> q
  • 24. PROGRESS Installed software Manipulated files Created a user and set up a ssh-key Installed and configured a database and a db user
  • 25. TASK4: DEPLOY! roles/app ├── files │ └── init.sh ├── tasks │ └── main.yml └── templates └── config.properties.j2 NB! Use variables (./hosts). Set 'serial: 1' for appservers in site.yml. Help: http://docs.ansible.com/service_module.html
  • 26. TASK4: SOLUTION Browse to http://app1.local:1234/ git diff HEAD origin/task4 git checkout task4 # or keep your own solution ansible-playbook site.yml --limit appservers --tags deploy
  • 27. WHAT JUST HAPPENED? /home/devops ├── config.properties ├── current -> /home/devops/devops_1416228023.jar ├── previous -> /home/devops/devops_1416221573.jar ├── devops_1416221573.jar ├── devops_1416228023.jar └── logs ├── stderr.log └── stdout.log /etc/init.d └── devops
  • 28. PROGRESS Installed software Manipulated files Created a user and set up a ssh-key Installed and configured a database and a db user Deployed an application to two appservers and enabled it as a service
  • 29. TASK5: DEPLOY DATABASE roles/db ├── files │ └── migrate_db.sql └── tasks └── main.yml Help: http://docs.ansible.com/command_module.html psql -d {{ db.name }} -q -f /tmp/migrate_db.sql sudo_user: postgres
  • 30. TASK5: SOLUTION Browse to http://app1.local:1234/ git diff HEAD origin/task5 git checkout task5 # or keep your own solution ansible-playbook site.yml --limit dbservers --tags deploy $ vagrant ssh db vagrant@db:~$ psql -d devops -U devops -W devops=> dt devops=> select * from hello; devops=> q
  • 31. PROGRESS Installed software Manipulated files Created a user and set up a ssh-key Installed and configured a database and a db user Deployed an application to two appservers and enabled it as a service Migrated the database schema and fetched data from it through the application
  • 32. TASK6: SET UP PROXY roles/nginx ├── handlers │ └── main.yml ├── tasks │ ├── config_nginx.yml │ ├── install_nginx.yml │ └── main.yml └── templates └── devops.conf.j2 Help: http://wsgiarea.pocoo.org/jinja/docs/loops.html
  • 33. TASK6: SOLUTION Browse to # refresh http://proxy.local/ me many times git diff HEAD origin/task6 git checkout task6 # or keep your own solution ansible-playbook site.yml --limit proxies --tags nginx
  • 34. PROGRESS Installed software Manipulated files Created a user and set up a ssh-key Installed and configured a database and a db user Deployed an application to two appservers and enabled it as a service Migrated the database schema and fetched data from it through the application Set up a reverse proxy for automatic failover between the two appservers
  • 35. THE EXPAND/CONTRACT PATTERN Expand Contract Add tables Add columns Tweak indexes Remove tables Remove columns Remove/add constraints
  • 42. PLAY TIME :-) Suggestions: Change database table name from HELLO to MESSAGES and deploy a new version without downtime. Implement automated rollback.
  • 43. I HAVE BEEN PLAYING :-) git checkout play ansible-playbook site.yml --limit appservers,dbservers --tags deploy ansible-playbook site.yml --limit appservers,dbservers --tags rollback