SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Ansible for Drupal
Or, “Running your Drupal development
operation like a farm”
What is Ansible
◦ Open source (naturally)
◦ Simple
◦ Agentless
◦ Powerful
◦ Not on Windows. Sorry!
Benefits of Ansible
◦ Secure
◦ Repeatable
◦ Fast
◦ Idempotent
Ansible Farming Tips
“ Servers are livestock, not pets.
“ Play it again, Sam
“
In a galaxy far, far away… there’s a role
for that
https://galaxy.ansible.com/
“ Read it like an open book
“ Please do not feed the sheep
Installation
Only on local machine
Use Linux package managers or pip on
Macs
Requirements:
◦ Python 2.6 or greater
Ansible Components
◦ Hosts
◦ Playbooks
▫ Roles
 Tasks
 Vars
 Templates
 Handlers
Key Ansible Modules
◦ Apt/Yum - install stuff
◦ File - change file settings
◦ Command - run shell command
◦ Synchronize - rsync
◦ Service - control services
Basics: your first Ansible command
Inventory file (hosts):
[webservers]
example1@miniserver.com
example2@miniserver.com
Command:
$ ansible -i hosts webservers -m ping
Output:
example1@miniserver.com | success >> {
"changed": false,
"ping": "pong"
}
example2@miniserver.com | success >> {
"changed": false,
"ping": "pong"
}
Our Drupal clone setup role - tasks file
- name: Git Clone to Location
git: repo=https://{{gituser}}:{{gitpass}}@{{reponame}} dest={{location}}
- name: Copy settings
command: cp {{location}}/sites/default/default.settings.php {{location}}/sites/default/settings.php
- name: Set permissions of settings
file: path={{location}}/sites/default/settings.php mode=0777
- name: Set Permissions of folder
file: path={{location}}/sites/default mode=0777
- name: Create Drupal
command: drush -r {{location}} si standard --db-url='mysql://{{dbuser}}:{{dbpass}}@localhost/{{dbname}}' --site-
name=Spawn --account-name={{username}} --account-pass={{dbpass}} -y
Our Drupal clone setup role - output
$ ansible-playbook -i hosts drupal-git-clone.yml --extra-vars "target=example.willhallonline.net"
PLAY [example.willhallonline.net] ************************************************
GATHERING FACTS ***************************************************************
ok: [example.willhallonline.net]
TASK: [willhallonline.drupal-clone-setup | Git Clone to Location] *************
changed: [example.willhallonline.net]
TASK: [willhallonline.drupal-clone-setup | Copy settings] *********************
changed: [example.willhallonline.net]
TASK: [willhallonline.drupal-clone-setup | Set permissions of settings] *******
changed: [example.willhallonline.net]
TASK: [willhallonline.drupal-clone-setup | Set Permissions of folder] *********
changed: [example.willhallonline.net]
TASK: [willhallonline.drupal-clone-setup | Create Drupal] *********************
changed: [example.willhallonline.net]
PLAY RECAP ********************************************************************
example.willhallonline.net : ok=6 changed=5 unreachable=0 failed=0
Intensive Drupal Farming
◦ VLAD (Vagrant LAMP Ansible
Drupal)
▫ github.com/hashbangcode/vlad
◦ Ansible with Drush Aliases
◦ Ansible with Docker
◦ Ansible Tower GUI and
management system
Resources
http://docs.ansible.com/
http://www.ansible.com/resources
http://galaxy.ansible.com/
Shameless plug:
http://www.willhallonline.co.uk/blog
for more things we’ve been doing with Ansible,
amongst other topics.

Weitere ähnliche Inhalte

Was ist angesagt?

Ansible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy MykhailiutaAnsible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy MykhailiutaTetiana Saputo
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansibleahamilton55
 
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David KarbanAnsible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David Karbanansiblebrno
 
docker build with Ansible
docker build with Ansibledocker build with Ansible
docker build with AnsibleBas Meijer
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansibleKhizer Naeem
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationJohn Lynch
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleKnoldus Inc.
 
Chef or how to make computers do the work for us
Chef or how to make computers do the work for usChef or how to make computers do the work for us
Chef or how to make computers do the work for ussickill
 
Ansible basics workshop
Ansible basics workshopAnsible basics workshop
Ansible basics workshopDavid Karban
 
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12Keith Resar
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them AllTim Fairweather
 
More tips n tricks
More tips n tricksMore tips n tricks
More tips n tricksbcoca
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = CodeGeorg Sorst
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsyncHazel Smith
 

Was ist angesagt? (20)

Automating with Ansible
Automating with AnsibleAutomating with Ansible
Automating with Ansible
 
Ansible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy MykhailiutaAnsible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy Mykhailiuta
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansible
 
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David KarbanAnsible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David Karban
 
docker build with Ansible
docker build with Ansibledocker build with Ansible
docker build with Ansible
 
Introducing Ansible
Introducing AnsibleIntroducing Ansible
Introducing Ansible
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
Drupal from scratch
Drupal from scratchDrupal from scratch
Drupal from scratch
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Chef or how to make computers do the work for us
Chef or how to make computers do the work for usChef or how to make computers do the work for us
Chef or how to make computers do the work for us
 
