Running Upstream Spacewalk Tests Using Ansible and Vagrant

Running Upstream Spacewalk Tests Using Ansible and Vagrant

RUNNING UPSTREAM SPACEWALK TESTS USING ANSIBLE AND VAGRANT Aleš Dujíček, Red Hat PyCon Israel 2. - 3. 5. 2016 INTRODUCTION SPACEWALK VAGRANT ANSIBLE System management tool VM management tool Configuration management tool 2 VAGRANT ● VM management tool ● Quick and easy to start, use and destroy VMs ● vagrant up ● vagrant ssh ● vagrant destroy ● Providers: libvirt, virtualbox, docker, … ● Provisioning: shell, ansible, chef, puppet, … 3 VAGRANT BOXES ● https://atlas.hashicorp.com/boxes/search ● box.img ● Libvirt image ● Vagrantfile { ● default configuration "provider" : "libvirt", "format" : "qcow2", ● metadata.json "virtual_size" : 6 } ● tar czf x.box metadata.json Vagrantfile box.img 4 VAGRANTFILE ● Ruby script ● Configuration of VM Vagrant.configure(2) do |config| config.vm.box = "Centos" config.vm.provision "shell", inline: <<-SHELL yum update -y yum install -y httpd SHELL end 5 ANSIBLE ● Configuration management tool ● Needs only SSH and Python ● Ad-hoc command ● $ ansible localhost -m ping ● Playbooks and inventories ● Lot of modules ● $ ansible-doc --list 6 ANSIBLE PLAYBOOKS ● YAML formatted files ● Describes hosts, variables, roles, and tasks ● Run --- - hosts: all $ ansible-playbook playbook.yml tasks: - name: Install git yum: git state: present - name: … … 7 ANSIBLE INVENTORY ● INI formatted file ● Describes groups of hosts s1.example.com [webservers] www1.example.com www2.example.com [dbservers] db1.example.com $ ansible dbservers -i inventory -m ping 8 VAGRANT WITH ANSIBLE ● Vagrantfile + playbook Vagrant.configure(2) do |config| config.vm.box = "Fedora23" config.vm.provision "ansible" do |ansible| ansible.playbook = "playbook.yml" end end 9 10 11 12 13 THANK YOU plus.google.com/+RedHat facebook.com/redhatinc linkedin.com/company/red-hat twitter.com/RedHatNews youtube.com/user/RedHatVideos.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us