ansible with vcloud air workshop install, configure and use ansible on your laptop to provision...
TRANSCRIPT
![Page 1: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/1.jpg)
Ansible with vCloud Air WorkshopInstall, configure and use Ansible on your laptop to provision workloads in vCloud Air
![Page 2: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/2.jpg)
AbstractLearn the basics of Ansible, use this workshop to install, setup and configure Ansible on your laptop. Once you have successfully configured Ansible, then learn how to use it for DevOps deployment into your vCloud Air environments.
Dylan Silva, Sales Engineer, Ansible Inc.
8/31/2015
![Page 3: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/3.jpg)
What is Ansible?• SIMPLE
– Human Readable Automation
– No Special Coding Skills Required
– Tasks executed in order
– Get Productive Quickly
• AGENTLESS– No extra code to manage
– Uses OpenSSH
– No agents to exploit or update
– More Efficient and Secure
• POWERFUL– App Deployment
– Configuration Management
– Workflow Orchestration
– Orchestrate the app lifecycle
![Page 4: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/4.jpg)
CONFIDENTIAL 4
Ansible Components
• Inventory• Modules• Tasks• Plays• Playbooks
![Page 5: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/5.jpg)
Inventory• Hosts and Groups• Inventory Sources
![Page 6: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/6.jpg)
CONFIDENTIAL 6
Inventory Concepts
• Hosts• Groups• Inventory-specific data• Static / Dynamic Sources
![Page 7: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/7.jpg)
CONFIDENTIAL 7
Inventory: Hosts
• Defines:– Port and Address– Remote/sudo usernames– Connection type
![Page 8: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/8.jpg)
CONFIDENTIAL 8
Inventory: Hosts
![Page 9: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/9.jpg)
CONFIDENTIAL 9
Inventory: Hosts
![Page 10: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/10.jpg)
CONFIDENTIAL 10
Inventory: Hosts
![Page 11: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/11.jpg)
Modules• Bits of code copied to the target system.• Executed to satisfy the task declaration.• Customizable.
![Page 12: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/12.jpg)
CONFIDENTIAL 12
Modules Examples
• vca_vapp• vca_nat• vca_fw• apt/yum• copy• file• service• template
![Page 13: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/13.jpg)
TASKS• Directory should exist• Package should be installed• Service should be running• Render a template into a configuration file• vCloud Air instance should exist
![Page 14: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/14.jpg)
CONFIDENTIAL 14
Tasks: Examples
![Page 15: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/15.jpg)
CONFIDENTIAL 15
Using Modules in Tasks
- name: add cache dir file: path=/opt/cache state=directory
- name: install nginx yum: name=nginx state=present
- name: start nginx service: name=nginx enabled=yes state=started state=started
![Page 16: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/16.jpg)
Exercise 1• Install Ansible• Setup key(s)• Run a couple of tasks
![Page 17: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/17.jpg)
Plays• Play naming
• Hosts selection
• Play arguments
• Variables
• Tasks
• Concurrency and order of operations
• Conditionals
![Page 18: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/18.jpg)
CONFIDENTIAL 18
Play Naming
- name: This is a Play
![Page 19: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/19.jpg)
CONFIDENTIAL 19
Hosts Selection
- name: This is a Playhosts: web-servers
![Page 20: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/20.jpg)
CONFIDENTIAL 20
Play Arguments
- name: This is a Playhosts: web-serversremote_user: fredsudo: yesconnection: ssh
![Page 21: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/21.jpg)
CONFIDENTIAL 21
Variables
- name: This is a Playhosts: web-serversremote_user: fredsudo: yesconnection: sshvars:
http_port: 80cache_dir: /opt/cache
![Page 22: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/22.jpg)
CONFIDENTIAL 22
Tasks- name: This is a Play
hosts: web-serversremote_user: fredsudo: yesconnection: sshvars:
http_port: 80cache_dir: /opt/cache
tasks: - name: create cache dir
file: path={{ cache_dir }} state=directory - name: install nginx
yum: name=nginx state=installed
![Page 23: Ansible with vCloud Air Workshop Install, configure and use Ansible on your laptop to provision workloads in vCloud Air](https://reader036.vdocument.in/reader036/viewer/2022062408/56649f345503460f94c51164/html5/thumbnails/23.jpg)
Exercise 2• Download playbooks• Make modifications to playbooks• Execute Playbooks against vCloud
Air