Skip to content

Commit 089a19e

Browse files
Enhance image building instructions (#1167)
Signed-off-by: Prajyot-Parab <[email protected]>
1 parent 1edf265 commit 089a19e

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

docs/book/src/developer/build-images.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
# How to build the machine boot images
22

33
## VPC
4-
TO-DO
54

6-
## Power VS
5+
- [Building CAPI Images for IBMCLOUD (CAPIBM) VPC](https://image-builder.sigs.k8s.io/capi/providers/ibmcloud.html#capibm---vpc)
76

8-
Compose the `user-varibales.json` file contains the information for the Power VS
7+
### Example
8+
9+
To build an image using a specific version of Kubernetes use the "PACKER_FLAGS" environment variable like in the example below:
10+
11+
```shell
12+
# Clone the image-builder repository
13+
$ git clone https://github.com/kubernetes-sigs/image-builder.git
14+
$ cd image-builder/images/capi
15+
$ PACKER_FLAGS="--var 'kubernetes_rpm_version=1.26.2-0' --var 'kubernetes_semver=v1.26.2' --var 'kubernetes_series=v1.26' --var 'kubernetes_deb_version=1.26.2-00'" make build-qemu-ubuntu-2004
16+
```
17+
18+
## PowerVS
19+
20+
- [Building CAPI Images for IBMCLOUD (CAPIBM) PowerVS](https://image-builder.sigs.k8s.io/capi/providers/ibmcloud.html#capibm---powervs)
21+
22+
### Example
23+
24+
Compose the `user-variables.json` file containing the information for the PowerVS
925

1026
```json
1127
{
@@ -29,23 +45,23 @@ Compose the `user-varibales.json` file contains the information for the Power VS
2945

3046
- `account_id`: IBM Cloud account ID
3147
- `apikey`: IBM Cloud API Key
32-
- `capture_cos_access_key`: Access key for the IBM Cloud Object Storage(COS) to export the image to
48+
- `capture_cos_access_key`: IBM Cloud Object Storage(COS) access key where the image will be exported
3349
- `capture_cos_bucket`: IBM Cloud Object Storage(COS) bucket name
3450
- `capture_cos_region`: IBM Cloud Object Storage(COS) bucket region
3551
- `capture_cos_secret_key`: IBM Cloud Object Storage(COS) secret key
36-
- `key_pair_name`: SSH key name present in the Power VS
52+
- `key_pair_name`: SSH key name present in the PowerVS
3753
- `kubernetes_deb_version`: Kubernetes deb version, e.g: 1.24.2-00
3854
- `kubernetes_rpm_version`: Kubernetes RPM package version, e.g: 1.24.2-0
3955
- `kubernetes_semver`: e.g: v1.24.2
4056
- `kubernetes_series`: e.g: v1.24
41-
- `region`: Power VS region, e.g: osa
42-
- `service_instance_id`: Power VS service instance ID
57+
- `region`: PowerVS region, e.g: osa
58+
- `service_instance_id`: PowerVS service instance ID
4359
- `ssh_private_key_file`: Path to the SSH private key file used to connect to the vm while image preparation, e.g: /Users/manjunath/.ssh/id_rsa
44-
- `zone`: Power VS zone, e.g: osa21
60+
- `zone`: PowerVS zone, e.g: osa21
4561

4662
```shell
4763
# Clone the image-builder repository
4864
$ git clone https://github.com/kubernetes-sigs/image-builder.git
4965
$ cd image-builder/images/capi
50-
$ PACKER_VAR_FILES=user-variables.json make build-powervs-centos-8
66+
$ ANSIBLE_SSH_ARGS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa" PACKER_VAR_FILES=user-variables.json make build-powervs-centos-8
5167
```

docs/book/src/machine-images/powervs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Power VS Images
1+
# PowerVS Images
22

33

44
| Region | Bucket | Object | Kubernetes Version |
@@ -10,7 +10,7 @@
1010
| us-south | power-oss-bucket | [capibm-powervs-centos-streams8-1-23-5.ova.gz][streams8-1-23-5] | 1.23.5 |
1111
| us-south | power-oss-bucket | [capibm-powervs-centos-streams8-1-22-4.ova.gz][streams8-1-22-4] | 1.22.4 |
1212

13-
Note: These images are built using the [image-builder][image-builder] tool and more information can be found [here](../developer/build-images.md#power-vs)
13+
Note: These images are built using the [image-builder][image-builder] tool and more information can be found [here](../developer/build-images.md#powervs)
1414

1515
[streams8-1-26-2]: https://power-oss-bucket.s3.us-south.cloud-object-storage.appdomain.cloud/capibm-powervs-centos-streams8-1-26-2.ova.gz
1616
[streams8-1-25-6]: https://power-oss-bucket.s3.us-south.cloud-object-storage.appdomain.cloud/capibm-powervs-centos-streams8-1-25-6.ova.gz

docs/book/src/machine-images/vpc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| us-south | power-oss-bucket | [capibm-vpc-ubuntu-2004-kube-v1-25-6.qcow2][kube-1-25-6] | 1.25.6 |
88
| us-south | power-oss-bucket | [capibm-vpc-ubuntu-2004-kube-v1-25-2.qcow2][kube-1-25-2] | 1.25.2 |
99

10-
Note: These images are built using the [image-builder][image-builder] tool and more information can be found [here](../topics/vpc/prerequisites.html#build-workload-cluster-image)
10+
Note: These images are built using the [image-builder][image-builder] tool and more information can be found [here](../developer/build-images.md#vpc)
1111

1212
[kube-1-26-2]: https://power-oss-bucket.s3.us-south.cloud-object-storage.appdomain.cloud/capibm-vpc-ubuntu-2004-kube-v1-26-2.qcow2
1313
[kube-1-25-6]: https://power-oss-bucket.s3.us-south.cloud-object-storage.appdomain.cloud/capibm-vpc-ubuntu-2004-kube-v1-25-6.qcow2

docs/book/src/topics/vpc/prerequisites.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111

1212
### Build workload cluster image:
1313

14-
1. Build a qcow2 image suitable for use as a Kubernetes cluster machine as detailed in the image builder [book](https://image-builder.sigs.k8s.io/capi/providers/raw.html).
14+
1. Build a qcow2 image suitable for use as a Kubernetes cluster machine as detailed in the image builder [book](https://image-builder.sigs.k8s.io/capi/providers/ibmcloud.html#capibm---vpc).
1515

1616
**Note:** Rename the output image to add the `.qcow2` extension. This is required by the next step.
1717

18+
For more information about the images can be found at [machine-images](../../machine-images/vpc.md) section
19+
1820
2. Upload the VPC Gen2 custom image to IBM Cloud following [this section](uploading-an-image.md) or the detailed explainations in the VPC [documentation](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images).

docs/book/src/topics/vpc/uploading-an-image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Uploading an image to the IBM Cloud
22

33
Build the Ubuntu image as described in the previous [VPC section](prerequisites.md).
4-
Make sure to build the qcow2 version by following the instructions for [raw image build](https://image-builder.sigs.k8s.io/capi/providers/raw.html).
4+
Make sure to build the qcow2 version by following the instructions for [ibmcloud vpc image build](https://image-builder.sigs.k8s.io/capi/providers/ibmcloud.html#capibm---vpc).
55

66
Since the IBM Cloud does not support dots before the qcow2 extension, rename the file as follows:
77
```console

0 commit comments

Comments
 (0)