Local Labs enhanced by Vagrant and Ansible. Apps and tools installations from scratch to practice configuration and management.
Shared folders can be used to make simple Data Pipelines where Data Storage is not the learning subject.
sudo mkdir /var/vms_shared_folder/
sudo chown -R $USER /var/vms_shared_folder/
ls /var/labs/
vagrant up
vagrant reload
vagrant ssh-config
After start the VM, it is necessary configure SSH to use the insecure shared key on ~/.ssh/config
.
For single machine use the name of the host, for clusters use host name with wildcard:
Single VM sample:
Host airflow-simple
Hostname 127.0.0.1
User vagrant
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile ~/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
Cluster VM sample:
Host kafka*
Hostname 127.0.0.1
User vagrant
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile ~/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
The nat_router
has a non-internal Host-Only network interface, to route communication to nat_router
, create routes bellow on host machine:
sudo ip route add 192.168.60.0/24 via 192.168.56.4
sudo ip route add 192.168.61.0/24 via 192.168.56.4
sudo ip route add 192.168.62.0/24 via 192.168.56.4
ansible-playbook playbooks/bigbang.yml -i playbooks/inventory/vagrant.ini
List opened ports on linux:
sudo netstat -tulpn | grep LISTEN