From 4b5acf5e9589b82d859d93380f5fdd116d8042d7 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Fri, 23 Dec 2022 21:49:15 +0100 Subject: [PATCH] Add retries;Increase ova cpu sizing;Replace deployment options --- .../roles/metacluster/tasks/registry.yml | 4 ++ packer/k8sbootstrap.pkr.hcl | 2 +- scripts/Update-OvfConfiguration.yml | 56 ++++++++++++------- 3 files changed, 41 insertions(+), 21 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/registry.yml b/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/registry.yml index 5de1233..5212759 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/registry.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/registry.yml @@ -35,9 +35,13 @@ docker-archive:./{{ item | basename }} | \ jq -r '.Tags[0]') chdir: /opt/metacluster/container-images/ + register: push_result loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}" loop_control: label: "{{ item | basename }}" + retries: 5 + delay: 10 + until: push_result is not failed - name: Get all stored container images (=artifacts) ansible.builtin.uri: diff --git a/packer/k8sbootstrap.pkr.hcl b/packer/k8sbootstrap.pkr.hcl index 04a2c4d..17d3872 100644 --- a/packer/k8sbootstrap.pkr.hcl +++ b/packer/k8sbootstrap.pkr.hcl @@ -33,7 +33,7 @@ source "vsphere-iso" "k8sbootstrap" { ssh_handshake_attempts = "100" ssh_pty = true - CPUs = 2 + CPUs = 4 RAM = 8192 network_adapters { diff --git a/scripts/Update-OvfConfiguration.yml b/scripts/Update-OvfConfiguration.yml index 3b32161..9600152 100644 --- a/scripts/Update-OvfConfiguration.yml +++ b/scripts/Update-OvfConfiguration.yml @@ -1,18 +1,12 @@ DeploymentConfigurations: -- Id: small - Label: 'Ubuntu Server 22.04 [SMALL: 2 vCPU/4GB RAM]' - Description: Ubuntu Server 22.04.x - Size: - CPU: 2 - Memory: 4096 +- Id: cp1w1 + Label: 'Workload-cluster: 1 control-plane node/1 worker node' + Description: 1 control-plane node/1 worker node -- Id: medium - Label: 'Ubuntu Server 22.04 [MEDIUM: 4 vCPU/8GB RAM]' - Description: Ubuntu Server 22.04.x - Size: - CPU: 4 - Memory: 8192 +- Id: cp1w2 + Label: 'Workload-cluster: 1 control-plane node/2 worker nodes' + Description: 1 control-plane node/2 worker nodes DynamicDisks: @@ -24,14 +18,14 @@ DynamicDisks: PropertyCategories: -# - Name: 0) Deployment information -# ProductProperties: -# - Key: deployment.type -# Type: string -# Value: -# - small -# - medium -# UserConfigurable: false +- Name: 0) Deployment information + ProductProperties: + - Key: deployment.type + Type: string + Value: + - cp1w1 + - cp1w2 + UserConfigurable: false - Name: 1) Meta-cluster ProductProperties: @@ -127,6 +121,28 @@ PropertyCategories: Configurations: '*' UserConfigurable: true + - Key: workloadcluster.controlplane + Type: int + Value: 1 + Configurations: + - cp1w1 + - cp1w2 + UserConfigurable: false + + - Key: workloadcluster.workers + Type: int + Value: 1 + Configurations: + - cp1w1 + UserConfigurable: false + + - Key: workloadcluster.workers + Type: int + Value: 2 + Configurations: + - cp1w2 + UserConfigurable: false + - Name: 3) Common ProductProperties: