SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Vagrant For DevOps
Lalatendu Mohanty
@lalatenduM
DevOps
What is it?
• It is a culture.
• Filling the gap between developer and operations.
DevOps
It aims at establishing a culture and environment
where building, testing, and releasing software, can
happen rapidly, frequently, and more reliably.
-Wikipedia
It means:
• Use right tools for automation, continuous
integration and achieve continuous delivery.
Vagrant
• Create and configure lightweight, reproducible,
and portable development environments.
• A higher-level wrapper around virtualization
software such as VirtualBox, VMware, KVM.
• Also wrapper around configuration management
software such as Ansible, Chef, Salt, and Puppet.
• Public clouds e.g. AWS, DigitalOcean can be
providers too.
Use Continuos Integration
Tools With Vagrant
• Machine provisioning
• Software provisioning
• Configuration Management
Vagrant :Quick Start
• mkdir centos; cd centos
• $ vagrant init centos/7
• $ vagrant up
OR
• $ vagrant up --provider <PROVIDER>
• $vagrant ssh
* These steps going to stay the same irrespective of OS and providers.
Understanding Vagrant
• Check the files in current directory
$ ls -al
total 8
drwxr-xr-x 4 lmohanty staff 136 Apr 23 01:04 .
drwxr-xr-x 14 lmohanty staff 476 Apr 22 23:32 ..
drwxr-xr-x 3 lmohanty staff 102 Apr 22 23:36 .vagrant
-rw-r--r-- 1 lmohanty staff 3178 Apr 23 01:04 Vagrantfile
$ tree .vagrant/
.vagrant/
└── machines
└── default
└── virtualbox
├── action_provision
├── action_set_name
├── creator_uid
├── id
├── index_uuid
├── private_key
└── synced_folders
Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = “centos/7"
# config.vm.network "forwarded_port", guest: 80, host: 8080
# config.vm.network "private_network", ip: “192.168.33.10"
# config.vm.network "public_network"
# config.vm.synced_folder "../data", "/vagrant_data"
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize CPU
# v.cpus = 2
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# config.vm.provision "shell", inline: <<-SHELL
# sudo yum update -y
# sudo yum install -y docker
# SHELL
end
Multi-machine Environment
• Setup multiple machines with just one “$ vagrant up”
command.
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: "echo Hello"
config.vm.define "web" do |web|
web.vm.box = "apache"
end
config.vm.define "db" do |db|
db.vm.box = "mysql"
end
end
Using Configuration
management Software
• We have Vagrant provisioners for Puppet, Chef, Ansible, CFEngine etc
Vagrant.configure("2") do |config|
# Run Ansible from the Host
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
end
end
Debugging
• VAGRANT_LOG environment variable for the desired log level name.
• Log levels are : debug (loud), info (normal), warn (quiet), and error (very
quiet)
$ VAGRANT_LOG=info vagrant up
OR
$ set VAGRANT_LOG=info
$ vagrant up
OR
$ vagrant up --info
Vagrant Plugins
• Add additional features or change default
behaviour.
• It is a Ruby gem. Vagrant is written in Ruby.
• List : https://github.com/mitchellh/vagrant/wiki/
Available-Vagrant-Plugins
Using DigitalOcean as a
Provider
• Install Vagrant plugin vagrant-digitalocean
• https://github.com/devopsgroup-io/vagrant-
digitalocean
• Demo
Vagrantbox
A Vagrantbox is a tarred, gzip file containing the following:
• Vagrantfile
• The information from this will be merged into your Vagrantfile that is created
when you run vagrant init boxname in a folder.
• box-disk.vmd (For Virtualbox)
• The box-disk.vmdk is the virtual machine image.
• box.of
• The box.ovf defines the virtual hardware for the box.
• metadata.son
• The metadata.json tells vagrant what provider the box works with.
Tools To Create Vagrantbox
• You can use tools like packer.io, imagefactory etc.
• You can build a Vagrantbox manually
• Or use “vagrant package” command for Virtualbox.
• Modify base boxes and reuse them.
• Also there is vagrant-mutate
• https://github.com/sciurus/vagrant-mutate
DevOps Workflow
• Use same configuration management code as
operations team in Vagrantfile.
• More automation means, more chance of parity
between development, testing and operations.
• Create a environment where developers and QA
can contribute to the automation and configuration
management code.
Future
• Otto
• The next generation tool from Hashicorp which uses Vagrant
and other ecosystem tools.
• But It is specially designed for micro services.
• Knows how to install and configure service dependencies for
development and deployment.
• otto dev : will create the development environment.
• otto infra, otto build, and otto deploy : will launches a complete
infrastructure, builds your application, and deploys it
References
• http://www.slideshare.net/nemo-mulodo/devops2-
vagrant-mosg
• https://blog.engineyard.com/2014/building-a-vagrant-
box
• https://www.vagrantup.com/docs/boxes/format.html
• http://unix.stackexchange.com/questions/222427/how-
to-create-custom-vagrant-box-from-libvirt-kvm-instance
• https://www.hashicorp.com/blog/otto.html

