WIP(headscale): Start migration

This commit is contained in:
Tanguy Herbron 2023-12-05 09:58:25 +01:00
parent 04e3e98cdb
commit 4a74a1a747
3 changed files with 19 additions and 1 deletions

View File

@ -6,6 +6,7 @@ up:
vagrant up; \ vagrant up; \
else \ else \
echo "No Homelab installation found or missing components, creating..."; \ echo "No Homelab installation found or missing components, creating..."; \
sleep 10; \
$(MAKE) install_vb; \ $(MAKE) install_vb; \
fi fi
@ -17,13 +18,19 @@ install_vb:
@echo "Creating components..." @echo "Creating components..."
@vagrant up @vagrant up
@echo "Installing k3s backbone configuration..." @echo "Installing k3s backbone configuration..."
@make ansible
wg:
@cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml init.yml --extra-vars "enable_setup=false enable_wireguard=true enable_k3s=false"
ansible:
@cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml init.yml --extra-vars "enable_setup=true enable_wireguard=true enable_k3s=true" @cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml init.yml --extra-vars "enable_setup=true enable_wireguard=true enable_k3s=true"
@make get_k3s_credentials @make get_k3s_credentials
k3s_reset: k3s_reset:
@echo "Resetting k3s configuration..." @echo "Resetting k3s configuration..."
@cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml k3s-ansible/reset.yml @cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml k3s-ansible/reset.yml
@cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml init.yml --extra-vars "enable_setup=true enable_wireguard=true enable_k3s=true" @make ansible
@make get_k3s_credentials @make get_k3s_credentials
destroy: destroy:

View File

@ -8,6 +8,8 @@ all:
k3s_label: k3s_label:
- type=worker - type=worker
- size=wide - size=wide
headscale:
network: beta
hb-wide-2: hb-wide-2:
ansible_host: 192.168.56.102 ansible_host: 192.168.56.102
is_nas: false is_nas: false
@ -66,6 +68,10 @@ all:
children: children:
master: master:
node: node:
headscale_client:
hosts:
hb-wide-1:
hb-wide-2:
vars: vars:
ansible_ssh_private_key_file: ~/.ssh/creator ansible_ssh_private_key_file: ~/.ssh/creator
ansible_user: creator ansible_user: creator

View File

@ -7,6 +7,8 @@ all:
wireguard_ip: 10.20.0.254 wireguard_ip: 10.20.0.254
k3s_label: k3s_label:
- type=outbound - type=outbound
headscale:
network: beta
children: children:
node: node:
hosts: hosts:
@ -20,6 +22,9 @@ all:
k3s_cluster: k3s_cluster:
children: children:
node: node:
headscale_server:
hosts:
outsider:
vars: vars:
ansible_ssh_private_key_file: ~/.ssh/creator ansible_ssh_private_key_file: ~/.ssh/creator
ansible_user: creator ansible_user: creator