mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-24 04:19:33 +01:00
Use etcd system container on fedora-atomic
* Use the upstream etcd image packaged with the required metadata to be usable as a system container (runc) under systemd
This commit is contained in:
parent
9969c357da
commit
8d7cfc1a45
@ -1,31 +1,5 @@
|
||||
#cloud-config
|
||||
write_files:
|
||||
- path: /etc/systemd/system/etcd-member.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=etcd-member
|
||||
Documentation=https://github.com/coreos/etcd
|
||||
Wants=network-online.target network.target
|
||||
After=network-online.target
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/etcd/etcd.conf
|
||||
ExecStartPre=/bin/mkdir -p /var/lib/etcd
|
||||
ExecStart=/usr/bin/docker run --rm --name etcd-member \
|
||||
--net=host \
|
||||
-v /etc/pki/tls/certs:/usr/share/ca-certificates:ro,z \
|
||||
-v /etc/ssl/etcd:/etc/ssl/certs:ro,Z \
|
||||
-v /var/lib/etcd:/var/lib/etcd:Z \
|
||||
--env-file=/etc/etcd/etcd.conf \
|
||||
quay.io/coreos/etcd:v3.3.3
|
||||
ExecStop=/usr/bin/docker stop etcd-member
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
TimeoutStartSec=0
|
||||
LimitNOFILE=40000
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
- path: /etc/etcd/etcd.conf
|
||||
content: |
|
||||
ETCD_NAME=${etcd_name}
|
||||
@ -134,11 +108,11 @@ bootcmd:
|
||||
- [setenforce, Permissive]
|
||||
runcmd:
|
||||
- [systemctl, daemon-reload]
|
||||
- [systemctl, enable, etcd-member.service]
|
||||
- [systemctl, start, --no-block, etcd-member.service]
|
||||
- [systemctl, disable, firewalld, --now]
|
||||
- "atomic install --system --name=etcd quay.io/dghubble/etcd:99f87f9245ef2b2104fe2fc3550c21327b5a980f"
|
||||
- [systemctl, start, --no-block, etcd.service]
|
||||
- [systemctl, enable, kubelet.service]
|
||||
- [systemctl, start, --no-block, kubelet.service]
|
||||
- [systemctl, disable, firewalld, --now]
|
||||
users:
|
||||
- default
|
||||
- name: fedora
|
||||
|
@ -1,31 +1,5 @@
|
||||
#cloud-config
|
||||
write_files:
|
||||
- path: /etc/systemd/system/etcd-member.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=etcd-member
|
||||
Documentation=https://github.com/coreos/etcd
|
||||
Wants=network-online.target network.target
|
||||
After=network-online.target
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/etcd/etcd.conf
|
||||
ExecStartPre=/bin/mkdir -p /var/lib/etcd
|
||||
ExecStart=/usr/bin/docker run --rm --name etcd-member \
|
||||
--net=host \
|
||||
-v /etc/pki/tls/certs:/usr/share/ca-certificates:ro,z \
|
||||
-v /etc/ssl/etcd:/etc/ssl/certs:ro,Z \
|
||||
-v /var/lib/etcd:/var/lib/etcd:Z \
|
||||
--env-file=/etc/etcd/etcd.conf \
|
||||
quay.io/coreos/etcd:v3.3.3
|
||||
ExecStop=/usr/bin/docker stop etcd-member
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
TimeoutStartSec=0
|
||||
LimitNOFILE=40000
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
- path: /etc/etcd/etcd.conf
|
||||
content: |
|
||||
ETCD_NAME=${etcd_name}
|
||||
@ -131,8 +105,8 @@ bootcmd:
|
||||
- [setenforce, Permissive]
|
||||
runcmd:
|
||||
- [systemctl, daemon-reload]
|
||||
- [systemctl, enable, etcd-member.service]
|
||||
- [systemctl, start, --no-block, etcd-member.service]
|
||||
- "atomic install --system --name=etcd quay.io/dghubble/etcd:99f87f9245ef2b2104fe2fc3550c21327b5a980f"
|
||||
- [systemctl, start, --no-block, etcd.service]
|
||||
- [hostnamectl, set-hostname, ${domain_name}]
|
||||
- [systemctl, enable, kubelet.path]
|
||||
- [systemctl, start, --no-block, kubelet.path]
|
||||
|
@ -1,31 +1,5 @@
|
||||
#cloud-config
|
||||
write_files:
|
||||
- path: /etc/systemd/system/etcd-member.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=etcd-member
|
||||
Documentation=https://github.com/coreos/etcd
|
||||
Wants=network-online.target network.target
|
||||
After=network-online.target
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/etcd/etcd.conf
|
||||
ExecStartPre=/bin/mkdir -p /var/lib/etcd
|
||||
ExecStart=/usr/bin/docker run --rm --name etcd-member \
|
||||
--net=host \
|
||||
-v /etc/pki/tls/certs:/usr/share/ca-certificates:ro,z \
|
||||
-v /etc/ssl/etcd:/etc/ssl/certs:ro,Z \
|
||||
-v /var/lib/etcd:/var/lib/etcd:Z \
|
||||
--env-file=/etc/etcd/etcd.conf \
|
||||
quay.io/coreos/etcd:v3.3.3
|
||||
ExecStop=/usr/bin/docker stop etcd-member
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
TimeoutStartSec=0
|
||||
LimitNOFILE=40000
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
- path: /etc/etcd/etcd.conf
|
||||
content: |
|
||||
ETCD_NAME=${etcd_name}
|
||||
@ -57,6 +31,8 @@ write_files:
|
||||
--retry 10)\nDIGITALOCEAN_IPV4_PRIVATE_0=$(curl\
|
||||
--url http://169.254.169.254/metadata/v1/interfaces/private/0/ipv4/address\
|
||||
--retry 10)" > $${OUTPUT}'
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
- path: /etc/systemd/system/kubelet.service
|
||||
content: |
|
||||
[Unit]
|
||||
@ -147,8 +123,8 @@ bootcmd:
|
||||
- [setenforce, Permissive]
|
||||
runcmd:
|
||||
- [systemctl, daemon-reload]
|
||||
- [systemctl, enable, etcd-member.service]
|
||||
- [systemctl, start, --no-block, etcd-member.service]
|
||||
- "atomic install --system --name=etcd quay.io/dghubble/etcd:99f87f9245ef2b2104fe2fc3550c21327b5a980f"
|
||||
- [systemctl, start, --no-block, etcd.service]
|
||||
- [systemctl, enable, cloud-metadata.service]
|
||||
- [systemctl, enable, kubelet.path]
|
||||
- [systemctl, start, --no-block, kubelet.path]
|
||||
|
@ -13,6 +13,8 @@ write_files:
|
||||
--retry 10)\nDIGITALOCEAN_IPV4_PRIVATE_0=$(curl\
|
||||
--url http://169.254.169.254/metadata/v1/interfaces/private/0/ipv4/address\
|
||||
--retry 10)" > $${OUTPUT}'
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
- path: /etc/systemd/system/kubelet.service
|
||||
content: |
|
||||
[Unit]
|
||||
|
Loading…
Reference in New Issue
Block a user