SlideShare una empresa de Scribd logo
1 de 29
Puppet and Vagrant in Development




   View details and rate at https://joind.in/6709
Puppet and Vagrant in Development

   Puppet is:
       Automation software to      help   system   admins
        manage infrastructure.
       Automates provisioning and configuration
       Automate repetitive tasks
       Ensure stability through consistency
       Open source and commercial versions
Puppet and Vagrant in Development

   Puppet Components:
       Puppet Master
       Puppet Agent
       Puppet Enterprise Console (not in open source)
       Puppet Module Tool
       Puppet Compliance
       Mcollective
       Facter
Puppet and Vagrant in Development

   Third-party Product Needs:
       Ruby
       Apache HTTP server
       Phusion Passenger
       ActiveMQ
       Ruby on Rails
Puppet and Vagrant in Development

   Supported Operating Systems:
       RHEL
       CentOS
       Ubuntu
       Debian
       Scientific Linux
       Oracle Linux
       SUSE
       Solaris
       Windows
Puppet and Vagrant in Development
   Pieces
       Modules for
        popular
        configurations
       Compose
        application stack
        needed
       Rollout to the
        node
Puppet and Vagrant in Development
   Workflow
       Node informs Puppet Master of status
       Puppet Master compiles a catalog
       Node complies with catalog
       Puppet Agent on client reports back to Puppet
        Master
       Puppet Master reports to Report Collector.
Puppet and Vagrant in Development
Puppet and Vagrant in Development
   Sample Usages
       Roll out another node in a cluster
                   Webserver
                   Email server
                   Database server
                   Etc.
       Add another workstation
       Create lifecycle machine
                   Development
                   Testing
                   Staging
                   Production
Puppet and Vagrant in Development
   Puppet Resources
       Puppet defines resources in a array'ish language
User { 'dave':
    Ensure => present,
    uid => '507',
    gid => 'admin',
    shell => '/bin/zsh',
    home => '/home/dave',
    managehome => true,
}

       We can see the parts of the structure
                   Type = User
                   Title = Dave
                   Attributes
                   Values
Puppet and Vagrant in Development
   Puppet Adding a Resources
       What does it look like:
$ puppet resource user dave ensure=present shell=”/bin/zsh”
home=”/home/dave” managehome=true
       Would output:
Notice: /User[dave]/ensure: created
User { 'dave':
    Ensure => present,
    uid => '507',
    gid => 'admin',
    shell => '/bin/zsh',
    home => '/home/dave',
    managehome => true,
}
Puppet and Vagrant in Development
   Puppet Manifests
       Can inform Puppet what to do in bulk using
        manifests.
$ puppet apply my_test_manifest.pp

       Manifest would look like:
# /path/to/my_test_manifest.pp
User { 'dave':
    Ensure => present,
    uid => '507',
    gid => 'admin',
    shell => '/bin/zsh',
    home => '/home/dave',
    managehome => true,
}
Puppet and Vagrant in Development
   Puppet Manifest Classes
       The Puppet manifests can become complex.
Class ntp {
    package { 'ntp':
        ensure => installed,
    }

    service { 'ntp':
        name => 'ntpd',
        ensure => running,
        enable => true,
        subscribe => File['ntp.conf'],
    }
}
Puppet and Vagrant in Development
   Puppet Training
       Materials available on PuppetLabs site for FREE
        download.
                  Learning Puppet Tutorial
                  Learn Puppet VM to train on (VMWare or
                    VirtualBox)
                  Module cheatsheet
                  Core types cheatsheet
                  Users Guide
                  Dashboard Manual
Puppet and Vagrant in Development
   Provisioned Your Way
       VirtualBox – through 3rd party
       VMWare – direct Puppet support
       Cloud – direct Puppet support
       Traditional hardware - standard
Puppet and Vagrant in Development
   Vagrant
       Virtualized development made easy
                  Lowers setup time
                  Eliminates “works on my machine” excuse
                  Uses Oracle VirtualBox
                  Can use Puppet or Chef
                  FREE and open source
Puppet and Vagrant in Development
   Vagrant setup items needed for this example
       Get VirtualBox from Oracle's download page
       Install Ruby
                   Required by Vagrant, Chef and/or Puppet.
       Install Vagrant
                   Talks to VirtualBox and builds virtual machine
                     based on a “base box”.
       Decide on whether to use Chef or Puppet.
                   Enables setup and configuration of advanced
                     services you may need in your environment.
