This repository has been archived by the owner on Mar 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgraphite.json
125 lines (108 loc) · 3.89 KB
/
graphite.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"variables": {
"graphite_version": "0.9.10",
"packer_graphite_version": "0.1.0",
"packer_graphite_repo": "http://github.com/ksclarke/packer-graphite",
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
"aws_security_group_id": "{{env `AWS_SECURITY_GROUP_ID`}}",
"aws_region": "{{env `AWS_REGION`}}",
"aws_instance_type": "{{env `AWS_INSTANCE_TYPE`}}",
"aws_source_ami": "{{env `AWS_SOURCE_AMI`}}",
"aws_virtualization_type": "{{env `AWS_VIRTUALIZATION_TYPE`}}",
"digitalocean_image": "{{env `DIGITALOCEAN_IMAGE`}}",
"digitalocean_api_token": "{{env `DIGITALOCEAN_API_TOKEN`}}",
"digitalocean_region": "{{env `DIGITALOCEAN_REGION`}}",
"digitalocean_size": "{{env `DIGITALOCEAN_SIZE`}}",
"server_admin_email": "{{env `PACKER_GRAPHITE_EMAIL`}}",
"server_host_name": "localhost",
"packer_build_name": "{{env `PACKER_GRAPHITE_BUILD_NAME`}}",
"docker_user": "{{env `DOCKER_USER`}}",
"automatic_os_security_updates": "false",
"automatic_os_reboot": "false",
"graphite_admin_password": "",
"graphite_secret_key_password": ""
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"security_group_id": "{{user `aws_security_group_id`}}",
"region": "{{user `aws_region`}}",
"associate_public_ip_address": "true",
"source_ami": "{{user `aws_source_ami`}}",
"instance_type": "{{user `aws_instance_type`}}",
"ami_virtualization_type": "{{user `aws_virtualization_type`}}",
"ssh_username": "ubuntu",
"tags": { "OS_Version": "Ubuntu", "Release": "Graphite {{user `graphite_version`}}" },
"ami_name": "{{user `packer_build_name`}} Graphite [{{timestamp}}]",
"ami_description": "A Graphite deployment built with Packer.io"
},
{
"type": "docker",
"image": "ubuntu:14.04",
"commit": "true",
"pull": "true"
},
{
"type": "digitalocean",
"api_token": "{{user `digitalocean_api_token`}}",
"image": "{{user `digitalocean_image`}}",
"region": "{{user `digitalocean_region`}}",
"size": "{{user `digitalocean_size`}}",
"droplet_name": "graphite-{{user `server_host_name`}}",
"snapshot_name": "{{user `packer_build_name`}} Graphite [{{timestamp}}]"
}
],
"provisioners": [
{
"type": "file",
"except": ["docker"],
"source": "scripts/carbon-cache-initd.sh",
"destination": "/tmp/carbon-cache"
},
{
"type": "shell",
"environment_vars": [
"SERVER_ADMIN_EMAIL={{user `server_admin_email`}}",
"GRAPHITE_SECRET_KEY={{user `graphite_secret_key_password`}}",
"GRAPHITE_ADMIN_PASSWORD={{user `graphite_admin_password`}}"
],
"scripts": [
"scripts/setup-base-system.sh",
"scripts/install-graphite.sh",
"scripts/configure-apache.sh"
]
},
{
"type": "shell",
"except": ["docker"],
"environment_vars": [
"PACKER_GRAPHITE_REPO={{user `packer_graphite_repo`}}",
"SERVER_HOST_NAME={{user `server_host_name`}}",
"SERVER_ADMIN_EMAIL={{user `server_admin_email`}}",
"AUTOMATIC_OS_SECURITY_UPDATES={{user `automatic_os_security_updates`}}",
"AUTOMATIC_OS_REBOOT={{user `automatic_os_reboot`}}"
],
"scripts": [
"scripts/modify-landscape.sh",
"scripts/configure-carbon-cache.sh",
"scripts/configure-base-system.sh"
]
},
{
"type": "shell",
"only": ["docker"],
"script": "scripts/install-supervisor.sh"
}
],
"post-processors": [
{
"type": "docker-tag",
"only": ["docker"],
"repository": "{{user `docker_user`}}/packer-graphite",
"tag": "{{user `packer_graphite_version`}}"
}
]
}