This commit is contained in:
Gene Wood 2018-10-17 13:09:34 -07:00
Родитель 3b6dcef78d
Коммит c62b05d7b2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F0A9E7DCD39E452E
2 изменённых файлов: 42 добавлений и 1 удалений

Просмотреть файл

@ -34,6 +34,28 @@ Parameters:
MozDefACMCertArn:
Type: "String"
Description: "The arn of your pre-issued certificate for ssl termination."
Default: "arn:aws:acm:us-west-2:656532927350:certificate/79f641f2-4046-4754-a28f-4db80d7c0583"
ESURL:
Type: "String"
Description: "The AWS ES endpoint URL"
Default: http://elasticsearch.example.com/
KibanaURL:
Type: "String"
Description: "The AWS ES Kibana URL"
Default: https://kibana.example.com/
AmazonMQURL:
Type: "String"
Description: "The AWS AmazonMQ URL"
Default: amqp+ssl://b-ea1aefe8-b194-4be5-91c3-0e8b2e664151-1.mq.us-west-2.amazonaws.com:5671
AmazonMQUsername:
Type: "String"
Description: "The AWS AmazonMQ Username"
Default: mozdef
AmazonMQPassword:
Type: "String"
NoEcho: true
Description: "The AWS AmazonMQ User Password"
Default: example-password
Resources:
MozDefElasticLoadBalancingV2TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
@ -54,7 +76,21 @@ Resources:
KeyName: !Ref KeyName
SecurityGroups:
- !Ref MozDefSecurityGroupId
# UserData: xxx
UserData:
Fn::Base64: !Sub |
#cloud-config
write_files:
- content: |
ES_URL=${ESURL}
KIBANA_URL=${KibanaURL}
AMAZON_MQ_URL=${AmazonMQURL}
AMAZON_MQ_USERNAME=${AmazonMQUsername}
AMAZON_MQ_PASSWORD=${AmazonMQPassword}
path: /opt/mozdef/docker/compose/cloudy_mozdef.env
runcmd:
- chmod 600 /opt/mozdef/docker/compose/cloudy_mozdef.env
- make -C /opt/mozdef -f /opt/mozdef/Makefile # run-cloudy-mozdef
MozDefAutoScaleGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:

Просмотреть файл

@ -69,6 +69,11 @@ Resources:
MozDefSecurityGroupId: !GetAtt MozDefSecurityGroups.Outputs.MozDefSecurityGroupId
MozDefLoadBalancerSecurityGroupId: !GetAtt MozDefSecurityGroups.Outputs.MozDefLoadBalancerSecurityGroupId
MozDefACMCertArn: !Ref ACMCertArn
ESURL: !GetAtt MozDefES.Outputs.ElasticsearchURL
KibanaURL: !GetAtt MozDefES.Outputs.ElasticsearchKibanaURL
AmazonMQURL: !GetAtt MozDefMQ.Outputs.MQURL
AmazonMQUsername: !GetAtt MozDefMQ.Outputs.MQUser
AmazonMQPassword: !GetAtt MozDefMQ.Outputs.MQPassword
Tags:
- Key: application
Value: mozdef