Skip to content

Commit 14e6d35

Browse files
committed
WIP: Try bumping builder base image to 24.04
1 parent f365ffa commit 14e6d35

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

src/cloud-api-adaptor/podvm/Dockerfile.podvm_builder

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Creates a builder container image that should be used to build the Pod VM
77
# disk inside a container.
88
#
9-
FROM ubuntu:20.04
9+
FROM ubuntu:24.04
1010

1111
ARG ARCH="amd64"
1212
ARG YQ_ARCH="amd64"

src/cloud-api-adaptor/podvm/README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ In order to build locally it requires the source trees and softwares mentioned i
1111
* On Ubuntu:
1212

1313
```bash
14-
$ apt-get install -y qemu-kvm cloud-utils qemu-utils protobuf-compiler pkg-config libdevmapper-dev libgpgme-dev
14+
apt-get install -y qemu-kvm cloud-utils qemu-utils protobuf-compiler pkg-config libdevmapper-dev libgpgme-dev
1515
```
1616

1717
Finally run the following commands to build the qcow2 image:
1818

1919
```bash
20-
$ export CLOUD_PROVIDER=[aws|azure|ibmcloud|libvirt|vsphere|generic]
21-
$ make image
20+
export CLOUD_PROVIDER=[aws|azure|ibmcloud|libvirt|vsphere|generic]
21+
make image
2222
```
23+
2324
**NOTE:** "generic" is a best-effort provider agnostic image creation
2425

2526
# How to build within container
@@ -47,11 +48,13 @@ Fedora 39 ([Dockerfile.podvm_builder.fedora](./Dockerfile.podvm_builder)) and RH
4748
([Dockerfile.podvm_builder.rhel](./Dockerfile.podvm_builder.rhel)).
4849

4950
You can create the builder image using the make target by running:
51+
5052
```bash
51-
$ make -C .. podvm-builder
53+
make -C .. podvm-builder
5254
```
5355

5456
You can optionally customize the builder image, by specify shell variables to the `make` command:
57+
5558
| Variable | Default value | Description |
5659
| ------------------- | -------------- | --------------------------------------------------------------- |
5760
| `ARCH` | `amd64`/`s390x`| Architecture of the podvm image to be built. Defaults to the architecture the of the current machine |
@@ -60,6 +63,7 @@ You can optionally customize the builder image, by specify shell variables to th
6063
| `ACTIVATION_KEY` | `""` | rhel only: the activation key for Red Hat Subscription Management (RHSM) |
6164

6265
e.g. to produce an s390x architecture builder image
66+
6367
```
6468
ARCH=s390x make -C .. podvm-builder
6569
```
@@ -75,7 +79,7 @@ Like the builder image, we have make targets for the binaries image in the paren
7579
To build the binaries image, use the following command:
7680

7781
```bash
78-
$ BUILDER_IMG=<your_builder_image> make -C .. podvm-binaries
82+
BUILDER_IMG=<your_builder_image> make -C .. podvm-binaries
7983
```
8084

8185
The build process can take significant time.
@@ -113,9 +117,11 @@ use the QEMU builder in emulation mode when running within container.
113117
> **Note:** Beware that the process consume a bunch of memory and disk from the host.
114118
If the build fails at the point QEMU was launched but packer couldn't
115119
connect via ssh, with an error similar to:
120+
>
116121
> ```
117122
> Build 'qemu.ubuntu' errored after 5 minutes 57 seconds: Timeout waiting for SSH.
118123
> ```
124+
>
119125
> then it might indicate lack of memory, so try to increase the amount of memory if running on VM.
120126
121127
The podvm image can be built for other architectures than `x86_64` by passing
@@ -130,14 +136,17 @@ $ docker build -t podvm_s390x \
130136
```
131137
132138
The Secure Execution enabled podvm image can be built by passing the `SE_BOOT` build argument to docker. Currently this is only supported for Ubutu `s390x`, which also needs put the `HOST KEY documents` to the [files](files) folder, please follow the `Download host key document from Resource Link` section at [this document](../ibmcloud/SECURE_EXECUTION.md) to download `HOST KEY documents`.
139+
133140
```bash
134141
$ tree -L 1 files
135142
files
136143
├── HKD-8562-1234567.crt
137144
├── etc
138145
└── usr
139146
```
147+
140148
Running below command will build the Secure Execution enabled qcow2 image:
149+
141150
```bash
142151
$ docker build -t se_podvm_s390x \
143152
--build-arg ARCH=s390x \
@@ -174,12 +183,13 @@ file out of the podvm container image.
174183
Running the below command will extract the qcow2 image built in the previous step.
175184

176185
```bash
177-
$ ./hack/download-image.sh podvm:latest . -o podvm.qcow2
186+
./hack/download-image.sh podvm:latest . -o podvm.qcow2
178187
```
188+
179189
Running the below command will extract the Secure Execution enabled qcow2 image built in the previous step.
180190

181191
```bash
182-
$ ./hack/download-image.sh se_podvm_s390x:latest . -o se_podvm.qcow2
192+
./hack/download-image.sh se_podvm_s390x:latest . -o se_podvm.qcow2
183193
```
184194

185195
# How to add support for a new Linux distribution
@@ -189,7 +199,7 @@ In order to add a new Linux distribution essentially it is needed to create some
189199
Follow the steps below, replacing `DISTRO` with the name of the distribution being added:
190200

191201
1. Create the builder dockerfile by copying `Dockerfile.podvm_builder` to `Dockerfile.podvm_builder.DISTRO` and
192-
adjusting the file properly (e.g. replace `FROM ubuntu:20.04` with `FROM DISTRO`). Try to keep the same
202+
adjusting the file properly (e.g. replace `FROM ubuntu:24.04` with `FROM DISTRO`). Try to keep the same
193203
software versions (e.g. Golang) as much as possible.
194204
2. Create the podvm image dockerfile by copying `Dockerfile.podvm` to `Dockerfile.podvm.DISTRO` and adjusting the file
195205
properly likewise. In particular, the *PODVM_DISTRO* and *BUILDER_IMG* arguments should be changed.

0 commit comments

Comments
 (0)