From daaecc315c96f6757a20ca5979c7889c0df02ec9 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Tue, 18 Sep 2018 16:27:27 -0400 Subject: 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 Signed-off-by: Bruce Ashfield --- recipes-connectivity/consul/files/consul.service | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 recipes-connectivity/consul/files/consul.service (limited to 'recipes-connectivity/consul/files/consul.service') 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 @@ +[Unit] +Description=Launch Consul Cluster + +[Service] +Restart=on-failure +RestartSec=45 +ExecStartPre=/bin/sh -c 'echo -ne \'{"data_dir":\"/var/consul","server":true,"bootstrap_expect":1,\' > /tmp/consul.conf' +ExecStartPre=/bin/sh -c 'echo -ne \'"bind_addr":"\'$(ifconfig br0 | awk \'/inet addr/{print substr($2,6)}\')\'"}\' >> /tmp/consul.conf' +ExecStart=/usr/bin/consul agent -config-file=/tmp/consul.conf + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-54-g00ecf