Cloud Formation Scripts (command line)
Recommended when installation needs to be automated or have large number of DataQ servers to be deployed.
CFN(Cloud Formation) Scripts Download
Prerequisites
Ensure jq and "aws cli" are installed
Permissions for aws account to create ec2 instance, load balancer.
Ensure the private subnet where Vexdata server is installed has out going traffic enabled.
Download CFN Scripts
Create a new file from the template file in dq_devops/ec2_cfn/cfn/cfn_templates_parameters/infrastructure/<ENV>.<ACCOUNT_>.<REGION>.ec2-infra.cfn.parameters.json
Replace ENV with the environment. ex : dev, prod\
Replace ACCOUNT with the environment. ex : Vexdatadv
Replace REGION with the environment. ex : us-east-1
Replace ENV with the environment. ex : dev, prod
If creating the server in dev environment, the new file name can be : dev.account.region.ec2-infra.cfn.parameters.json
Below five properties are mandatory.
VPCId
PrivateSubnets
PublicSubnets
KeyPairName
ALBSSLPolicy
ACMCertificateArn Note: PublicSubnets are coma separated values used by load balancer.
Update the CFN Stack Tags File as needed in ./cfn/cfn_templates_parameters/common/env.account.region.cfn-stack.tags.json
Update both the Parameter and Stack Tags files name ( env.account.region.emr-infra.cfn.parameters.json and env.account.region.cfn-stack.tags.json ) with corresponding env/account/region values you need. File should be like this dq_devops/ec2_cfn/cfn/cfn_templates_parameters/infrastructure/<ENV>.<ACCOUNT_>.<REGION>.region.cfn-stack.tags.json
Update sed command under replace_template_parameters() function in the script(ec2_cfn/shell_scripts/ec2_infra_deploy.sh) as below,
If running the scripts in Mac, UPDATE all 'sed' commands in below Format: >
sed -i '' "s/ParameterNameValue/${PARAMETER_NAME}/g" $PARAMETER_FILE
If running the scripts in LINUX, UPDATE all 'sed' commands in below Format: >
sed -i "s/ParameterNameValue/${PARAMETER_NAME}/g" $PARAMETER_FILE
\
Execute Infrastructure Shell Script:
Below example will create infra for dev environment and account Vexdata with internet-facing (public) Application Load Balancer and http protocol.
Proceed with the following steps after successful installation
Login to the aws web console under cloud formation to confirm the stack is created successful.
Click on the stack name-> Outputs -> corresponding to the key "LoadBalancerDnsName", there will be a load balancer url. Click on the URL to login to Vexdata application.
if the jobs need to be executed on EMR cluster, ssh into the ec2 instance where Vexdata is running, and URL needs to be set in app.properties file.
Last updated