Contenu connexe

Tendances

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
 
Vagrant + Ansible + Docker
Vagrant + Ansible + DockerVagrant + Ansible + Docker
Vagrant + Ansible + DockerVijay Selvaraj
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with CapistranoSumit Chhetri
 
How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker Jonathan Martin
 
Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]Nicolas Poggi
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in developmentAdam Culp
 
Automated Infrastructure and Application Management
Automated Infrastructure and Application ManagementAutomated Infrastructure and Application Management
Automated Infrastructure and Application ManagementClark Everetts
 
Dependencies and Licenses
Dependencies and LicensesDependencies and Licenses
Dependencies and LicensesRobert Reiz
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleMichael Bahr
 
Comprehensive Monitoring for Docker
Comprehensive Monitoring for DockerComprehensive Monitoring for Docker
Comprehensive Monitoring for DockerChristian Beedgen
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionRobert Reiz
 
Docker - 15 great Tutorials
Docker - 15 great TutorialsDocker - 15 great Tutorials
Docker - 15 great TutorialsJulien Barbier
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java DevelopersNGINX, Inc.
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To RunningGiacomo Vacca
 
Containers #101 : Docker ONBUILD triggers and Introduction to Docker Compose
Containers #101 : Docker ONBUILD triggers and Introduction to Docker ComposeContainers #101 : Docker ONBUILD triggers and Introduction to Docker Compose
Containers #101 : Docker ONBUILD triggers and Introduction to Docker ComposeRaziel Tabib (Join our team)
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux ContainerBalaji Rajan
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPuppet
 

Tendances (20)

Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Vagrant + Ansible + Docker
Vagrant + Ansible + DockerVagrant + Ansible + Docker
Vagrant + Ansible + Docker
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
 
How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker
 
Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Automated Infrastructure and Application Management
Automated Infrastructure and Application ManagementAutomated Infrastructure and Application Management
Automated Infrastructure and Application Management
 
Dependencies and Licenses
Dependencies and LicensesDependencies and Licenses
Dependencies and Licenses
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Comprehensive Monitoring for Docker
Comprehensive Monitoring for DockerComprehensive Monitoring for Docker
Comprehensive Monitoring for Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker - 15 great Tutorials
Docker - 15 great TutorialsDocker - 15 great Tutorials
Docker - 15 great Tutorials
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
Docker zero
Docker zeroDocker zero
Docker zero
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
 
Containers #101 : Docker ONBUILD triggers and Introduction to Docker Compose
Containers #101 : Docker ONBUILD triggers and Introduction to Docker ComposeContainers #101 : Docker ONBUILD triggers and Introduction to Docker Compose
Containers #101 : Docker ONBUILD triggers and Introduction to Docker Compose
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux Container
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with Chocolatey
 

Similaire à Vagrant For DevOps

Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerJohn Rofrano
 
