Your SlideShare is downloading. ×
0
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Service Delivery Assembly Line with Vagrant, Packer, and Ansible

2,444

Published on

Leverage Packer, Vagrant, and Ansible as part of a service delivery pipeline. Streamline your continuous delivery process while also targeting multiple cloud providers.

Leverage Packer, Vagrant, and Ansible as part of a service delivery pipeline. Streamline your continuous delivery process while also targeting multiple cloud providers.

Published in: Technology
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,444
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
55
Comments
0
Likes
7
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Building(a(Service(Delivery( Assembly(Line(with(Vagrant,( Packer,(and(Ansible( ( ( ( ( @ichristo( ichristoffersen@vizuri.com(
  • 2. My new app is going to be the next big thing!
  • 3. Linux, IaaS, AWS, Rackspace, VMWare, oVirt, Spacewalk, Cobbler, Puppet, Ansible, Chef, Kickstart, Seed Linux Administrators SAN Engineers Network Engineers DevOps ITOps Service Level Agreements Budgets Staffing Guidance Procurement Process Authority to Operate Auditing & Compliance Infrastructure My new app is going to be the next big thing!
  • 4. Service Delivery : Provisioning the right set of resources required to support a set of activities in a timely manner
  • 5. Service Delivery : Provisioning the right set of resources required to support a set of activities in a timely manner yesterday
  • 6. Week$1$ Week$2$ Week$3$ Week$4$ Week$6$ Week$6$ Week$7$ Week$8$
  • 7. Assembly line : a manufacturing process in which work moves from station to station until a final product is produced
  • 8. Order Assemble Ship Get0Rich
  • 9. But what about quality? Can we scale to meet demand?
  • 10. Code Smell: A symptom in the source code that could indicate potential problems or weakness in the overall design
  • 11. Example Code Smells: Duplicate Code Long Methods Large, Multi-line Classes Long Class Parameter Lists
  • 12. Infrastructure Smell: A symptom in the system architecture that could indicate potential problems or fragility in the overall system
  • 13. Infrastructure Smells: Gold Images Teetering Stacks Configuration Drift Infrastructure Atrophy
  • 14. SMELL :: GOLD IMAGE
  • 15. PRESCRIPTION :: Use Packer
  • 16. Automatically create machine images for multiple platforms from a single blueprint
  • 17. AWS: AMI VMware: VMX + disks VirtualBox: OVF + disks DigitalOcean: Snapshots and many more … http://www.packer.io/docs/templates/builders.html
  • 18. Wait? Didn’t you say that ”gold” images were bad.
  • 19. Packer brings all the benefits of ”gold” images without the baggage.
  • 20. Automation No human interaction. Great for Continuous Integration / Deployment Standardization Use Puppet, Chef, Ansible, Bash to configure the image Repeatability Template goes into version control Image creation knowledge is now in code Anyone can build / rebuild the base images
  • 21. EXAMPLE CentOS Image in both AWS & Digital Ocean
  • 22. { "builders": [ { "type" : "amazon-ebs", "access_key" : "{{user `aws_access_key`}}", "secret_key" : "{{user `aws_secret_key`}}", "region" : "us-east-1", "source_ami" : "ami-8997afe0", "security_group_id" : "sg-8f7e24e4", "instance_type" : "t1.micro", "ssh_username" : "ec2-user", "ssh_timeout" : "5m", "ami_name" : "centos-baseline {{timestamp}}" }, …
  • 23. … { "type" : "digitalocean", "api_key" : "{{user `do_api_key`}}", "client_id" : "{{user `do_client_id`}}", "image_id" : "562354", "snapshot_name" : "centos-baseline {{timestamp}}" } ] … }
  • 24. $ packer validate base-image.json Template validated successfully. $ packer build base-image.json amazon-ebs output will be in this color. digitalocean output will be in this color. … ==> amazon-ebs: Deleting temporary keypair... Build 'amazon-ebs' finished. ==> digitalocean: Destroying droplet... ==> digitalocean: Deleting temporary ssh key... Build 'digitalocean' finished. ==> Builds finished. The artifacts of successful builds are: --> digitalocean: A snapshot was created: 'centos-baseline 1396457723' in region 'New York 1'
  • 25. SMELL :: Teetering Stacks
  • 26. + PRESCRIPTION
  • 27. Mature, stable, proven. Development since Jan 2010. Used by thousands of companies.
  • 28. Deploy to Multiple Providers AWS, DigitalOcean, HP Cloud, Joyent, KVM, libvirt, lxc, OpenStack, Rackspace, Vmware, VirtualBox vagrant up --provider=foo
  • 29. •  Simplifies the provisioning process for servers. •  Easier to have an instance per systems component. •  Copy files to new images. (i.e. Keys, Scripts, RPMs) Workflow
  • 30. www.vagrantbox.es
  • 31. Leverage Your own Packer Images •  Base Image as starting point. •  Integrates with multiple “provisioners” – Puppet, Chef, Ansible, Bash
  • 32. Automation No human interaction. Great for Continuous Delivery Standardization Can also use Puppet, Chef, Ansible, Bash Use Packer images as base images Repeatability Template goes into version control Image creation knowledge is now in code Anyone can build / rebuild the environment
  • 33. EXAMPLE Multiple CentOS Images created in AWS from base AMI
  • 34. Vagrant.configure("2") do |config| config.vm.box = "dummy" config.vm.box_url = "https://github.com/mitchellh/ vagrant-aws/raw/master/dummy.box" config.vm.provider :aws do |aws, override| aws.access_key_id = "YOUR KEY" aws.secret_access_key = "YOUR SECRET KEY" aws.keypair_name = "KEYPAIR NAME” aws.ami = ”ami-9baa9cf2” override.ssh.username = "ec2-user" override.ssh.forward_agent = true override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY" end end Vagrantfile
  • 35. $ vagrant up --provider=aws Use `vagrant plugin` commands to manage plugins. This warning will be removed in the next version of Vagrant. Bringing machine 'test-broker' up with 'aws' provider... Bringing machine 'test-node-01' up with 'aws' provider... Bringing machine 'test-node-02' up with 'aws' provider… Running Vagrant
  • 36. SMELL :: Configuration Drift
  • 37. PRESCRIPTION
  • 38. •  Configuration Management tool like Puppet, Chef, CFEngine •  Quick to get started •  Builds on familiar tools •  Run commands over SSH. No additional agents required
  • 39. EXAMPLE Configure NTP on Multiple CentOS AWS Images
  • 40. … config.vm.provision :ansible do |ansible| ansible.sudo = true ansible.playbook = "provisioning/ansible/playbook.yml” ansible.verbose = true end - hosts: all tasks: - name: ensure ntpd is at the latest version yum: pkg=ntp state=latest notify: - restart ntpd handlers: - name: restart ntpd service: name=ntpd state=restarted
  • 41. $ vagrant provision Use `vagrant plugin` commands to manage plugins. This warning will be removed in the next version of Vagrant. Bringing machine 'test-broker' up with 'aws' provider... Bringing machine 'test-node-01' up with 'aws' provider... Bringing machine 'test-node-02' up with 'aws' provider... WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1 Installing a LAMP Stack on CentOS
  • 42. EXAMPLE Provision a CentOS LAMP Stack in AWS
  • 43. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| boxes.each do |box| config.vm.define box[:name], primary: box[:primary] do |config| config.vm.box = "aws-centos" config.vm.box_url = https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box … config.vm.provision :shell, :privileged => false, :inline => "sudo yum -y install screen" config.vm.provision :ansible do |ansible| ansible.sudo = true ansible.playbook = "provisioning/ansible/playbook- lamp.yml" ansible.verbose = true end …
  • 44. - name : Install LAMP Stack user: ec2-user hosts: all tasks: - name: Install mysql yum: name=mysql-server state=latest - name: install httpd yum: name=httpd - name: Install php for mysql yum: name=$item with_items: - php - php-mysql - mysql-server
  • 45. $ vagrant up --provider=aws Use `vagrant plugin` commands to manage plugins. This warning will be removed in the next version of Vagrant. Bringing machine 'test-broker' up with 'aws' provider... Bringing machine 'test-node-01' up with 'aws' provider... Bringing machine 'test-node-02' up with 'aws' provider... WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1 $ vagrant provision
  • 46. vagrantup.com packer.io ansible.com Thank you

×