Cluster configs

This commit is contained in:
Jeroen Vermeulen 2023-10-23 14:12:51 +02:00
parent c9c329ece1
commit 9218d5e300
No known key found for this signature in database
8 changed files with 224 additions and 164 deletions

View File

@ -16,7 +16,7 @@ In this repo:
- In the package the customer will have 6 new Talos VPSses. - In the package the customer will have 6 new Talos VPSses.
- The first 3 IPs need to be used for the `talos_control_nodes` - The first 3 IPs need to be used for the `talos_control_nodes`
- The remaining 3 IPs need to be used for the `talos_worker_nodes` - The remaining 3 IPs need to be used for the `talos_worker_nodes`
- Attach 3 extra IPs to the VPS which will become `c1.[NAME].k8s.snel.com`, the first control node. - Attach 2 extra IPs to the VPS which will become `c1.[NAME].k8s.snel.com`, the first control node.
- Use these IPs in the inventory file as `ingress_ips` - Use these IPs in the inventory file as `ingress_ips`
- These will be floating IPs for MetalLB - These will be floating IPs for MetalLB
@ -24,7 +24,7 @@ In this repo:
Your Vaultwarden vault password will be asked. Your Vaultwarden vault password will be asked.
```zsh ```zsh
cd ~/repos/snel.ansible cd ~/repos/snel.ansible
git pull git pull --recurse-submodules
bw sync bw sync
BW_SESSION=$(bw unlock --raw) ansible-playbook site.yml --limit cluster_[NAME] BW_SESSION=$(bw unlock --raw) ansible-playbook site.yml --limit cluster_[NAME]
``` ```

View File

@ -1,39 +1,59 @@
--- ---
kubernetes: talos_control_lb:
children: children:
customer_[NAME]: cluster_[NAME]_control_lb:
vars: talos_control_nodes:
cluster_name: [NAME].k8s.snel.com children:
children: cluster_[NAME]_control_nodes:
control_lb_nodes: talos_worker_nodes:
hosts: children:
control.[NAME].k8s.snel.com: cluster_[NAME]_worker_nodes:
ansible_host: 185.62.___.___ talos_hardware_nodes:
talos: children:
children: cluster_[NAME]_hardware_nodes:
talos_control_nodes: talos_first_nodes:
hosts: hosts:
c1.[NAME].k8s.snel.com: c1.[NAME].k8s.snel.com:
ansible_host: 185.62.___.___
c2.[NAME].k8s.snel.com: cluster_[NAME]:
ansible_host: 185.62.___.___ vars:
c3.[NAME].k8s.snel.com: cluster_name: [NAME].k8s.snel.com
ansible_host: 185.62.___.___ ingress_ips:
talos_worker_nodes: - 185.62.___.___ # Rancher + Traefik
hosts: - 185.62.___.___ # extra IP
w1.[NAME].k8s.snel.com: children:
ansible_host: 185.62.___.___ cluster_[NAME]_control_lb:
w2.[NAME].k8s.snel.com: hosts:
ansible_host: 185.62.___.___ control.[NAME].k8s.snel.com:
w3.[NAME].k8s.snel.com: ansible_host: 185.62.___.___
ansible_host: 185.62.___.___ cluster_[NAME]_control_nodes:
#talos_hardware_nodes: hosts:
# hosts: c1.[NAME].k8s.snel.com:
# hw1.[NAME].k8s.snel.com: ansible_host: 185.62.___.___
talos_first_nodes: c2.[NAME].k8s.snel.com:
hosts: ansible_host: 185.62.___.___
c1.[NAME].k8s.snel.com: c3.[NAME].k8s.snel.com:
ingress_ips: ansible_host: 185.62.___.___
- 185.62.___.___ # Rancher + Traefik cluster_[NAME]_worker_nodes:
# - 185.62.___.___ # extra IP hosts:
# - 185.62.___.___ # extra IP w1.[NAME].k8s.snel.com:
ansible_host: 185.62.___.___
w2.[NAME].k8s.snel.com:
ansible_host: 185.62.___.___
w3.[NAME].k8s.snel.com:
ansible_host: 185.62.___.___
cluster_[NAME]_hardware_nodes:
hosts:
# hw1.[NAME].k8s.snel.com:
# ansible_host: 77.95.___.___
# talos_disk: /dev/nvme0n1
# mayastor_disk: /dev/nvme1n1
# network_interface: bond0
# network_interface_bond:
# mode: balance-rr
# miimon: 100
# updelay: 200
# downdelay: 200
# interfaces:
# - enp196s0f1
# - enp65s0f1