Ansible basics workshop
Ansible basics workshopAnsible basics workshop
Ansible basics workshop
 
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them All
 
More tips n tricks
More tips n tricksMore tips n tricks
More tips n tricks
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsync
 

Ähnlich wie Drupal cambs ansible for drupal april 2015

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Омские ИТ-субботники
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013grim_radical
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with ociDonghuKIM2
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!Jeff Geerling
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to AnsibleCédric Delgehier
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppSmartLogic
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012Carlos Sanchez
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansibleOmid Vahdaty
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestrationPaolo Tonin
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with AnsibleIvan Serdyuk
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Carlos Sanchez
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloudTahsin Hasan
 
MariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructuresMariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructuresFederico Razzoli
 
Hadoop & HDFS for Beginners
Hadoop & HDFS for BeginnersHadoop & HDFS for Beginners
Hadoop & HDFS for BeginnersRahul Jain
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestrationbcoca
 
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 waySylvain Rayé
 

Ähnlich wie Drupal cambs ansible for drupal april 2015 (20)

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
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with oci
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!
 
Puppet
PuppetPuppet
Puppet
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
Ansible
AnsibleAnsible
Ansible
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloud
 
MariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructuresMariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructures
 
Hadoop & HDFS for Beginners
Hadoop & HDFS for BeginnersHadoop & HDFS for Beginners
Hadoop & HDFS for Beginners
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestration
 
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
 

Kürzlich hochgeladen

Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...roncy bisnoi
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...SUHANI PANDEY
 
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Datingkojalkojal131
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Delhi Call girls
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...SUHANI PANDEY
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceDelhi Call girls
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...tanu pandey
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.soniya singh
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...SUHANI PANDEY
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 

Kürzlich hochgeladen (20)

VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...
 
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 

Drupal cambs ansible for drupal april 2015

  • 1. Ansible for Drupal Or, “Running your Drupal development operation like a farm”
  • 2. What is Ansible ◦ Open source (naturally) ◦ Simple ◦ Agentless ◦ Powerful ◦ Not on Windows. Sorry!
  • 3. Benefits of Ansible ◦ Secure ◦ Repeatable ◦ Fast ◦ Idempotent
  • 5. “ Servers are livestock, not pets.
  • 6. “ Play it again, Sam
  • 7. “ In a galaxy far, far away… there’s a role for that https://galaxy.ansible.com/
  • 8. “ Read it like an open book
  • 9. “ Please do not feed the sheep
  • 10. Installation Only on local machine Use Linux package managers or pip on Macs Requirements: ◦ Python 2.6 or greater
  • 11. Ansible Components ◦ Hosts ◦ Playbooks ▫ Roles  Tasks  Vars  Templates  Handlers
  • 12. Key Ansible Modules ◦ Apt/Yum - install stuff ◦ File - change file settings ◦ Command - run shell command ◦ Synchronize - rsync ◦ Service - control services
  • 13. Basics: your first Ansible command Inventory file (hosts): [webservers] example1@miniserver.com example2@miniserver.com Command: $ ansible -i hosts webservers -m ping Output: example1@miniserver.com | success >> { "changed": false, "ping": "pong" } example2@miniserver.com | success >> { "changed": false, "ping": "pong" }
  • 14. Our Drupal clone setup role - tasks file - name: Git Clone to Location git: repo=https://{{gituser}}:{{gitpass}}@{{reponame}} dest={{location}} - name: Copy settings command: cp {{location}}/sites/default/default.settings.php {{location}}/sites/default/settings.php - name: Set permissions of settings file: path={{location}}/sites/default/settings.php mode=0777 - name: Set Permissions of folder file: path={{location}}/sites/default mode=0777 - name: Create Drupal command: drush -r {{location}} si standard --db-url='mysql://{{dbuser}}:{{dbpass}}@localhost/{{dbname}}' --site- name=Spawn --account-name={{username}} --account-pass={{dbpass}} -y
  • 15. Our Drupal clone setup role - output $ ansible-playbook -i hosts drupal-git-clone.yml --extra-vars "target=example.willhallonline.net" PLAY [example.willhallonline.net] ************************************************ GATHERING FACTS *************************************************************** ok: [example.willhallonline.net] TASK: [willhallonline.drupal-clone-setup | Git Clone to Location] ************* changed: [example.willhallonline.net] TASK: [willhallonline.drupal-clone-setup | Copy settings] ********************* changed: [example.willhallonline.net] TASK: [willhallonline.drupal-clone-setup | Set permissions of settings] ******* changed: [example.willhallonline.net] TASK: [willhallonline.drupal-clone-setup | Set Permissions of folder] ********* changed: [example.willhallonline.net] TASK: [willhallonline.drupal-clone-setup | Create Drupal] ********************* changed: [example.willhallonline.net] PLAY RECAP ******************************************************************** example.willhallonline.net : ok=6 changed=5 unreachable=0 failed=0
  • 16. Intensive Drupal Farming ◦ VLAD (Vagrant LAMP Ansible Drupal) ▫ github.com/hashbangcode/vlad ◦ Ansible with Drush Aliases ◦ Ansible with Docker ◦ Ansible Tower GUI and management system