Devoxx UK 2013: Sandboxing with the Vagrant-Binding API
Devoxx UK 2013: Sandboxing with the Vagrant-Binding APIDevoxx UK 2013: Sandboxing with the Vagrant-Binding API
Devoxx UK 2013: Sandboxing with the Vagrant-Binding APIHendrik Ebbers
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundHendrik Ebbers
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Hendrik Ebbers
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantBrian Hogan
 
Lightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetLightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetHendrik Ebbers
 
Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)Dmitry Guyvoronsky
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and dockerFabio Fumarola
 
Avoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and VagrantAvoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and Vagrantandygale
 
Improved development workflows using vagrant
Improved development workflows using vagrantImproved development workflows using vagrant
Improved development workflows using vagrantMakis Asimidis
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and DockerFabio Fumarola
 
NetDevOps Developer Environments with Vagrant @ SCALE16x
NetDevOps Developer Environments with Vagrant @ SCALE16xNetDevOps Developer Environments with Vagrant @ SCALE16x
NetDevOps Developer Environments with Vagrant @ SCALE16xHank Preston
 
Using Vagrant
Using VagrantUsing Vagrant
Using Vagrantandygale
 
Powering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with VagrantPowering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with VagrantCoen Jacobs
 
Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef Michael Lihs
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environmentbocribbz
 

Similaire à Vagrant For DevOps (20)

Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and Docker
 
Vagrant & Docker
Vagrant & DockerVagrant & Docker
Vagrant & Docker
 
Devoxx UK 2013: Sandboxing with the Vagrant-Binding API
Devoxx UK 2013: Sandboxing with the Vagrant-Binding APIDevoxx UK 2013: Sandboxing with the Vagrant-Binding API
Devoxx UK 2013: Sandboxing with the Vagrant-Binding API
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG Dortmund
 
Intro to vagrant
Intro to vagrantIntro to vagrant
Intro to vagrant
 
Vagrant
Vagrant Vagrant
Vagrant
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
 
Lightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetLightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and Puppet
 
Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
Avoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and VagrantAvoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and Vagrant
 
Improved development workflows using vagrant
Improved development workflows using vagrantImproved development workflows using vagrant
Improved development workflows using vagrant
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
 
NetDevOps Developer Environments with Vagrant @ SCALE16x
NetDevOps Developer Environments with Vagrant @ SCALE16xNetDevOps Developer Environments with Vagrant @ SCALE16x
NetDevOps Developer Environments with Vagrant @ SCALE16x
 
Using Vagrant
Using VagrantUsing Vagrant
Using Vagrant
 
Powering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with VagrantPowering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with Vagrant
 
Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
Vagrant
VagrantVagrant
Vagrant
 

Plus de Lalatendu Mohanty

Confident OpenShift Upgrades with the Update Graph.pdf
Confident OpenShift Upgrades with the Update Graph.pdfConfident OpenShift Upgrades with the Update Graph.pdf
Confident OpenShift Upgrades with the Update Graph.pdfLalatendu Mohanty
 
Reproducible development to live applications with Red Hat CDK and Red Hat Op...
Reproducible development to live applications with Red Hat CDK and Red Hat Op...Reproducible development to live applications with Red Hat CDK and Red Hat Op...
Reproducible development to live applications with Red Hat CDK and Red Hat Op...Lalatendu Mohanty
 
OpenShift As A DevOps Platform
OpenShift As A DevOps PlatformOpenShift As A DevOps Platform
OpenShift As A DevOps PlatformLalatendu Mohanty
 
Red Hat Container Development Kit
Red Hat Container Development KitRed Hat Container Development Kit
Red Hat Container Development KitLalatendu Mohanty
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker composeLalatendu Mohanty
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with dockerLalatendu Mohanty
 
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedoraBringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedoraLalatendu Mohanty
 
Running A SIG in CentOS @Devconf Brno 2014
Running A SIG in CentOS @Devconf Brno 2014Running A SIG in CentOS @Devconf Brno 2014
Running A SIG in CentOS @Devconf Brno 2014Lalatendu Mohanty
 
