Giter Site home page Giter Site logo

containers101-workshop-vagrant's Introduction

RHEL 8 Ansible Workshop class build out VM

Vagrantfile with buildout configuration for a Virtualbox VM with RHEL 8 server-desktop and configuration for building out an ansible workshop within AWS

Requirements

  1. VirtualBox & Extension Pack
  2. Vagrant
  3. vagrant-vbguest
    vagrant plugin install vagrant-vbguest 
  4. To register with subscription-manager a free RedHat Developer subscription is required. This Vagrantfile expects to find the credentials in environment variables called RH_SUBSCRIPTION_MANAGER_USER and RH_SUBSCRIPTION_MANAGER_PW. Ensure these are exported and available to Vagrant, the Vagrantfile will abort if these are not set.
  5. group_var/all.yml file filled in with all your specific settings an example is available here

Start

Be sure to update the source_all variable in Vagrantfile of where your all.yml file is located on host system. To start the vm just run command

vagrant up

Vagrantfile for RHEL 8

Vagrantfile to spin up a RHEL 8 VM and register with RHN via subscription-manager. It will install the environment for running ansible playbooks to build the red hat ansible workshop on AWS.

Ansible Workshop build out on AWS

ansible-playbook 1_provision.yml

NOTE: If 1_provision.yml playbook has errors you will need to start over after running

ansible-playbook 3_unregister.yml -e NOSSH=true
ansible-playbook 2_load.yml

NOTE: Playbook 2_load.yml will hang twice while doing the subscription manager tasks. After each time it hangs just run the playbook again.

To test workshop

copy the test-workshop.yml file onto the admin server and run

ansible nodes -m shell -a 'rpm -qa | grep docker'
ansible nodes -m shell -a 'rpm -qa | grep podman'
ansible nodes -m shell -a 'docker images redhatgov/alpine' -b 
ansible nodes -m shell -a 'docker images redhatgov/fedora' -b
ansible nodes -m shell -a 'podman images redhatgov/alpine' -b 
ansible nodes -m shell -a 'podman images redhatgov/fedora' -b

To remove the workshop environment from AWS

ansible-playbook 3_unregister.yml

NOTE: If any errors while unregistering run again with environment variable

ansible-playbook 3_unregister.yml -e NOSSH=true

Notes

Using the current latest versions of Vagrant and VirtualBox on MacOS, the version of VirtualBox Guest Additions is newer than the version packaged in roboxes/rhel8. Vagrant will try and update this before the VM has been registered with RHN so all calls to yum install fail. For this reason config.vbguest.auto_update = false is configured.

containers101-workshop-vagrant's People

Contributors

sixpac009 avatar

Watchers

Ivan Makfinsky avatar James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.