Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

This set of instructions can be injected into a Jenkins pipeline or any other CI tool and used for creating Roost Environment on the go (EaaS).

export SCRIPT=jenkins-cluster-deploy.sh
export S3_URL=https://remote-roostprod.s3-us-west-1.amazonaws.com/${SCRIPT}

# Credentials
export AWS_CREDS="/var/lib/jenkins/aws_accessKeys.csv"
export ROOST_TOKEN="*****"
export ROOST_SERVER="roost.io:443"
export CLUSTER_ALIAS="jenkins-pipeline" # OR any variable like ${JOB_NAME}
export IMAGE_TAG=${GIT_COMMIT}

# Project Deploy Settings
export HELM_DIR="$WORKSPACE/helm-vote"
export HELM_ARGS="--set clusterIP=CLUSTER_IP,tag=latest,namespace=${BUILD_TAG},registry=zbio"
# Roost Script will inject CLUSTER_IP

# Step 1: Download Script
curl -qsL ${S3_URL} -o $HOME/${SCRIPT}

# Step 2: Start Cluster and Deploy Helm Chart
sh $HOME/${SCRIPT} -l "start" -c ${CLUSTER_ALIAS} -f "$HELM_DIR" -r ${ROOST_SERVER} -a ${ROOST_TOKEN} -k ${AWS_CREDS} 

# echo "=== Done with deploy ==="

# Other script options to stop/delete the same cluster 

# sh $HOME/${SCRIPT} -l "stop" -r ${ROOST_SERVER} -j ${HOME}/Roost/${CLUSTER_ALIAS}/remoteConfig.json
# sh $HOME/${SCRIPT} -l "delete" -r ${ROOST_SERVER} -j ${HOME}/Roost/${CLUSTER_ALIAS}/remoteConfig.json  

  • No labels