feat: add Ingress and Service configurations for nginx deployment, and implement MetalLB and Traeik installation scripts

refactor: remove obsolete Traefik installation script

feat: add environment checks and configurations for Vagrant setup, including dnsmasq  MetalLB  and ingress
This commit is contained in:
jon brookes 2025-08-23 15:05:26 +01:00
parent bd222ce39e
commit b2b028a16c
19 changed files with 375 additions and 147 deletions

View file

@ -1,7 +1,10 @@
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y software-properties-common git vim python3.10-venv jq
sudo apt-get install -y software-properties-common git vim python3.10-venv jq figlet
source /vagrant/.envrc
# Set up ansible environment for vagrant user
sudo -u vagrant mkdir -p /home/vagrant/.ansible
@ -103,6 +106,7 @@ if ! grep -qF "$BLOCK_START" "$BASHRC"; then
eval `ssh-agent -s`
ssh-add ~/machines/*/virtualbox/private_key
ssh-add -L
source ~/vagrant/.envrc
EOF
else
echo "Provisioning block already present in $BASHRC"
@ -144,7 +148,13 @@ if [ $? -ne 0 ]; then
fi
# copy_k8s_config.yaml
ANSIBLE_SUPPRESS_INTERPRETER_DISCOVERY_WARNING=1ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook copy_k8s_config.yaml --inventory-file ansible_inventory.ini
ANSIBLE_SUPPRESS_INTERPRETER_DISCOVERY_WARNING=1 ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook copy_k8s_config.yaml --inventory-file ansible_inventory.ini
if [ $? -ne 0 ]; then
echo "Ansible playbook failed. Please check your Vagrant VMs and network configuration."
exit 1
fi
ANSIBLE_SUPPRESS_INTERPRETER_DISCOVERY_WARNING=1 ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook install_dnsmasq.yaml --inventory-file ansible_inventory.ini
if [ $? -ne 0 ]; then
echo "Ansible playbook failed. Please check your Vagrant VMs and network configuration."
exit 1
@ -158,3 +168,5 @@ if [ $? -ne 0 ]; then
exit 1
fi