Initial vagrant setup and e2e testing support

This commit is contained in:
derekwaynecarr
2014-07-14 13:50:04 -04:00
parent 41eb15bcff
commit 69ae2fe4bb
43 changed files with 1268 additions and 370 deletions

View File

@@ -0,0 +1,2 @@
{% set hostname = grains.host %}
DAEMON_ARGS="-peer-addr {{hostname}}:7001 -name {{hostname}}"

View File

@@ -0,0 +1,11 @@
[Unit]
Description=etcd
Documentation=https://github.com/coreos/etcd
[Service]
Type=simple
EnvironmentFile=/etc/default/etcd
ExecStart=/usr/local/bin/etcd $DAEMON_ARGS
[Install]
WantedBy=multi-user.target

View File

@@ -46,6 +46,24 @@ etcd:
- group: etcd
- dir_mode: 700
{% if grains['os_family'] == 'RedHat' %}
/etc/default/etcd:
file.managed:
- source: salt://etcd/default
- template: jinja
- user: root
- group: root
- mode: 644
/usr/lib/systemd/system/etcd.service:
file.managed:
- source: salt://etcd/etcd.service
- user: root
- group: root
{% else %}
/etc/init.d/etcd:
file.managed:
- source: salt://etcd/initd
@@ -53,11 +71,17 @@ etcd:
- group: root
- mode: 755
{% endif %}
etcd-service:
service.running:
- name: etcd
- enable: True
- watch:
- file: /etc/etcd/etcd.conf
{% if grains['os_family'] == 'RedHat' %}
- file: /usr/lib/systemd/system/etcd.service
- file: /etc/default/etcd
{% endif %}
- cmd: etcd-install