This commit is contained in:
jonas 2021-10-18 17:20:55 +02:00
parent e3bae71113
commit be783f12ed
10 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,11 @@
apiVersion: harvesterhci.io/v1beta1
kind: VirtualMachineImage
metadata:
name: 56e5b8adb10
namespace: default
spec:
displayName: opensuse-leap-15.3-jeos.x86_64-kvm-and-xen.qcow2
pvcName: ""
pvcNamespace: ""
sourceType: download
url: http://172.18.0.1/images/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2

View File

@ -0,0 +1,8 @@
apiVersion: harvesterhci.io/v1beta1
kind: KeyPair
metadata:
name: admin
namespace: default
spec:
publicKey: |
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILGVNwMC2H+Fn4AhCDIa4MVfEYsVF7Zs2yHc8cGbv40l jonas@admin

View File

@ -0,0 +1,8 @@
apiVersion: harvesterhci.io/v1beta1
kind: KeyPair
metadata:
name: exilio
namespace: default
spec:
publicKey: |
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDSJ4KrM7iwmUyvOznqNiTaYOIVxpog7Ktfr2xaJgH6O jonas@exsilio

View File

@ -0,0 +1,7 @@
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: airgap
namespace: default
spec:
config: '{"cniVersion":"0.3.1","name":"airgap","type":"bridge","bridge":"harvester-br0","promiscMode":true,"vlan":250,"ipam":{}}'

View File

@ -0,0 +1,7 @@
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: public-1
namespace: default
spec:
config: '{"cniVersion":"0.3.1","name":"public-1","type":"bridge","bridge":"harvester-br0","promiscMode":true,"vlan":100,"ipam":{}}'

View File

@ -0,0 +1,7 @@
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: public-2
namespace: default
spec:
config: '{"cniVersion":"0.3.1","name":"public-2","type":"bridge","bridge":"harvester-br0","promiscMode":true,"vlan":200,"ipam":{}}'

4
salt/pillars/images.sls Normal file
View File

@ -0,0 +1,4 @@
images:
opensuse:
- url: https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2
checksum: da11e3ed78cdadb0c8a15e9dd82c3c2b2746ba61cb98c3c03cfb156e5b8adb10

View File

@ -11,6 +11,7 @@ base:
- hostapd - hostapd
- pxe - pxe
- harvester_cluster - harvester_cluster
- images
{% if salt['pillar.file_exists']('local.sls') %} {% if salt['pillar.file_exists']('local.sls') %}
- local - local
{% endif %} {% endif %}

View File

@ -0,0 +1,15 @@
{% for distname, items in pillar['images'].items() %}
{% for item in items %}
{% set filename = item['url'].split('/')[-1] %}
Downloading image {{ filename }}:
file.managed:
- name: /srv/www/htdocs/images/{{ filename }}
- source: {{ item['url'] }}
- source_hash: {{ item['checksum'] }}
- user: root
- group: root
- mode: "0644"
- makedirs: True
- dir_mode: "0755"
{% endfor %}
{% endfor %}

View File

@ -15,3 +15,4 @@ base:
- docker.registry - docker.registry
- remote-desktop - remote-desktop
- wol - wol
- images