From 2be42989e5ba4add82637777e1d79f5f596b9f1a Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Thu, 7 Jul 2022 20:16:18 +0200 Subject: [PATCH] Refine templating #4;Update sizing --- .../roles/metacluster/tasks/components.yml | 2 +- ansible/vars/metacluster.yml | 66 +++++++++---------- scripts/Update-OvfConfiguration.yml | 16 ++--- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/ansible/roles/metacluster/tasks/components.yml b/ansible/roles/metacluster/tasks/components.yml index 6079a7e..df018d8 100644 --- a/ansible/roles/metacluster/tasks/components.yml +++ b/ansible/roles/metacluster/tasks/components.yml @@ -24,7 +24,7 @@ - name: Inject chart values into ansible var files ansible.builtin.blockinfile: path: /opt/firstboot/ansible/vars/metacluster.yml - block: >2 + block: | {{ item.key }}: {{ item.value.helm.chart_values | default(omit) }} marker: "# {mark} ANSIBLE MANAGED BLOCK -- {{ item.key }}" diff --git a/ansible/vars/metacluster.yml b/ansible/vars/metacluster.yml index 4d74935..ee3b20c 100644 --- a/ansible/vars/metacluster.yml +++ b/ansible/vars/metacluster.yml @@ -20,51 +20,51 @@ components: version: 1.3.0 chart: longhorn/longhorn parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag' - chart_values: |2 - defaultSettings: - defaultDataPath: /mnt/blockstorage - defaultReplicaCount: 1 - ingress: - enabled: true - host: storage.[% vapp['metacluster.fqdn'] %] - persistence: - defaultClassReplicaCount: 1 + chart_values: |4 + defaultSettings: + defaultDataPath: /mnt/blockstorage + defaultReplicaCount: 1 + ingress: + enabled: true + host: storage.[% vapp['metacluster.fqdn'] %] + persistence: + defaultClassReplicaCount: 1 harbor: helm: version: 1.9.1 # (= Harbor v2.5.1) chart: harbor/harbor parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /' - chart_values: |2 - expose: - ingress: - hosts: - core: registry.[% vapp['metacluster.fqdn'] %] - externalURL: https://registry.[% vapp['metacluster.fqdn'] %] - harborAdminPassword: "[% vapp['guestinfo.rootpw'] %]" - notary: - enabled: false + chart_values: |4 + expose: + ingress: + hosts: + core: registry.[% vapp['metacluster.fqdn'] %] + externalURL: https://registry.[% vapp['metacluster.fqdn'] %] + harborAdminPassword: "[% vapp['guestinfo.rootpw'] %]" + notary: + enabled: false gitea: helm: version: v5.0.9 # (= Gitea v1.16.8) chart: gitea-charts/gitea parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | sed '/:/!s/$/:latest/' - chart_values: |2 - gitea: - admin: - username: administrator - password: "[% vapp['guestinfo.rootpw'] %]" - email: admin@[% vapp['metacluster.fqdn'] %] - image: - pullPolicy: IfNotPresent - ingress: - enabled: true - hosts: - - host: git.[% vapp['metacluster.fqdn'] %] - paths: - - path: / - pathType: Prefix + chart_values: |4 + gitea: + admin: + username: administrator + password: "[% vapp['guestinfo.rootpw'] %]" + email: admin@[% vapp['metacluster.fqdn'] %] + image: + pullPolicy: IfNotPresent + ingress: + enabled: true + hosts: + - host: git.[% vapp['metacluster.fqdn'] %] + paths: + - path: / + pathType: Prefix argo-cd: helm: diff --git a/scripts/Update-OvfConfiguration.yml b/scripts/Update-OvfConfiguration.yml index f258e93..cf0b591 100644 --- a/scripts/Update-OvfConfiguration.yml +++ b/scripts/Update-OvfConfiguration.yml @@ -1,12 +1,5 @@ DeploymentConfigurations: -- Id: small - Label: 'Ubuntu Server 22.04 [SMALL: 1 vCPU/2GB RAM]' - Description: Ubuntu Server 22.04.x - Size: - CPU: 1 - Memory: 2048 - - Id: medium Label: 'Ubuntu Server 22.04 [MEDIUM: 2 vCPU/4GB RAM]' Description: Ubuntu Server 22.04.x @@ -14,6 +7,13 @@ DeploymentConfigurations: CPU: 2 Memory: 4096 +- Id: large + Label: 'Ubuntu Server 22.04 [LARGE: 2 vCPU/8GB RAM]' + Description: Ubuntu Server 22.04.x + Size: + CPU: 2 + Memory: 8192 + DynamicDisks: - Description: Longhorn persistent storage @@ -29,8 +29,8 @@ PropertyCategories: # - Key: deployment.type # Type: string # Value: -# - small # - medium +# - large # UserConfigurable: false - Name: 1) Kubernetes