CPS Quickstart Prerequisites


  1. A storage bucket in GCP and credentials to access it
  2. A Configmap and Secret on your OpenShift cluster for the bucket configuration and credentials
  3. Creating the Configmap and Secret in OpenShift

Step 1: Creating a storage bucket

Note: Only Google Storage bucket is supported currently, support for AWS S3 Bucket will be available in a future release.

You can create a bucket through the GCP console or by running the following command in Google Cloud Shell.

    $ AX_APS_BUCKET_NAME=<bucket_name>
    $ gsutil mb -b on gs://$AX_APS_BUCKET_NAME/
    $ gcloud iam service-accounts create appranix --display-name "Appranix service account"
    $ AX_SERVICE_ACCOUNT_EMAIL=$(gcloud iam service-accounts list --filter="displayName:Appranix service account" --format 'value(email)')
    $ gsutil iam ch serviceAccount:$AX_SERVICE_ACCOUNT_EMAIL:objectAdmin gs://${AX_APS_BUCKET_NAME}
    $ gcloud iam service-accounts keys create ax_service_account.json --iam-account $AX_SERVICE_ACCOUNT_EMAIL

Note: You will require the ax_service_account.json created here in Step 3.

Step 2: Obtaining the Appranix token for the cluster

Login into your Appranix console and create a cluster connection. Once created, copy the token generated for that cluster.

The token string is the content after –token=


Note: You can sign-up for Appranix here.

Step 3: Creating the Configmap and Secret in the cluster

A Configmap and Secret which contains the credentials and bucket configuration must be created before installing the operator.

It can be done by running the following script against your cluster.

Note: Replace the "token" and "bucketname" with the correct values before running the script.

  $ AX_TOKEN=<token>
  $ AX_CPS_BUCKET_NAME=<bucket_name>
  $ AX_SERVICE_ACCOUNT=$(cat ax_service_account.json | base64 -w 0)
  $ oc new-project appranix     # For OpenShift cluster
  $ kubectl create namespace appranix     # For k8s cluster
  $ curl -Ls -H "Content-Type: application/json" https://us-central1-appranix-dev-07.cloudfunctions.net/gen-setup  -d '{"token": "'$AX_TOKEN'", "bucket": "'$AX_CPS_BUCKET_NAME'", "cloud": "'$AX_CPS_BUCKET_PROVIDER'", "secret": "'$AX_SERVICE_ACCOUNT'"}' | oc apply -f -