SlideShare a Scribd company logo
1 of 60
Roman R.
About me
- Software Engineer at EPAM
- @co-organizer Lviv GDG
- @founder 2enota
Roman Rodomansky
itspoma@gmail.com
github.com/itspoma
skype: roman.rodomanskyy
linkedin.com/in/rodomansky
1) Ansible overview
2) Ansible architecture and concepts
3) What is deploy?
4) Deploying Symfony2 app with Ansible
Agenda
- python-powered redically simple IT automation tool
- is optimized for easy automation, review, editing, &
auditability
- free, open source
- simply
- clear (anyone)
- fast (to learn, to setup)
- complete (modules)
- efficient (runs on OpenSSH)
- secure (without agents)
What is Ansible?
- configuration management
- application deployment
- multi-tier orchestration
- cloud provisioning
For what Ansible?
- agentless architecture
- management over SSH (no custom PKI-SSH-based, no
external databases, no daemons, does not leave
software installed)
- developer friendly (configuration as data, not code)
- batteries-included (usefull modules)
- dead simple
- release cycles are usually about two months long
Ansible features
Who uses Ansible?
Who uses Ansible?
20.01.2014
- fabric (python library)
- capistrano (capifony)
- puppet
- chef
- saltstack
- idephix, magellanes,
deployer, rocketeer (php)
Other tools
- required Python 2.6
- or Python 2.5 (with additional paramiko, PyYAML,
python-jinja2 and httplib2 modules)
- Windows isn’t supported for the control machine
(starting with 1.8 will be fully support Windows)
- includes Red Hat, Debian, CentOS, OS X, any of the
BSDs, and so on
Control Machine Requirements
- Python 2.4 or later
- if Python 2.5, then with python-simplejson modules
- ansible_python_interpreter to point at your 2.x
Python
- starting in version 1.7, ansible contains support for
managing windows machines
Managed Node Requirements
- 1.9-dev “Dancing In the Street”
- 1.8 “You Really Got Me” Nov 26, 2014
- new Jinja2 filters, fixed a log of modules bugs, new
system, variables, new modules, docker support,
etc
- 1.7 “Summer Nights” Sep 24, 2014
Versions
Ansible Galaxy
Ansible Tower
Ansible Tower
- from git
- from os packages (recommend If you are
wishing to run the latest released version)
- from pip (recommended to use Python
package manager for other cases)
Install & Configure
- Paramiko (python ssh module)
- SSH (OpenSSH)
- local
Connection types
Ansible architecture
[web]
webserver-1.example.com
webserver-2.example.com
[db]
dbserver-1.example.com
Host Inventory: Basics
[web]
webserver-[01:25].example.com
webserver-2.example.com
[db]
dbserver-[a:f].example.com
Host Inventory: Ranges
[all:children]
all-local
all-stage
[all-local:children]
web-local
db-local
[all-stage:children]
web-stage
db-stage
Host Inventory: child groups
[web-stage:children]
web-stage-testing
web-stage-production
[db-stage:children]
db-stage-testing
db-stage-production
[web-stage-testing]
testing-red
[web-stage-production]
production
[web-local]
vagrant
[db-local]
vagrant
non standart SSH-ports:
webserver-3.example.com:2222
SSH tunnel:
myhost ansible_ssh_port=5555
ansible_ssh_host=192.168.0.1
Host Inventory: More
ansible <host-pattern> [options]
vm$ cd demo1/
vm$ ansible all -m ping
vm$ ansible all -m setup
vm$ ansible all -a "grep -c processor /proc/cpuinfo"
vm$ ansible all -a "uptime"
vm$ ansible all -a "uptime" -f 10
Demo
- playbooks
- plays
- tasks and handlers
- modules
- variables
Ansible concepts
playbooks contains plays
plays contains tasks
tasks contains modules
handels can be triggered by tasks,
and will run at the end, once
Playbooks
a tasks calls a module,
and may have parameters
Tasks
Modules
May 2013 - 72, October 2014 - 175,
February 2015 - 1933 modules on Galaxy
Modules list
- package management: yum, apt
- remove execution: command, shell
- service management: service
- file handling: copy, template
- scm: git, subversion
Modules examples
- monitoring: monit, nagios, haproxy, etc
- development: jenkins, drush, solr, scala,
maven, etc
- web: Varnish, apache, composer, tomcat,
symfony2, etc
- networking: tor, RabbitMQ, iptables, etc
- cloud: stash-docker, OpenStack, etc
Modules examples #2
Module: copy and template
Module: apt and yum
Simple playbook
- playbooks
- inventory (group vars, host vars)
- command line (ansible-playbook -e
“uservar=vagrant”)
- discovered variables (facts)
Variables
Ansible Directory Structure
ls demo2-*/
ls demo3-*/
Demo
Variables
Facts
- discovered variables about systems
- ansible -m setup <hostname>
Using facts
Variables (example of group-var)
Variables (example of host-vars)
- project organization tool
- reusable components
- defined filesystem structure
- show: parameterized roles
Roles
Roles
- failed_when
- changed_when
- until
- ignore_errors
- {{ lookup(‘file’, ‘test.pub’) }}
- etc
Advanced playbook features
Usage: ansible-vault
[create|decrypt|edit|encrypt|rekey|view] [--help]
[options] file_name
Ansible vault
App deploy strategies
- basic file transfer (via ftp/scp)
- using Source Control
- using Build Scripts and other Tools
http://symfony.com/doc/current/cookbook/deployment/tools.html
1) Upload your modified code
2) Update your vendor dependencies (composer)
3) Running database migrations
4) Updated assetic assets
5) Clearing your cache
6) Other things
Symfony deployment
Symfony deployment
$ git pull
$ php composer.phar install
$ php app/console doctrine:migration:migrate --no-iteraction
$ php app/console assets:install web --symlink
$ php app/console assets:dump --env=prod
$ php app/console cache:clear
Directory structure
1) Upload your modified code
- name: Pull sources from the repository.
git: repo={{repo}} dest={{dest}} version={{branch}}
when: project_deploy_strategy == “git”
module “synchronize” for rsync
Symfony deployment
2) Update your vendor dependencies (composer)
- name: Install composer
get_url: url=https://getcomposer.org/composer.phar
dest={{project_root}}/composer.phar mode=0755 validate_certs=no
- name: Run composer install
shell: cd {{project_root}}/releases/{{release}} && {{path}}
{{project_root}}/composer.phar install {{project_composer_opts}}
Symfony deployment
3) Running database migrations
- name: Run migrations
shell: cd {{project_root}}/releases/{{release}}
&& if $(grep doctrine-migrations-bundle composer.json);
then {{symfony2_project_php_path}} app/console
doctrine:migrations:migrate -n; fi
Symfony deployment
4) Updated assetic assets
- name: Dump assets
shell: cd {{project_root}}/releases/{{release}} &&
{{symfony2_project_php_path}} app/console
assetic:dump --env={{symfony2_project_env}}
{{symfony2_project_console_opts}}
Symfony deployment
5) Clearing your cache
- name: Clear cache
shell: cd {{project_root}}/releases/{{release}} &&
{{symfony2_project_php_path}} app/console
cache:clear --env={{symfony2_project_env}}
Symfony deployment
less than 50 lines of “code”
less than 10 tasks
less than 5 variables
Complicated?
Easy way
https://galaxy.ansible.com/list#/roles/639
https://github.com/servergrove/ansible-symfony2
active release: "A-OK" ➙ failure deploying "APP" ➙
rollback ➙ active release: "A-OK"
active release: "A-OK" ➙ deploying "BORKED" ➙ fail
Deployment rollback
https://github.com/itspoma/epam-symfony2-ansible
https://galaxy.ansible.com/
Roman R.
Resources
Thanks!
- name: questions?
copy: src=audience
desc=narrator

