mirror of https://github.com/easzlab/kubeasz.git
33 lines
1.0 KiB
Django/Jinja
33 lines
1.0 KiB
Django/Jinja
[Unit]
|
|
Description=Etcd Server
|
|
After=network.target
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
Documentation=https://github.com/coreos
|
|
|
|
[Service]
|
|
Type=notify
|
|
WorkingDirectory=/var/lib/etcd/
|
|
ExecStart={{ bin_dir }}/etcd \
|
|
--name={{ NODE_NAME }} \
|
|
--cert-file=/etc/etcd/ssl/etcd.pem \
|
|
--key-file=/etc/etcd/ssl/etcd-key.pem \
|
|
--peer-cert-file=/etc/etcd/ssl/etcd.pem \
|
|
--peer-key-file=/etc/etcd/ssl/etcd-key.pem \
|
|
--trusted-ca-file={{ ca_dir }}/ca.pem \
|
|
--peer-trusted-ca-file={{ ca_dir }}/ca.pem \
|
|
--initial-advertise-peer-urls=https://{{ inventory_hostname }}:2380 \
|
|
--listen-peer-urls=https://{{ inventory_hostname }}:2380 \
|
|
--listen-client-urls=https://{{ inventory_hostname }}:2379,http://127.0.0.1:2379 \
|
|
--advertise-client-urls=https://{{ inventory_hostname }}:2379 \
|
|
--initial-cluster-token=etcd-cluster-0 \
|
|
--initial-cluster={{ ETCD_NODES }} \
|
|
--initial-cluster-state={{ CLUSTER_STATE }} \
|
|
--data-dir=/var/lib/etcd
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
LimitNOFILE=65536
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|