-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetEnvironment.sh
41 lines (41 loc) · 1.71 KB
/
setEnvironment.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# this project name is used in many of the object names for several of the cloudformation stacks
export PREFIX=xxx
# get current region
export FULL_REGION=`aws configure get region`
# this removes the dashes from region name
export REGION=`sed 's/-//g' <<<"$FULL_REGION"`
export PROJECT_NAME=${PREFIX}-${REGION}
# staging bucket name to initially hold code uploaded from this github
export S3_BUCKET=${PROJECT_NAME}-s3-temp-bucket
# local ip to limit the opening of the firewall
export LOCAL_IP=`curl http://checkip.amazonaws.com/`
# Redis port for the database
export REDISPORT=12000
# DNS cluster prefix within the Hosted Zone Name
export CLUSTERNAME=${REGION}.${PREFIX}
# This must already exist-not created with these scripts
export HOSTEDZONENAME=xxxx-rlec.xxxxxxxx.com
# Zone names can be duplicate, add the specific zone id
export HOSTEDZONEID=xxxxxxxxxx
# User name and password for Redis Cluster login
export CLUSTERUSERNAME=xxxxxxxxxx@xxxxxx.com
export CLUSTERPASSWORD=xxxxxxxxxx
export CLUSTERURL=${CLUSTERUSERNAME}:${CLUSTERPASSWORD}
# controls if additional components such as EMR, Hbase and Aurora are created
export CREATE_ALL=false
# controls if redis connector is created
export CREATE_CONNECTOR=false
# ec2 instance type for app node
export EC2_INSTANCE_TYPE=i3.2xlarge
# ec2 instance type for Redis instances
export REDIS_EC2_INSTANCE_TYPE=r4.2xlarge
# key pair for redis ec2 instances
export KEY_PAIR=${PREFIX}_${REGION}
# number of instances between 1 and 3
export NUMBER_INSTANCES=2
# VPC Cidr
export VPC_CIDR=10.1.0.0/16
# Create Elastic IPs for fixed IPS on redis nodes
export CREATE_ELASTIC_IPS=true
export REDIS_URI=redis://redis-${REDISPORT}.${REGION}.${PREFIX}.demo-rlec.redislabs.com:${REDISPORT}