Ansible & Vagrant
-
Upload
mukul-malhotra -
Category
Technology
-
view
117 -
download
0
Transcript of Ansible & Vagrant
Ansible & Vagrant(Ansible Provisioner for Vagrant)
Mukul MalhotraRed Hat Gluster Storage
Agenda
What is Vagrant ?
Vagrant components
Vagrantfile
Boxes
What is Ansible ?
Provisioning VM with Ansible
Demo
Questions ?
What is Vagrant ?
Provide theteamdevelopers with a reproducible and portablework environment to isolate dependencies and their configuration
Manages virtual machines
Quick & easy to use
Great for development & testing
Machines are provisioned on top of VirtualBox, VMware, libvirt, AWS & more.
Provisioning tools such as shell scripts, Ansible, Chef, Puppet can be used to automatically install and configure software on the machine.
Vagrant: Getting Started
Requirement:
Enabling Intel VT-x/AMD-V Virtualization Hardware Extensions in BIOS
$ cat /proc/cpuinfo |grep -E "vmx|svm"
VirtualBox: https://www.virtualbox.org/wiki/Downloads
Vagrant: https://www.vagrantup.com/downloads.html
Vagrant: Getting Started (Contd.)
Download vagrant box with specific name,
$ vagrant box add centos/7
Default URL: https://atlas.hashicorp.com/boxes/search
Initialise the vagrant file & run the virtual machine,
$ vagrant init
$ vagrant up --provider virtualbox
SSH into the virtual machine,
$ vagrant ssh
Destroy the virtual machine,
$ vagrant destroy
Vagrant component: Vagrantfile
# mkdir /project/test_env
# cd /project/test_env
# vagrant init
Vagrant component: boxes
Different base boxes as per providers I.e, Virtualbox,Vmware etc
Download the base box as per OS to Initiate the virtual machine in minutes
Can package or re-package the base box as per provider
What is Ansible ?
Simple IT automation tool. It can configure systems,deploy software & orchestrate
Written in Python
Easy to use, easy to manage & easy to understand
Ansible is agent-less & no server & client deamon'sare required
Ansibles configuration, deployment, and orchestration language are defined in Playbook & written in YAML
Automated Provisioning with Ansible using Vagrantfile
Demo
Thank You
Questions/Feedback ?