- Enable Hyper-V
- Install Vagrant
- Install Git
- Add your user to the list of Hyper-V Administrators. This will allow you to use vagrant without opening an Administrative PowerShell prompt.
- Clone repo using
git clone [email protected]:estenrye/ansible-rancher-lab.git
The vagrant driver for Hyper-V lacks two components that allow us to have a predictable lab setup. The first is that the Hyper-V vagrant driver does not provide a mechanism for specifying multiple Network Interface Adapters on a guest VM. The second is that the Hyper-V vagrant driver does not provide a mechnanism for specifying a static IP address for a guest VM on any network type. This project addresses the first problem by using a combination of vagrant commands and PowerShell commandlets to add a second Network Interface Adapter to the router guest VM. It addresses the second by dynamically generating the inventory on the host machine and copying it to the acs guest VM.
./scripts/OneTimeSetup.ps1
vagrant up openvas router
vagrant halt router
Add-VMNetworkAdapter -VMName router.rz.lab -SwitchName Private -Name LAN
Start-VM router.rz.lab
./scripts/Generate-Ansible-Inventory.ps1
vagrant ssh openvas -c "ansible-playbook -i inventory --become playbooks/network.yml"
vagrant up acs utility dc docker-manager docker-worker
vagrant ssh acs -c "ansible-playbook -i rz_lab_inventory --become playbooks/net-plan.internal.yml"
vagrant ssh acs -c "ansible-playbook -i rz_lab_inventory --become playbooks/site.yml"
- Wait for ELK Stack to fully deploy and initialize before proceeding. http://utility.rz.lab:5601
vagrant ssh acs -c "ansible-playbook -i rz_lab_inventory --become playbooks/beats.yml"
Much of this project wouldn't be, if not for the great contributions of others. Please check out their sites in the references.