diff options
-rw-r--r-- | inventory/group_vars/k8s-lwl/main.yml | 48 | ||||
-rw-r--r-- | inventory/host_vars/emc-master.yml | 4 | ||||
-rw-r--r-- | inventory/host_vars/lw-master.yml | 58 | ||||
-rw-r--r-- | inventory/host_vars/sk-2019vm.yml | 6 | ||||
-rw-r--r-- | inventory/hosts.ini | 26 | ||||
-rw-r--r-- | spreadspace/group_vars/k8s-lwl.yml | 10 | ||||
-rw-r--r-- | spreadspace/k8s-lwl.yml | 26 | ||||
-rw-r--r-- | spreadspace/lw-master.yml | 8 |
8 files changed, 181 insertions, 5 deletions
diff --git a/inventory/group_vars/k8s-lwl/main.yml b/inventory/group_vars/k8s-lwl/main.yml new file mode 100644 index 00000000..e06cb665 --- /dev/null +++ b/inventory/group_vars/k8s-lwl/main.yml @@ -0,0 +1,48 @@ +--- +docker_pkg_provider: docker-com +docker_pkg_name: docker-ce + +kubernetes_version: 1.17.5 +kubernetes_container_runtime: docker +kubernetes_network_plugin: kubeguard + +kubernetes: + cluster_name: lndwrbl-live + + dedicated_master: False + api_extra_sans: + - 178.63.180.137 + - k8s-master.lndwrbl.live + + pod_ip_range: 172.18.0.0/16 + pod_ip_range_size: 24 + service_ip_range: 172.18.192.0/18 + + +kubernetes_secrets: + encryption_config_keys: "{{ vault_kubernetes_encryption_config_keys }}" + + +kubeguard: + ## node_index must be in the range between 1 and 190 -> 189 hosts possible + ## + ## hardcoded hostnames are not nice but if we do this via host_vars + ## the info is spread over multiple files and this makes it more diffcult + ## to find mistakes, so it is nicer to keep it in one place... + node_index: + # lw-live-01: 1 + # lw-live-02: 2 + lw-live-00: 100 + lw-live-dist0: 110 + lw-dione: 111 + lw-helene: 112 + lw-master: 127 + + direct_net_zones: + encoder: + transfer_net: 172.18.191.0/24 + node_interface: + lw-dione: eno2 + lw-helene: eno2 + +kubernetes_overlay_node_ip: "{{ kubernetes.pod_ip_range | ipsubnet(kubernetes.pod_ip_range_size, kubeguard.node_index[inventory_hostname]) | ipaddr(1) | ipaddr('address') }}" diff --git a/inventory/host_vars/emc-master.yml b/inventory/host_vars/emc-master.yml index 6c11048a..e89463a9 100644 --- a/inventory/host_vars/emc-master.yml +++ b/inventory/host_vars/emc-master.yml @@ -16,7 +16,7 @@ install: sdb: type: zfs pool: storage - name: "{{ inventory_hostname }}-data" + name: "streamstats" size: 50g interfaces: - bridge: br-public @@ -52,7 +52,7 @@ kubelet_lvm: emc_stats_lvm: pvs: /dev/sdb - vg: "{{ host_name }}-data" + vg: streamstats lv: stats size: 42G fs: ext4 diff --git a/inventory/host_vars/lw-master.yml b/inventory/host_vars/lw-master.yml new file mode 100644 index 00000000..d198c2a3 --- /dev/null +++ b/inventory/host_vars/lw-master.yml @@ -0,0 +1,58 @@ +--- +vm_host: sk-2019vm + +install: + host: "{{ vm_host }}" + mem: 10240 + numcpu: 6 + disks: + primary: /dev/sda + scsi: + sda: + type: zfs + pool: storage + name: "{{ inventory_hostname }}" + size: 20g + # sdb: + # type: zfs + # pool: storage + # name: "streamstats" + # size: 50g + interfaces: + - bridge: br-public + name: primary0 + autostart: True + +network: + nameservers: "{{ hostvars[vm_host].vm_host.network.dns }}" + domain: "{{ host_domain }}" + systemd_link: + interfaces: "{{ install.interfaces }}" + primary: + interface: primary0 + ip: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address') }}" + mask: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('netmask') }}" + gateway: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('address') }}" + overlay: "{{ (hostvars[vm_host].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + +external_ip: "{{ network.primary.overlay }}" + +docker_lvm: + vg: "{{ host_name }}" + lv: docker + size: 7G + fs: ext4 + +kubelet_lvm: + vg: "{{ host_name }}" + lv: kubelet + size: 5G + fs: ext4 + + +emc_stats_lvm: + pvs: /dev/sdb + vg: streamstats + lv: stats + size: 42G + fs: ext4 diff --git a/inventory/host_vars/sk-2019vm.yml b/inventory/host_vars/sk-2019vm.yml index 99614153..2558f2e3 100644 --- a/inventory/host_vars/sk-2019vm.yml +++ b/inventory/host_vars/sk-2019vm.yml @@ -22,7 +22,8 @@ vm_host: prefix: 192.168.250.254/24 offsets: sk-torrent: 136 - emc-master: 137 +# emc-master: 137 + lw-master: 137 ele-gwhetzner: 138 ch-mimas: 142 sk-testvm: 253 @@ -31,7 +32,8 @@ vm_host: prefix: 178.63.180.136/29 offsets: sk-torrent: 0 - emc-master: 1 +# emc-master: 1 + lw-master: 1 ele-gwhetzner: 2 ch-mimas: 6 sk-testvm: 7 diff --git a/inventory/hosts.ini b/inventory/hosts.ini index ca372098..07c77742 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -99,6 +99,7 @@ env_group=spreadspace lw-telesto host_name=telesto lw-dione host_name=dione lw-helene host_name=helene +lw-master [lendwirbel-live:children] lendwirbel-live-dist @@ -225,6 +226,7 @@ sk-2019vm [kvmguests] emc-master +lw-master ch-keyserver ch-testvm ch-gw-lan @@ -260,6 +262,7 @@ lendwirbel-live-xx [hetzner] emc-master +lw-master sk-testvm sk-torrent @@ -288,7 +291,7 @@ ele-dolmetsch-ctl ele-dolmetsch-raspi -### kubernetes cluster: emc +### Kubernetes Cluster: emc [k8s-emc-encoder] #ele-dione #ele-helene @@ -313,3 +316,24 @@ k8s-emc-streamer [elevate-festival:children] elevate k8s-emc + + +### Kubernetes Cluster: lendwirbel-live +[k8s-lwl-encoder] +lw-dione +lw-helene + +[k8s-lwl-distribution:children] +lendwirbel-live-dist + +[k8s-lwl-streamer:children] +lendwirbel-live-xx + +[k8s-lwl-master] +lw-master + +[k8s-lwl:children] +k8s-lwl-master +k8s-lwl-encoder +k8s-lwl-distribution +k8s-lwl-streamer diff --git a/spreadspace/group_vars/k8s-lwl.yml b/spreadspace/group_vars/k8s-lwl.yml new file mode 100644 index 00000000..5fc69d0a --- /dev/null +++ b/spreadspace/group_vars/k8s-lwl.yml @@ -0,0 +1,10 @@ +$ANSIBLE_VAULT;1.2;AES256;spreadspace +30386433346435633361623664663166623666363833376365653735303831643437356532646663 +3966666138623466653532663763363938613966663135640a373132653064366438616362376561 +61366437363736396465656137643566303635636538366130636363366561623339393232306635 +6131303737333633330a643862383839326335633363393266653936323166383264333535323235 +32323832383362313432306537663736646236656139336463393261356133343263306266343931 +62383064393735613232366162306230363636356237663035333566663132613833356638623965 +38653936643336383561343831666561393337346234653637303264626566393165616363656438 +36303563343962623361366535646563666132643466346533316433653166326264323131386231 +32623331343931613639663364333961613231343765363964396239383633653730 diff --git a/spreadspace/k8s-lwl.yml b/spreadspace/k8s-lwl.yml new file mode 100644 index 00000000..d587c0f7 --- /dev/null +++ b/spreadspace/k8s-lwl.yml @@ -0,0 +1,26 @@ +--- +- name: Basic Node Setup + hosts: k8s-lwl + roles: + - role: base + - role: sshd + - role: zsh + +- import_playbook: ../common/kubernetes-cluster-layout.yml + vars: + kubernetes_cluster_layout: + nodes_group: k8s-lwl + masters: + - lw-master + +### hack hack hack... +- name: cook kubernetes secrets + hosts: _kubernetes_masters_ + gather_facts: no + tasks: + - set_fact: + kubernetes_secrets_cooked: "{{ kubernetes_secrets }}" + external_ip_cooked: "{{ external_ip }}" + +- import_playbook: ../common/kubernetes.yml +- import_playbook: ../common/kubernetes-cleanup.yml diff --git a/spreadspace/lw-master.yml b/spreadspace/lw-master.yml new file mode 100644 index 00000000..07b517f5 --- /dev/null +++ b/spreadspace/lw-master.yml @@ -0,0 +1,8 @@ +--- +- name: Basic Setup + hosts: lw-master + roles: + - role: base + - role: sshd + - role: zsh +# - role: elevate/emc-stats |