From daeeebae563d41c0271cce4d7afa5f3cbefa2680 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Fri, 23 Jul 2021 12:54:01 +0700 Subject: [PATCH 1/2] Upgrade to latest CoreOS testing stream https://github.com/coreos/fedora-coreos-config/pull/1114 --- metal/roles/pxe-server/defaults/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/metal/roles/pxe-server/defaults/main.yml b/metal/roles/pxe-server/defaults/main.yml index 663a333b..699f2de9 100644 --- a/metal/roles/pxe-server/defaults/main.yml +++ b/metal/roles/pxe-server/defaults/main.yml @@ -1,8 +1,7 @@ -iso_url: "https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/34.20210529.3.0/x86_64/fedora-coreos-34.20210529.3.0-live.x86_64.iso" -iso_checksum: "sha256:6bec8c1e67747c4d2fd8dca8bb833b74879d9c60c99d9edd4c4f17e2830ed6f0" -iso_file_name: "fedora-coreos-34.20210529.3.0-live.x86_64.iso" +iso_url: "https://builds.coreos.fedoraproject.org/prod/streams/testing/builds/34.20210711.2.1/x86_64/fedora-coreos-34.20210711.2.1-live.x86_64.iso" +iso_checksum: "sha256:8b02f80125b76889a10b88b6471645b2017a752e3b5e6c44d122c6b11fd51d0d" +iso_file_name: "fedora-coreos-34.20210711.2.1-live.x86_64.iso" -os_username: admin os_name: CoreOS # TODO (optimize) Get timezone automatically from the controller timezone: Asia/Ho_Chi_Minh From 499dd397be4c00048613be2294976c82045c1c1b Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Fri, 23 Jul 2021 13:50:33 +0700 Subject: [PATCH 2/2] Use volume for PXE config files --- metal/roles/pxe-server/templates/dhcp/Dockerfile | 2 -- metal/roles/pxe-server/templates/docker-compose.yml | 3 +++ metal/roles/pxe-server/templates/tftp/Dockerfile | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/metal/roles/pxe-server/templates/dhcp/Dockerfile b/metal/roles/pxe-server/templates/dhcp/Dockerfile index 38bb0713..0870e4a6 100644 --- a/metal/roles/pxe-server/templates/dhcp/Dockerfile +++ b/metal/roles/pxe-server/templates/dhcp/Dockerfile @@ -4,6 +4,4 @@ RUN apk add dhcp RUN touch /var/lib/dhcp/dhcpd.leases -COPY dhcpd.conf /etc/dhcp/dhcpd.conf - CMD [ "dhcpd", "-f", "-cf", "/etc/dhcp/dhcpd.conf" ] diff --git a/metal/roles/pxe-server/templates/docker-compose.yml b/metal/roles/pxe-server/templates/docker-compose.yml index d4061f08..dcacf065 100644 --- a/metal/roles/pxe-server/templates/docker-compose.yml +++ b/metal/roles/pxe-server/templates/docker-compose.yml @@ -3,11 +3,14 @@ version: "3" services: dhcp: build: ./dhcp + volumes: + - ./dhcp/dhcpd.conf:/etc/dhcp/dhcpd.conf network_mode: host tftp: build: ./tftp network_mode: host volumes: + - ./tftp/tftpboot/grub.cfg:/var/lib/tftpboot/grub.cfg - ./mnt/EFI/fedora/grubx64.efi:/var/lib/tftpboot/grubx64.efi - ./mnt/images/ignition.img:/var/lib/tftpboot/ignition.img - ./mnt/images/pxeboot/initrd.img:/var/lib/tftpboot/initrd.img diff --git a/metal/roles/pxe-server/templates/tftp/Dockerfile b/metal/roles/pxe-server/templates/tftp/Dockerfile index 4f02514a..5d632ac4 100644 --- a/metal/roles/pxe-server/templates/tftp/Dockerfile +++ b/metal/roles/pxe-server/templates/tftp/Dockerfile @@ -2,6 +2,4 @@ FROM alpine:3 RUN apk add tftp-hpa -COPY ./tftpboot /var/lib/tftpboot - CMD [ "in.tftpd", "--foreground", "--secure", "/var/lib/tftpboot" ]