diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2018-09-18 16:27:27 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-09-25 17:40:49 -0400 |
commit | daaecc315c96f6757a20ca5979c7889c0df02ec9 (patch) | |
tree | 69fc4ddff707d3469b365d7b83e32f57efbe1640 /recipes-connectivity/consul/files/consul.service | |
parent | 492de1f32fc0053b692e3173ea6d3d19052f7c97 (diff) | |
download | meta-cloud-services-daaecc315c96f6757a20ca5979c7889c0df02ec9.tar.gz |
consul: consule-migrate: move from meta-overc
After several requests to make the consul recipe available outside of
meta-overc and the OverC framework we are moving the consul recipes
here. These are a copy from meta-overc (HEAD 6afe8d2c12ac).
NOTE that not all the DEPENDS have been copied as we will follow this
commit with work to make use of SRC_URIs for dependencies. See the
associated commit(s) which will follow this one.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-connectivity/consul/files/consul.service')
-rw-r--r-- | recipes-connectivity/consul/files/consul.service | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/recipes-connectivity/consul/files/consul.service b/recipes-connectivity/consul/files/consul.service new file mode 100644 index 0000000..c9494e3 --- /dev/null +++ b/recipes-connectivity/consul/files/consul.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Launch Consul Cluster | ||
3 | |||
4 | [Service] | ||
5 | Restart=on-failure | ||
6 | RestartSec=45 | ||
7 | ExecStartPre=/bin/sh -c 'echo -ne \'{"data_dir":\"/var/consul","server":true,"bootstrap_expect":1,\' > /tmp/consul.conf' | ||
8 | ExecStartPre=/bin/sh -c 'echo -ne \'"bind_addr":"\'$(ifconfig br0 | awk \'/inet addr/{print substr($2,6)}\')\'"}\' >> /tmp/consul.conf' | ||
9 | ExecStart=/usr/bin/consul agent -config-file=/tmp/consul.conf | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=multi-user.target | ||