As an alternative to creating the infrastructure manually, you can deploy the infrastructure in silent mode.
- Prerequisite: The same prerequisites that are required to deploy the infrastructure manually are also needed if you plan to deploy the infrastructure in silent mode, see Setup requirements.
- Prerequisite: To prepare for running a silent deployment, you must have completed steps 1 and 2 of Creating the infrastructure. You should also read step 3, and complete if required.
- Prerequisite: To Configure SSL, make sure you have a valid SSL certificate that has been imported by AWS into the Certificate Manager. See https://aws.amazon.com/certificate-manager/ for more information.
- Prerequisite: Make sure you create a Kubernetes cluster and also have 3 docker Repositories in AWS ECR registry. The Repositories must have the title - dqplus-main, dqplus-os and dqplus-extension.
-
Populate a variables file with the following required settings. Use the format
setting = "value", for exampleawsPrimaryRegion= "us-east-1":useAccessKeyAndSecret = "y"awsPrimaryRegion = " "awsAccessKey = " "awsSecretKey = " "awsSecondaryRegion = " "domainName = " "vpcId = " "privateSubnet1Id = " "privateSubnet2Id = " "deploymentId = " "localPathToEc2Key = " "s3KmsKey = " "kmsServiceEndpoint = " "#AuroraauroraPostgresPassword = " "auroraDbInstanceClass = "db.r5.xlarge"auroraBackupRetentionPeriod = "30"auroraPreferredBackupWindow = "04:02-04:32"auroraPreferredMaintenanceWindow = "sat:02:00-sat:02:30"auroraSnapshotIdentifier = " "#RedshiftredshiftEnabled = "true"redshiftMasterPassword = " "redshiftStandardSnapshotIdentifier = " "redshiftHpSnapshotIdentifier = " "redshiftPortNumber = "5439"#EMRemrEc2KeyName = " "emrCoreInstanceCount = "3"emrCoreInstanceType = "r5d.xlarge"emrTaskInstanceCount = "1"emrTaskInstanceType = "r5d.xlarge"emrMasterInstanceCount = "3"emrMasterInstanceType = "r5d.xlarge"emrKmsKeyArn = " "#EBpublicSubnet1Id = " "publicSubnet2Id = " "elasticBeanstalkPlatformName = "64bit Amazon Linux 2023 v5.6.2 running Tomcat 10 Corretto 17"ebMaxInstanceCount = "4"ebMinInstanceCount = "2"ebInstanceType = "c5.2xlarge"ebKeyPairName = " "ebAppCount = "1 "sslConnectionStatus = "true"httpsListenerEnable = "true"httpListenerEnable = "false"ebOrK8s = "0"sslCertificateArn = " "Note: TheebOrK8sis working as a flag for elastic Beanstalk or Kubernetes deployment. IfebOrK8s=0, it will deploy elastic beanstalk and if "ebOrK8s=1" then it will skip elastic beanstalk deployment and do the required configuration for Kubernetes deployment.sslCertificateArn = "arn:aws:acm:us-east-1:0517023248360:certificate/xxxxx-aabd-4134-a85e-1ea86xxxxxx"Note:sslConnectionStatusis working as a flag. But the other three values will get read into a terraform variable file. IfsslConnectionStatus = "true",httpsListenerEnableshould be"true",httpListenerEnableshould be"false", andsslCertificateArnshould set the value of ssl certificate. Similarly, IfsslConnectionStatus = "false",httpsListenerEnableshould be"false",httpListenerEnableshould be"true", andsslCertificateArncan be blank"".Note: Where the above settings contain a value, for exampleebMaxInstanceCount = "4", this is the recommended default value which should be used in most cases. Please note that you must include all settings.Note: TheelasticBeanstalkPlatformNamevalue can change regularly due to the AWS release schedule. It is recommended that you verify the value for this setting from your AWS account by running the following AWS CLI command:aws elasticbeanstalk list-available-solution-stacks | grep "running Tomcat 10 Corretto 17"Tip: During a manual deployment, the values for these settings are entered via prompts when running thepython3 setup.pyscript.The following table provides additional information about each of the properties:Property Description awsPrimaryRegionThe AWS primary region, for example:
awsPrimaryRegion = "us-east-1"awsAccessKeyThe AWS access key that will be used for deployment, for example:
awsAccessKey = "AKIAIOSFODNN7EXAMPLE"This must have Admin access for the duration of the installation. For more information, see the AWS documentation, for example at: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
awsSecretKeyThe AWS secret key that will be used for deployment, for example:
awsSecretKey = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"This must have Admin access for the duration of the installation. For more information, see the AWS documentation, for example at: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
awsSecondaryRegionThe AWS secondary region, for example:
awsSecondaryRegion = "us-east-2"domainNameThe domain name for the installation, for example:
domainName = "infogix.com"vpcIdThe VPC ID of the Virtual Private Cloud to install into, for example:
vpcId = "vpc-6hj35709"privateSubnet1IdThe subnet ID for the first private subnet, for example:
privateSubnet1Id = "subnet-07b3d0bf6h8op62ed"privateSubnet2IdThe subnet ID for the second private subnet, for example:
privateSubnet2Id = "subnet-00ecf411w465df7ef"deploymentIdThe unique deployment ID associated with the AWS IAM user or AWS account, for example:
deploymentId = "dev"localPathToEc2KeyThe path to the Elastic Beanstalk key pair on the VM, for example:
localPathToEc2Key = "/home/ec2-user/engineering.pem"s3KmsKeyThe ARN of the KMS key used for S3. auroraPostgresPasswordThe password for the Amazon Aurora account, for example:
auroraPostgresPassword = "Password1"auroraDbInstanceClassThe Amazon Aurora database instance class. The default value is:
auroraDbInstanceClass = "db.r5.xlarge"For more information, see the AWS documentation, for example at:
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html
auroraBackupRetentionPeriodThe number of days to retain backup data. The default value is 30 days:
auroraBackupRetentionPeriod = "30"auroraPreferredBackupWindowPreferred time to perform backups. The default value is between 04:02 AM and 04:32 AM:
auroraPreferredBackupWindow = "04:02-04:32"auroraPreferredMaintenanceWindowPreferred time to perform maintenance. The default value is on a Saturday between 02:00 AM and 02:30 AM:
auroraPreferredMaintenanceWindow = "sat:02:00-sat:02:30"auroraSnapshotIdentifierSpecifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. redshiftEnabledDetermines whether to install the Redshift environment. If the value is set to '
true', script creates redshift, if it is set to 'false' redshift creation gets skipped.redshiftMasterPasswordThe password for the Amazon Redshift database, for example:
redshiftMasterPassword = "Password1"redshiftPortNumberThe port number used to connect to an Amazon Redshift database. redshiftStandardSnapshotIdentifierThe name of the snapshot from which to create the new Standard Redshift cluster if restoring from an existing DB. redshiftHpSnapshotIdentifierThe name of the snapshot from which to create the new High Performance Redshift cluster if restoring from an existing DB. ebOrK8sThe ebOrK8sis working as a flag for elastic Beanstalk or Kubernetes deployment. IfebOrK8s=0, it will deploy elastic beanstalk and ifebOrK8s=1then it will skip elastic beanstalk deployment and do the required configuration for Kubernetes deployment.publicSubnet1IdIf using public subnets, enter the first Subnet ID, alternatively leave as " " publicSubnet2IdIf using public subnets, enter the second Subnet ID, alternatively leave as " " elasticBeanstalkPlatformNameThe Elastic Beanstalk platform name, for example:
elasticBeanstalkPlatformName = "64bit Amazon Linux 2 v4.1.3 running Tomcat 10 Corretto 17"The
elasticBeanstalkPlatformNamevalue can change regularly due to the AWS release schedule. It is recommended that you verify the value for this setting from your AWS account by running the following AWS CLI command:aws elasticbeanstalk list-available-solution-stacks | grep "running Tomcat 10 Corretto 17"ebMaxInstanceCountThe maximum number of EC2 instances in your Elastic Beanstalk environment. The default value is:
ebMaxInstanceCount = "4"ebMinInstanceCountThe minimum number of EC2 instances in your Elastic Beanstalk environment. The default value is:
ebMinInstanceCount = "2"ebInstanceTypeThe Elastic Beanstalk instance type. The default value is:
ebInstanceType = "c5.2xlarge"ebKeyPairNameThe name of the AWS key pair for the Elastic Beanstalk (EB) instance, for example:
ebKeyPairName = "engineering"This can be the same as the
emrEc2KeyName, or it can be different.ebAppCountDetermines whether to install the Elastic Beanstalk environments into an existing application called
dqplus. If you already have a Data360 DQ+ installation in AWS, the value should be0. If this is your first implementation of Data360 DQ+, the value should be1.The default value is:
ebAppCount = "1"ebInstanceProfileArnThe ARN of the instance profile to assign to Elastic Beanstalk instances. ebSecurityGroupIdsThe security group IDs separated by a comma to apply to Elastic Beanstalk instances. ebSecurityAmiIdThe AMI ID to use for Elastic Beanstalk instances if you are using a custom image.
If you are not using a custom image, do not add this setting to the file.
emrEc2KeyNameThe name of the AWS key pair for the Elastic Map Reduce (EMR) instance, for example:
emrEc2KeyName = "engineering"This can be the same as the
ebKeyPairName, or it can be different.emrCoreInstanceCountThe number of EMR core instances. The default value is:
emrCoreInstanceCount = "3"emrCoreInstanceTypeThe EMR core node type. Infogix supports the r5d instance range for this setting.
The default value is:
emrCoreInstanceType = "r5d.xlarge"emrTaskInstanceCountThe number of task nodes in your EMR cluster. The default value is:
emrTaskInstanceCount = "1"emrTaskInstanceTypeThe EMR task node type. Infogix supports the r5d instance range for this setting.
The default value is:
emrTaskInstanceType = "r5d.xlarge"emrMasterInstanceCountThe number of EMR Master instances.
The default value is
emrCoreInstanceCount = "3"emrMasterInstanceTypeThe EMR primary node type. Infogix supports the r5d instance range for this setting.
The default value is:
emrMasterInstanceType = "r5d.xlarge"emrKmsKeyArnThe ARN of the KMS key to use for EMR. sslConnectionStatusThe sslConnectionStatuswill set the flag for ssl configure. The default value is :sslConnectionStatus = "false"(for"http").httpsListenerEnableThe elastic beanstalk will set the httpsListenerEnablevalue to set the Application load balancer listeners setting. The default value is :httpsListenerEnable = "false"(sincesslConnectionStatusis"false"and it is for https configuration).httpListenerEnableThe elastic beanstalk will set the httpListenerEnablevalue to set the Application load balancer listeners setting. The default value is :httpListenerEnable = "true"(sincesslConnectionStatusis"false"and it is for http configuration).sslCertificateArnThe elastic beanstalk will set the ssl certificate value. The default value is : sslCertificateArn = ""(since thesslConnectionStatusis"false"and it is for an HTTP configuration). -
Name the variables file
dqplus.tfvarsand save it in theinfra/aws/configdirectory. -
Create a new variables file called
dqplus.propertiesand add the following property:OVERRIDES_FOLDER=<path to OVERRIDES_FOLDER>For example:
OVERRIDES_FOLDER=/tmp/files/ - After you create the variable file, run this command:
terraform init -
From the
infra/aws/configdirectory, run the following commands:terraform plan -target=module.buckets -var-file=dqplus.tfvars -out=bucketplanterraform apply bucketplan -
Upload the
emr_bootstrap.shandemr_bootstrap2.shfiles to the newly created bucket in the following location:/spark/bootstrap/emr_bootstrap.sh and /spark/bootstrap/emr_bootstrap2.sh.Tip: You can find theemr_bootstrap.shfile in theconfigdirectory.Note: If you are using a custom EMR Bootstrap script, upload that one, not the file from theconfigdirectory. See step 3 of Creating the infrastructure for more details. - Upload any self signed certificates that you need to install to the newly created bucket
in the following location:
/sparkshared/certs/ - From the
infra/aws/configdirectory, run the following commands:terraform plan -var-file=dqplus.tfvars -out=planterraform apply planNote: Runningterraform apply planwill create the infrastructure and will incur costs. Before executing this command, it is recommended that you first verify what will be created by runningterraform show plan. - From the
infra/aws/configdirectory, run the following commands:For EB deployment:python3 ./properties.py python3 ./password.pyFor K8s deployment:python3 ./properties.py python3 ./password.py python3 ./properties-ecr.py python3 ./password-k8s.py
The properties.py script parses data from the output of Terraform and
creates a new properties file required by the installer to install the product.
The password.py script parses data from the output of Terraform and creates
a new file containing sensitive information required by the installer.
The properties-ecr.py script parses data from the output of Terraform and
creates a new properties file required by the installer for docker container registry (AWS
ECR).
The properties-k8s.py script parses data and edit new properties required by
the installer for Kubernetes deployment.