Hinweis der Redaktion

  1. First heard about Ansible at Drupal Camp Brighton in January. It’s an IT Automation tool, a bit like Chef or Puppet, but with a couple of key differences which I’ll get explain later. We now use it to do as much as possible. We think it’s really quite brilliant and also relatively easy to pick up. This talk is just aimed at giving you an introduction to Ansible and how it might be used to manage servers running Drupal sites.
  2. This is really good if you know very little about Systems Administration. Agentless, unlike Chef or Puppet. Uses Open SSH for server access. You’ll likely need to be well acquainted with SSH keys. I haven’t actually been able to find anything you can’t do with it yet. In some cases you wouldn’t want to, because it’s a one off task or you can do it more easily with a bash script. But you could do almost anything with Ansible if you wanted to. It can securely access sudo as well with the right configuration. Can administer Windows servers in conjunction with PowerShell. Can’t be used for the control machine.
  3. Make new servers secure in double-quick time. Servers can be identical, and therefore reliable. Servers can be ready to go in 10 minutes. Sites can be cloned in another 10. Idempotence means changes are only made when changes are required, for the most part.
  4. Key principles of using Ansible
  5. A wise man who knew lots about Ansible said that. They should be there to do a job for you, not for you to look after them. If they’re not working, put them down and use another one. Even if they are working, you might want to move servers for any number of reasons. No problem. Sell that animal off for a tidy profit, and get a new one to feed up. With Ansible, you don’t need to try and nurse poorly servers back to health. They become very disposable.
  6. Ideally, if you’ve written a process in Ansible, you should be able to run it again immediately after running it the first time and, on the second go, nothing should change. Because it’s idempotent, it should be safe.
  7. Much like there’s a module for that in Drupal, for Ansible there are roles. Many user contributed roles are stored on Ansible Galaxy and you can download them and include them in your own Ansible projects. You have to be a bit careful at the moment though because Ansible doesn’t have Drupal’s user base and the community provided roles haven’t gone through quite the same level of peer review, and sometimes they have bits of bespoke configuration floating around in them. However, we’ve made use of several really good ones for doing things like setting up nginx and mysql, installing various packages etc. It’s only going to get better.
  8. By its very nature, Ansible is task driven. Also, it’s written in very human friendly YAML. Consequently, you shouldn’t need to add extra comments to explain what a role, playbook or task does. If you do, you probably need to separate things out a bit more. You’ll see what I mean later when I run through some examples.
  9. So we know servers are livestock, right. Probably, you want them to be like sheep, in that there aren’t any individuals. What you don’t want is some stranger coming round to pet your very cute sheep and feeding them half a packet of crisps. What I’m trying to say with this rather stretched analogy is that, in an ideal Ansible universe, you wouldn’t need to log in to your servers. At all. Everything could be done remotely. I’d be lying if I said that we didn’t still have to log in to our servers on a regular basis for any number of reasons. But once you’ve logged into a server and made changes, suddenly that server becomes a pet, because you’ve singled it out for special attention. It’s now your prize sheep, and you’ve got to make sure it’s in tip-top condition for the county fair next week. And if it suddenly falls ill, that causes you a problem, because you’ve invested time in it. And we don’t want that to happen.
  10. You run your farm from your farmhouse in the middle of your plot. You don’t have shepherds or cow-herds out watching your flocks all of the time. No need to install Ansible on servers.
  11. You keep track of all of your animals in an inventory, which we usually name ‘hosts’. Playbooks contain the details of everything you need to do to keep your animals alive and safe. Explain toles, tasks, etc.
  12. Ansible modules are more the basic building blocks of tasks. Roles are more like Drupal modules.
  13. You can arrange them into groups, which is useful if, for example, you’re running some on Debian and some on CentOS. Example of an ad-hoc command. You probably won’t run many of them as playbooks are far more useful. You get nice color coded feedback showing exactly what tasks have been run and what’s changed (if anything). It also usually gives pretty useful error codes which is handy for debugging and the like.
  14. This role clones a site from its git repository to the site location and creates a Drupal site install. All of the variables are contained in another file, passwords can be stored encrypted using Ansible Vault. We have another role that copies over the database and the files, and then locks down the permissions.
  15. Here’s the output I got when I ran it as part of a playbook using the command ‘ansible-playbook’ Again, you can see there’s nice colour-coded output, with each task’s outcome recorded. You can use -v for more verbose feedback. No red failed ones, so that’s good. And here’s spawn
  16. VLAD is a really interesting project by Philip Norton and Dan Bohea which enables you to fire up a Drupal development environment on a local virtual machine. It looks awesome and we’ll be looking at this in the near future. Drush aliases, as I’m sure a lot of you know, are very useful for a great number of things, including syncing databases and files between production and development environments, performing upgrades to Drupal etc. Some of our Ansible playbooks incorporate Drush alias commands. Serious power.
  17. Some useful resources