Skip to content

Commit 3fdb551

Browse files
authored
Add Vpc image docs (#613)
* Writing howto build and upload VPC images * Fixing links * Moved image docs into uploading-an-image.md, put references in index.md and prerequisites.md * Adding link into summary.md
1 parent 6c33092 commit 3fdb551

File tree

4 files changed

+67
-4
lines changed

4 files changed

+67
-4
lines changed

docs/book/src/SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [Topics](./topics/index.md)
99
- [VPC Cluster](./topics/vpc/index.md)
1010
- [Prerequisites](./topics/vpc/prerequisites.md)
11+
- [Uploading an image](topics/vpc/uploading-an-image.md)
1112
- [Creating a cluster](./topics/vpc/creating-a-cluster.md)
1213
- [Power VS Cluster](./topics/powervs/index.md)
1314
- [Prerequisites](./topics/powervs/prerequisites.md)
@@ -19,4 +20,4 @@
1920
- [Release Process](./developer/release.md)
2021
- [Troubleshooting](./user/troubleshooting.md)
2122
- [Reference](./reference/reference.md)
22-
- [Regions-Zones Mapping](./reference/regions-zones-mapping.md)
23+
- [Regions-Zones Mapping](./reference/regions-zones-mapping.md)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
## Contents
44
- [Prerequisites](/topics/vpc/prerequisites.html)
5-
- [Creating a cluster](/topics/vpc/creating-a-cluster.html)
5+
- [Uploading an image](/topics/vpc/uploading-an-image.html)
6+
- [Creating a cluster](/topics/vpc/creating-a-cluster.html)

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@
1515

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

18-
19-
2. Create a VPC Gen2 custom image based on the qcow2 image built in the previous step as detailed in the VPC [documentation](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images).
18+
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).
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Uploading an image to the IBM Cloud
2+
3+
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).
5+
6+
Since the IBM Cloud does not support dots before the qcow2 extension, rename the file as follows:
7+
```console
8+
ubuntu-2004-ibmcloud-kube-v1-23-4.qcow2
9+
```
10+
11+
## Upload VM image:
12+
13+
1) Create an IBM COS instance
14+
2) Create a bucket in the COS instance.
15+
3) Upload the image
16+
1) Upload via aspera
17+
* Install the browser extension for Aspera
18+
* Downloading the Aspera tool
19+
* Selecting the image via Aspera dialog
20+
* Upload the image via aspera
21+
2) Using minio cli
22+
* Install minio cli
23+
* Creating a service credential with hmac=true for the bucket
24+
* Example upload for eu-de:
25+
```sh
26+
mc alias set uploadcos https://s3.eu-de.cloud-object-storage.appdomain.cloud <hmac access id> <hmac secret key>
27+
```
28+
```sh
29+
mc cp <image-name>.qcow2 uploadcos/<my-bucket-name>
30+
```
31+
32+
## Add VM image to VPC
33+
34+
1) Make sure you have editor rights for all/most VPC services
35+
2) Add additional read rights for:
36+
```console
37+
src: service VPC Infrastructure Services resourceType equals image
38+
target: serviceInstance string equals <your-Cloud-Object Storage-VM-plain-name>
39+
```
40+
41+
Add write rights for:
42+
```console
43+
Service VPC Infrastructure Services in Resource_group <your_resource_group_or_account> resourceType equals image
44+
target: service Cloud object storage in resource_group <your_resource_group_or_account>
45+
```
46+
47+
3) Go to https://cloud.ibm.com/vpc-ext/provision/customImage
48+
* Fill in imagename, resource group or account
49+
* Choice box: Cloud Object Storage
50+
* Set Filter: <your_cos_plain_name> <eu-de_or_other> <your_vm_bucket>
51+
* Choice box: Select your image
52+
* Select base os (ubuntu-20-04-amd64 for example)
53+
* Click Create Image
54+
55+
Now you can provision a VM with your own VM image.
56+
Then please continue with
57+
[creating a cluster](creating-a-cluster.md).
58+
59+
Make sure you take the ImageID from your VM image. The ImageID can be determined using ibmcloud cli. In addition, the Kubernetes version must be set to match the image. In this example:
60+
```console
61+
v1.23.4
62+
```

0 commit comments

Comments
 (0)