Puppet and Vagrant in Development
   Vagrant Basic How To
       Create a directory and change to the new directory
        via command line.
       Execute three simple commands:
$ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
$ vagrant init lucid32
$ vagrant up

       We now have a working Ubuntu (Lucid Lynx 32 bit)
        linux server running. However it is very “bare
        bones”.
       List installed Boxes
$ vagrant box list
Puppet and Vagrant in Development
   Benefits of Using Vagrant
       Solo Developers
                   Maintain consistency across multiple projects.
                   Run multiple environments on a single home
                     machine. (Dev., Test, Staging)
                   Easily tear down and rebuild
       Teams
                   Identical development environments. Consistent
                      and portable.
       Companies
                   Easier onboarding of new talent.
                   Build development environment      once   and
                     distribute to teams.
Puppet and Vagrant in Development
   Vagrant Configuration
       Vagrantfile
                  Simply Ruby code which typically contains a
                    Vagrant configuration block.
                  First thing loaded by Vagrant.
                  Basic file created when 'init' is called from within
                    a directory.
                  Add more options for more configuration.
Puppet and Vagrant in Development
   Vagrant Base Box
       Many base boxes available over the Internet, or you
        can create your own.
                Creation convention should be followed
       A base box must be added via local file or HTTP
$ vagrant box add {name} {location to pull from}

       Or you can remove current base boxes
$ vagrant box remove {name}

       Base box is defined in the Vagrantfile
Vagrant::Config.run do |config|
    config.vm.box = “lucid32”
end
Puppet and Vagrant in Development
   Testing/Running
       To launch the bootup/provision we simply tell
        Vagrant “up”.
$ vagrant up

       Or if you “suspended” to shut down last time you
        would use “resume”.
       To shut down we can either “suspend” to save the
        current state of the machine (does not return disk
        space, about 1GB), “destroy” everything (requires
        re-provision), or “halt” which is a graceful
        shutdown.
$ vagrant destroy
$ vagrant halt
Puppet and Vagrant in Development
   SSH
       Vagrant makes SSH easy to the virtual machine
        from within the project directory.
$ vagrant ssh

       Project files are available at '/vagrant' by default,
        but can be changed.
       The VM has both read and write access to the
        shared folder.
       To gain root (su) access the password is 'vagrant'
Puppet and Vagrant in Development
   Provisioning
       Using Chef or Puppet we can create a manifest to
        alter the VM.
                 Install apps
                 Edit config files


                 Many tasks needed to go from Base Box

                    to desired environment.
       Manifests (or recipe for Chef)
                  Manifests sub-directory within project.
                  Default.pp is the default file loaded.
Puppet and Vagrant in Development
   Port Forwarding
       By default your host machine should be able to
        access the virtual machine by IP address. However,
        we need to activate port forwarding for services.
       For HTTP:
Vagrant::Config.run do |config|
    # Forward guest port 80 to host port 4567
    config.vm.forward_port 80, 4567
end

       Then we simply reload Vagrant.
$ vagrant reload
Puppet and Vagrant in Development
   Packaging
       Start with a Base Box
                   Customize it as needed, unless relying solely on
                     provisioning with Chef or Puppet.
                   Run command to package
$ vagrant package –vagrantfile Vagrantfile.pkg
                   Creates 'package.box' in same directory.
                   Distribute via raw file or via HTTP, for others.
                   Other users can now use:
$ vagrant box add my_box /path/to/the/package.box
$ vagrant init my_box
$ vagrant up
Puppet and Vagrant in Development
   Advanced Capabilities of Vagrant
       Many   advanced      topics     available   under
        Documentation on the Vagrant site.
                  Modules within Manifests to encapsulate
                    Puppet files.
                  Create your own Base Boxes
                  Multi-VM Environment
                  Plugins
                  NFS Shared Folders
Puppet and Vagrant in Development
   Resources
       http://vagrantup.com
       http://puppetlabs.com
       http://opscode.com/chef/
       http://virtualbox.org



         View details and rate at https://joind.in/6709
Puppet and Vagrant in Development

   Thank you


                   Adam Culp
            http://www.geekyboy.com
           http://github.com/adamculp
                Twitter @adamculp

Más contenido relacionado

La actualidad más candente

Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To RunningGiacomo Vacca
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHErica Windisch
 