Introduction to Project atomic (CentOS Dojo Bangalore)
Introduction to Project atomic (CentOS Dojo Bangalore)Introduction to Project atomic (CentOS Dojo Bangalore)
Introduction to Project atomic (CentOS Dojo Bangalore)Lalatendu Mohanty
 

Plus de Lalatendu Mohanty (14)

Confident OpenShift Upgrades with the Update Graph.pdf
Confident OpenShift Upgrades with the Update Graph.pdfConfident OpenShift Upgrades with the Update Graph.pdf
Confident OpenShift Upgrades with the Update Graph.pdf
 
Reproducible development to live applications with Red Hat CDK and Red Hat Op...
Reproducible development to live applications with Red Hat CDK and Red Hat Op...Reproducible development to live applications with Red Hat CDK and Red Hat Op...
Reproducible development to live applications with Red Hat CDK and Red Hat Op...
 
OpenShift As A DevOps Platform
OpenShift As A DevOps PlatformOpenShift As A DevOps Platform
OpenShift As A DevOps Platform
 
Contributing To CentOS SIGs
Contributing To CentOS SIGsContributing To CentOS SIGs
Contributing To CentOS SIGs
 
Atomic CLI scan
Atomic CLI scanAtomic CLI scan
Atomic CLI scan
 
Red Hat Container Development Kit
Red Hat Container Development KitRed Hat Container Development Kit
Red Hat Container Development Kit
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker compose
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
GlusterFS And Big Data
GlusterFS And Big DataGlusterFS And Big Data
GlusterFS And Big Data
 
Project Atomic-Nulecule
Project Atomic-NuleculeProject Atomic-Nulecule
Project Atomic-Nulecule
 
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedoraBringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
 
Running A SIG in CentOS @Devconf Brno 2014
Running A SIG in CentOS @Devconf Brno 2014Running A SIG in CentOS @Devconf Brno 2014
Running A SIG in CentOS @Devconf Brno 2014
 
Docker quick start
Docker quick startDocker quick start
Docker quick start
 
Introduction to Project atomic (CentOS Dojo Bangalore)
Introduction to Project atomic (CentOS Dojo Bangalore)Introduction to Project atomic (CentOS Dojo Bangalore)
Introduction to Project atomic (CentOS Dojo Bangalore)
 

Dernier

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 

Dernier (20)

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 

