Skip to content

Instantly share code, notes, and snippets.

@ajeddeloh
Last active July 9, 2019 23:11
Show Gist options
  • Save ajeddeloh/bfb7a02f7882cb8ad9589080ac5df68d to your computer and use it in GitHub Desktop.
Save ajeddeloh/bfb7a02f7882cb8ad9589080ac5df68d to your computer and use it in GitHub Desktop.
variant: fcos
version: 1.0.0
systemd:
units:
- name: etcd-member.service
enabled: true
contents: |
[Unit]
Description=Run single node etcd
[Service]
ExecStartPre=mkdir -p /var/lib/etcd
ExecStartPre=-/bin/podman kill etcd
ExecStartPre=-/bin/podman rm etcd
ExecStartPre=-/bin/podman pull quay.io/coreos/etcd
ExecStart=/bin/podman run --name etcd --volume /var/lib/etcd:/etcd-data:z --net=host quay.io/coreos/etcd:latest /usr/local/bin/etcd --data-dir /etcd-data --name node1 \
--initial-advertise-peer-urls http://127.0.0.1:2380 --listen-peer-urls http://127.0.0.1:2380 \
--advertise-client-urls http://127.0.0.1:2379 \
--listen-client-urls http://127.0.0.1:2379 \
--initial-cluster node1=http://127.0.0.1:2380
ExecStop=/bin/podman stop etcd
[Install]
WantedBy=multi-user.target
- name: serial-getty@ttyS0.service
dropins:
- name: autologin.conf
contents: |
[Service]
TTYVTDisallocate=no
ExecStart=
ExecStart=-/usr/sbin/agetty --autologin core --noclear %I $TERM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment