Configuring your local environment
The subsequent commands in this guide use environment variables for configuring the
various parameters of the GCP project and OpenShift or OKD cluster.
For this purpose,
a vars.sh
file can be created with the following contents,
replacing the values in angle brackets <>
with the relevant values for your GCP project and cluster:
$ cat << EOF > vars.sh
export ANJ_PROJ=<ProjectName>
export ANJ_SACCT=<ServiceAccountName>
export ANJ_VPC=<NetworkName>
export ANJ_INSTANCE=<InstanceName>
export ANJ_REGION=<Region>
export ANJ_ZONE=<Zone>
export ANJ_IMAGE_REGISTRY=<ImageRegistry>
export ANJ_IMAGE_PATH=<ImagePath>
export ANJ_IMAGE_TAG=latest
export ANJ_NODE_LABEL_KEY="node-role.kubernetes.io/worker"
export ANJ_NODE_LABEL_VALUE=""
export ANJ_SACCT_IMAGE_PULLER="anjimagepuller"
export ANJ_BUCKET_NAME=<BucketName>
export ANJ_CLUSTER_REPLICAS=3
export ANJ_K8S_TOOLSET_DIR=<Directory where to find the {TOOLSET_NAME} files>
EOF
Description of configuration values
Environment variable | Usage |
---|---|
|
The GCP project name where your cluster has been set up. |
|
The GCP VPC network name where your cluster is running. |
|
The name of the VM instance used as the publicly available "bastion" gateway to the cluster. |
|
The GCP region, such as |
|
The GCP zone, such as |
|
The artifact registry used for storing the example Anjuna Confidential Pod container images.
For example: |
|
The path in the container image registry to store the images.
For example: |
|
The Node selector label key to help determine which Nodes of your cluster will
have the Anjuna Kubernetes Toolset installed.
E.g., |
|
The Node selector label value. Empty is allowed. |
|
The name of the service account that will be created to enable access to the artifact registry for the Anjuna Kubernetes Toolset images. |
|
The name of a GCP bucket for storing the Confidential Container disk images you will build. |
|
The directory where the Anjuna Kubernetes Toolset files are located. |
The Anjuna Kubernetes Toolset uses Node labels to know on which Nodes
of your cluster it should be installed.
To query the existing Node labels of your cluster,
run Usually, the Anjuna Kubernetes Toolset is installed on all worker Nodes.
In OpenShift,
all worker Nodes are labeled with key If you want to install the Anjuna Kubernetes Toolset to specific Nodes,
label the Nodes with |
Load the configuration
For each terminal session,
the configuration should be loaded in order for the values to be used in the commands in this guide.
To do so,
run the following command from within the directory where the vars.sh
file is stored:
$ source vars.sh
Download and extract the Toolset archive
Download the Anjuna Kubernetes Toolset archive
from the Anjuna Resource Center,
and extract it to the directory defined by the ANJ_K8S_TOOLSET_DIR
environment variable.
To do so, run the following commands in the directory with the archive:
$ mkdir -p ${ANJ_K8S_TOOLSET_DIR}
$ tar -C ${ANJ_K8S_TOOLSET_DIR} -xf anjuna-k8s-sev*.tar.gz