This commit is contained in:
jonas 2021-10-26 15:34:18 +02:00
parent 5fe60ef166
commit a375142569
3 changed files with 34 additions and 2 deletions

View File

@ -14,8 +14,8 @@ tlu-harvester:
images:
opensuse:
- name: openSUSE Leap 15.3
url: https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2
checksum: da11e3ed78cdadb0c8a15e9dd82c3c2b2746ba61cb98c3c03cfb156e5b8adb10
url: https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-OpenStack-Cloud.qcow2
checksum: 7207cce5b77d9d040610c39cd3d09437489797882b1b834acfb8b0f9d82be26c
ns: default
- name: openSUSE MicroOS
url: https://download.opensuse.org/tumbleweed/appliances/openSUSE-MicroOS.x86_64-kvm-and-xen.qcow2

View File

@ -0,0 +1,30 @@
{% set fqdn = "rmt." + pillar['network']['domain'] -%}
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
harvesterhci.io/cloud-init-template: user
harvesterhci.io/creator: ""
name: rmt-client-register
namespace: default
data:
cloudInit: |-
runcmd:
- [ bash, "-c", "type SUSEConnect >/dev/null 2>&1 || { sudo zypper --non-interactive install SUSEConnect; }" ]
- [ curl, -O, "http://{{ fqdn }}/tools/rmt-client-setup" ]
- [ sudo, sh, rmt-client-setup, --host, {{ fqdn }}, --yes, --regcert, "http://{{ fqdn }}/rmt.crt", --fingerprint, "{{ fingerprint }}" ]
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
harvesterhci.io/cloud-init-template: user
harvesterhci.io/creator: ""
name: password-config-default-user
namespace: default
data:
cloudInit: |-
password: {{ pillar['tlu-harvester']['password'] }}
chpasswd: { expire: False }
ssh_pwauth: True

View File

@ -9,6 +9,8 @@ Add tlu-harvester manifests:
- include_empty: True
- makedirs: True
- dir_modes: "0700"
- context:
fingerprint: {{ salt['cmd.shell']('/usr/bin/openssl x509 -in /etc/rmt/ssl/rmt-ca.crt -noout -fingerprint | /usr/bin/cut -d= -f2') }}
{%- set images = salt['file.find']('/srv/www/htdocs/images/suse',type='f',mindepth=1,maxdepth=1,print='name') %}
Adding image manifest for SUSE images: