a lab to build all VMs in one (windows 10+) host
- Enable hyper-v first, you can refer this code snippet to enable hyper-v
- Run .\LocalWorkShop\New-VMSwitch.ps1 to create a Hyper-V internal facing virtual switch, then run .\LocalWorkShop/Set-NetIPInterface.ps1 to config MAC for the NIC connected to this switch
- Install packer, vagrant, kubectl, helm
by scoop
scoop install packer vagrant kubectl helm
- Build vagrant box (the hyper-v vm template) from packer
- Up the vagrant box
- Config k3s cluster
cd $(git rev-parse --show-toplevel)
$url="https://github.com/freeipa/ansible-freeipa.git"
$submoduleDir="AnsibleWorkShop/runner/project/roles/ansible-freeipa"
# ansible-role-k3s
$url="https://github.com/PyratLabs/ansible-role-k3s.git"
$branch="v3_release"
$submoduleDir="AnsibleWorkShop/runner/project/roles/ansible-role-k3s"
git submodule add --force -b $branch $url $submoduleDir