2014-11-06 11:06:30 +00:00
|
|
|
#cloud-config
|
|
|
|
|
|
|
|
coreos:
|
2015-03-12 12:16:18 +00:00
|
|
|
fleet:
|
|
|
|
etcd-servers: http://<master-private-ip>:4001
|
|
|
|
metadata: "role=node"
|
2014-11-06 11:06:30 +00:00
|
|
|
units:
|
|
|
|
- name: etcd.service
|
|
|
|
mask: true
|
|
|
|
- name: fleet.service
|
|
|
|
command: start
|
2015-03-13 19:40:25 +00:00
|
|
|
- name: flanneld.service
|
2014-11-06 11:06:30 +00:00
|
|
|
command: start
|
2015-03-13 19:40:25 +00:00
|
|
|
drop-ins:
|
|
|
|
- name: 50-network-config.conf
|
|
|
|
content: |
|
|
|
|
[Service]
|
|
|
|
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
|
|
|
# as we need to turn eth1 as the default interface
|
|
|
|
# https://github.com/coreos/bugs/issues/228 is sorted
|
|
|
|
# see notes in https://github.com/coreos/flannel/pull/137
|
|
|
|
ExecStart=
|
|
|
|
ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \
|
|
|
|
/usr/bin/docker run --net=host --privileged=true --rm \
|
|
|
|
--volume=/run/flannel:/run/flannel \
|
|
|
|
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
|
|
|
|
--env-file=/run/flannel/options.env \
|
|
|
|
--volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \
|
|
|
|
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld -etcd-endpoints http://<master-private-ip>:4001 --ip-masq=true --iface=eth1
|
2014-11-06 11:06:30 +00:00
|
|
|
- name: docker.service
|
|
|
|
command: start
|
2015-03-10 17:10:32 +00:00
|
|
|
drop-ins:
|
|
|
|
- name: 51-docker-mirror.conf
|
|
|
|
content: |
|
|
|
|
[Service]
|
|
|
|
Environment=DOCKER_OPTS='--registry-mirror=http://<master-private-ip>:5000'
|
2014-11-06 11:06:30 +00:00
|
|
|
- name: setup-network-environment.service
|
|
|
|
command: start
|
|
|
|
content: |
|
|
|
|
[Unit]
|
|
|
|
Description=Setup Network Environment
|
|
|
|
Documentation=https://github.com/kelseyhightower/setup-network-environment
|
|
|
|
Requires=network-online.target
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStartPre=-/usr/bin/mkdir -p /opt/bin
|
2015-01-16 11:25:10 +00:00
|
|
|
ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/setup-network-environment
|
2014-11-06 11:06:30 +00:00
|
|
|
ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment
|
|
|
|
ExecStart=/opt/bin/setup-network-environment
|
|
|
|
RemainAfterExit=yes
|
|
|
|
Type=oneshot
|
2014-11-26 00:34:43 +00:00
|
|
|
- name: kube-proxy.service
|
|
|
|
command: start
|
|
|
|
content: |
|
|
|
|
[Unit]
|
|
|
|
Description=Kubernetes Proxy
|
|
|
|
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
|
|
|
Requires=setup-network-environment.service
|
|
|
|
After=setup-network-environment.service
|
|
|
|
|
|
|
|
[Service]
|
2015-02-22 16:08:00 +00:00
|
|
|
ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/kubernetes-release/release/v0.11.0/bin/linux/amd64/kube-proxy
|
2014-11-26 00:34:43 +00:00
|
|
|
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-proxy
|
|
|
|
ExecStart=/opt/bin/kube-proxy \
|
2015-03-09 18:32:16 +00:00
|
|
|
--master=http://<master-private-ip>:8080 \
|
2014-11-26 00:34:43 +00:00
|
|
|
--logtostderr=true
|
|
|
|
Restart=always
|
|
|
|
RestartSec=10
|
2014-11-06 11:06:30 +00:00
|
|
|
- name: kube-kubelet.service
|
|
|
|
command: start
|
|
|
|
content: |
|
|
|
|
[Unit]
|
|
|
|
Description=Kubernetes Kubelet
|
|
|
|
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
|
|
|
Requires=setup-network-environment.service
|
|
|
|
After=setup-network-environment.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
EnvironmentFile=/etc/network-environment
|
2015-02-22 16:08:00 +00:00
|
|
|
ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/kubernetes-release/release/v0.11.0/bin/linux/amd64/kubelet
|
2014-11-06 11:06:30 +00:00
|
|
|
ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet
|
|
|
|
ExecStart=/opt/bin/kubelet \
|
|
|
|
--address=0.0.0.0 \
|
|
|
|
--port=10250 \
|
2015-01-16 11:25:10 +00:00
|
|
|
--hostname_override=$private_ipv4 \
|
2015-02-22 16:08:00 +00:00
|
|
|
--api_servers=<master-private-ip>:8080 \
|
2014-11-06 11:06:30 +00:00
|
|
|
--logtostderr=true
|
|
|
|
Restart=always
|
|
|
|
RestartSec=10
|
|
|
|
update:
|
|
|
|
group: alpha
|
|
|
|
reboot-strategy: off
|