View File

@ -1,78 +1,86 @@
--- ---
kubernetes: talos_control_lb:
children: children:
cluster_deovero: cluster_deovero_control_lb:
vars: talos_control_nodes:
cluster_name: deovero.k8s.snel.com children:
children: cluster_deovero_control_nodes:
control_lb_nodes: talos_worker_nodes:
hosts: children:
control.deovero.k8s.snel.com: cluster_deovero_worker_nodes:
ansible_host: 185.62.56.88 talos_hardware_nodes:
talos: hosts:
children: hw1.deovero.k8s.snel.com:
talos_control_nodes: hw2.deovero.k8s.snel.com:
hosts: hw3.deovero.k8s.snel.com:
c1.deovero.k8s.snel.com: talos_first_nodes:
ansible_host: 185.62.58.191 hosts:
c2.deovero.k8s.snel.com: c1.deovero.k8s.snel.com:
ansible_host: 185.62.58.208
c3.deovero.k8s.snel.com: cluster_deovero:
ansible_host: 185.62.56.102 vars:
talos_worker_nodes: cluster_name: deovero.k8s.snel.com
hosts: ingress_ips:
w1.deovero.k8s.snel.com: - 185.62.58.184 # Rancher + Traefik
ansible_host: 185.62.58.15 - 185.62.57.66
w2.deovero.k8s.snel.com: - 185.62.58.66
ansible_host: 185.62.56.96 children:
hw1.deovero.k8s.snel.com: cluster_deovero_control_lb:
ansible_host: 77.95.229.160 hosts:
talos_disk: /dev/nvme0n1 control.deovero.k8s.snel.com:
mayastor_disk: /dev/nvme1n1 ansible_host: 185.62.56.88
network_interface: bond0 cluster_deovero_control_nodes:
network_interface_bond: hosts:
mode: balance-rr c1.deovero.k8s.snel.com:
miimon: 100 ansible_host: 185.62.58.191
updelay: 200 c2.deovero.k8s.snel.com:
downdelay: 200 ansible_host: 185.62.58.208
interfaces: c3.deovero.k8s.snel.com:
- enp196s0f1 ansible_host: 185.62.56.102
- enp65s0f1 cluster_deovero_worker_nodes:
hw2.deovero.k8s.snel.com: hosts:
ansible_host: 128.204.192.80 w1.deovero.k8s.snel.com:
talos_disk: /dev/nvme0n1 ansible_host: 185.62.58.15
mayastor_disk: /dev/nvme1n1 w2.deovero.k8s.snel.com:
network_interface: bond0 ansible_host: 185.62.56.96
network_interface_bond: cluster_deovero_hardware_nodes:
mode: balance-rr hosts:
miimon: 100 hw1.deovero.k8s.snel.com:
updelay: 200 ansible_host: 77.95.229.160
downdelay: 200 talos_disk: /dev/nvme0n1
interfaces: mayastor_disk: /dev/nvme1n1
- enp196s0f1 network_interface: bond0
- enp65s0f1 network_interface_bond:
hw3.deovero.k8s.snel.com: mode: balance-rr
ansible_host: 89.207.131.21 miimon: 100
talos_disk: /dev/nvme0n1 updelay: 200
mayastor_disk: /dev/nvme1n1 downdelay: 200
network_interface: bond0 interfaces:
network_interface_bond: - enp196s0f1
mode: balance-rr - enp65s0f1
miimon: 100 hw2.deovero.k8s.snel.com:
updelay: 200 ansible_host: 128.204.192.80
downdelay: 200 talos_disk: /dev/nvme0n1
interfaces: mayastor_disk: /dev/nvme1n1
- enp196s0f1 network_interface: bond0
- enp65s0f1 network_interface_bond:
talos_hardware_nodes: mode: balance-rr
hosts: miimon: 100
hw1.deovero.k8s.snel.com: updelay: 200
hw2.deovero.k8s.snel.com: downdelay: 200
hw3.deovero.k8s.snel.com: interfaces:
talos_first_nodes: - enp196s0f1
hosts: - enp65s0f1
c1.deovero.k8s.snel.com: hw3.deovero.k8s.snel.com:
ingress_ips: ansible_host: 89.207.131.21
- 185.62.58.184 # Rancher + Traefik talos_disk: /dev/nvme0n1
- 185.62.57.66 mayastor_disk: /dev/nvme1n1
#- 185.62.58.66 network_interface: bond0
network_interface_bond:
mode: balance-rr
miimon: 100
updelay: 200
downdelay: 200
interfaces:
- enp196s0f1
- enp65s0f1

