mirror of https://github.com/MISP/misp-cloud
55 lines
1.6 KiB
JSON
55 lines
1.6 KiB
JSON
{
|
|
"variables": {
|
|
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
|
|
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
|
|
"destination_regions": "eu-west-1,eu-west-2,eu-west-3,eu-central-1,us-east-1,us-west-1,ap-northeast-1,sa-east-1,us-west-2",
|
|
"hostname": "misp"
|
|
},
|
|
"builders": [{
|
|
"type": "amazon-ebs",
|
|
"access_key": "{{user `aws_access_key`}}",
|
|
"secret_key": "{{user `aws_secret_key`}}",
|
|
"region": "eu-west-1",
|
|
"ami_groups": "all",
|
|
"source_ami_filter": {
|
|
"filters": {
|
|
"virtualization-type": "hvm",
|
|
"name": "ubuntu/images/*ubuntu-bionic-18.04-amd64-server-*",
|
|
"root-device-type": "ebs"
|
|
},
|
|
"owners": ["099720109477"],
|
|
"most_recent": true
|
|
},
|
|
"instance_type": "t2.medium",
|
|
"ami_regions": "{{user `destination_regions`}}",
|
|
"ssh_username": "ubuntu",
|
|
"ami_name": "MISP-{{timestamp}}",
|
|
"ami_description": "MISP - Malware Information Sharing Platform",
|
|
"tags": {
|
|
"Amazon_AMI_Management_Identifier": "misp-build"
|
|
}
|
|
}],
|
|
"provisioners": [
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
|
"inline":[
|
|
"echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
|
"script": "/home/ubuntu/misp/bootstrap",
|
|
"pause_before": "10s"
|
|
}
|
|
],
|
|
"post-processors":[{
|
|
"type": "amazon-ami-management",
|
|
"regions": "{{user `destination_regions`}}",
|
|
"identifier": "misp-build",
|
|
"keep_releases": "1"
|
|
}
|
|
]
|
|
}
|