How To Set a Vagrant Development System
How To Set a Vagrant Development SystemHow To Set a Vagrant Development System
How To Set a Vagrant Development SystemPaul Bearne
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutesLarry Cai
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesLuciano Fiandesio
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Puppet
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux ContainerBalaji Rajan
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshopRuncy Oommen
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XJérôme Petazzoni
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...Jérôme Petazzoni
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureJérôme Petazzoni
 
Vagrant vs Docker
Vagrant vs DockerVagrant vs Docker
Vagrant vs Dockerjchase50
 

La actualidad más candente (20)

A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
 
How To Set a Vagrant Development System
How To Set a Vagrant Development SystemHow To Set a Vagrant Development System
How To Set a Vagrant Development System
 
The state of the swarm
The state of the swarmThe state of the swarm
The state of the swarm
 
Tech Talk - Vagrant
Tech Talk - VagrantTech Talk - Vagrant
Tech Talk - Vagrant
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutes
 
Docker
DockerDocker
Docker
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux Container
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 
Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and Azure
 
Vagrant vs Docker
Vagrant vs DockerVagrant vs Docker
Vagrant vs Docker
 
Docker by Example - Quiz
Docker by Example - QuizDocker by Example - Quiz
Docker by Example - Quiz
 

Similar a Puppet and Vagrant in development

Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Acquia
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOpsAgile Spain
 
Cooking Perl with Chef: Hello World Tutorial
Cooking Perl with Chef: Hello World TutorialCooking Perl with Chef: Hello World Tutorial
Cooking Perl with Chef: Hello World TutorialDavid Golden
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012Carlos Sanchez
 
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
 
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
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environmentbocribbz
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011Carlos Sanchez
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechChristopher Bumgardner
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packerfrastel
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantAntons Kranga
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Puppet
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitAndreas Heim
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantJoe Ferguson
 

Similar a Puppet and Vagrant in development (20)

Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
 
Cooking Perl with Chef: Hello World Tutorial
Cooking Perl with Chef: Hello World TutorialCooking Perl with Chef: Hello World Tutorial
Cooking Perl with Chef: Hello World Tutorial
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012
 
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
 
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
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with Vagrant
 
Vagrant
VagrantVagrant
Vagrant
 
Vagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy StepsVagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy Steps
 
Security Testing Using Infrastructure-As-Code
Security Testing Using Infrastructure-As-CodeSecurity Testing Using Infrastructure-As-Code
Security Testing Using Infrastructure-As-Code
 
Keep calm and vagrant up
Keep calm and vagrant upKeep calm and vagrant up
Keep calm and vagrant up
 

Más de Adam Culp

Putting legacy to REST with middleware
Putting legacy to REST with middlewarePutting legacy to REST with middleware
Putting legacy to REST with middlewareAdam Culp
 
Release your refactoring superpower
Release your refactoring superpowerRelease your refactoring superpower
Release your refactoring superpowerAdam Culp
 
Managing Technical Debt
Managing Technical DebtManaging Technical Debt
Managing Technical DebtAdam Culp
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications FasterAdam Culp
 
Containing Quality
Containing QualityContaining Quality
Containing QualityAdam Culp
 
Debugging elephpants
Debugging elephpantsDebugging elephpants
Debugging elephpantsAdam Culp
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshopAdam Culp
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffAdam Culp
 
Foundations of Zend Framework
Foundations of Zend FrameworkFoundations of Zend Framework
Foundations of Zend FrameworkAdam Culp
 
Accidental professional
Accidental professionalAccidental professional
Accidental professionalAdam Culp
 
Build great products
Build great productsBuild great products
Build great productsAdam Culp
 
Does Your Code Measure Up?
Does Your Code Measure Up?Does Your Code Measure Up?
Does Your Code Measure Up?Adam Culp
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsAdam Culp
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing DevelopmentAdam Culp
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy CodeAdam Culp
 
Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Adam Culp
 
Clean application development tutorial
Clean application development tutorialClean application development tutorial
Clean application development tutorialAdam Culp
 
Refactoring 101
Refactoring 101Refactoring 101
Refactoring 101Adam Culp
 

Más de Adam Culp (20)

Hypermedia
HypermediaHypermedia
Hypermedia
 
Putting legacy to REST with middleware
Putting legacy to REST with middlewarePutting legacy to REST with middleware
Putting legacy to REST with middleware
 
php-1701-a
php-1701-aphp-1701-a
php-1701-a
 
Release your refactoring superpower
Release your refactoring superpowerRelease your refactoring superpower
Release your refactoring superpower
 
