Skip to content

Commit

Permalink
Validation and pre-shutdown containers added to DM (CiscoCloud#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeynap authored and stephenrlouie committed Feb 21, 2017
1 parent d91ba48 commit e1c3590
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/dir-sot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ ServerClient:
Port: 24601
InsecureSkipVerify: true
SavePath: "/var/vaquero"
LocalDir:
PollInterval: 1
Etcd:
Endpoints:
- "http://10.10.10.5:2379"
- "http://10.10.10.6:2379"
- "http://10.10.10.7:2379"
Timeout: 5
Retry: 3
LocalDir:
PollInterval: 1
SoT:
- Local:
ID: vaquero-local
Expand Down
15 changes: 14 additions & 1 deletion local/assets/cloud-config/coreos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#cloud-config
coreos:

update:
group: stable
reboot-strategy: off
Expand All @@ -15,6 +14,20 @@ coreos:
{{ end }}

units:
- name: checkpoint.service
command: start
content: |
[Unit]
Description=CoreOS (Re)Provision
Author=Vaquero
[Service]
ExecStart=/usr/bin/curl {{ Checkpoint }}
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
- name: etcd2.service
command: start
- name: fleet.service
Expand Down
9 changes: 9 additions & 0 deletions local/assets/ignition/etcd-proxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
systemd:
units:
- name: checkpoint.service
enable: true
contents: |
[Service]
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/curl -vvv {{ Checkpoint }}
[Install]
WantedBy=multi-user.target
- name: etcd2.service
enable: true
dropins:
Expand Down
10 changes: 10 additions & 0 deletions local/assets/ignition/etcd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
---
systemd:
units:
- name: checkpoint.service
enable: true
contents: |
[Service]
ExecStart=/usr/bin/curl -vvv {{ Checkpoint }}
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
- name: etcd2.service
enable: true
dropins:
Expand Down
16 changes: 16 additions & 0 deletions local/boot/coreos-cloudconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,19 @@ unattended:

metadata:
root_pass: $1$De/uvwHY$77ZDxv9lNwZJbwFziq4Ix0

before_shutdown:
- image: busybox
pull: yes
commands:
- /bin/ls
retry: 0
timeout: 60

validate:
- image: busybox
pull: yes
commands:
- "[ -e /etc ]"
retry: 0
timeout: 60
16 changes: 16 additions & 0 deletions local/boot/coreos-ignition-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,19 @@ unattended:
metadata:
fleet_role: etcd
root_pass: $1$De/uvwHY$77ZDxv9lNwZJbwFziq4Ix0

before_shutdown:
- image: busybox
pull: yes
commands:
- /bin/ls
retry: 0
timeout: 60

validate:
- image: busybox
pull: yes
commands:
- /bin/sh -c "[ -e /etc ]"
retry: 0
timeout: 60
8 changes: 6 additions & 2 deletions local/sites/test-site/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ name: etcd3
interfaces:
- type: physical
subnet: vagrant1
mac: 00:00:00:00:00:23
ipv4: 10.10.10.23
bmc:
type: ssh
username: core
keypath: /vagrant/provision_files/id_rsa
mac: 00:00:00:00:00:23
ipv4: 10.10.10.23
metadata:
mstr: etcd3
role: kube-master
Expand Down Expand Up @@ -130,6 +130,10 @@ interfaces:
subnet: vagrant1
mac: 00:00:00:00:00:41
ipv4: 10.10.10.41
bmc:
type: ssh
username: core
keypath: /vagrant/provision_files/id_rsa
metadata:
name: centos1
ip: 10.10.10.41
Expand Down

0 comments on commit e1c3590

Please sign in to comment.