Coder Social home page Coder Social logo

rhce8-practice-env's Introduction

rhce8-practice-env

An RHCE v8 lab enviroment with practice exams.

welcome

If you are preparing for the RHCE v8 exam, this repo will help you create a lab environment and practice the exam objectives.

The repo contains Vagrant and Ansible files that will set up 1x control node (RHEL server with GUI), one local repo server, and 4x other nodes.

  • control
  • repo
  • node1
  • node2
  • node3
  • node4

The control node will have access to the local repo server and the other nodes, which will simulate the exam scenario.

Setting Up the Environment

See the Setup page for details instructions on how to install and configure the environment.

Environment Info

Vagrant Boxes

Users

User: vagrant Password: vagrant Sudo access: yes

Network

  • control
    • control.ansi.example.com
    • 192.168.55.200
    • Gateway - 192.168.55.1
    • DNS - 8.8.8.8
  • node1
    • node1.ansi.example.com
    • 192.168.55.201
    • Gateway - 192.168.55.1
    • DNS - 8.8.8.8
  • node2
    • node2.ansi.example.com
    • 192.168.55.202
    • Gateway - 192.168.55.1
    • DNS - 8.8.8.8
  • node3
    • node3.ansi.example.com
    • 192.168.55.203
    • Gateway - 192.168.55.1
    • DNS - 8.8.8.8
  • node4
    • node4.ansi.example.com
    • 192.168.55.204
    • Gateway - 192.168.55.1
    • DNS - 8.8.8.8
  • repo
    • repo.ansi.example.com
    • 192.168.55.199
    • Base and AppStream repos are available via:
      • http://repo.ansi.example.com/BaseOS
      • http://repo.ansi.example.com/AppStream

Vagrant Commands

Use the commands below to control your environment with Vagrant:

  • vagrant up - Boots and provisions the environment
  • vagrant destroy -f - Shuts down and destroys the environment
  • vagrant halt - Only shuts down the environment VMs (can be booted up with vagrant up)
  • vagrant suspend - Puts the VMs in a suspended state
  • vagrant resume - Takes VMs out of a suspended state

Note

  • The first time you run vagrant up it will download the box (VM image), so it will take a while. After that, recreating the VMs will be quicker as the images will already be local to your machine.
  • Once the VMs are created you can also use the VirtualBox Manager to control the VMS.

Reseting the environment

Use vagrant destroy -f and vagrant up to recreate the environment. You can also recreate a specific node by providing the node name to the two commands.

For example:

vagrant destroy -f node1

vagrant up node1

Accessing the systems

There are three ways to access the systems:

  • With vagrant ssh [node]
  • Via VirtualBox Manager
  • Using the built-in SSH client for you OS ssh [email protected]

Tip

Add the IP addresses to your local host file if you want to connect to the guest systems with the hostname.

Practice Exams

A few practice exams are available at the RHCE8 Practice Exams page.

Exam Material

Red Hat Developer Program (FREE RHEL Licenses)

I highly recommend registering your control node (or all nodes) using free RHEL licenses that are provided with the Red Hat Developer Program (you can read more about it here). By doing that, you will be able to run full updates by adding Red Hat official repos, and much more.

  • Register for the Red Hat Developer Program
  • Register the control node to your new developer account using subscritption-manager (or using included playbooks - see below)
  • Optionally:
    • Enable the 'CodeReady Linux Builder' repo
    • Install/enable the EPEL repo

Using Included Playbooks

Once you have your Red Had Developer subscription, you can also register the control node with included playbooks, either before the build, or after building the environment.

First add your Red Hat username and password to:

roles/register-control-node/defaults/main.yml

---
# defaults file for register-control-node

username: ''
password: ''

Then use one of the two methods below.

Enabling control registration during build

Before building the environment, set the register_control variable to true:

playbooks/build-nodes.yml

  vars:
    - register_control: true

Then run vagrant up as usual to build the environment.

After the environment is built

Run the playbook register-control.yml from the control node:

# ssh to the control node
vagrant ssh control

# Change into the /vagrant folder
cd /vagrant

# Run the playbook
ansible-playbook playbooks/register-control.yml

Known Issues

VT-x is not available. (VERR_VMX_NO_VMX)

Running the vagrant up environment build will fail If HyperV is installed on the Windows VirtualBox host. Error is usually "VT-x is not available. (VERR_VMX_NO_VMX)" or similar, when the script attempts to boot the first VM.

Resolution seems to be either remove HyperV, or preventing its hypervisor from starting with the command below followed by a reboot:

bcdedit /set hypervisorlaunchtype off

Could not create the medium storage unit (VERR_ALREADY_EXISTS)

The following error might appear when re-creating one or more VMs in VirtualBox:

Stderr: 0%...VBOX_E_FILE_ERROR
VBoxManage: error: Failed to create medium
VBoxManage: error: Could not create the medium storage unit 'rhce8env/disk-0-4.vdi'.
VBoxManage: error: VDI: cannot create image 'rhce8env/disk-0-4.vdi' (VERR_ALREADY_EXISTS)

If you have VirtualBox Manager open, check the disks in the 'Media' section and you might notice that a disk for a deleted VM is still listed. If the file itself doesn't exist, close the VirtualBox Manager and try running vagrant up again.

Author

Victor Mendonça

Acknowledgements

This project is a fork of the rdbreak/rhce8env project, but it has many extra features and modifications.

Exam 1 is a variation of the of the Lisenet: Ansible Sample Exam for RHCE EX294 and EX407.

rhce8-practice-env's People

Contributors

victorbrca avatar

Stargazers

 avatar khamali avatar Stephen avatar Hue Truong avatar Mark Wilson avatar  avatar Areca avatar Łukasz Stasieńko avatar

Watchers

 avatar  avatar

Forkers

kmf

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.