Remove debugging; Cleanup redundant logic;Add vapp property
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2022-06-27 20:26:09 +02:00
parent 4ba7b590ba
commit 8cbfcb016b
4 changed files with 42 additions and 15 deletions

View File

@ -56,6 +56,17 @@
path: /opt/metacluster/container_images path: /opt/metacluster/container_images
state: absent state: absent
- name: Install longhorn chart
kubernetes.core.helm:
name: longhorn
chart_ref: /opt/metacluster/helm_charts/longhorn
release_namespace: longhorn
create_namespace: yes
values:
ingress:
enabled: true
host: storage.{{ vapp['guestinfo.fqdn'] }}
- name: Cleanup tempfile - name: Cleanup tempfile
ansible.builtin.file: ansible.builtin.file:
path: "{{ kubeconfig.path }}" path: "{{ kubeconfig.path }}"

View File

@ -21,17 +21,10 @@
loop_control: loop_control:
label: "{{ item.key }}" label: "{{ item.key }}"
- ansible.builtin.command:
cmd: ls /opt/metacluster/helm-charts -lashR
register: result
- ansible.builtin.debug:
var: result
- name: Parse helm charts for container images - name: Parse helm charts for container images
ansible.builtin.shell: ansible.builtin.shell:
cmd: "{{ item.value.helm.parse_logic }}" cmd: "{{ item.value.helm.parse_logic }}"
chdir: /opt/metacluster/helm-charts/{{ item.key }} chdir: /opt/metacluster/helm-charts/{{ item.key }}
# chdir: /opt/metacluster/helm-charts/{{ item.value.helm.basedir | default(item.key) }}
register: containerimages register: containerimages
loop: "{{ lookup('ansible.builtin.dict', components) }}" loop: "{{ lookup('ansible.builtin.dict', components) }}"
loop_control: loop_control:

View File

@ -31,7 +31,6 @@ components:
helm: helm:
version: v5.0.9 # (= Gitea v1.16.8) version: v5.0.9 # (= Gitea v1.16.8)
chart: gitea-charts/gitea chart: gitea-charts/gitea
basedir: helm-chart
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /' parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
argo-cd: argo-cd:

View File

@ -1,18 +1,22 @@
DeploymentConfigurations: DeploymentConfigurations:
- Id: small - Id: small
Label: 'Ubuntu Server 22.04 [SMALL: 1 vCPU/2GB RAM]' Label: 'Ubuntu Server 22.04 [SMALL: 1 vCPU/2GB RAM]'
Description: Ubuntu Server 22.04.x Description: Ubuntu Server 22.04.x
Size: Size:
CPU: 1 CPU: 1
Memory: 2048 Memory: 2048
- Id: medium - Id: medium
Label: 'Ubuntu Server 22.04 [MEDIUM: 2 vCPU/4GB RAM]' Label: 'Ubuntu Server 22.04 [MEDIUM: 2 vCPU/4GB RAM]'
Description: Ubuntu Server 22.04.x Description: Ubuntu Server 22.04.x
Size: Size:
CPU: 2 CPU: 2
Memory: 4096 Memory: 4096
DynamicDisks: [] DynamicDisks: []
PropertyCategories: PropertyCategories:
# - Name: 0) Deployment information # - Name: 0) Deployment information
# ProductProperties: # ProductProperties:
# - Key: deployment.type # - Key: deployment.type
@ -21,8 +25,10 @@ PropertyCategories:
# - small # - small
# - medium # - medium
# UserConfigurable: false # UserConfigurable: false
- Name: 1) Operating System - Name: 1) Operating System
ProductProperties: ProductProperties:
- Key: guestinfo.hostname - Key: guestinfo.hostname
Type: string(1..15) Type: string(1..15)
Label: Hostname* Label: Hostname*
@ -30,6 +36,7 @@ PropertyCategories:
DefaultValue: '' DefaultValue: ''
Configurations: '*' Configurations: '*'
UserConfigurable: true UserConfigurable: true
- Key: guestinfo.rootpw - Key: guestinfo.rootpw
Type: password(7..) Type: password(7..)
Label: Local root password* Label: Local root password*
@ -37,6 +44,7 @@ PropertyCategories:
DefaultValue: '' DefaultValue: ''
Configurations: '*' Configurations: '*'
UserConfigurable: true UserConfigurable: true
- Key: guestinfo.rootsshkey - Key: guestinfo.rootsshkey
Type: password(1..) Type: password(1..)
Label: Local root SSH public key* Label: Local root SSH public key*
@ -44,15 +52,10 @@ PropertyCategories:
DefaultValue: '' DefaultValue: ''
Configurations: '*' Configurations: '*'
UserConfigurable: true UserConfigurable: true
- Key: guestinfo.ntpserver
Type: string(1..)
Label: Time server*
Description: A comma-separated list of timeservers
DefaultValue: 0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org
Configurations: '*'
UserConfigurable: true
- Name: 2) Networking - Name: 2) Networking
ProductProperties: ProductProperties:
- Key: guestinfo.ipaddress - Key: guestinfo.ipaddress
Type: ip Type: ip
Label: IP Address* Label: IP Address*
@ -60,6 +63,7 @@ PropertyCategories:
DefaultValue: '' DefaultValue: ''
Configurations: '*' Configurations: '*'
UserConfigurable: true UserConfigurable: true
- Key: guestinfo.prefixlength - Key: guestinfo.prefixlength
Type: int(8..32) Type: int(8..32)
Label: Subnet prefix length* Label: Subnet prefix length*
@ -67,6 +71,7 @@ PropertyCategories:
DefaultValue: '24' DefaultValue: '24'
Configurations: '*' Configurations: '*'
UserConfigurable: true UserConfigurable: true
- Key: guestinfo.dnsserver - Key: guestinfo.dnsserver
Type: ip Type: ip
Label: DNS server* Label: DNS server*
@ -74,6 +79,7 @@ PropertyCategories:
DefaultValue: '' DefaultValue: ''
Configurations: '*' Configurations: '*'
UserConfigurable: true UserConfigurable: true
- Key: guestinfo.gateway - Key: guestinfo.gateway
Type: ip Type: ip
Label: Gateway* Label: Gateway*
@ -82,6 +88,24 @@ PropertyCategories:
Configurations: '*' Configurations: '*'
UserConfigurable: true UserConfigurable: true
- Key: guestinfo.ntpserver
Type: string(1..)
Label: Time server*
Description: A comma-separated list of timeservers
DefaultValue: 0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org
Configurations: '*'
UserConfigurable: true
- Name: 3) Kubernetes
ProductProperties:
- Key: guestinfo.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'
Configurations: '*'
UserConfigurable: true
AdvancedOptions: AdvancedOptions:
- Key: appliance.name - Key: appliance.name
Value: "{{ appliance.name }}" Value: "{{ appliance.name }}"