Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Continuous Delivery Meetup - Otto, Vagrant & a PDQ test environment

Continuous Delivery Meetup - Otto, Vagrant & a PDQ test environment

How to use Vagrant to provision and configure a small test lab on your local laptop. This allows for super fast setup, local development, with fast feedback cycles.

See http://devopsdan.com for more information on Devops events and training.

Stephen Wallace

Stephen J Wallace

November 25, 2015
Tweet

More Decks by Stephen J Wallace

Other Decks in Education

Transcript

  1. Otto, Vagrant, and a PDQ test env Continuous Delivery, 25th

    Nov 2015 Stephen Wallace https://au.linkedin.com/in/stephenwallace @stphnwallace
  2. Who am I? (“Look into the eyes, not around the

    eyes….”) Devops independent Puppet trainer Home brewer Connector of people (3000+)
  3. What do I do? • Help people (companies) stay relevant

    in a fast moving world • Build people, which builds teams. Collaboration Economy • Help enough people get what they want…
  4. Why? • The Three Ways • Be zippy • Fast

    feedback • Experiment / iterate • How to tool up to facilitate this? • Local dev, avoid errors, test quickly, then check in
  5. What? • Puppet • You like Ruby, right? • Scalable

    • Commercial support • Free t-shirts n stickers • Extremely well run Meetup group…. ;0)
  6. Vagrant? • Programatic provisioning to local app, public and private

    cloud • Ability to broker off to config management • Extremely useful for local test environments! • Configure a single host, or a full “lab” of hosts on their own private network. • Can include external configs via yaml
  7. Otto….Vagrant RIP? • Hashicorp’s stuff’s cool. • Otto - Vagrantfile

    out, Appfile in. application { name = "my-app" type = "ruby" dependency { source = "github.com/hashicorp/otto/examples/postgresql" } } customization "ruby" { ruby_version = “2.1" }
  8. Vagrantfile lives! • How’s this for a list of provisioners?

    • Shell • Ansible • CFEngine • Chef Solo / Chef Zero / Chef Client / Chef Apply (2 many cooks?!) • Docker • Puppet Apply • Puppet Agent • Salt • …and yes, it also does cloud!
  9. Vagrantfile • Can be as simple as this… • mkdir

    stuff ; cd stuff ; vagrant init ; vagrant up • But you’ll like want to do this… config.vm.define "client", primary: true do |client| client.vm.hostname = "client.example.com" client.vm.network :private_network, ip: "192.168.250.10" client.vm.provision "shell", inline: $setupscript end …..where $setupscript is a shell script that bootstraps stuff.
  10. Puppet • Client - Server (mostly) • Puppet console can

    make life easier, especially in a Windows shop. • Uses SSL certificates to authenticate - time waits for no kerberos connection! • Easy download and reuse of someone else’s hard work via Puppet Forge & github :)
  11. Modules and Classes • Programatically wrap resources in a class

    wrapper. • `include base::linux` ….puppet apply…and watch the magic… • Puppet can write this code for you! ( `puppet resource file /etc/passwd` ) • Use an IDE, Sublime 3, or vim- puppet syntax highlighting!
  12. Your homework…. • Download the learning VM (https://puppetlabs.com/download- learning-vm) •

    http://www.vagrantup.com/downloads • git clone https://github.com/lwndev/atlassian-apps-vagrant- install.git && cd atlas* && vagrant up • Put the kettle on, check the module README.md • Incr resources? vb.customize ["modifyvm", :id, "--cpus", "2"] • Access JIRA: http://192.168.33.12:8080 - be amazed at how easy that was :)
  13. Who likes free #Devops education? • Yup, we do to!

    • This Saturday 28th…… • http://devopsdan.com/ • @devopsdanny
  14. Who likes free #BeerOps? • Yup, we do to! •

    Dec 10th…… • http:// beeropsmegamixer.com/ • @beeropsmegamix
  15. We’re looking for leadership! 20+ Vendor Backed Meetup Groups /

    3,000 Membership Puppet, Ansible, Salt, Chef Docker, CoreOS Atlassian Devops Hashicorp Microsoft Automation (Sydney, Melbourne, Brisbane) Collaboration Economy (R U a 20%er?) Come and talk to me!