Project: Zenko (Runtime / Cloud Native Storage)
File: Using.md

In the hosts file `/etc/hosts` map the ip of the kube node you are testing with to `zenko.local`. For example, by adding the line: ``` <kubernetes-IP> zenko.local ``` If you are ssh-ed into one of the kube servers or doing a port-forward to a remote kube instance, the `kube-node-ip` value will be `127.0.0.1` Find the Zenko service endpoint for S3 calls to Cloudserver by running: ``` kubectl get services ``` Look for the service named `zenko-cloudserver`, the value under `NAME` should be set as the Zenko endpoint for testing: ``` export CLOUDSERVER_ENDPOINT=http://<zenko-cloudserver-IP> export CLOUDSERVER_HOST=<zenko-cloudserver-IP> ``` Create an account using Orbit. Export the access key and secret key of that account (for example, in `.secrets.env`): ``` export ZENKOACCESSKEY=<zenko-access-key> export ZENKOSECRETKEY=<zenko-secret-key> ``` Install node and npm. Navigate to `Zenko/tests/node_tests/backbeat`. Install node modules: `npm i`. Create a bucket on AWS `<destination-aws-bucket-name>` with versioning enabled. In Orbit, create an AWS storage location `<destination-aws-location-name>` with an AWS bucket `<destination-aws-bucket-name>`. In Orbit, create an AWS location `<source-aws-location-name>`. Create a container on Azure `<destination-azure-container-name>`. In Orbit, create an Azure storage location `<destination-azure-location-name>` with an Azure container `<destination-azure-container-name>`. Create a bucket on GCP `<destination-gcp-bucket-name>`. In Orbit, create a GCP storage location `<destination-gcp-location-name>` with an GCP bucket `<destination-gcp-bucket-name>`. Export the keys, bucket name, container name, and storage location names (for example, in `.env` and `.secrets.env`): ``` export AWSACCESSKEY=<aws-access-key> export AWSSECRETKEY=<aws-secret-key> export AWSCRRBUCKET_NAME=<destination-aws-bucket-name> export AWSBACKENDDESTINATION_LOCATION=<destination-aws-location-name> export AWSBACKENDSOURCE_LOCATION=<source-aws-location-name> export AZUREACCOUNTNAME=<azure-account-name> export AZURESECRETKEY=<azure-access-key> export AZUREBACKENDENDPOINT=<azure-endpoint> export AZURECRRBUCKET_NAME=<destination-azure-container-name> export AZUREBACKENDDESTINATION_LOCATION=<destination-azure-location-name> export GCPCRRBUCKET_NAME=<destination-gcp-bucket-name> export GCPBACKENDDESTINATION_LOCATION=<destination-gcp-location-name> export GCPBACKENDSERVICE_KEY=<gcp-private-key> export GCPBACKENDSERVICE_EMAIL=<gcp-client-email> ``` If using `*.env` files, source the files: ``` source .env && source .secrets.env ``` Create the GCP credential file in `Zenko/tests/zenko_e2e/backbeat`: ``` cat >gcp_key.json <<EOF { "privatekey": "${GCPBACKENDSERVICEKEY}", "clientemail": "${GCPBACKENDSERVICEEMAIL}" } EOF ``` Run the test suite: `npm run test_crr`. Create a bucket on AWS `<destination-aws-bucket-name>` with versioning enabled. In Orbit, create an AWS location `<destination-aws-location-name>` with an AWS bucket `<destination-aws-bucket-name>`. Create a container on Azure `<destination-azure-container-name>`. In Orbit, create an Azure storage location `<destination-azure-location-name>` with an Azure container `<destination-azure-container-name>`. Export the keys, AWS bucket name, and AWS location (for example, in `.env` and `.secrets.env`): ``` export CLOUDSERVER_HOST=<zenko-cloudserver-name> export AWSACCESSKEY=<aws-access-key> export AWSSECRETKEY=<aws-secret-key> export AWSCRRBUCKET_NAME=<destination-aws-bucket-name> export AWSBACKENDDESTINATION_LOCATION=<destination-aws-location-name> export AZUREACCOUNTNAME=<azure-account-name> export AZURESECRETKEY=<azure-access-key> export AZUREBACKENDENDPOINT=<azure-endpoint> export AZURECRRBUCKET_NAME=<destination-azure-container-name> export AZUREBACKENDDESTINATION_LOCATION=<destination-azure-location-name> ``` If using `*.env` files, source the files: ``` source .env && source .secrets.env ``` Run the test suite: `npm run test_api` for API tests, or `npm run testcrrpause_resume` for CRR pause and resume tests. Create a bucket on AWS `<destination-fail-aws-bucket-name>` with versioning enabled. In Orbit, create an AWS location `<destination-fail-aws-location-name>` with an AWS bucket `<destination-fail-aws-bucket-name>`. Export the keys, AWS bucket name, and AWS location (for example, in `.env` and `.secrets.env`): ``` export AWSACCESSKEY=<aws-access-key> export AWSSECRETKEY=<aws-secret-key> export AWSS3FAILBACKBEATBUCKET_NAME=<destination-fail-aws-bucket-name> export AWSS3FAILBACKENDDESTINATION_LOCATION=<destination-fail-aws-bucket-name> ``` If using `*.env` files, source the files: ``` source .env && source .secrets.env ``` Run the test suite: `npm run test_retry`.