Skip to content

Commit

Permalink
Removed kinesis basic applications. Added option for user to upload w…
Browse files Browse the repository at this point in the history
…ebsite content
  • Loading branch information
root committed Jul 18, 2019
1 parent 2864f58 commit 50731fc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
18 changes: 11 additions & 7 deletions templates/quickstart-ct-clickstream-analytics-master.template
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Metadata:
- QSS3BucketName
- QSS3KeyPrefix
- Label:
default: Custom website configuration
default: Custom website content
Parameters:
- WebsiteContent
ParameterLabels:
Expand Down Expand Up @@ -610,8 +610,7 @@ Parameters:
MinValue: 1
MaxValue: 100
DatabaseName:
Description: The name of the first database to be created when the redshift cluster is
created
Description: The name of the first database to be created when the redshift cluster is created
Type: String
Default: dev
AllowedPattern: "([a-z]|[0-9])+"
Expand Down Expand Up @@ -678,7 +677,7 @@ Parameters:
- 'no'
Default: 'no'
WebsiteContent:
Description: Provide S3 bucket name with path to deploy website in this quickstart. Leave blank if there is no site to deploy.
Description: This is the S3 location where your custom website contents are uploaded. This QuickStart will deploy your website from this location. Leave blank if there is no site to deploy.
Type: String
Mappings:
InstanceType2Arch:
Expand Down Expand Up @@ -1904,8 +1903,13 @@ Resources:
EOL'
/usr/bin/sudo /sbin/service aws-kinesis-agent start
/usr/bin/sudo /sbin/chkconfig aws-kinesis-agent on
/usr/bin/aws s3 sync s3://${WebsiteContent} /var/www/html/ || true
/usr/bin/sudo service httpd restart
WebsiteContentURL=${WebsiteContent}
if [ -z "$WebsiteContentURL" ]
then
echo "WebsiteContentURL Variable is empty."
else
/usr/bin/aws s3 sync s3://$WebsiteContentURL /var/www/html/ && /usr/bin/sudo /sbin/service httpd restart
fi
Properties:
KeyName: !Ref 'AppKeyPairName'
ImageId: !FindInMap
Expand Down Expand Up @@ -2128,7 +2132,7 @@ Resources:
then
echo "WebsiteContentURL Variable is empty."
else
/usr/bin/aws s3 sync s3://${WebsiteContent} /var/www/html/ && /usr/bin/sudo /sbin/service httpd restart
/usr/bin/aws s3 sync s3://$WebsiteContentURL /var/www/html/ && /usr/bin/sudo /sbin/service httpd restart
fi
/usr/bin/sudo /bin/chown -R aws-kinesis-agent-user:aws-kinesis-agent-user /var/log/demodata/
source <(aws sts assume-role --role-arn arn:aws:iam::${AWS::AccountId}:role/${AppRole} --role-session-name "QuickStart" --duration-seconds 1900 | jq -r '.Credentials | @sh "export AWS_SESSION_TOKEN=\(.SessionToken)\nexport AWS_ACCESS_KEY_ID=\(.AccessKeyId)\nexport AWS_SECRET_ACCESS_KEY=\(.SecretAccessKey) "')
Expand Down
32 changes: 18 additions & 14 deletions templates/quickstart-ct-clickstream-analytics.template
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ Metadata:
default: AWS quick start configuration
Parameters:
- QSS3BucketName
- QSS3KeyPrefix
- QSS3KeyPrefix
- Label:
default: Custom website configuration
default: Custom website content
Parameters:
- WebsiteContent
ParameterLabels:
Expand Down Expand Up @@ -569,11 +569,9 @@ Parameters:
ESIndex:
Description: Index name of the amazon elasticsearch domain.
Type: String
Default: test
ESType:
Description: Name of the amazon elasticsearch type.
Type: String
Default: test
ESIndexRotation:
Description: Frequency at which the amazon elasticsearch index will be rotated.
Type: String
Expand Down Expand Up @@ -601,7 +599,6 @@ Parameters:
DatabaseName:
Description: The name of the first database to be created when the redshift cluster is created
Type: String
Default: dev
AllowedPattern: "([a-z]|[0-9])+"
ClusterType:
Description: The type of redshift cluster
Expand Down Expand Up @@ -630,19 +627,18 @@ Parameters:
Description: Master user password for redshift cluster
NoEcho: 'true'
Type: String
Default: Test!123
MasterUser:
Description: Name of the master user of the redshift cluster
Type: String
Default: test
Default: masteruser
RedshiftBufferInterval:
Description: Number of seconds to buffer data before delivering to S3 (60 to 900).
Type: Number
Default: 300
MinValue: 60
MaxValue: 900
RedshiftBufferSize:
Description: Number of MB of data to buffer before delivering to S3 (1 to 128).
Description: MB of data to buffer before delivering to S3 (1 to 128).
Type: Number
Default: 5
MinValue: 1
Expand All @@ -659,14 +655,14 @@ Parameters:
Type: String
Default: '5439'
isDemo:
Description: Set to NO if you do not want to ingest demo data into redshift.
Description: Set to 'yes' if you want to ingest demo data into redshift.
Type: String
AllowedValues:
- 'yes'
- 'no'
Default: 'no'
WebsiteContent:
Description: Provide S3 bucket name with path to deploy website in this quickstart. Leave blank if there is no site to deploy.
Description: This is the S3 location where your custom website contents are uploaded. This QuickStart will deploy your website from this location. Leave blank if there is no site to deploy.
Type: String
Mappings:
InstanceType2Arch:
Expand Down Expand Up @@ -1860,8 +1856,13 @@ Resources:
EOL'
/usr/bin/sudo /sbin/service aws-kinesis-agent start
/usr/bin/sudo /sbin/chkconfig aws-kinesis-agent on
/usr/bin/aws s3 sync s3://${WebsiteContent} /var/www/html/ || true
/usr/bin/sudo service httpd restart
WebsiteContentURL=${WebsiteContent}
if [ -z "$WebsiteContentURL" ]
then
echo "WebsiteContentURL Variable is empty."
else
/usr/bin/aws s3 sync s3://$WebsiteContentURL /var/www/html/ && /usr/bin/sudo /sbin/service httpd restart
fi
Properties:
KeyName: !Ref 'AppKeyPairName'
ImageId: !FindInMap
Expand Down Expand Up @@ -2084,8 +2085,8 @@ Resources:
then
echo "WebsiteContentURL Variable is empty."
else
/usr/bin/aws s3 sync s3://${WebsiteContent} /var/www/html/ && /usr/bin/sudo /sbin/service httpd restart
fi
/usr/bin/aws s3 sync s3://$WebsiteContentURL /var/www/html/ && /usr/bin/sudo /sbin/service httpd restart
fi
/usr/bin/sudo /bin/chown -R aws-kinesis-agent-user:aws-kinesis-agent-user /var/log/demodata/
source <(aws sts assume-role --role-arn arn:aws:iam::${AWS::AccountId}:role/${AppRole} --role-session-name "QuickStart" --duration-seconds 1900 | jq -r '.Credentials | @sh "export AWS_SESSION_TOKEN=\(.SessionToken)\nexport AWS_ACCESS_KEY_ID=\(.AccessKeyId)\nexport AWS_SECRET_ACCESS_KEY=\(.SecretAccessKey) "')
export PGPASSWORD='${MasterUserPassword}'
Expand Down Expand Up @@ -2267,6 +2268,7 @@ Resources:
Resource: !Ref BastionNotificationTopic
Topics:
- !Ref BastionNotificationTopic

ESCloudwatchLogsGroup:
Type: AWS::Logs::LogGroup
Properties:
Expand Down Expand Up @@ -2320,6 +2322,8 @@ Outputs:
Value: !Ref ESDomainName
ElasticSearchDomainEndpoint:
Value: !GetAtt ESDomain.DomainEndpoint
ElasticSearchKibanaEndpoint:
Value: !Sub "https://${ESDomain.DomainEndpoint}/_plugin/kibana/"
ElasticSearchDeliveryStream:
Value: !Ref FIrehoseToElasticsearch
RedshiftCluster:
Expand Down

0 comments on commit 50731fc

Please sign in to comment.