2+1 nodes cluster, node image based on ubuntu-focal.
Hosts:
- controller: 192.168.33.20
- node1: 192.168.33.21
- node2: 192.168.33.22
All machines are connected by a host-only network.
Each with 1GB memory and 2 cores, for 4 core hosts, the minimal setup could be controller + node1.
To manage metadata for downloaded box files:
Example:
{
"name": "ubuntu/focal64",
"versions": [{
"version": "20200618.0.0",
"providers": [{
"name": "virtualbox",
"url": "focal-server-cloudimg-amd64-vagrant.box"
}]
}]
}
Add downloaded box using metadata file with box version (without this file, all imported box will begin versioning from 0):
vagrant box add foo.json
Check it out:
vagrant box list
The 1st run step-1.
Name the virtual machine step-2.
Set CPU cores and memory (using VirtualBox provider) step-3.
Add a host-only network step-4.
Bridge to chosen host network step-5.
Do something more to prepare the virtual machine step-6.
To prepare or regenerate your own key pair:
ssh-keygen -f insecure-key -N ''
SSH access by key pair:
ssh -i insecure-key vagrant@{IP}
Ignore host checking during first time login (potential MITM attack):
ssh -i insecure-key -o StrictHostKeyChecking=no vagrant@{IP}
Furthermore, force no password input:
ssh -i insecure-key -o StrictHostKeyChecking=no -o PasswordAuthentication=no vagrant@{IP}
Then VMs should be re-created to apply new keys.
Zhan.Shi @ 2017-2020