-
Notifications
You must be signed in to change notification settings - Fork 12
/
example.hcl
36 lines (30 loc) · 922 Bytes
/
example.hcl
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
# vim: set ft=hcl :
service "my-service" {
# Use a semaphore to update one machine at a time
sequentialUpdates = true
# Check for updates every 10s
checkInterval = "10s"
# Run this command before update starts
before "script" {
command = "initctl my-service stop"
}
# Artifact defines what repository to use (rackspace) and where
# your artifact live on that repository
artifact "rackspace" {
bucket = "my-container"
path = "my-service.tar.gz"
destination = "./test/dest"
}
# After successful update send an event to graphite
# this allows you to show deploy annotations in tools like grafana
after "graphite-event" {
host = "http://my-graphite-server"
tags = "my-service deployment"
what = "deployed to {{.Hostname}}"
data = "{{.Hash}}"
}
# Run this command after the update finishes
after "script" {
command = "initctl my-service start"
}
}