Enviar pesquisa
Carregar
Deploy PHP Apps with Ansible
•
5 gostaram
•
6,156 visualizações
Título melhorado com IA
Orestes Carracedo
Seguir
A quick introduction to Ansible and how to deploy simple PHP applications.
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 34
Baixar agora
Baixar para ler offline
Recomendados
Angular & RXJS: examples and use cases
Angular & RXJS: examples and use cases
Fabio Biondi
RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019
Fabio Biondi
Layout with Stack View, Table View, and Collection View
Layout with Stack View, Table View, and Collection View
Make School
The Many Ways to Test Your React App
The Many Ways to Test Your React App
All Things Open
Selenium Primer
Selenium Primer
gueste1e4db
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
Steffen Gebert
Jenkins
Jenkins
MohanRaviRohitth
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Netcetera
Recomendados
Angular & RXJS: examples and use cases
Angular & RXJS: examples and use cases
Fabio Biondi
RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019
Fabio Biondi
Layout with Stack View, Table View, and Collection View
Layout with Stack View, Table View, and Collection View
Make School
The Many Ways to Test Your React App
The Many Ways to Test Your React App
All Things Open
Selenium Primer
Selenium Primer
gueste1e4db
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
Steffen Gebert
Jenkins
Jenkins
MohanRaviRohitth
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Netcetera
Spring Boot
Spring Boot
Pei-Tang Huang
Selenium WebDriver FAQ's
Selenium WebDriver FAQ's
Praveen Gorantla
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
Automation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
Ansible
Ansible
Kamil Lelonek
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
Guilherme Pereira Silva
REST APIs with Spring
REST APIs with Spring
Joshua Long
Spring boot
Spring boot
Bhagwat Kumar
Spring Boot and REST API
Spring Boot and REST API
07.pallav
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Simplilearn
Introduction to Protractor
Introduction to Protractor
Florian Fesseler
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
QASymphony
Web assembly - Future of the Web
Web assembly - Future of the Web
CodeValue
Spring Boot
Spring Boot
Jaran Flaath
Introduction to RxJS
Introduction to RxJS
Abul Hasan
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
Shengyou Fan
Maven
Maven
Harshit Choudhary
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQube
Angelin R
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
AWSKRUG - AWS한국사용자모임
Automation testing on ios platform using appium
Automation testing on ios platform using appium
Ambreen Khan
Automation and Ansible
Automation and Ansible
jtyr
Automated Deployments with Ansible
Automated Deployments with Ansible
Martin Etmajer
Mais conteúdo relacionado
Mais procurados
Spring Boot
Spring Boot
Pei-Tang Huang
Selenium WebDriver FAQ's
Selenium WebDriver FAQ's
Praveen Gorantla
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
Automation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
Ansible
Ansible
Kamil Lelonek
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
Guilherme Pereira Silva
REST APIs with Spring
REST APIs with Spring
Joshua Long
Spring boot
Spring boot
Bhagwat Kumar
Spring Boot and REST API
Spring Boot and REST API
07.pallav
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Simplilearn
Introduction to Protractor
Introduction to Protractor
Florian Fesseler
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
QASymphony
Web assembly - Future of the Web
Web assembly - Future of the Web
CodeValue
Spring Boot
Spring Boot
Jaran Flaath
Introduction to RxJS
Introduction to RxJS
Abul Hasan
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
Shengyou Fan
Maven
Maven
Harshit Choudhary
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQube
Angelin R
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
AWSKRUG - AWS한국사용자모임
Automation testing on ios platform using appium
Automation testing on ios platform using appium
Ambreen Khan
Mais procurados
(20)
Spring Boot
Spring Boot
Selenium WebDriver FAQ's
Selenium WebDriver FAQ's
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Automation - web testing with selenium
Automation - web testing with selenium
Ansible
Ansible
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
REST APIs with Spring
REST APIs with Spring
Spring boot
Spring boot
Spring Boot and REST API
Spring Boot and REST API
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Introduction to Protractor
Introduction to Protractor
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
Web assembly - Future of the Web
Web assembly - Future of the Web
Spring Boot
Spring Boot
Introduction to RxJS
Introduction to RxJS
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
Maven
Maven
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQube
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
Automation testing on ios platform using appium
Automation testing on ios platform using appium
Destaque
Automation and Ansible
Automation and Ansible
jtyr
Automated Deployments with Ansible
Automated Deployments with Ansible
Martin Etmajer
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
Robert Reiz
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
Sarah Z
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Idan Tohami
Ansible presentation
Ansible presentation
John Lynch
Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and Docker
Dennis Rowe
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Martin Etmajer
Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2
Brian Schott
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansible
fmaccioni
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestration
bcoca
Ansible tips & tricks
Ansible tips & tricks
bcoca
Ansible Introduction
Ansible Introduction
Robert Reiz
How Ansible Makes Automation Easy
How Ansible Makes Automation Easy
Peter Sankauskas
It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
Carlos Perez
Vagrant For DevOps
Vagrant For DevOps
Lalatendu Mohanty
Vagrant to-aws-flow
Vagrant to-aws-flow
Kimberly Macias
Microservices: The Right Way
Microservices: The Right Way
Daniel Woods
Automated Deployment with Capistrano
Automated Deployment with Capistrano
Sumit Chhetri
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and more
Chef Software, Inc.
Destaque
(20)
Automation and Ansible
Automation and Ansible
Automated Deployments with Ansible
Automated Deployments with Ansible
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible presentation
Ansible presentation
Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and Docker
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansible
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestration
Ansible tips & tricks
Ansible tips & tricks
Ansible Introduction
Ansible Introduction
How Ansible Makes Automation Easy
How Ansible Makes Automation Easy
It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
Vagrant For DevOps
Vagrant For DevOps
Vagrant to-aws-flow
Vagrant to-aws-flow
Microservices: The Right Way
Microservices: The Right Way
Automated Deployment with Capistrano
Automated Deployment with Capistrano
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and more
Semelhante a Deploy PHP Apps with Ansible
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Simon Boulet
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
Dana Luther
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
hernanibf
Lean Php Presentation
Lean Php Presentation
Alan Pinstein
How to install and configure LEMP stack
How to install and configure LEMP stack
RootGate
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Stein Inge Morisbak
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Stein Inge Morisbak
PHP selber bauen
PHP selber bauen
Walter Ebert
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestration
Outlyer
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
Pablo Godel
mapserver_install_linux
mapserver_install_linux
tutorialsruby
mapserver_install_linux
mapserver_install_linux
tutorialsruby
mapserver_install_linux
mapserver_install_linux
tutorialsruby
mapserver_install_linux
mapserver_install_linux
tutorialsruby
Writing & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp Boston
Puppet
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
Salesforce Developers
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Raja Rozali Raja Hasan
Deployment with capifony
Deployment with capifony
Jan De Coster
DevOps in PHP environment
DevOps in PHP environment
Evaldo Felipe
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to Production
Fabio Kung
Semelhante a Deploy PHP Apps with Ansible
(20)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
Lean Php Presentation
Lean Php Presentation
How to install and configure LEMP stack
How to install and configure LEMP stack
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
PHP selber bauen
PHP selber bauen
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestration
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
mapserver_install_linux
mapserver_install_linux
mapserver_install_linux
mapserver_install_linux
mapserver_install_linux
mapserver_install_linux
mapserver_install_linux
mapserver_install_linux
Writing & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp Boston
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Deployment with capifony
Deployment with capifony
DevOps in PHP environment
DevOps in PHP environment
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to Production
Mais de Orestes Carracedo
Receipt processing with Google Cloud Platform and the Google Assistant
Receipt processing with Google Cloud Platform and the Google Assistant
Orestes Carracedo
Stand out from the herd
Stand out from the herd
Orestes Carracedo
Ansible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User Group
Orestes Carracedo
Android push notifications
Android push notifications
Orestes Carracedo
Betabeers Android as a Digital Signage platform
Betabeers Android as a Digital Signage platform
Orestes Carracedo
Android as a digital signage platform
Android as a digital signage platform
Orestes Carracedo
Mais de Orestes Carracedo
(6)
Receipt processing with Google Cloud Platform and the Google Assistant
Receipt processing with Google Cloud Platform and the Google Assistant
Stand out from the herd
Stand out from the herd
Ansible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User Group
Android push notifications
Android push notifications
Betabeers Android as a Digital Signage platform
Betabeers Android as a Digital Signage platform
Android as a digital signage platform
Android as a digital signage platform
Último
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
mohitsingh558521
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
Dilum Bandara
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
LoriGlavin3
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Curtis Poe
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
LoriGlavin3
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
LoriGlavin3
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Precisely
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
LoriGlavin3
Último
(20)
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
Deploy PHP Apps with Ansible
1.
Deploying PHP applications with CC https://www.flickr.com/photos/din_bcn/2551132104/ @OrestesCA
@phpvigo
2.
Orestes Carracedo Software Consultant @OrestesCA whoami ßetabeers Barcelona @OrestesCA @phpvigo
3.
@OrestesCA @phpvigo 2003 2015
4.
1. Deployment 2. Ansible 3.
All together @OrestesCA @phpvigo
5.
Deployment @OrestesCA @phpvigo
6.
Blue-green deployment @OrestesCA @phpvigo http://martinfowler.com/bliki/BlueGreenDeployment.html
7.
Simple blue-green deployment @OrestesCA
@phpvigo -- /var/www/my-app.com |-- current -> /var/www/my-app.com/releases/20100509150741 |-- releases | |-- 20100509150741 | |-- 20100509145325 |-- shared
8.
Blue-green deployment: demo @OrestesCA
@phpvigo
9.
Ansible 1. Setup 2. Inventory 3.
Commands 4. Modules 5. Tasks 6. Roles @OrestesCA @phpvigo
10.
What is Ansible SCM
automation tool agent-less simple + powerful @OrestesCA @phpvigo
11.
Connections Managed Node #1 Managed
Node #2 Control Machine Inventory ssh @OrestesCA @phpvigo
12.
Control Machine setup http://docs.ansible.com $
sudo pip install ansible … $ ansible ansible ansible-doc ansible-galaxy ansible- playbook ansible-pull ansible-vault @OrestesCA @phpvigo
13.
Inventory setup $ export
ANSIBLE_INVENTORY=~/ansible_hosts [vagrant] 127.0.0.1:2222 foo=bar [vagrant:vars] ansible_ssh_user=vagrant env=local http://docs.ansible.com/intro_inventory.html https://docs.ansible.com/playbooks_variables.html Precedence: -i file or $ANSIBLE_INVENTORY or /etc/ansible/hosts @OrestesCA @phpvigo
14.
Modules $ ansible vagrant
-m ping --vvvv <127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant on PORT 2222 TO 127.0.0.1 <127.0.0.1> REMOTE_MODULE ping … 127.0.0.1 | success >> { "changed": false, "ping": "pong" } $ ansible all -m ping —vvvv … @OrestesCA @phpvigo
15.
Random fact _________________ < GATHERING
FACTS > ----------------- ^__^ (oo)_______ (__) )/ ||----w | || || http://docs.ansible.com/faq.html#how-do-i-disable-cowsay export ANSIBLE_NOCOWS=1 @OrestesCA @phpvigo
16.
Playbooks - hosts: vagrant sudo:
True tasks: - name: Install ntp apt: pkg=ntp state=installed $ ansible-playbook test_playbook.yml … GATHERING FACTS ok: [127.0.0.1] TASK: [Install ntp] changed: [127.0.0.1] PLAY RECAP 127.0.0.1: ok=2 changed=1 unreachable=0 failed=0 test_playbook.yml @OrestesCA @phpvigo
17.
Idempotence - hosts: vagrant sudo:
True tasks: - name: Install ntp apt: pkg=ntp state=installed $ ansible-playbook test_playbook.yml … GATHERING FACTS ok: [127.0.0.1] TASK: [Install ntp] ok: [127.0.0.1] PLAY RECAP 127.0.0.1: ok=2 changed=0 unreachable=0 failed=0 test_playbook.yml @OrestesCA @phpvigo
18.
Idempotence - hosts: vagrant sudo:
True tasks: - name: Install ntp apt: pkg=ntp state=installed $ ansible-playbook test_playbook.yml … GATHERING FACTS ok: [127.0.0.1] TASK: [Install ntp] ok: [127.0.0.1] PLAY RECAP 127.0.0.1: ok=2 changed=0 unreachable=0 failed=0 test_playbook.yml @OrestesCA @phpvigo
19.
Facts $ ansible vagrant
-m setup 127.0.0.1 | success >> { "ansible_facts": { "ansible_all_ipv4_addresses": [ "10.0.2.15" ], "ansible_all_ipv6_addresses": [ "fe80::a00:27ff:fe6b:d3e" ], "ansible_architecture": "x86_64", "ansible_bios_date": "12/01/2006", "ansible_bios_version": "VirtualBox", … @OrestesCA @phpvigo
20.
Templates, facts and
variables - hosts: vagrant sudo: True tasks: - name: Write MOTD template: src=templates/motd dest=/etc/motd You’re now in the {{ env | upper }} environment at {{ ansible_hostname }} {{ ansible_distribution }} {{ansible_distribution_release }} {{ ansible_distribution_version }} {{ ansible_system }} {{ ansible_kernel }} {{ ansible_architecture }} test_playbook.yml templates/motd You’re now in the LOCAL environment at Debian-jessie-amd64- netboot Debian jessie 8.0 Linux 3.16.0-4-amd64 x86_64 @OrestesCA @phpvigo
21.
Conditionals - name: Enable
LOCAL env prompt indicator template: src=templates/env/local/.bash_profile dest=~/.bash_profile when: env == "local" test_playbook.yml export PS1="[$(tput setaf 2)][u@h W]$ [$(tput setaf 7)][$(tput sgr0)]" templates/.bash_profile [vagrant@Debian-jessie-amd64-netboot ~]$ https://docs.ansible.com/playbooks_conditionals.html @OrestesCA @phpvigo
22.
Notifications and handlers -
hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest version yum: pkg=httpd state=latest - name: write the apache config file template: src=/srv/httpd.j2 dest=/etc/httpd.conf notify: - restart apache - name: ensure apache is running (and enable it at boot) service: name=httpd state=started enabled=yes handlers: - name: restart apache service: name=httpd state=restarted @OrestesCA @phpvigo
23.
Roles site.yml roles/ common/ files/ templates/ tasks/ handlers/ vars/ defaults/ meta/ webserver/ … files https://docs.ansible.com/playbooks_roles.html https://github.com/ansible/ansible-examples - hosts: webservers roles: -
common - webserver site.yml @OrestesCA @phpvigo
24.
First steps in
practice Dependencies Credentials Deployment @OrestesCA @phpvigo
25.
Install dependencies $ ansible-playbook
test_playbook.yml … /bin/sh: 1: /usr/bin/python: not found … Missing Python gather_facts: False tasks: - name: Install Python raw: apt-get install python -y - name: Gather facts after python install setup: - name: Write MOTD … test_playbook.yml @OrestesCA @phpvigo
26.
Install dependencies $ ansible-playbook
test_playbook.yml --sudo PLAY [vagrant] TASK: [Install Python] ok: [127.0.0.1] TASK: [Gather facts] ok: [127.0.0.1] TASK: [Write MOTD] changed: [127.0.0.1] PLAY RECAP 127.0.0.1: ok=3 changed=1 unreachable=0 failed=0 test_playbook.yml @OrestesCA @phpvigo
27.
Setup remote access -
name: Setup access authorized_key: user="{{ ansible_ssh_user }}" key="{{ item }}" with_file: - ~/.ssh/id_rsa.pub - /some/secure/dir/keys/admin.pub test_playbook.yml http://docs.ansible.com/authorized_key_module.html $ ansible-playbook test_playbook.yml --ask-pass SSH password: TASK: [Setup access] ok: [127.0.0.1] => (item=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD… orestes@mjolnir.local) … @OrestesCA @phpvigo
28.
Simple deployment - name:
Clone git repository git: > dest=/var/www/awesome-app repo=https://github.com/initech/awesome-app update=no sudo: yes sudo_user: www-data register: cloned - name: Clear cache … when: cloned|changed test_playbook.yml https://github.com/ansistrano http://www.future500.nl/articles/2014/07/thoughts-on-deploying-with-ansible/ @OrestesCA @phpvigo
29.
Advanced deployment http://www.ansible.com/application-deployment http://docs.ansible.com/playbooks_delegation.html - hosts:
webservers max_fail_percentage: 30 serial: 10 @OrestesCA @phpvigo
30.
Learning from the
community https://galaxy.ansible.com @OrestesCA @phpvigo
31.
All together @OrestesCA @phpvigo
32.
Using a contributed
role @OrestesCA @phpvigo - name: Deploy my-app.com hosts: production vars: ansistrano_allow_anonymous_stats: no ansistrano_deploy_to: /var/www/my-app.com ansistrano_keep_releases: 10 ansistrano_deploy_via: git ansistrano_git_repo: git@bitbucket.org:orestes/my-app.com.git ansistrano_git_branch: build roles: - { role: carlosbuenosvinos.ansistrano-deploy } $ ansible-galaxy install carlosbuenosvinos.ansistrano-deploy https://github.com/ansistrano/deploy
33.
final demo @OrestesCA @phpvigo
34.
EOF ___________________ < THAT’S ALL
FOLKS! > ------------------- ^__^ (oo)_______ (__) )/ ||----w | || || @OrestesCA @phpvigo
Baixar agora