-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer_sonarqube.json
38 lines (38 loc) · 1.3 KB
/
packer_sonarqube.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"aws_region": "us-east-1",
"app_name": "sonarqube",
"source_ami": "{{env `DOCKER_AMI`}}"
},
"builders": [
{
"name": "{{user `app_name` }}",
"ami_name": "{{user `app_name` }}-{{timestamp}}",
"ami_description": "Docker-CE AMI with SonarQube",
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `aws_region`}}",
"instance_type": "t2.micro",
"ssh_username": "centos",
"associate_public_ip_address": "false",
"source_ami": "{{user `source_ami` }}",
"run_tags": { "Name": "packer_{{user `app_name` }}" },
"tags": {
"Name": "packer_sonarqube",
"OS Version": "Centos",
"Tool": "Packer",
"Author": "Eric MacFarland"
}
}
],
"provisioners": [
{
"type": "shell",
"pause_before": "10s",
"scripts": ["scripts/install-sonarqube.sh", "scripts/ensure-elasticsearch-compatibility.sh"]
}
]
}