Skip to content

Commit

Permalink
local build tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Da Li Liu committed Mar 28, 2024
1 parent 11fa90b commit 0a7d58b
Show file tree
Hide file tree
Showing 56 changed files with 75 additions and 75 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/caa_build_and_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
description: 'Image registry (e.g. "quay.io/confidential-containers") where the built image will be pushed to'
default: 'quay.io/liudalibj'
description: 'Image registry (e.g. "quay.io/liudalibj") where the built image will be pushed to'
required: false
type: string
dev_arches:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/caa_build_and_push_per_arch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
description: 'Image registry (e.g. "quay.io/confidential-containers") where the built image will be pushed to'
default: 'quay.io/liudalibj'
description: 'Image registry (e.g. "quay.io/liudalibj") where the built image will be pushed to'
required: false
type: string
dev_tags:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/csi_wrapper_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
default: 'quay.io/liudalibj'
description: 'Image registry (e.g. "ghcr.io/confidential-containers") where the built image will be pushed to'
required: false
type: string
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-e2e-tests-ibmcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
;;
esac
podvm_image_tar_name="podvm-generic-ubuntu-${arch_string}-${caa_commit_id}.tar"
podvm_docker_name="quay.io/confidential-containers/podvm-generic-ubuntu-${arch_string}:${caa_commit_id}"
podvm_docker_name="quay.io/liudalibj/podvm-generic-ubuntu-${arch_string}:${caa_commit_id}"
manifest_url="https://quay.io/v2/confidential-containers/podvm-generic-ubuntu-${arch_string}/manifests/${caa_commit_id}"
curl -I --silent "${manifest_url}" > header.txt
if grep -q "HTTP/2 200" "header.txt"; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/peerpod-ctrl_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
default: 'quay.io/liudalibj'
description: 'Image registry (e.g. "ghcr.io/confidential-containers") where the built image will be pushed to'
required: false
type: string
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/peerpodconfig-ctrl_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
default: 'quay.io/liudalibj'
description: 'Image registry (e.g. "ghcr.io/confidential-containers") where the built image will be pushed to'
required: false
type: string
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/podvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
default: 'quay.io/liudalibj'
required: false
type: string
image_tag:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/podvm_binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
default: 'quay.io/liudalibj'
required: false
type: string
image_tag:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/podvm_builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
default: 'quay.io/liudalibj'
required: false
type: string
image_tag:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
uses: docker/build-push-action@v3
with:
tags: |
quay.io/confidential-containers/test-images:${{env.DOCKER_TAG}}
quay.io/liudalibj/test-images:${{env.DOCKER_TAG}}
push: true
context: src/cloud-api-adaptor/
platforms: linux/s390x,linux/amd64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/webhook_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_call:
inputs:
registry:
default: 'quay.io/confidential-containers'
default: 'quay.io/liudalibj'
description: 'Image registry (e.g. "ghcr.io/confidential-containers") where the built image will be pushed to'
required: false
type: string
Expand Down
10 changes: 5 additions & 5 deletions docs/Release-Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Please ensure podvm image build don't break:
- or use the GHA [Publish pod VM Images](https://github.com/confidential-containers/cloud-api-adaptor/blob/main/.github/workflows/podvm_publish.yaml)

These updates should be done in a PR that is merged triggering the [project images publish workflow](../.github/workflows/publish_images_on_push.yaml) to create a new container image in
[`quay.io/confidential-containers/cloud-api-adaptor`](https://quay.io/repository/confidential-containers/cloud-api-adaptor?tab=tags) to use in testing.
[`quay.io/liudalibj/cloud-api-adaptor`](https://quay.io/repository/confidential-containers/cloud-api-adaptor?tab=tags) to use in testing.

#### Tags and update go submodules

Expand Down Expand Up @@ -130,13 +130,13 @@ sed -i 's#\(github.com/confidential-containers/operator/config/release\)#\1?ref=
sed -i 's#\(github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods\)#\1?ref=v0.8.0#' Makefile
```

Once this has been completed and merged in we should pin the cloud-api-adaptor image used on the deployment files. You should use the commit SHA-1 of the last built `quay.io/confidentil-containers/cloud-api-image` image to update the overlays kustomization files. For example, suppose the release image is `quay.io/confidential-containers/cloud-api-adaptor:6d7d2a3fe8243809b3c3a710792c8498292e2fc3`:
Once this has been completed and merged in we should pin the cloud-api-adaptor image used on the deployment files. You should use the commit SHA-1 of the last built `quay.io/confidentil-containers/cloud-api-image` image to update the overlays kustomization files. For example, suppose the release image is `quay.io/liudalibj/cloud-api-adaptor:6d7d2a3fe8243809b3c3a710792c8498292e2fc3`:
```
cd install/overlays/
for p in aws azure ibmcloud ibmcloud-powervs vsphere; do cd aws; kustomize edit set image cloud-api-adaptor=quay.io/confidential-containers/cloud-api-adaptor:6d7d2a3fe8243809b3c3a710792c8498292e2fc3; cd -; done
for p in aws azure ibmcloud ibmcloud-powervs vsphere; do cd aws; kustomize edit set image cloud-api-adaptor=quay.io/liudalibj/cloud-api-adaptor:6d7d2a3fe8243809b3c3a710792c8498292e2fc3; cd -; done
# Note that the libvirt use the tag with prefix 'dev-'
cd libvirt; kustomize edit set image cloud-api-adaptor=quay.io/confidential-containers/cloud-api-adaptor:dev-6d7d2a3fe8243809b3c3a710792c8498292e2fc3; cd -
cd libvirt; kustomize edit set image cloud-api-adaptor=quay.io/liudalibj/cloud-api-adaptor:dev-6d7d2a3fe8243809b3c3a710792c8498292e2fc3; cd -
```
After these version updates have been merged via new PR.
We then can repeat the steps done during the release candidate phase, but this time use the
Expand Down Expand Up @@ -204,7 +204,7 @@ The CoCo operator URLs on the [Makefile](../src/cloud-api-adaptor/Makefile) shou
The changes on the overlay kustomization files should be reverted to start using the latest cloud-api-adaptor images again:
```
cd install/overlays/
for p in aws azure ibmcloud ibmcloud-powervs libvirt vsphere; do cd aws; kustomize edit set image cloud-api-adaptor=quay.io/confidential-containers/cloud-api-adaptor:latest; cd -; done
for p in aws azure ibmcloud ibmcloud-powervs libvirt vsphere; do cd aws; kustomize edit set image cloud-api-adaptor=quay.io/liudalibj/cloud-api-adaptor:latest; cd -; done
```

References to Kata Containers should be reverted to the CCv0 branch in:
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BUILD_TYPE=dev
ARG BUILDER_BASE=quay.io/confidential-containers/golang-fedora:1.21.8-38
ARG BUILDER_BASE=quay.io/liudalibj/golang-fedora:1.21.8-38
ARG BASE=registry.fedoraproject.org/fedora:38

# This dockerfile uses Go cross-compilation to build the binary,
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ endif

### PODVM IMAGE BUILDING ###

REGISTRY ?= quay.io/confidential-containers
REGISTRY ?= quay.io/liudalibj

PODVM_DISTRO ?= ubuntu
PODVM_TAG ?= $(VERSIONS_HASH)
Expand Down
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ echo ${PODVM_AMI_ID}
If you would like to deploy the latest code from the default branch (`main`) of this repository then expose the following environment variable:

```bash
export registry="quay.io/confidential-containers"
export registry="quay.io/liudalibj"
```

## Deploy Kubernetes using EKS
Expand Down Expand Up @@ -149,7 +149,7 @@ bases:
images:
- name: cloud-api-adaptor
newName: quay.io/confidential-containers/cloud-api-adaptor # change image if needed
newName: quay.io/liudalibj/cloud-api-adaptor # change image if needed
newTag: d4496d008b65c979a4d24767979a77ed1ba21e76
generatorOptions:
Expand Down
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/aws/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# Builds pod vm image inside container
#
# syntax=docker/dockerfile:1.3
ARG BUILDER_IMG="quay.io/confidential-containers/podvm-builder-ubuntu"
ARG BINARIES_IMG="quay.io/confidential-containers/podvm-binaries-ubuntu-amd64"
ARG BUILDER_IMG="quay.io/liudalibj/podvm-builder-ubuntu"
ARG BINARIES_IMG="quay.io/liudalibj/podvm-binaries-ubuntu-amd64"

FROM ${BINARIES_IMG} AS podvm_binaries
FROM ${BUILDER_IMG} AS podvm_builder
Expand Down
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/azure/build-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ docker run --rm \

### Option 3: Using a pre-created QCOW2 image

`quay.io/confidential-containers` hosts pre-created pod-vm images as container images.
`quay.io/liudalibj` hosts pre-created pod-vm images as container images.

- Download QCOW2 image

```bash
mkdir -p qcow2-img && cd qcow2-img

export QCOW2_IMAGE="quay.io/confidential-containers/podvm-generic-ubuntu-amd64:latest"
export QCOW2_IMAGE="quay.io/liudalibj/podvm-generic-ubuntu-amd64:latest"
curl -LO https://raw.githubusercontent.com/confidential-containers/cloud-api-adaptor/staging/podvm/hack/download-image.sh

bash download-image.sh $QCOW2_IMAGE . -o podvm.qcow2
Expand Down
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/azure/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# Builds pod vm image inside container
#
# syntax=docker/dockerfile:1.3
ARG BUILDER_IMG="quay.io/confidential-containers/podvm-builder-ubuntu"
ARG BINARIES_IMG="quay.io/confidential-containers/podvm-binaries-ubuntu-amd64"
ARG BUILDER_IMG="quay.io/liudalibj/podvm-builder-ubuntu"
ARG BINARIES_IMG="quay.io/liudalibj/podvm-binaries-ubuntu-amd64"

FROM ${BINARIES_IMG} AS podvm_binaries
FROM ${BUILDER_IMG} AS podvm_builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The easiest way to extract the qcow2 file from the podvm container image is usin

```
$ cd podvm
$ ./hack/download-image.sh quay.io/confidential-containers/podvm-generic-ubuntu-amd64 . -o podvm.qcow2
$ ./hack/download-image.sh quay.io/liudalibj/podvm-generic-ubuntu-amd64 . -o podvm.qcow2
```

In case your workload images are pulled from a private registry then you need to provide the authentication file by either [installing along with the cloud-api-adaptor deployment](registries-authentication.md#deploy-authentication-file-along-with-cloud-api-adaptor-deployment) or [statically embedding in the podvm image](registries-authentication.md#statically-embed-authentication-file-in-podvm-image). With the later you will need to build the image from sources, so find detailed instructions in [podvm/README.md](../podvm/README.md).
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o nounset

script_dir=$(dirname "$(readlink -f "$0")")

registry="${registry:-quay.io/confidential-containers}"
registry="${registry:-quay.io/liudalibj}"
name="cloud-api-adaptor"
release_build=${RELEASE_BUILD:-false}
version=${VERSION:-unknown}
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/hack/image-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -o nounset
script_dir=$(dirname "$(readlink -f "$0")")

tags_file="${script_dir}/../tags.txt"
registry="${registry:-quay.io/confidential-containers}"
registry="${registry:-quay.io/liudalibj}"
name="cloud-api-adaptor"
arch_file_prefix="tags-architectures-"
all_arches_array=()
Expand Down
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/ibmcloud/IMPORT_PODVM_TO_VPC.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Importing Public PODVM images into IBM Cloud VPC

As part of the release process pre-built images are published as container images to the confidential-containers quay repository. e.g. `quay.io/confidential-containers/podvm-ibmcloud-ubuntu-s390x` that contain a single qcow2 file that can be extracted. Alternatively images can be built and distributed directly as qcow2 files. These qcow2 that needs to be uploaded to ibmcloud to use as a vpc image.
As part of the release process pre-built images are published as container images to the confidential-containers quay repository. e.g. `quay.io/liudalibj/podvm-ibmcloud-ubuntu-s390x` that contain a single qcow2 file that can be extracted. Alternatively images can be built and distributed directly as qcow2 files. These qcow2 that needs to be uploaded to ibmcloud to use as a vpc image.

To simpify this process a script has been created to aid this. `ibmcloud/image/import.sh`.

Expand Down Expand Up @@ -52,7 +52,7 @@ The script will sanitise `.` and `_` into `-` and lowercase the image name. Only

- Extracting and uploading a qcow2 image from a container image:

`./import.sh quay.io/confidential-containers/podvm-ibmcloud-ubuntu-s390x ca-tor --instance jt-cos-instance --bucket podvm-image-cos-bucket-jt --region jp-tok`
`./import.sh quay.io/liudalibj/podvm-ibmcloud-ubuntu-s390x ca-tor --instance jt-cos-instance --bucket podvm-image-cos-bucket-jt --region jp-tok`

- Uploading a qcow2 file directly:

Expand Down
8 changes: 4 additions & 4 deletions src/cloud-api-adaptor/ibmcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ seen is similar to:
You can follow the process [documented](./IMPORT_PODVM_TO_VPC.md) from the `cloud-api-adaptor/ibmcloud/image` to extract and upload
the peer pod image you've just built to IBM Cloud as a custom image, noting to replace the
`quay.io/confidential-containers/podvm-ibmcloud-ubuntu-s390x` reference with the local container image that you built
`quay.io/liudalibj/podvm-ibmcloud-ubuntu-s390x` reference with the local container image that you built
above e.g. `localhost/podvm_ibmcloud_s390x:latest`.
This script will end with the line: `Image <image-name> with id <image-id> is available`. The `image-id` field will be
needed in the kustomize step later.
## Import Release VM Image
Alternatively to use a pre-built peer pod VM image you can follow the process [documented](./IMPORT_PODVM_TO_VPC.md) with the release images found at `quay.io/confidential-containers/podvm-generic-ubuntu-<ARCH>`. Running this command will require docker or podman, as per [tools](./IMPORT_PODVM_TO_VPC.md#tools)
Alternatively to use a pre-built peer pod VM image you can follow the process [documented](./IMPORT_PODVM_TO_VPC.md) with the release images found at `quay.io/liudalibj/podvm-generic-ubuntu-<ARCH>`. Running this command will require docker or podman, as per [tools](./IMPORT_PODVM_TO_VPC.md#tools)
```bash
./import.sh quay.io/confidential-containers/podvm-generic-ubuntu-s390x eu-gb --bucket example-bucket --instance example-cos-instance
./import.sh quay.io/liudalibj/podvm-generic-ubuntu-s390x eu-gb --bucket example-bucket --instance example-cos-instance
```
This script will end with the line: `Image <image-name> with id <image-id> is available`. The `image-id` field will be
Expand Down Expand Up @@ -124,7 +124,7 @@ This will create `caa-provisioner-cli` in the `test/tools` directory. To use the
export IBMCLOUD_API_KEY= # your ibmcloud apikey
export PODVM_IMAGE_ID= # the image id of the peerpod vm uploaded in the previous step
export PODVM_INSTANCE_PROFILE= # instance profile name that runs the peerpod (bx2-2x8 or bz2-2x8 for example)
export CAA_IMAGE_TAG= # cloud-api-adaptor image tag that supports this arch, see quay.io/confidential-containers/cloud-api-adaptor
export CAA_IMAGE_TAG= # cloud-api-adaptor image tag that supports this arch, see quay.io/liudalibj/cloud-api-adaptor
pushd ibmcloud/cluster
cat <<EOF > ../../selfmanaged_cluster.properties
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/ibmcloud/SECURE_EXECUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $ docker build -t se_podvm_s390x \
#### Upload the Secure Execution enabled peer pod VM image to IBM Cloud
You can follow the process [documented](./IMPORT_PODVM_TO_VPC.md) to extract and upload
the Secure Execution enabled peer pod image you've just built to IBM Cloud as a custom image, noting to replace the
`quay.io/confidential-containers/podvm-ibmcloud-ubuntu-s390x` reference with the local container image that you built
`quay.io/liudalibj/podvm-ibmcloud-ubuntu-s390x` reference with the local container image that you built
above e.g. `se_podvm_s390x:latest`, and run the script with `--os hyper-protect-1-0-s390x`.
The sample command, assume your working dir is `cloud-api-adaptor/ibmcloud/image`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bases:

images:
- name: cloud-api-adaptor
newName: quay.io/confidential-containers/cloud-api-adaptor # change image if needed
newName: quay.io/liudalibj/cloud-api-adaptor # change image if needed
newTag: d4496d008b65c979a4d24767979a77ed1ba21e76

generatorOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bases:

images:
- name: cloud-api-adaptor
newName: quay.io/confidential-containers/cloud-api-adaptor # change image if needed
newName: quay.io/liudalibj/cloud-api-adaptor # change image if needed
newTag: d4496d008b65c979a4d24767979a77ed1ba21e76

generatorOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bases:

images:
- name: cloud-api-adaptor
newName: quay.io/confidential-containers/cloud-api-adaptor # change image if needed
newName: quay.io/liudalibj/cloud-api-adaptor # change image if needed
newTag: d4496d008b65c979a4d24767979a77ed1ba21e76

generatorOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bases:

images:
- name: cloud-api-adaptor
newName: quay.io/confidential-containers/cloud-api-adaptor # change image if needed
newName: quay.io/liudalibj/cloud-api-adaptor # change image if needed
newTag: d4496d008b65c979a4d24767979a77ed1ba21e76

generatorOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bases:

images:
- name: cloud-api-adaptor
newName: quay.io/confidential-containers/cloud-api-adaptor # change image if needed
newName: quay.io/liudalibj/cloud-api-adaptor # change image if needed
newTag: dev-d4496d008b65c979a4d24767979a77ed1ba21e76

generatorOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bases:

images:
- name: cloud-api-adaptor
newName: quay.io/confidential-containers/cloud-api-adaptor # change image if needed
newName: quay.io/liudalibj/cloud-api-adaptor # change image if needed
newTag: d4496d008b65c979a4d24767979a77ed1ba21e76

generatorOptions:
Expand Down
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#
# Builds pod vm image inside container
#
ARG BUILDER_IMG="quay.io/confidential-containers/podvm-builder-ubuntu"
ARG BUILDER_IMG="quay.io/liudalibj/podvm-builder-ubuntu"

# Override it via build-args for different platforms
ARG BINARIES_IMG="quay.io/confidential-containers/podvm-binaries-ubuntu-amd64"
ARG BINARIES_IMG="quay.io/liudalibj/podvm-binaries-ubuntu-amd64"

FROM ${BINARIES_IMG} AS podvm_binaries
FROM ${BUILDER_IMG} AS podvm_builder
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/podvm/Dockerfile.podvm_binaries
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Builds pod vm image inside container
#
ARG BUILDER_IMG="quay.io/confidential-containers/podvm-builder-ubuntu"
ARG BUILDER_IMG="quay.io/liudalibj/podvm-builder-ubuntu"

FROM ${BUILDER_IMG} AS podvm_builder

Expand Down
Loading

0 comments on commit 0a7d58b

Please sign in to comment.