View File

@ -1,39 +1,59 @@
--- ---
kubernetes: talos_control_lb:
children: children:
cluster_pietje: cluster_pietje_control_lb:
vars: talos_control_nodes:
cluster_name: pietje.k8s.snel.com children:
children: cluster_pietje_control_nodes:
control_lb_nodes: talos_worker_nodes:
hosts: children:
control.pietje.k8s.snel.com: cluster_pietje_worker_nodes:
ansible_host: 185.62.58.98 talos_hardware_nodes:
talos: children:
children: cluster_pietje_hardware_nodes:
talos_control_nodes: talos_first_nodes:
hosts: hosts:
c1.pietje.k8s.snel.com: c1.pietje.k8s.snel.com:
ansible_host: 185.62.58.123
c2.pietje.k8s.snel.com: cluster_pietje:
ansible_host: 185.62.57.138 vars:
c3.pietje.k8s.snel.com: cluster_name: pietje.k8s.snel.com
ansible_host: 185.62.57.9 ingress_ips:
talos_worker_nodes: - 185.62.56.120 # Rancher + Traefik
hosts: - 185.62.56.201 # extra IP
w1.pietje.k8s.snel.com: children:
ansible_host: 185.62.56.40 cluster_pietje_control_lb:
w2.pietje.k8s.snel.com: hosts:
ansible_host: 185.62.56.141 control.pietje.k8s.snel.com:
w3.pietje.k8s.snel.com: ansible_host: 185.62.58.98
ansible_host: 185.62.57.201 cluster_pietje_control_nodes:
# talos_hardware_nodes: hosts:
# hosts: c1.pietje.k8s.snel.com:
# hw1.[NAME].k8s.snel.com: ansible_host: 185.62.58.123
talos_first_nodes: c2.pietje.k8s.snel.com:
hosts: ansible_host: 185.62.57.138
c1.pietje.k8s.snel.com: c3.pietje.k8s.snel.com:
ingress_ips: ansible_host: 185.62.57.9
- 185.62.58.66 # Rancher + Traefik cluster_pietje_worker_nodes:
# - 185.62.___.___ # extra IP hosts:
# - 185.62.___.___ # extra IP w1.pietje.k8s.snel.com:
ansible_host: 185.62.56.40
w2.pietje.k8s.snel.com:
ansible_host: 185.62.56.141
w3.pietje.k8s.snel.com:
ansible_host: 185.62.57.201
cluster_pietje_hardware_nodes:
hosts:
# hw1.[NAME].k8s.snel.com:
# ansible_host: 77.95.___.___
# talos_disk: /dev/nvme0n1
# mayastor_disk: /dev/nvme1n1
# network_interface: bond0
# network_interface_bond:
# mode: balance-rr
# miimon: 100
# updelay: 200
# downdelay: 200
# interfaces:
# - enp196s0f1
# - enp65s0f1

13
inventory/general.yml Normal file
View File

@ -0,0 +1,13 @@
---
debian:
children:
ubuntu:
control_hosts:
children:
ansible_host:
hosts:
localhost:
jump_host:
hosts:
jump.snel.com:

View File

@ -3,18 +3,17 @@ kubernetes:
children: children:
ubuntu: ubuntu:
children: children:
control_lb_nodes talos_control_lb:
haproxy: haproxy:
children: children:
control_lb_nodes talos_control_lb:
debian: talos:
children: children:
ubuntu: talos_control_nodes:
control_hosts: talos_worker_nodes:
children:
talos_hardware_nodes:
kubernetes_control_lb:
children: children:
ansible_host: talos_control_lb:
hosts:
localhost:
jump_host:
hosts:
jump.snel.com:

@ -1 +1 @@
Subproject commit 0889cc8caae33796d70e620de8812cdc79f76c7c Subproject commit 883ef18d44ede735ea5f6c08338c2a3d2e808085