-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer_prometheus.json
executable file
·38 lines (38 loc) · 1.13 KB
/
packer_prometheus.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": "prometheus",
"source_ami": "{{env `CENTOS7_AMI_PRODUCT_CODE`}}"
},
"builders": [
{
"name": "{{user `app_name` }}",
"ami_name": "{{user `app_name` }}-{{timestamp}}",
"ami_description": "A Centos 7 AMI with Prometheus.",
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `aws_region`}}",
"instance_type": "m5.large",
"ssh_username": "centos",
"associate_public_ip_address": "false",
"source_ami": "{{user `source_ami` }}",
"run_tags": { "Name": "packer_{{user `app_name` }}" },
"tags": {
"Name": "packer_prometheus",
"OS Version": "Centos",
"Tool": "Packer",
"Author": "Abhimanyu Narwal"
}
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'",
"scripts": ["scripts/install-prometheus.sh"]
}
]
}