From e39f1a155b0b96e86b487566dac485d969063701 Mon Sep 17 00:00:00 2001 From: gabelchinmay Date: Tue, 20 Feb 2024 17:42:22 -0800 Subject: [PATCH 1/5] fix ui overwrite issue --- Earthfile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Earthfile b/Earthfile index 4feaa0b..c5620e7 100644 --- a/Earthfile +++ b/Earthfile @@ -155,11 +155,11 @@ build-iso: COPY --if-exists "$CLUSTERCONFIG" /overlay/opt/spectrocloud/clusterconfig/spc.tgz END - COPY --if-exists ui.tar /overlay/opt/spectrocloud/emc/ - RUN if [ -f /overlay/opt/spectrocloud/emc/ui.tar ]; then \ - tar -xf /overlay/opt/spectrocloud/emc/ui.tar -C /overlay/opt/spectrocloud/emc && \ - rm -f /overlay/opt/spectrocloud/emc/ui.tar; \ - fi + # COPY --if-exists ui.tar /overlay/opt/spectrocloud/emc/ + # RUN if [ -f /overlay/opt/spectrocloud/emc/ui.tar ]; then \ + # tar -xf /overlay/opt/spectrocloud/emc/ui.tar -C /overlay/opt/spectrocloud/emc && \ + # rm -f /overlay/opt/spectrocloud/emc/ui.tar; \ + # fi WORKDIR /build COPY --platform=linux/${ARCH} --keep-own +iso-image-rootfs/rootfs /build/image @@ -366,6 +366,14 @@ iso-image: FROM --platform=linux/${ARCH} +base-image COPY --platform=linux/${ARCH} +stylus-image/ / COPY overlay/files/ / + + COPY --if-exists ui.tar /opt/spectrocloud/emc/ + RUN if [ -f /opt/spectrocloud/emc/ui.tar ]; then \ + tar -xf /opt/spectrocloud/emc/ui.tar -C /opt/spectrocloud/emc && \ + rm -f /opt/spectrocloud/emc/ui.tar; \ + fi + + RUN rm -f /etc/ssh/ssh_host_* /etc/ssh/moduli RUN touch /etc/machine-id \ From 39d43fa756e97dd25415ef8c55aeaa9a0a87e9ed Mon Sep 17 00:00:00 2001 From: gabelchinmay Date: Tue, 20 Feb 2024 22:25:41 -0800 Subject: [PATCH 2/5] adding ui files directly into root fs --- Earthfile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Earthfile b/Earthfile index c5620e7..fee2367 100644 --- a/Earthfile +++ b/Earthfile @@ -155,12 +155,6 @@ build-iso: COPY --if-exists "$CLUSTERCONFIG" /overlay/opt/spectrocloud/clusterconfig/spc.tgz END - # COPY --if-exists ui.tar /overlay/opt/spectrocloud/emc/ - # RUN if [ -f /overlay/opt/spectrocloud/emc/ui.tar ]; then \ - # tar -xf /overlay/opt/spectrocloud/emc/ui.tar -C /overlay/opt/spectrocloud/emc && \ - # rm -f /overlay/opt/spectrocloud/emc/ui.tar; \ - # fi - WORKDIR /build COPY --platform=linux/${ARCH} --keep-own +iso-image-rootfs/rootfs /build/image IF [ "$ARCH" = "arm64" ] @@ -372,8 +366,6 @@ iso-image: tar -xf /opt/spectrocloud/emc/ui.tar -C /opt/spectrocloud/emc && \ rm -f /opt/spectrocloud/emc/ui.tar; \ fi - - RUN rm -f /etc/ssh/ssh_host_* /etc/ssh/moduli RUN touch /etc/machine-id \ From ac4ec9c5766da1dbacd4489be7b3c3beb6b27ae1 Mon Sep 17 00:00:00 2001 From: gabelchinmay Date: Tue, 20 Feb 2024 23:20:25 -0800 Subject: [PATCH 3/5] Revert "adding ui files directly into root fs" This reverts commit 39d43fa756e97dd25415ef8c55aeaa9a0a87e9ed. --- Earthfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Earthfile b/Earthfile index fee2367..c5620e7 100644 --- a/Earthfile +++ b/Earthfile @@ -155,6 +155,12 @@ build-iso: COPY --if-exists "$CLUSTERCONFIG" /overlay/opt/spectrocloud/clusterconfig/spc.tgz END + # COPY --if-exists ui.tar /overlay/opt/spectrocloud/emc/ + # RUN if [ -f /overlay/opt/spectrocloud/emc/ui.tar ]; then \ + # tar -xf /overlay/opt/spectrocloud/emc/ui.tar -C /overlay/opt/spectrocloud/emc && \ + # rm -f /overlay/opt/spectrocloud/emc/ui.tar; \ + # fi + WORKDIR /build COPY --platform=linux/${ARCH} --keep-own +iso-image-rootfs/rootfs /build/image IF [ "$ARCH" = "arm64" ] @@ -366,6 +372,8 @@ iso-image: tar -xf /opt/spectrocloud/emc/ui.tar -C /opt/spectrocloud/emc && \ rm -f /opt/spectrocloud/emc/ui.tar; \ fi + + RUN rm -f /etc/ssh/ssh_host_* /etc/ssh/moduli RUN touch /etc/machine-id \ From 5c81cea06eba4491a106f049e02b3d7f5642a0d9 Mon Sep 17 00:00:00 2001 From: gabelchinmay Date: Tue, 20 Feb 2024 23:27:49 -0800 Subject: [PATCH 4/5] testing changes --- Earthfile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Earthfile b/Earthfile index c5620e7..368f670 100644 --- a/Earthfile +++ b/Earthfile @@ -147,6 +147,7 @@ build-iso: FROM --platform=linux/${ARCH} $OSBUILDER_IMAGE ENV ISO_NAME=${ISO_NAME} + COPY --if-exists ui.tar overlay/files-iso/opt/spectrocloud/emc/ COPY overlay/files-iso/ /overlay/ COPY --if-exists user-data /overlay/files-iso/config.yaml COPY --if-exists content-*/*.zst /overlay/opt/spectrocloud/content/ @@ -155,11 +156,11 @@ build-iso: COPY --if-exists "$CLUSTERCONFIG" /overlay/opt/spectrocloud/clusterconfig/spc.tgz END - # COPY --if-exists ui.tar /overlay/opt/spectrocloud/emc/ - # RUN if [ -f /overlay/opt/spectrocloud/emc/ui.tar ]; then \ - # tar -xf /overlay/opt/spectrocloud/emc/ui.tar -C /overlay/opt/spectrocloud/emc && \ - # rm -f /overlay/opt/spectrocloud/emc/ui.tar; \ - # fi + #COPY --if-exists ui.tar /overlay/opt/spectrocloud/emc/ + RUN if [ -f /overlay/opt/spectrocloud/emc/ui.tar ]; then \ + tar -xf /overlay/opt/spectrocloud/emc/ui.tar -C /overlay/opt/spectrocloud/emc && \ + rm -f /overlay/opt/spectrocloud/emc/ui.tar; \ + fi WORKDIR /build COPY --platform=linux/${ARCH} --keep-own +iso-image-rootfs/rootfs /build/image @@ -367,11 +368,11 @@ iso-image: COPY --platform=linux/${ARCH} +stylus-image/ / COPY overlay/files/ / - COPY --if-exists ui.tar /opt/spectrocloud/emc/ - RUN if [ -f /opt/spectrocloud/emc/ui.tar ]; then \ - tar -xf /opt/spectrocloud/emc/ui.tar -C /opt/spectrocloud/emc && \ - rm -f /opt/spectrocloud/emc/ui.tar; \ - fi + # COPY --if-exists ui.tar /opt/spectrocloud/emc/ + # RUN if [ -f /opt/spectrocloud/emc/ui.tar ]; then \ + # tar -xf /opt/spectrocloud/emc/ui.tar -C /opt/spectrocloud/emc && \ + # rm -f /opt/spectrocloud/emc/ui.tar; \ + # fi From 30983e25c0bafd5197370e52153890f02f1afe66 Mon Sep 17 00:00:00 2001 From: gabelchinmay Date: Wed, 21 Feb 2024 03:13:18 -0800 Subject: [PATCH 5/5] fix copy to rootfs --- Earthfile | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/Earthfile b/Earthfile index 368f670..d065177 100644 --- a/Earthfile +++ b/Earthfile @@ -147,7 +147,6 @@ build-iso: FROM --platform=linux/${ARCH} $OSBUILDER_IMAGE ENV ISO_NAME=${ISO_NAME} - COPY --if-exists ui.tar overlay/files-iso/opt/spectrocloud/emc/ COPY overlay/files-iso/ /overlay/ COPY --if-exists user-data /overlay/files-iso/config.yaml COPY --if-exists content-*/*.zst /overlay/opt/spectrocloud/content/ @@ -156,14 +155,17 @@ build-iso: COPY --if-exists "$CLUSTERCONFIG" /overlay/opt/spectrocloud/clusterconfig/spc.tgz END - #COPY --if-exists ui.tar /overlay/opt/spectrocloud/emc/ - RUN if [ -f /overlay/opt/spectrocloud/emc/ui.tar ]; then \ - tar -xf /overlay/opt/spectrocloud/emc/ui.tar -C /overlay/opt/spectrocloud/emc && \ - rm -f /overlay/opt/spectrocloud/emc/ui.tar; \ - fi + WORKDIR /build COPY --platform=linux/${ARCH} --keep-own +iso-image-rootfs/rootfs /build/image + + COPY --if-exists ui.tar /build/image/opt/spectrocloud/emc/ + RUN if [ -f /build/image/opt/spectrocloud/emc/ui.tar ]; then \ + tar -xf /build/image/opt/spectrocloud/emc/ui.tar -C /build/image/opt/spectrocloud/emc && \ + rm -f /build/image/opt/spectrocloud/emc/ui.tar; \ + fi + IF [ "$ARCH" = "arm64" ] RUN /entrypoint.sh --name $ISO_NAME build-iso --date=false --overlay-iso /overlay dir:/build/image --debug --output /iso/ --arch $ARCH ELSE IF [ "$ARCH" = "amd64" ] @@ -367,14 +369,6 @@ iso-image: FROM --platform=linux/${ARCH} +base-image COPY --platform=linux/${ARCH} +stylus-image/ / COPY overlay/files/ / - - # COPY --if-exists ui.tar /opt/spectrocloud/emc/ - # RUN if [ -f /opt/spectrocloud/emc/ui.tar ]; then \ - # tar -xf /opt/spectrocloud/emc/ui.tar -C /opt/spectrocloud/emc && \ - # rm -f /opt/spectrocloud/emc/ui.tar; \ - # fi - - RUN rm -f /etc/ssh/ssh_host_* /etc/ssh/moduli RUN touch /etc/machine-id \