vagrant

Vagrant Project :

spotify-github-profile

BOX : generic/rhel8 4.2.14

PROVIDERS :

Vagrant Synced Folders used to share Ansible playbooks provisioned via ‘ansible_local’

Environment

Tools

$getips <provider>

$getprivkeys <provider>

Harvest the private keys and sow them converted ready for use by PuTTY which is much more conventient/speedy than using vagrant ssh

Links

Accidentally included secrets in your source code?

RHN Secrets

$cat .secrets.rb

image

Vagrant Add Box

$python3 -m http.server 8000 &

Add the BOX locally

$cd /mnt/d/Virtual_Machines/GOLD

$vagrant box add --name pauliopolis/rhel8 gold-virtualbox-rhel8.box

This method won’t allow you to specify a version so use a metadata.json instead

$vagrant box add metadata-file.json

or

$python3 -m http.server 8000 &

$vagrant box add metadata-http.json

Alternatively - upload the BOX to Vagrant Cloud

$vagrant box add pauliopolis/rhel8

Vagrant Usage

cd vagrant/custom virtualbox & vmware project Vagrantfiles differ and remain works in progress currently

$vagrant up

$vagrant provision --provision-with update,certs,vga,cleanup

$vagrant reload In order to boot with the previously updated kernel & VBox Guest Additions

Examples

$vagrant up

image

Close and re-open Oracle VM VirtualBox Manager to see RAM Usage (indicating Guest Additions)

image

Guest still shows Packer hostname at this stage even though hostname has been set only because it has not yet been rebooted or logged into.

image

$vagrant provision --provision-with update,certs,vga,cleanup

image

$vagrant reload

image

Close and re-open Oracle VM VirtualBox Manager to see RAM Usage (indicating Guest Additions) - Observe new kernel version

image