You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: qemu_artifact.md
+25-9Lines changed: 25 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,22 +9,28 @@ Given the size of the image, the first VM using it on a node might take a while
9
9
The current AMI process involves a few steps:
10
10
11
11
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
+
13
15
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
+
16
20
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
20
25
21
26
The QEMU artifact process collapses (2) and (3):
22
27
23
28
a. nix package is build and published using GHA (`.github/workflows/nix-build.yml`)
24
29
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`
28
34
29
35
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.
30
36
@@ -36,6 +42,16 @@ Following `make init alpine-image`, the generated VM image should be bundled as
36
42
37
43
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.
38
44
45
+
list of packages installed on the EKS to build images:
0 commit comments