More Related Content

What's hot

Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點William Yeh
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 
CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지충섭 김
 
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and ChefScaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chefbridgetkromhout
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)Ruoshi Ling
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Michele Orselli
 
Using docker to develop NAS applications
Using docker to develop NAS applicationsUsing docker to develop NAS applications
Using docker to develop NAS applicationsTerry Chen
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionRemotty
 
Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeDanielle Madeley
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with AugeasPuppet
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境謝 宗穎
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeSoshi Nemoto
 
Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practicesBas Meijer
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesLarry Cai
 
이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructure이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructureDaegwon Kim
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013Tomas Doran
 

What's hot (20)

Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지
 
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and ChefScaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Using docker to develop NAS applications
Using docker to develop NAS applicationsUsing docker to develop NAS applications
Using docker to develop NAS applications
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in Action
 
Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and code
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
 
Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practices
 
Docker toolbox
Docker toolboxDocker toolbox
Docker toolbox
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
 
이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructure이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructure
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013
 

Viewers also liked

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014D
 
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...Alexey Petrov
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony Roel Sint
 
Netflix Velocity Conference 2011
Netflix Velocity Conference 2011Netflix Velocity Conference 2011
Netflix Velocity Conference 2011Adrian Cockcroft
 
Database migration with flyway
Database migration  with flywayDatabase migration  with flyway
Database migration with flywayJonathan Holloway
 
AnsibleによるHWプロビジョニング -OneViewの連携-
AnsibleによるHWプロビジョニング  -OneViewの連携-AnsibleによるHWプロビジョニング  -OneViewの連携-
AnsibleによるHWプロビジョニング -OneViewの連携-Takahiro Kida
 
