This commit is contained in:
Jonas Forsberg 2021-10-16 15:09:54 +02:00
parent a36de5b233
commit 04b6350fd3
4 changed files with 68 additions and 2 deletions

View File

@ -1,4 +1,8 @@
pxe:
harvester:
versions:
- 0.3.0
- version: 0.3.0
hash:
iso: a5c6ef5081fa844b1a13689e8a0dbbd57ea4d58202a0f4b0c05d12c60955f6e2
initrd: 6d7899c381da7bf10a70991d024c6b6ab17a26d477b0523704076c43548922a1
rootfs: dd8fb6118431ec9175beb6561a91027128841e46fdc6dff3b671dccc798f6aed
vmlinuz: 6887e6a026f47509c729fb3fe1527f06adae15eb0f31982f52dcf86f3237fd1a

View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -0,0 +1,11 @@
## Menu Colours
set menu_color_normal=white/black
set menu_color_highlight=white/green
{% for item in pillar['pxe']['harvester'] -%}
menuentry 'Harvester {{ item['version'] }}' --class os {
linux harvester-v{{ item['version'] }}-vmlinuz-amd64 nomodeset initrd=harvester-v{{ item['version'] }}-initrd-amd64 ip=dhcp net.ifnames=1 rd.cos.disable rd.noverifyssl console=tty1 root=live:http://{{ pillar['network']['ip'] }}/harvester/harvester-v{{ item['version'] }}-rootfs-amd64.squashfs iso_url=http://{{ pillar['network']['ip'] }}/harvester/harvester-v{{ item['version'] }}-amd64.iso
initrd harvester-v{{ item['version'] }}-initrd-amd64
boot
}
{% endfor %}

View File

@ -0,0 +1,47 @@
{% for item in pillar['pxe']['harvester'] -%}
Download harvester {{ item['version'] }} ISO:
file.managed:
- name: /srv/www/htdocs/harvester/harvester-v{{ item['version'] }}-amd64.iso
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-amd64.iso
- source_hash: {{ item['hash']['iso'] }}
- user: root
- group: root
- mode: "0644"
Download harvester {{ item['version'] }} initrd:
file.managed:
- name: /srv/tftpboot/harvester-v{{ item['version'] }}-initrd-amd64
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-initrd-amd64
- source_hash: {{ item['hash']['initrd'] }}
- user: root
- group: root
- mode: "0644"
Download harvester {{ item['version'] }} wmlinuz:
file.managed:
- name: /srv/tftpboot/harvester-v{{ item['version'] }}-vmlinuz-amd64
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-vmlinuz-amd64
- source_hash: {{ item['hash']['vmlinuz'] }}
- user: root
- group: root
- mode: "0644"
Download harvester {{ item['version'] }} rootfs:
file.managed:
- name: /srv/www/htdocs/harvester/harvester-v{{ item['version'] }}-rootfs-amd64.squashfs
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-rootfs-amd64.squashfs
- source_hash: {{ item['hash']['rootfs'] }}
- user: root
- group: root
- mode: "0644"
{% endfor %}
Update harvester grub file:
file.managed:
- name: /srv/tftpboot/harvester.cfg
- source: salt://pxe/harvester/files/harvester.cfg.jinja
- template: jinja
- user: root
- group: root
- mode: "0644"