This is my Homelab infrastructure.
- Ansible (version >= 2.9.6)
- Python3 and Pip
- Packer (version >= 1.6.0)
- Terraform (version >= 0.12.28)
- Terragrunt (version >= 0.23.29)
Fill ansible/secrets.yml based on ansible/secrets.example and encrypt the file with ansible-vault
cd ansible
Install dependencies pip3 install -r requirements.txt
fill all secrets.yml
based on secrets.example
in each subdirectory of groups_vars
ansible-playbook -i <inventory_file> playbooks/add-ssh-keys.yml
ansible-playbook -i <inventory_file> playbooks/deploy_authorized_keys.yml
ansible-playbook -i dmz deploy_dmz.yml
ansible-playbook -i lab deploy_lab.yml
Port 8888 used for debian build Port 8889 used for ubuntu build
Open both ports on windows firewall
Start powershell prompt with admin right netsh interface portproxy add v4tov4 listenport=<PORT> listenaddress=<IP> connectport=<PORT> connectaddress=127.0.0.1
Replace with the LAN IP of your PC and with [8888, 8889]
To delete the rules netsh interface portproxy del v4tov4 listenport=<PORT> listenaddress=<IP>
cd packer
Supported distributions :
Linux : ./build.sh
Windows : ./build.ps1
Linux : ./validate.sh
Windows : ./validate.ps1
cd terraform
Install dependencies < packages.txt xargs sudo apt-get install -y
fill account.hcl
based on account.example
Infrastructure is split in 2 parts :
- dmz
- lab
Command must be run in one of this two directories (dmz/lab)
terragrunt plan-all
terragrunt apply-all
Copyright © Ludovic Ortega, 2019
Contributor(s):
-Ortega Ludovic - mastership@hotmail.fr