11---
22title : AWS
3- description : Cloud API Adaptor (CAA) on AWS
3+ description : Peer Pods Helm Chart using Cloud API Adaptor (CAA) on AWS
44categories :
55- examples
66tags :
7+ - helm
78- caa
89- aws
910- eks
@@ -17,9 +18,12 @@ This documentation will walk you through setting up CAA (a.k.a. Peer Pods) on AW
1718
1819## Pre-requisites
1920
20- - Install ` aws ` CLI [ tool] ( https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html )
21- - Install ` eksctl ` CLI [ tool] ( https://eksctl.io/installation/ )
22- - Install kubectl by following the instructions [ here] ( https://kubernetes.io/docs/tasks/tools/#kubectl ) .
21+ Install Required Tools:
22+
23+ - Install [ kubectl] ( https://kubernetes.io/docs/tasks/tools/#kubectl ) ,
24+ - Install [ Helm] ( https://helm.sh/docs/intro/install ) ,
25+ - Install ` aws ` CLI [ tool] ( https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html ) ,
26+ - Install ` eksctl ` CLI [ tool] ( https://eksctl.io/installation/ ) ,
2327- Ensure that the tools ` curl ` , ` git ` and ` jq ` are installed.
2428
2529## AWS Preparation
@@ -77,6 +81,14 @@ eksctl create cluster --name "$CLUSTER_NAME" \
7781
7882Wait for the cluster to be created.
7983
84+ Label the cluster nodes with ` node.kubernetes.io/worker= `
85+
86+ ``` bash
87+ for NODE_NAME in $( kubectl get nodes -o jsonpath=' {.items[*].metadata.name}' ) ; do
88+ kubectl label node $NODE_NAME node.kubernetes.io/worker=
89+ done
90+ ```
91+
8092### Allow required network ports
8193
8294``` bash
@@ -109,20 +121,20 @@ aws ec2 authorize-security-group-ingress --group-id "$EKS_CLUSTER_SG" --protocol
109121> - Port ` 9000 ` is the VXLAN port used by CAA. Ensure it doesn't conflict with the VXLAN port
110122> used by the Kubernetes CNI.
111123
112- ## Deploy CAA
124+ ## Deploy the CAA Helm chart
113125
114- ### Download the CAA deployment artifacts
126+ ### Download the CAA Helm deployment artifacts
115127
116128{{< tabpane text=true right=true persist=header >}}
117129{{% tab header="** Versions** :" disabled=true /%}}
118130
119131{{% tab header="Last Release" %}}
120132
121133``` bash
122- export CAA_VERSION=" 0.16 .0"
134+ export CAA_VERSION=" 0.17 .0"
123135curl -LO " https://github.com/confidential-containers/cloud-api-adaptor/archive/refs/tags/v${CAA_VERSION} .tar.gz"
124136tar -xvzf " v${CAA_VERSION} .tar.gz"
125- cd " cloud-api-adaptor-${CAA_VERSION} /src/cloud-api-adaptor"
137+ cd " cloud-api-adaptor-${CAA_VERSION} /src/cloud-api-adaptor/install/charts/peerpods "
126138```
127139
128140{{% /tab %}}
@@ -133,18 +145,24 @@ cd "cloud-api-adaptor-${CAA_VERSION}/src/cloud-api-adaptor"
133145export CAA_BRANCH=" main"
134146curl -LO " https://github.com/confidential-containers/cloud-api-adaptor/archive/refs/heads/${CAA_BRANCH} .tar.gz"
135147tar -xvzf " ${CAA_BRANCH} .tar.gz"
136- cd " cloud-api-adaptor-${CAA_BRANCH} /src/cloud-api-adaptor"
148+ cd " cloud-api-adaptor-${CAA_BRANCH} /src/cloud-api-adaptor/install/charts/peerpods "
137149```
138150
139151{{% /tab %}}
140152
141153{{% tab header="DIY" %}}
142- This assumes that you already have the code ready to use. On your terminal change directory to the Cloud API Adaptor's code base.
154+ This assumes that you already have the code ready to use.
155+ On your terminal change directory to the Cloud API Adaptor's code base.
143156{{% /tab %}}
144157
145158{{< /tabpane >}}
146159
147- ### CAA pod VM image
160+ ### Export PodVM image version
161+
162+ Exports the PodVM image ID used by peer pods. This variable tells the deployment tooling which PodVM image version
163+ to use when creating peer pod virtual machines in AWS.
164+
165+ The image is pulled from the Coco community gallery (or manually built) and must match the current CAA release version.
148166
149167{{< tabpane text=true right=true persist=header >}}
150168{{% tab header="** Versions** :" disabled=true /%}}
@@ -187,7 +205,11 @@ Once image build is finished, export image id to the environment variable `PODVM
187205
188206{{< /tabpane >}}
189207
190- ### CAA container image
208+ ### Export CAA container image path
209+
210+ Define the Cloud API Adaptor (CAA) container image to deploy.
211+ These variables tell the deployment tooling which CAA image and architecture-specific tag to pull and run.
212+ The tag is derived from the CAA release version to ensure compatibility with the selected PodVM image and configuration.
191213
192214{{< tabpane text=true right=true persist=header >}}
193215{{% tab header="** Versions** :" disabled=true /%}}
@@ -229,17 +251,6 @@ If you have made changes to the CAA code and you want to deploy those changes th
229251
230252{{< /tabpane >}}
231253
232- ### Create the AWS credentials file
233-
234- ``` bash
235- cat << EOF > install/overlays/aws/aws-cred.env
236- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
237- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
238- EOF
239- ```
240-
241- > ** Note** : The values should be without quotes
242-
243254### Select peer-pods machine type
244255
245256{{< tabpane text=true right=true persist=header >}}
@@ -264,75 +275,76 @@ export DISABLECVM="true"
264275{{% /tab %}}
265276{{< /tabpane >}}
266277
267- ### Populate the ` kustomization.yaml ` file
268-
269- Run the following command to update the [ ` kustomization.yaml ` ] ( https://github.com/confidential-containers/cloud-api-adaptor/blob/main/install/overlays/aws/kustomization.yaml ) file:
270-
271- ``` yaml
272- cat <<EOF > install/overlays/aws/kustomization.yaml
273- apiVersion : kustomize.config.k8s.io/v1beta1
274- kind : Kustomization
275- resources :
276- - ../../yamls
277- images :
278- - name : cloud-api-adaptor
279- newName : " ${CAA_IMAGE}"
280- newTag : " ${CAA_TAG}"
281- generatorOptions :
282- disableNameSuffixHash : true
283- configMapGenerator :
284- - name : peer-pods-cm
285- namespace : confidential-containers-system
286- literals :
287- - CLOUD_PROVIDER="aws"
288- - DISABLECVM="${DISABLECVM}"
289- - VXLAN_PORT="9000"
290- - PODVM_AMI_ID="${PODVM_AMI_ID}"
291- - PODVM_INSTANCE_TYPE="${PODVM_INSTANCE_TYPE}"
292- secretGenerator :
293- - name : peer-pods-secret
294- namespace : confidential-containers-system
295- envs :
296- - aws-cred.env
297- EOF
298- ```
299-
300- ### Deploy CAA on the Kubernetes cluster
278+ ### Populate the ` providers/aws.yaml ` file
301279
302- Label the cluster nodes with ` node.kubernetes.io/worker= `
280+ List of all available configuration options can be found in two places:
281+ - [ Main charts values] ( https://github.com/confidential-containers/cloud-api-adaptor/blob/main/src/cloud-api-adaptor/install/charts/peerpods/values.yaml )
282+ - [ AWS specific values] ( https://github.com/confidential-containers/cloud-api-adaptor/blob/main/src/cloud-api-adaptor/install/charts/peerpods/providers/aws.yaml )
303283
304- ``` bash
305- for NODE_NAME in $( kubectl get nodes -o jsonpath=' {.items[*].metadata.name}' ) ; do
306- kubectl label node $NODE_NAME node.kubernetes.io/worker=
307- done
308- ```
309-
310- Deploy the coco operator. Usually it's the same version as CAA, but it can be adjusted.
284+ Run the following command to update the [ ` providers/aws.yaml ` ] ( https://github.com/confidential-containers/cloud-api-adaptor/blob/main/src/cloud-api-adaptor/install/charts/peerpods/providers/aws.yaml ) file:
311285
312286``` bash
313- export COCO_OPERATOR_VERSION=" ${CAA_VERSION} "
314- kubectl apply -k " github.com/confidential-containers/operator/config/release?ref=v${COCO_OPERATOR_VERSION} "
315- kubectl apply -k " github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods?ref=v${COCO_OPERATOR_VERSION} "
316- ```
317-
318- Run the following command to deploy CAA:
319-
320- ``` bash
321- kubectl apply -k " install/overlays/aws"
287+ cat << EOF > providers/aws.yaml
288+ provider: aws
289+ image:
290+ name: "${CAA_IMAGE} "
291+ tag: "${CAA_TAG} "
292+ providerConfigs:
293+ aws:
294+ DISABLECVM: ${DISABLECVM}
295+ PODVM_AMI_ID: "${PODVM_AMI_ID} "
296+ PODVM_INSTANCE_TYPE: "${PODVM_INSTANCE_TYPE} "
297+ VXLAN_PORT: 9000
298+ EOF
322299```
323300
324- Generic CAA deployment instructions are also described [ here] ( https://github.com/confidential-containers/cloud-api-adaptor/blob/main/install/README.md ) .
325-
326- ## Deploy the Peerpod controller for garbage collecting pod VMs
327-
328- Change the working directory from ` cloud-api-adaptor-${CAA_VERSION}/src/cloud-api-adaptor `
329- to ` cloud-api-adaptor-${CAA_VERSION}/src/peerpod-ctrl `
330-
331- Run the following command to deploy the Peerpod CRD
332-
333- ``` bash
334- kubectl apply -k " config/default"
335- ```
301+ ### Deploy helm chart on the Kubernetes cluster
302+
303+ 1 . Create namespace managed by Helm:
304+ ``` bash
305+ kubectl apply -f - << EOF
306+ apiVersion: v1
307+ kind: Namespace
308+ metadata:
309+ name: confidential-containers-system
310+ labels:
311+ app.kubernetes.io/managed-by: Helm
312+ annotations:
313+ meta.helm.sh/release-name: peerpods
314+ meta.helm.sh/release-namespace: confidential-containers-system
315+ EOF
316+ ` ` `
317+
318+ 2. Create the secret using ` kubectl` :
319+
320+ See [providers/aws-secrets.yaml.template](https://github.com/confidential-containers/cloud-api-adaptor/blob/main/src/cloud-api-adaptor/install/charts/peerpods/providers/aws-secrets.yaml.template) for required keys.
321+
322+ ` ` ` bash
323+ kubectl create secret generic my-provider-creds \
324+ -n confidential-containers-system \
325+ --from-literal=AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
326+ --from-literal=AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
327+ --from-file=id_rsa.pub=${SSH_KEY}
328+ ` ` `
329+
330+ > ** Note** : ` --from-file=id_rsa.pub=${SSH_KEY} ` is optional. It allows user to SSH into the pod VMs for troubleshooting purposes.
331+ > This option works only for custom debug enabled pod VM images. The prebuilt pod VM images do not have SSH connection enabled.
332+
333+ 3. Install helm chart:
334+
335+ Below command uses customization options ` -f` and ` --set` which are described [here](../../getting-started/installation/advanced_configuration).
336+
337+ ` ` ` bash
338+ helm install peerpods . \
339+ -f providers/aws.yaml \
340+ --set secrets.mode=reference \
341+ --set secrets.existingSecretName=my-provider-creds \
342+ --dependency-update \
343+ -n confidential-containers-system
344+ ` ` `
345+
346+ Generic Peer pods Helm charts deployment instructions are also described
347+ [here](https://github.com/confidential-containers/cloud-api-adaptor/tree/main/src/cloud-api-adaptor/install/charts/peerpods/README.md).
336348
337349# # Run sample application
338350
0 commit comments