Skip to content

Commit

Permalink
doc: update doc to add ibmcloud specific properties
Browse files Browse the repository at this point in the history
Add more details to document to run e2e test on ibmcloud

Fixes: #1646

Signed-off-by: Yuan Yuan Wang <wyuany@cn.ibm.com>
  • Loading branch information
wyuany committed Dec 31, 2023
1 parent 4ac087d commit 79fc285
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
15 changes: 12 additions & 3 deletions ibmcloud/IMPORT_PODVM_TO_VPC.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,31 @@ To simpify this process a script has been created to aid this. `ibmcloud/image/i

- jq `apt install jq`
- ibmcloud `curl -fsSL https://clis.cloud.ibm.com/install/linux | sh` (https://cloud.ibm.com/docs/cli?topic=cli-getting-started)
- docker/podman `apt install docker.io`
- docker/podman `apt install docker.io`
It's failed to install `docker` on Ubuntu20.04 with above single command. `docker` can be installed with `snap` as below.
```
sudo snap install docker
sudo systemctl start snap.docker.dockerd
sudo systemctl enable snap.docker.dockerd
```

### Cloud-Object-Storage

To create the VPC image you need to first import the file to ibmcloud COS. The script will do this step but a bucket must already be available.

You may follow the [offical documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage) to create a bucket, a free tier is sufficient.
You may follow the [offical documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage) to create a bucket, a free tier is sufficient. Bucket region can be different from the VPC region.

## Running
```
Usage: ./import.sh <docker-image/qcow2-file> <vpc-region> [--bucket <name> --region <cos-region> --instance <cos-instance> --endpoint <cos-endpoint> --api <cloud-endpoint> --os <operating-system>]
```

### Arguments

The first two arguments are positional:

1. The name of the container image to extract the qcow2 file, or the file itself
1. The VPC region to create the image in (the process can be repeated for multiple regions)
1. The VPC region to create the image in (the process can be repeated for multiple regions)

The later options:

Expand Down
29 changes: 29 additions & 0 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,32 @@ TEST_PROVISION=no \
TEST_INSTALL_CAA=no \
TEST_PROVISION_FILE="${PWD}/skip-provisioning.properties" \
```
## IBM Cloud
Take region `jp-tok` for example.
```
cd ../.. # go to project root
cat <<EOF> skip-provisioning.properties
REGION="jp-tok"
ZONE="jp-tok-1"
VPC_ID="<vpc-of-worker>"
VPC_SUBNET_ID="<subnet-of-worker>"
VPC_SECURITY_GROUP_ID="<security-group-of-vpc>"
RESOURCE_GROUP_ID="<resource-group-id>"
IBMCLOUD_PROVIDER="ibmcloud"
APIKEY="<your-ibmcloud-apikey>"
IAM_SERVICE_URL="https://iam.cloud.ibm.com/identity/token"
VPC_SERVICE_URL="https://jp-tok.iaas.cloud.ibm.com/v1"
IKS_SERVICE_URL="https://containers.cloud.ibm.com/global"
PODVM_IMAGE_ID="<podvm-image-uploaded-previously>"
INSTANCE_PROFILE_NAME="bz2-2x8"
PODVM_IMAGE_ARCH="s390x"
IMAGE_PULL_API_KEY="<can-be-same-as-apikey>"
CAA_IMAGE_TAG="4ac087db10409a04e6d46d20ad08c39ad25b0778"
EOF
```
- For `INSTANCE_PROFILE_NAME`, if it's not secure execution, the value is started with "bz". If it's secure execution, the value is started with 'bz2e'. More values can be found through ibmcloud command `ibmcloud is instance-profiles`.
- For `PODVM_IMAGE_ID`, the vpc image id uploaded to ibmcloud.
- For `CAA_IMAGE_TAG`, the commit id of project. The commit id can be found here: https://github.com/confidential-containers/cloud-api-adaptor/commits/main/

0 comments on commit 79fc285

Please sign in to comment.