Objective
To create a temporary demo cluster on Google Cloud Platform
Artifacts
The Roost provided solution consists of:
Executable - gcpController
Config JSON template - gcp_config.json.template, gcp_config.json
Roost Website based access for Admin and Users - roost.io & roost.io/tufin
Steps to spawn a cluster on GCP
Connect to a terminal (Mac)
export the following variables at the minimum
ROOST_AUTH_TOKEN=”<Value provided by Roost Team>"
SVC_ACCOUNT_JSON=”Location of the googleApi.key”
USER_EMAIL="<any email value>"
USER_NAME="<any unique name, only alphabets>"
INSTALL_SCRIPT='["<path to installscipts that you want to execute on cluster >"
]'UNINSTALL_SCRIPT='["<path to uninstallscripts that you want to execute on cluster >"]'
Download and run the bash script at getController.sh
Sample usage is below:
Code Block |
---|
# export the varables export ROOST_AUTH_TOKEN="****" USER_EMAIL=abc@zb.io USER_NAME=user_name SVC_ACCOUNT_JSON="/var/tmp/Roost/googleApi.key" INSTALL_SCRIPT='["/var/tmp/Roost/clone.sh","/var/tmp/Roost/deploy.sh"]' UNINSTALL_SCRIPT='["/var/tmp/Roost/uninstall.sh"]'; curl https://tempclusterdev.s3-us-west-1.amazonaws.com/getController.sh -o ~/getController.sh chmod +x ~/getController.sh # ### # To just download the binaries and config ~/getController.sh #Start & Stop GCP Cluster using binary /var/tmp/Roost/bin/gcpController start /var/tmp/Roost/bin/gcp_config.json /var/tmp/Roost/bin/gcpController stop /var/tmp/Roost/bin/gcp_config.json |
Content of the files (/var/tmp/Roost/clone.sh
, /var/tmp/Roost/deploy.sh
, /var/tmp/Roost/uninstall.sh
)
Code Block | ||
---|---|---|
| ||
#!/bin/sh
export KUBECONFIG=/var/tmp/Roost/.kube/config.roostctl
cd /var/tmp
git clone https://github.com/bengrissinger/generic-bank.git |
Code Block | ||
---|---|---|
| ||
#!/bin/sh export KUBECONFIG=/var/tmp/Roost/.kube/config.roostctl cd /var/tmp/generic-bank ./deploy.sh CZ08W3S6WA3S |
Code Block | ||
---|---|---|
| ||
#!/bin/sh export KUBECONFIG=/var/tmp/Roost/.kube/config.roostctl /var/tmp/generic-bank/remove.sh |
Steps for End-User
Open a browser and visit web-page roost.io/tufin
Enter the email and token provided by the admin
This will open a terminal on the web-page where Kubernetes and Docker commands can be run
To get the the public ip of the controlplane, Run
Code Block curl ifconfig.me
Using this public ip, you can connect to the services deployed