Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme and add elemental #119

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG K8S_DISTRIBUTION
ARG CUSTOM_TAG
ARG CLUSTERCONFIG
ARG ARCH
ARG PE_VERSION=v4.1.2
ARG PE_VERSION=v4.2.1
ARG SPECTRO_LUET_VERSION=v1.2.0
ARG KAIROS_VERSION=v2.4.3
ARG K3S_FLAVOR_TAG=k3s1
Expand Down Expand Up @@ -54,6 +54,10 @@ IF [[ "$BASE_IMAGE" =~ "ubuntu-20-lts-arm-nvidia-jetson-agx-orin" ]]
ARG IS_JETSON=true
END

elemental:
FROM quay.io/kairos/packages:elemental-cli-system-0.3.1
SAVE ARTIFACT /usr/bin/elemental /elemental

build-all-images:
IF $FIPS_ENABLED
BUILD +build-provider-images-fips
Expand Down Expand Up @@ -325,6 +329,8 @@ base-image:
chmod 444 /etc/machine-id
RUN rm /tmp/* -rf

COPY +elemental/elemental /usr/bin/elemental

# Ensure SElinux gets disabled
RUN if grep "security=selinux" /etc/cos/bootargs.cfg > /dev/null; then sed -i 's/security=selinux //g' /etc/cos/bootargs.cfg; fi &&\
if grep "selinux=1" /etc/cos/bootargs.cfg > /dev/null; then sed -i 's/selinux=1/selinux=0/g' /etc/cos/bootargs.cfg; fi
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ v3.4.1
v3.4.3

v4.1.0
v4.2.1
```

4. Checkout the desired tag
Expand All @@ -88,8 +89,8 @@ git checkout <tag version>
**Sample Output**

```shell
git checkout v3.4.3
Note: switching to 'v3.4.3'.
git checkout v4.2.1
Note: switching to 'v4.2.1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
Expand Down Expand Up @@ -152,7 +153,7 @@ To build the provider images

To build the fips enabled ubuntu installer image
```shell
./earthly.sh +iso --BASE_IMAGE=gcr.io/spectro-images-public/ubuntu-focal-fips:v4.0_20230817 --FIPS_ENABLED=true --ARCH=amd64 --PE_VERSION=v4.0.0
./earthly.sh +iso --BASE_IMAGE=gcr.io/spectro-images-public/ubuntu-focal-fips:v4.0_20230817 --FIPS_ENABLED=true --ARCH=amd64 --PE_VERSION=v4.2.1
```

Output
Expand All @@ -171,7 +172,7 @@ system.registry: ttl.sh
system.repo: ubuntu
system.k8sDistribution: k3s
system.osName: ubuntu
system.peVersion: v3.4.0
system.peVersion: v4.2.1
system.customTag: demo
system.osVersion: 22
```
Expand All @@ -186,19 +187,19 @@ palette-edge-installer.iso.sha256

# Output
REPOSITORY TAG IMAGE ID CREATED SIZE
ttl.sh/ubuntu k3s-1.24.6-v3.4.3-demo cad8acdd2797 17 hours ago 4.62GB
ttl.sh/ubuntu k3s-1.24.6-v3.4.3-demo_linux_amd64 cad8acdd2797 17 hours ago 4.62GB
ttl.sh/ubuntu k3s-1.25.2-v3.4.3-demo f6e490f53971 17 hours ago 4.62GB
ttl.sh/ubuntu k3s-1.25.2-v3.4.3-demo_linux_amd64 f6e490f53971 17 hours ago 4.62GB
ttl.sh/ubuntu k3s-1.24.6-v4.2.1-demo cad8acdd2797 17 hours ago 4.62GB
ttl.sh/ubuntu k3s-1.24.6-v4.2.1-demo_linux_amd64 cad8acdd2797 17 hours ago 4.62GB
ttl.sh/ubuntu k3s-1.25.2-v4.2.1-demo f6e490f53971 17 hours ago 4.62GB
ttl.sh/ubuntu k3s-1.25.2-v4.2.1-demo_linux_amd64 f6e490f53971 17 hours ago 4.62GB
```

Earthly is a multi-architecture build tool. In this example we are building images for AMD64 hardware which is reflected by the tags above. In the future we will support ARM64 builds and those tags will be included. We only need to push the image tag that DOES NOT have the architecture reference i.e `linux_amd64` in the above example.

11. The provider images are by default not pushed to a registry. You can push the images by using the `docker push` command and reference the created images.

```shell
docker push ttl.sh/ubuntu:k3s-1.25.2-v3.4.3-demo && \
docker push ttl.sh/ubuntu:k3s-1.24.6-v3.4.3-demo
docker push ttl.sh/ubuntu:k3s-1.25.2-v4.2.1-demo && \
docker push ttl.sh/ubuntu:k3s-1.24.6-v4.2.1-demodocker push ttl.sh/ubuntu:k3s-1.24.6-v3.4.3-demo
```

> ⚠️ The default registry, [ttl.sh](https://ttl.sh/) is a short-lived registry. Images in the ttl.sh registry have a default time to live of
Expand Down