Skip to content

Commit

Permalink
simplify fleet invocation across CoreOS cloud-configs.
Browse files Browse the repository at this point in the history
Signed-off-by: António Meireles <antonio.meireles@reformi.st>
  • Loading branch information
AntonioMeireles committed Mar 13, 2015
1 parent d6be298 commit b5a50ca
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 65 deletions.
24 changes: 3 additions & 21 deletions docs/getting-started-guides/aws/cloud-configs/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ write_files:
#! /usr/bin/bash
until curl http://127.0.0.1:4001/v2/machines; do sleep 2; done
coreos:
fleet:
etcd-servers: http://localhost:4001
metadata: "role=master"
units:
- name: setup-network-environment.service
command: start
Expand Down Expand Up @@ -48,27 +51,6 @@ coreos:
--snapshot true
Restart=always
RestartSec=10s
- name: fleet.socket
command: start
content: |
[Socket]
ListenStream=/var/run/fleet.sock
- name: fleet.service
command: start
content: |
[Unit]
Description=fleet daemon
Wants=etcd.service
After=etcd.service
Wants=fleet.socket
After=fleet.socket
[Service]
Environment="FLEET_ETCD_SERVERS=http://127.0.0.1:4001"
Environment="FLEET_METADATA=role=master"
ExecStart=/usr/bin/fleetd
Restart=always
RestartSec=10s
- name: etcd-waiter.service
command: start
content: |
Expand Down
15 changes: 3 additions & 12 deletions docs/getting-started-guides/aws/cloud-configs/node.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
#cloud-config

coreos:
fleet:
etcd-servers: http://<master-private-ip>:4001
metadata: "role=node"
units:
- name: etcd.service
mask: true
- name: fleet.service
command: start
content: |
[Unit]
Description=fleet daemon
Wants=fleet.socket
After=fleet.socket
[Service]
Environment="FLEET_ETCD_SERVERS=http://<master-private-ip>:4001"
Environment="FLEET_METADATA=role=node"
ExecStart=/usr/bin/fleetd
Restart=always
RestartSec=10s
- name: flannel.service
command: start
content: |
Expand Down
24 changes: 4 additions & 20 deletions docs/getting-started-guides/coreos/cloud-configs/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ write_files:
#! /usr/bin/bash
until curl http://127.0.0.1:4001/v2/machines; do sleep 2; done
coreos:
fleet:
etcd-servers: http://localhost:4001
metadata: "role=master"
units:
- name: setup-network-environment.service
command: start
Expand Down Expand Up @@ -48,27 +51,8 @@ coreos:
--snapshot true
Restart=always
RestartSec=10s
- name: fleet.socket
command: start
content: |
[Socket]
ListenStream=/var/run/fleet.sock
- name: fleet.service
command: start
content: |
[Unit]
Description=fleet daemon
Wants=etcd.service
After=etcd.service
Wants=fleet.socket
After=fleet.socket
[Service]
Environment="FLEET_ETCD_SERVERS=http://127.0.0.1:4001"
Environment="FLEET_METADATA=role=master"
ExecStart=/usr/bin/fleetd
Restart=always
RestartSec=10s
- name: etcd-waiter.service
command: start
content: |
Expand Down Expand Up @@ -159,7 +143,7 @@ coreos:
--logtostderr=true
Restart=always
RestartSec=10
- name: kube-controller-manager.service
- name: kube-controller-manager.service
command: start
content: |
[Unit]
Expand Down
15 changes: 3 additions & 12 deletions docs/getting-started-guides/coreos/cloud-configs/node.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
#cloud-config

coreos:
fleet:
etcd-servers: http://<master-private-ip>:4001
metadata: "role=node"
units:
- name: etcd.service
mask: true
- name: fleet.service
command: start
content: |
[Unit]
Description=fleet daemon
Wants=fleet.socket
After=fleet.socket
[Service]
Environment="FLEET_ETCD_SERVERS=http://<master-private-ip>:4001"
Environment="FLEET_METADATA=role=node"
ExecStart=/usr/bin/fleetd
Restart=always
RestartSec=10s
- name: flannel.service
command: start
content: |
Expand Down

0 comments on commit b5a50ca

Please sign in to comment.