Vagrant For DevOps

  • 1. Vagrant For DevOps Lalatendu Mohanty @lalatenduM
  • 2. DevOps What is it? • It is a culture. • Filling the gap between developer and operations.
  • 3. DevOps It aims at establishing a culture and environment where building, testing, and releasing software, can happen rapidly, frequently, and more reliably. -Wikipedia It means: • Use right tools for automation, continuous integration and achieve continuous delivery.
  • 4. Vagrant • Create and configure lightweight, reproducible, and portable development environments. • A higher-level wrapper around virtualization software such as VirtualBox, VMware, KVM. • Also wrapper around configuration management software such as Ansible, Chef, Salt, and Puppet. • Public clouds e.g. AWS, DigitalOcean can be providers too.
  • 5. Use Continuos Integration Tools With Vagrant • Machine provisioning • Software provisioning • Configuration Management
  • 6. Vagrant :Quick Start • mkdir centos; cd centos • $ vagrant init centos/7 • $ vagrant up OR • $ vagrant up --provider <PROVIDER> • $vagrant ssh * These steps going to stay the same irrespective of OS and providers.
  • 7. Understanding Vagrant • Check the files in current directory $ ls -al total 8 drwxr-xr-x 4 lmohanty staff 136 Apr 23 01:04 . drwxr-xr-x 14 lmohanty staff 476 Apr 22 23:32 .. drwxr-xr-x 3 lmohanty staff 102 Apr 22 23:36 .vagrant -rw-r--r-- 1 lmohanty staff 3178 Apr 23 01:04 Vagrantfile $ tree .vagrant/ .vagrant/ └── machines └── default └── virtualbox ├── action_provision ├── action_set_name ├── creator_uid ├── id ├── index_uuid ├── private_key └── synced_folders
  • 8. Vagrantfile Vagrant.configure(2) do |config| config.vm.box = “centos/7" # config.vm.network "forwarded_port", guest: 80, host: 8080 # config.vm.network "private_network", ip: “192.168.33.10" # config.vm.network "public_network" # config.vm.synced_folder "../data", "/vagrant_data" # config.vm.provider "virtualbox" do |vb| # # Display the VirtualBox GUI when booting the machine # vb.gui = true # # # Customize CPU # v.cpus = 2 # # # Customize the amount of memory on the VM: # vb.memory = "1024" # end # # config.vm.provision "shell", inline: <<-SHELL # sudo yum update -y # sudo yum install -y docker # SHELL end
  • 9. Multi-machine Environment • Setup multiple machines with just one “$ vagrant up” command. Vagrant.configure("2") do |config| config.vm.provision "shell", inline: "echo Hello" config.vm.define "web" do |web| web.vm.box = "apache" end config.vm.define "db" do |db| db.vm.box = "mysql" end end
  • 10. Using Configuration management Software • We have Vagrant provisioners for Puppet, Chef, Ansible, CFEngine etc Vagrant.configure("2") do |config| # Run Ansible from the Host config.vm.provision "ansible" do |ansible| ansible.playbook = "playbook.yml" end end
  • 11. Debugging • VAGRANT_LOG environment variable for the desired log level name. • Log levels are : debug (loud), info (normal), warn (quiet), and error (very quiet) $ VAGRANT_LOG=info vagrant up OR $ set VAGRANT_LOG=info $ vagrant up OR $ vagrant up --info
  • 12. Vagrant Plugins • Add additional features or change default behaviour. • It is a Ruby gem. Vagrant is written in Ruby. • List : https://github.com/mitchellh/vagrant/wiki/ Available-Vagrant-Plugins
  • 13. Using DigitalOcean as a Provider • Install Vagrant plugin vagrant-digitalocean • https://github.com/devopsgroup-io/vagrant- digitalocean • Demo
  • 14. Vagrantbox A Vagrantbox is a tarred, gzip file containing the following: • Vagrantfile • The information from this will be merged into your Vagrantfile that is created when you run vagrant init boxname in a folder. • box-disk.vmd (For Virtualbox) • The box-disk.vmdk is the virtual machine image. • box.of • The box.ovf defines the virtual hardware for the box. • metadata.son • The metadata.json tells vagrant what provider the box works with.
  • 15. Tools To Create Vagrantbox • You can use tools like packer.io, imagefactory etc. • You can build a Vagrantbox manually • Or use “vagrant package” command for Virtualbox. • Modify base boxes and reuse them. • Also there is vagrant-mutate • https://github.com/sciurus/vagrant-mutate
  • 16. DevOps Workflow • Use same configuration management code as operations team in Vagrantfile. • More automation means, more chance of parity between development, testing and operations. • Create a environment where developers and QA can contribute to the automation and configuration management code.
  • 17. Future • Otto • The next generation tool from Hashicorp which uses Vagrant and other ecosystem tools. • But It is specially designed for micro services. • Knows how to install and configure service dependencies for development and deployment. • otto dev : will create the development environment. • otto infra, otto build, and otto deploy : will launches a complete infrastructure, builds your application, and deploys it
  • 18. References • http://www.slideshare.net/nemo-mulodo/devops2- vagrant-mosg • https://blog.engineyard.com/2014/building-a-vagrant- box • https://www.vagrantup.com/docs/boxes/format.html • http://unix.stackexchange.com/questions/222427/how- to-create-custom-vagrant-box-from-libvirt-kvm-instance • https://www.hashicorp.com/blog/otto.html