Windows Vagrant Setup

Vagrant installation on Windows

To participate in the lab you can use any 3 Linux servers of your choice. The labs are tailored for setup with CentOS/RHEL hosts. Below are instructions on how to setup the 3 required host with Vagrant on Windows. Follow the step by step guide to bootstrap the techlab environment on your OS of choice.

Prerequisites

  • VirtualBox 6 and higher requires 64-bit Windows.

Connectivity Details

With the Windows Vagrant setup provided the three local CentOS virtual machines running under VirtualBox have the following IP addresses and credentials.

1
2
3
4
5
6
control: 192.168.122.30
node1: 192.168.122.31
node2: 192.168.122.32

user: vagrant
password: vagrant

On Windows ensure VirtualBox and Vagrant are installed. The easiest way is to use Chocolatey to install both of them.

In an administrative powershell console execute the following commands:

1
2
3
4
5
6
7
# install chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

# installl VirtualBox and Vagrant
choco install -y virtualbox vagrant

Open a new PowerShell console with your login account privileges and execute the following commands.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# create directory and download Vagrantfile
mkdir ansible-techlab
cd ansible-techlab
iwr -OutFile Vagrantfile https://raw.githubusercontent.com/puzzle/ansible-techlab/master/Vagrantfile

# add Rocky Linux Box
vagrant box add --name=rockylinux/8 https://app.vagrantup.com/rockylinux/boxes/8/versions/4.0.0/providers/download/virtualbox.box

# setup vm's
vagrant up

Techlab Shutdown

1
2
3
4
cd ansible-techlab

# shutdown all vm's
vagrant destroy -f
Last modified November 14, 2022: add http headers (7f665a8)