diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/main.yml b/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/main.yml index e636839..8388d6a 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/main.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/main.yml @@ -157,6 +157,13 @@ name: token_init_{{ lookup('password', '/dev/null length=5 chars=ascii_letters,digits') }} register: gitea_api_token + - name: Retrieve existing gitea configuration + ansible.builtin.uri: + # url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/orgs + url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/repos/search + method: GET + register: gitea_existing_config + - name: Create organization(s) ansible.builtin.uri: url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/orgs @@ -234,7 +241,7 @@ - name: Generate argo-cd API token ansible.builtin.uri: - url: https://gitops.{{ vapp['metacluster.fqdn'] }}/api/v1/account/admin/token + url: https://gitops.{{ vapp['metacluster.fqdn'] }}/api/v1/session method: POST force_basic_auth: yes body: diff --git a/ansible/roles/metacluster/tasks/k3s.yml b/ansible/roles/metacluster/tasks/k3s.yml index 59ba630..d4cf30a 100644 --- a/ansible/roles/metacluster/tasks/k3s.yml +++ b/ansible/roles/metacluster/tasks/k3s.yml @@ -7,14 +7,6 @@ - /var/lib/rancher/k3s/server/manifests - /opt/metacluster/k3s -- name: Inject manifests - ansible.builtin.template: - src: helmchartconfig.j2 - dest: /var/lib/rancher/k3s/server/manifests/{{ item.name }}_config.yml - loop: "{{ platform.packaged_components }}" - loop_control: - label: "{{ item.name }}" - - name: Download & install K3s binary ansible.builtin.get_url: url: https://github.com/k3s-io/k3s/releases/download/{{ platform.k3s.version }}/k3s @@ -35,3 +27,14 @@ owner: root group: root mode: 0755 + +- name: Inject manifests + ansible.builtin.template: + src: helmchartconfig.j2 + dest: /var/lib/rancher/k3s/server/manifests/{{ item.name }}-config.yaml + owner: root + group: root + mode: 0600 + loop: "{{ platform.packaged_components }}" + loop_control: + label: "{{ item.name }}" diff --git a/ansible/vars/metacluster.yml b/ansible/vars/metacluster.yml index 56adf54..d180ffe 100644 --- a/ansible/vars/metacluster.yml +++ b/ansible/vars/metacluster.yml @@ -119,5 +119,6 @@ dependencies: packages: - lvm2 + - python3-jmespath - python3-passlib - skopeo diff --git a/scripts/Update-OvfConfiguration.yml b/scripts/Update-OvfConfiguration.yml index cf0b591..2d7f744 100644 --- a/scripts/Update-OvfConfiguration.yml +++ b/scripts/Update-OvfConfiguration.yml @@ -1,17 +1,17 @@ DeploymentConfigurations: -- Id: medium - Label: 'Ubuntu Server 22.04 [MEDIUM: 2 vCPU/4GB RAM]' +- Id: small + Label: 'Ubuntu Server 22.04 [SMALL: 2 vCPU/4GB RAM]' Description: Ubuntu Server 22.04.x Size: CPU: 2 Memory: 4096 -- Id: large - Label: 'Ubuntu Server 22.04 [LARGE: 2 vCPU/8GB RAM]' +- Id: medium + Label: 'Ubuntu Server 22.04 [MEDIUM: 4 vCPU/8GB RAM]' Description: Ubuntu Server 22.04.x Size: - CPU: 2 + CPU: 4 Memory: 8192 DynamicDisks: @@ -29,17 +29,18 @@ PropertyCategories: # - Key: deployment.type # Type: string # Value: +# - small # - medium -# - large # UserConfigurable: false - Name: 1) Kubernetes ProductProperties: + - Key: metacluster.fqdn Type: string(1..) Label: Appliance FQDN* Description: 'Respective subdomains will be available for each component (e.g. storage.example.org); this address should already be configured as a wildcard record within your DNS zone.' - DefaultValue: 'example.org' + DefaultValue: 'meta.k8s.cluster' Configurations: '*' UserConfigurable: true