Skip to content

Commit e40cd2d

Browse files
ciobandarora
authored andcommitted
chore: adding details on EKS build
1 parent 49d62e4 commit e40cd2d

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

ansible/vars.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ postgres_major:
99

1010
# Full version strings for each major version
1111
postgres_release:
12-
postgresorioledb-17: "17.5.1.018-orioledb"
13-
postgres17: "17.4.1.075"
14-
postgres15: "15.8.1.132"
12+
postgresorioledb-17: "17.5.1.019-orioledb"
13+
postgres17: "17.4.1.076"
14+
postgres15: "15.8.1.133"
1515

1616
# Non Postgres Extensions
1717
pgbouncer_release: "1.19.0"

qemu_artifact.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,28 @@ Given the size of the image, the first VM using it on a node might take a while
99
The current AMI process involves a few steps:
1010

1111
1. nix package is build and published using GHA (`.github/workflows/nix-build.yml`)
12-
- this builds Postgres along with the PG extensions we use.
12+
13+
- this builds Postgres along with the PG extensions we use.
14+
1315
2. "stage1" build (`amazon-arm64-nix.pkr.hcl`, invoked via `.github/workflows/ami-release-nix.yml`)
14-
- uses an upstream Ubuntu image to initialize the AMI
15-
- installs and configures the majority of the software that gets shipped as part of the AMI (e.g. gotrue, postgrest, ...)
16+
17+
- uses an upstream Ubuntu image to initialize the AMI
18+
- installs and configures the majority of the software that gets shipped as part of the AMI (e.g. gotrue, postgrest, ...)
19+
1620
3. "stage2" build (`stage2-nix-psql.pkr.hcl`, invoked via `.github/workflows/ami-release-nix.yml`)
17-
- uses the image published from (2)
18-
- installs and configures the software that is build and published using nix in (1)
19-
- cleans up build dependencies etc
21+
22+
- uses the image published from (2)
23+
- installs and configures the software that is build and published using nix in (1)
24+
- cleans up build dependencies etc
2025

2126
The QEMU artifact process collapses (2) and (3):
2227

2328
a. nix package is build and published using GHA (`.github/workflows/nix-build.yml`)
2429
b. packer build (`qemu-arm64-nix.pkr.hcl`)
25-
- uses an upstream Ubuntu live image as the base
26-
- performs the work that was performed as part of the "stage1" and "stage2" builds
27-
- this work is executed using `ebssurrogate/scripts/qemu-bootstrap-nix.sh`
30+
31+
- uses an upstream Ubuntu live image as the base
32+
- performs the work that was performed as part of the "stage1" and "stage2" builds
33+
- this work is executed using `ebssurrogate/scripts/qemu-bootstrap-nix.sh`
2834

2935
While the AMI build uses the EBS Surrogate Packer builder to create a minimal boot environment that it then adds things to, the QEMU build merely adds things to the Ubuntu Cloud Image. As such, it's likely possible to make something more minimal with a bit more work, but this was deemed unnecessary for now. Collapsing Stage1 and Stage2 was done in the interest of iteration speed, as executing them together is much faster than saving an artifact off stage1, booting another VM off it, and then executing stage2.
3036

@@ -36,6 +42,16 @@ Following `make init alpine-image`, the generated VM image should be bundled as
3642

3743
For faster iteration, it's more convenient to build the image on an ubuntu bare-metal node that's part of the EKS cluster you're using. Build the image in the `k8s.io` namespace in order for it to be available for immediate use on that node.
3844

45+
list of packages installed on the EKS to build images:
46+
47+
```
48+
apt-get install -y git emacs ripgrep vim-tiny byobu build-essential
49+
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
50+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
51+
apt-cache update
52+
apt-get install -y qemu-system qemu-system-arm qemu-utils qemu-efi-aarch64 libvirt-clients libvirt-daemon libqcow-utils software-properties-common git make libnbd-bin nbdkit fuse2fs cloud-image-utils awscli packer=1.11.2-1
53+
```
54+
3955
### Dependencies note
4056

4157
Installing `docker.io` on an EKS node might interfere with the k8s setup of the node. You can instead install `nerdctl` and `buildkit`:

0 commit comments

Comments
 (0)