-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun
More file actions
executable file
·27 lines (23 loc) · 1.68 KB
/
run
File metadata and controls
executable file
·27 lines (23 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# (c) Copyright 2016 DataNexus Inc. All Rights Reserved.
# postgresql deployment wrapper
export application=$1 # application overlay to deploy
: ${AWS_PROFILE:=datanexus} && export AWS_PROFILE=$AWS_PROFILE # sets this to a reasonable ~/.aws/credentials default
if [ $# -eq 0 ] || [ "$1" == "-h" ] ; then
echo "Usage: `basename $0` [-h]\thelp"
echo "\t `basename $0` [FILE | TENANT PROJECT CLOUD REGION DOMAIN CLUSTER SSH_USER TENANT_PATH]\tdeploy $application overlay with FILE configuration or with the specified values"
echo "Example: `basename $0` datanexus demo aws us-east-1 development a centos /tmp/datanexus"
echo "\t `basename $0` /tmp/configuration.yml"
exit 0
fi
# ./run kafka datanexus demo aws us-east-1 development a centos /Users/christopher/Documents/DataNexus/Demos/us-east-1 /Users/christopher/Documents/DataNexus/Platform/Source/ /Users/christopher/Documents/DataNexus/Platform/Source/datanexus
# likely called by the orchestrator to just pass through everything
# if [ $# -eq 4 ] && [ "$1" == "-e" ]; then
# cd $application && ./provision-postgresql $3 "$4" $1 "$2"
# deploy postgresql as an overlay or a full deployment via configuration file
if [ $# -eq 11 ] && [ -d ${11} ]; then
# cd $application && ./$application-operations --tags "$application" -e "tenant=$1 project=$2 cloud=$3 region=$4 domain=$5 cluster=$6 user=$7 tenant_config_path=$8"
cd $application && ./$application-operations -e "tenant=$2 project=$3 cloud=$4 region=$5 domain=$6 cluster=$7 user=$8 key_path=$9 application_path=${10} atenant_config_path=${11}"
elif [ $# -eq 1 ] && [ -f $1 ] && [ -s $1 ]; then
./provision-postgresql --tags "vm,$application" -e "configuration=$1"
fi