-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy
executable file
·22 lines (15 loc) · 1.15 KB
/
deploy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env sh
# (c) Copyright 2016 DataNexus Inc. All Rights Reserved.
# elastic platform deployment wrapper
export application=elasticsearch # application overlay to deploy
: "${AWS_PROFILE:=datanexus}" && export AWS_PROFILE=$AWS_PROFILE # sets this to a reasonable ~/.aws/credentials default
: "${AZURE_PROFILE:=datanexus}" && export AZURE_PROFILE="$AZURE_PROFILE" # sets this to a reasonable ~/.azure/credentials default
# AWS_PROFILE=ucsd ec2_region=us-west-2 eval ./deploy $platform_root/ucsd/inventory/hostsfile-us-west-2-IPaaS.none $platform_root/ucsd IPaaS aws '$ec2_region' production none
if [ $# -eq 0 ] || [ "$1" = "-h" ] ; then
printf "Usage: deploy [-h]\\thelp\\n"
printf "\\t deploy [INVENTORY TENANT PROJECT CLOUD REGION DOMAIN CLUSTER]\\tdeploy %s overlay with the specified values\\n" "$application"
printf "Example: deploy datanexus demo aws us-east-1 development none\\n"
exit 0
fi
tenant=`/usr/bin/basename ${2}` # derive tenant name from the path
./provision-elasticsearch --inventory=$1 --tags "$application" -e "tenant_config_path=${2} project=$3 cloud=$4 region=$5 domain=$6 cluster=$7 tenant=${tenant}"