HP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsibleHP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsiblePatrick Galbraith
 
Jenkins and ansible reference
Jenkins and ansible referenceJenkins and ansible reference
Jenkins and ansible referencelaonap166
 
Ansibleで味わうHelion OpenStack
Ansibleで味わうHelion OpenStackAnsibleで味わうHelion OpenStack
Ansibleで味わうHelion OpenStackMasataka Tsukamoto
 
Icinga 2010 at OSMC
Icinga 2010 at OSMCIcinga 2010 at OSMC
Icinga 2010 at OSMCIcinga
 
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrateToshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrateIcinga
 
Automation with Ansible and Containers
Automation with Ansible and ContainersAutomation with Ansible and Containers
Automation with Ansible and ContainersRodolfo Carvalho
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Arun prasath
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with AnsibleMartin Etmajer
 
Mutation testing in php with Humbug
Mutation testing in php with HumbugMutation testing in php with Humbug
Mutation testing in php with Humbugmarkredeman
 

Viewers also liked (20)

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony
 
Ansible
AnsibleAnsible
Ansible
 
Ansible 2.0
Ansible 2.0Ansible 2.0
Ansible 2.0
 
Netflix Velocity Conference 2011
Netflix Velocity Conference 2011Netflix Velocity Conference 2011
Netflix Velocity Conference 2011
 
Database migration with flyway
Database migration  with flywayDatabase migration  with flyway
Database migration with flyway
 
Database migration
Database migrationDatabase migration
Database migration
 
AnsibleによるHWプロビジョニング -OneViewの連携-
AnsibleによるHWプロビジョニング  -OneViewの連携-AnsibleによるHWプロビジョニング  -OneViewの連携-
AnsibleによるHWプロビジョニング -OneViewの連携-
 
HP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsibleHP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and Ansible
 
Jenkins and ansible reference
Jenkins and ansible referenceJenkins and ansible reference
Jenkins and ansible reference
 
Ansibleで味わうHelion OpenStack
Ansibleで味わうHelion OpenStackAnsibleで味わうHelion OpenStack
Ansibleで味わうHelion OpenStack
 
Icinga 2010 at OSMC
Icinga 2010 at OSMCIcinga 2010 at OSMC
Icinga 2010 at OSMC
 
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrateToshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
Toshaan Bharvani – Icinga2 and Ansible, how to manage and migrate
 
Automation with Ansible and Containers
Automation with Ansible and ContainersAutomation with Ansible and Containers
Automation with Ansible and Containers
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
Mutation testing in php with Humbug
Mutation testing in php with HumbugMutation testing in php with Humbug
Mutation testing in php with Humbug
 
Event storming recipes
Event storming recipesEvent storming recipes
Event storming recipes
 

Similar to Deploy Symfony Apps with Ansible

Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Alex S
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop AutomationRui Lapa
 
KubeCon 2017: Kubernetes from Dev to Prod
KubeCon 2017: Kubernetes from Dev to ProdKubeCon 2017: Kubernetes from Dev to Prod
KubeCon 2017: Kubernetes from Dev to ProdSubhas Dandapani
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopVivek Krishnakumar
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Alex S
 
Fabric - a server management tool from Instagram
Fabric - a server management tool from InstagramFabric - a server management tool from Instagram
Fabric - a server management tool from InstagramJay Ren
 
Bhushan m dev_ops_engr_aws
Bhushan m dev_ops_engr_awsBhushan m dev_ops_engr_aws
Bhushan m dev_ops_engr_awsBhushan Mahajan
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdfNigussMehari4
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationNicolas Fränkel
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныTimur Safin
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...Amazon Web Services
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltStack
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Richard Donkin
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraTomislav Plavcic
 

Similar to Deploy Symfony Apps with Ansible (20)

ansible why ?
ansible why ?ansible why ?
ansible why ?
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop Automation
 
KubeCon 2017: Kubernetes from Dev to Prod
KubeCon 2017: Kubernetes from Dev to ProdKubeCon 2017: Kubernetes from Dev to Prod
KubeCon 2017: Kubernetes from Dev to Prod
 
Docker-v3.pdf
Docker-v3.pdfDocker-v3.pdf
Docker-v3.pdf
 
Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer Workshop
 
Ansible Hands On
Ansible Hands OnAnsible Hands On
Ansible Hands On
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
 
Fabric - a server management tool from Instagram
Fabric - a server management tool from InstagramFabric - a server management tool from Instagram
Fabric - a server management tool from Instagram
 
Nano Server (ATD 11)
Nano Server (ATD 11)Nano Server (ATD 11)
Nano Server (ATD 11)
 
Bhushan m dev_ops_engr_aws
Bhushan m dev_ops_engr_awsBhushan m dev_ops_engr_aws
Bhushan m dev_ops_engr_aws
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdf
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоны
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
 