Managing Technical Debt
Managing Technical DebtManaging Technical Debt
Managing Technical Debt
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications Faster
 
Containing Quality
Containing QualityContaining Quality
Containing Quality
 
Debugging elephpants
Debugging elephpantsDebugging elephpants
Debugging elephpants
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshop
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework Blastoff
 
Foundations of Zend Framework
Foundations of Zend FrameworkFoundations of Zend Framework
Foundations of Zend Framework
 
Accidental professional
Accidental professionalAccidental professional
Accidental professional
 
Build great products
Build great productsBuild great products
Build great products
 
Does Your Code Measure Up?
Does Your Code Measure Up?Does Your Code Measure Up?
Does Your Code Measure Up?
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing Development
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy Code
 
Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2
 
Clean application development tutorial
Clean application development tutorialClean application development tutorial
Clean application development tutorial
 
Refactoring 101
Refactoring 101Refactoring 101
Refactoring 101
 

Último

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Último (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: 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)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

Puppet and Vagrant in development

  • 1. Puppet and Vagrant in Development View details and rate at https://joind.in/6709
  • 2. Puppet and Vagrant in Development  Puppet is:  Automation software to help system admins manage infrastructure.  Automates provisioning and configuration  Automate repetitive tasks  Ensure stability through consistency  Open source and commercial versions
  • 3. Puppet and Vagrant in Development  Puppet Components:  Puppet Master  Puppet Agent  Puppet Enterprise Console (not in open source)  Puppet Module Tool  Puppet Compliance  Mcollective  Facter
  • 4. Puppet and Vagrant in Development  Third-party Product Needs:  Ruby  Apache HTTP server  Phusion Passenger  ActiveMQ  Ruby on Rails
  • 5. Puppet and Vagrant in Development  Supported Operating Systems:  RHEL  CentOS  Ubuntu  Debian  Scientific Linux  Oracle Linux  SUSE  Solaris  Windows
  • 6. Puppet and Vagrant in Development  Pieces  Modules for popular configurations  Compose application stack needed  Rollout to the node
  • 7. Puppet and Vagrant in Development  Workflow  Node informs Puppet Master of status  Puppet Master compiles a catalog  Node complies with catalog  Puppet Agent on client reports back to Puppet Master  Puppet Master reports to Report Collector.
  • 8. Puppet and Vagrant in Development
  • 9. Puppet and Vagrant in Development  Sample Usages  Roll out another node in a cluster  Webserver  Email server  Database server  Etc.  Add another workstation  Create lifecycle machine  Development  Testing  Staging  Production
  • 10. Puppet and Vagrant in Development  Puppet Resources  Puppet defines resources in a array'ish language User { 'dave': Ensure => present, uid => '507', gid => 'admin', shell => '/bin/zsh', home => '/home/dave', managehome => true, }  We can see the parts of the structure  Type = User  Title = Dave  Attributes  Values
  • 11. Puppet and Vagrant in Development  Puppet Adding a Resources  What does it look like: $ puppet resource user dave ensure=present shell=”/bin/zsh” home=”/home/dave” managehome=true  Would output: Notice: /User[dave]/ensure: created User { 'dave': Ensure => present, uid => '507', gid => 'admin', shell => '/bin/zsh', home => '/home/dave', managehome => true, }
  • 12. Puppet and Vagrant in Development  Puppet Manifests  Can inform Puppet what to do in bulk using manifests. $ puppet apply my_test_manifest.pp  Manifest would look like: # /path/to/my_test_manifest.pp User { 'dave': Ensure => present, uid => '507', gid => 'admin', shell => '/bin/zsh', home => '/home/dave', managehome => true, }
  • 13. Puppet and Vagrant in Development  Puppet Manifest Classes  The Puppet manifests can become complex. Class ntp { package { 'ntp': ensure => installed, } service { 'ntp': name => 'ntpd', ensure => running, enable => true, subscribe => File['ntp.conf'], } }
  • 14. Puppet and Vagrant in Development  Puppet Training  Materials available on PuppetLabs site for FREE download.  Learning Puppet Tutorial  Learn Puppet VM to train on (VMWare or VirtualBox)  Module cheatsheet  Core types cheatsheet  Users Guide  Dashboard Manual
  • 15. Puppet and Vagrant in Development  Provisioned Your Way  VirtualBox – through 3rd party  VMWare – direct Puppet support  Cloud – direct Puppet support  Traditional hardware - standard
  • 16. Puppet and Vagrant in Development  Vagrant  Virtualized development made easy  Lowers setup time  Eliminates “works on my machine” excuse  Uses Oracle VirtualBox  Can use Puppet or Chef  FREE and open source
  • 17. Puppet and Vagrant in Development  Vagrant setup items needed for this example  Get VirtualBox from Oracle's download page  Install Ruby  Required by Vagrant, Chef and/or Puppet.  Install Vagrant  Talks to VirtualBox and builds virtual machine based on a “base box”.  Decide on whether to use Chef or Puppet.  Enables setup and configuration of advanced services you may need in your environment.
  • 18. Puppet and Vagrant in Development  Vagrant Basic How To  Create a directory and change to the new directory via command line.  Execute three simple commands: $ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box $ vagrant init lucid32 $ vagrant up  We now have a working Ubuntu (Lucid Lynx 32 bit) linux server running. However it is very “bare bones”.  List installed Boxes $ vagrant box list
  • 19. Puppet and Vagrant in Development  Benefits of Using Vagrant  Solo Developers  Maintain consistency across multiple projects.  Run multiple environments on a single home machine. (Dev., Test, Staging)  Easily tear down and rebuild  Teams  Identical development environments. Consistent and portable.  Companies  Easier onboarding of new talent.  Build development environment once and distribute to teams.
  • 20. Puppet and Vagrant in Development  Vagrant Configuration  Vagrantfile  Simply Ruby code which typically contains a Vagrant configuration block.  First thing loaded by Vagrant.  Basic file created when 'init' is called from within a directory.  Add more options for more configuration.
  • 21. Puppet and Vagrant in Development  Vagrant Base Box  Many base boxes available over the Internet, or you can create your own. Creation convention should be followed  A base box must be added via local file or HTTP $ vagrant box add {name} {location to pull from}  Or you can remove current base boxes $ vagrant box remove {name}  Base box is defined in the Vagrantfile Vagrant::Config.run do |config| config.vm.box = “lucid32” end
  • 22. Puppet and Vagrant in Development  Testing/Running  To launch the bootup/provision we simply tell Vagrant “up”. $ vagrant up  Or if you “suspended” to shut down last time you would use “resume”.  To shut down we can either “suspend” to save the current state of the machine (does not return disk space, about 1GB), “destroy” everything (requires re-provision), or “halt” which is a graceful shutdown. $ vagrant destroy $ vagrant halt
  • 23. Puppet and Vagrant in Development  SSH  Vagrant makes SSH easy to the virtual machine from within the project directory. $ vagrant ssh  Project files are available at '/vagrant' by default, but can be changed.  The VM has both read and write access to the shared folder.  To gain root (su) access the password is 'vagrant'
  • 24. Puppet and Vagrant in Development  Provisioning  Using Chef or Puppet we can create a manifest to alter the VM.  Install apps  Edit config files  Many tasks needed to go from Base Box to desired environment.  Manifests (or recipe for Chef)  Manifests sub-directory within project.  Default.pp is the default file loaded.
  • 25. Puppet and Vagrant in Development  Port Forwarding  By default your host machine should be able to access the virtual machine by IP address. However, we need to activate port forwarding for services.  For HTTP: Vagrant::Config.run do |config| # Forward guest port 80 to host port 4567 config.vm.forward_port 80, 4567 end  Then we simply reload Vagrant. $ vagrant reload
  • 26. Puppet and Vagrant in Development  Packaging  Start with a Base Box  Customize it as needed, unless relying solely on provisioning with Chef or Puppet.  Run command to package $ vagrant package –vagrantfile Vagrantfile.pkg  Creates 'package.box' in same directory.  Distribute via raw file or via HTTP, for others.  Other users can now use: $ vagrant box add my_box /path/to/the/package.box $ vagrant init my_box $ vagrant up
  • 27. Puppet and Vagrant in Development  Advanced Capabilities of Vagrant  Many advanced topics available under Documentation on the Vagrant site.  Modules within Manifests to encapsulate Puppet files.  Create your own Base Boxes  Multi-VM Environment  Plugins  NFS Shared Folders
  • 28. Puppet and Vagrant in Development  Resources  http://vagrantup.com  http://puppetlabs.com  http://opscode.com/chef/  http://virtualbox.org View details and rate at https://joind.in/6709
  • 29. Puppet and Vagrant in Development  Thank you Adam Culp http://www.geekyboy.com http://github.com/adamculp Twitter @adamculp