Recently uploaded

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 

Recently uploaded (20)

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 

Deploy Symfony Apps with Ansible

Editor's Notes

  1. 3y epam
  2. yet another система керування конфігураціями, для автоматизації ручної рутини особливість - простота, при великій гнучкості you can get started in minutes located on github any ручні роботи автоматизувати
  3. it can configure systems and deploy the applications and orchestrate more advanced (просунутий) IT tasks: such as continuous deployments or zero downtime rolling updates +докер -вагран
  4. configurations are text It reads like English uses SSH to execute modules on remote machines without having to install any systems management software comes with a large selection of modules for automating common tasks modules can be written in any language -- if you would like to add extensions in bash, Python, Ruby, or even C, you are welcome to do so
  5. Jira, Confluence, HipChat from 2012, downloaded >1kk
  6. top 10 python projects on github, new contributor added every ~1.3 days 7 commits to dev-branch every day
  7. some for deploy, some for system tasks fabric is a Python (2.5-2.7) library for application deployment or systems administration tasks over SSH It provides a basic suite of operations, and uploading/downloading files python syntax (from fabric.api import run) capistrano: pre-post hooks (beforeX / afterX) rollback ant/phing
  8. client, local-machine requirements (вимога) for Ansible are extremely minimal (надзвичайно мінімальним) ansible runs on a central computer Python 2.5 + paramiko / PyYAML / python-jinja2 / httplib2
  9. raw module do not need “python-simplejson” module more
  10. 1.9 = танці на вулиці // stable release 26 листопада 2014 24 вересня 2014 every 2 month release
  11. перед тем, как переходити до техничних деталей analogue: packagist, npmjs, rubygems.org
  12. saas service => software as a service => пз як послуга
  13. demo free basic = 100$/month, up to 100 nodes, annual contract only enterprise = 50$/host/per-year, 8x5 support premium = 70$/host/per-year, 24x7 support 10 hosts = premium = 60$/per-month
  14. from git == to get all the latest features (новейшие функции), keep up to date with the development release cycles are usually about two months long
  15. it's important to understand how Ansible is communicating with remote machines over SSH by default => Ansible 1.3 try to use native OpenSSH when possible as fallback => high-quality (высокое качество) Python implementation of OpenSSH called ‘paramiko’ In Ansible 1.2 and before - defalut is Paramiko When speaking with remote machines, Ansible will by default assume (вважати) you are using SSH keys local => when node == control machine
  16. Inventory can be sourced from simple text files, the cloud, or configuration management databases
  17. інвентар with hosts describe infrastructure of your app servers the things in brackets are group names, used for classifying systems, are controlling for what purpose It is ok to put systems in more than one group, for instance a server could be both a webserver and a dbserver
  18. pattern діапазони
  19. custom connection settings group-vars / host-vars
  20. default: /etc/ansible/ (!!!) ansible is NOT just about running commands, it also has powerful configuration management and deployment features
  21. концепти, поняття
  22. playbooks define configuration policy and orchestration workflows YAML - зручний для читання людиною формат серіалізаціі даних, близький до мов розмітки декларативность описания всего позволяет читать хорошо написанные плейбуки как английский текст
  23. Модулей очень много, они есть на любой вкус и цвет При помощи модулей мы можем развернуть машину в облаке выполнить команду шела, управлять базами данных, создавать файлы и папки, копировать шаблоны, отправлять сообщения в очереди, управлять сетевой инфраструктурой, писать сообщения в чаты и много чего еще. травень 2013 = 72, Жовтень = 175, лютий2015 = овер2000
  24. over2000 modules on Galaxy
  25. tags
  26. Ansible подразумевает минимум два файла для начала работы — инвентарный файл, в который мы пишем список хостов и делим их по группам — inventory и файл задач — playbook default: /etc/ansible/ Ansible is NOT just about running commands, it also has powerful configuration management and deployment features
  27. best practice
  28. feature from ansible 1.5 allows keeping encrypted data (in source control) сховище
  29. other things: Tagging a particular version of your code Running any tests Removal of any unnecessary files Clearing of external cache systems cron tasks
  30. time to implementation
  31. Tagging a particular version of your code Running any tests Removal of any unnecessary files Clearing of external cache systems cron tasks
  32. Tagging a particular version of your code Running any tests Removal of any unnecessary files Clearing of external cache systems cron tasks
  33. Tagging a particular version of your code Running any tests Removal of any unnecessary files Clearing of external cache systems cron tasks
  34. Tagging a particular version of your code Running any tests Removal of any unnecessary files Clearing of external cache systems cron tasks
  35. use with_install (cache:clear, assets:install, assets:dump)
  36. minumum variables