Skip to content

Instantly share code, notes, and snippets.

@alunduil
Created July 20, 2014 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alunduil/cd30b07727e96499a381 to your computer and use it in GitHub Desktop.
Save alunduil/cd30b07727e96499a381 to your computer and use it in GitHub Desktop.
#cloud-config
write_files:
- path: /home/core/logentries.sh
permissions: '0744'
owner: root:root
content: |
#/usr/bin/env bash
journalctl -o short -f | awk '{ print "UUID4",$0; fflush(); }' | ncat --ssl --ssl-verify data.logentries.com 20000
coreos:
etcd:
discovery: https://discovery.etcd.io/UUID4
addr: $public_ipv4:4001
peer-addr: $public_ipv4:7001
fleet:
metadata: provider=rackspace,region=dfw
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: logentries.service
command: start
content: |
[Unit]
Description=Forward journal logs to logentries
After=systemd-journald.service
After=systemd-networkd.service
[Service]
Restart=always
ExecStart=/bin/bash /home/core/logentries.sh
[Install]
WantedBy=multi-user.target
update:
group: beta
reboot-strategy: etcd-lock
users:
- name: alunduil
groups:
- sudo
- docker
ssh-authorized-keys:
- ssh-dss KEY alunduil@elijah
# /usr/lib64/systemd/system/etcd.service
[Unit]
Description=etcd
[Service]
User=etcd
PermissionsStartOnly=true
Environment=ETCD_DATA_DIR=/var/lib/etcd ETCD_NAME=default
ExecStart=/usr/bin/etcd
Restart=always
RestartSec=10s
[Install]
WantedBy=multi-user.target
# /run/systemd/system/etcd.service.d/10-oem.conf
[Service]
Environment=ETCD_PEER_ELECTION_TIMEOUT=1200
# /run/systemd/system/etcd.service.d/20-cloudinit.conf
[Service]
Environment="ETCD_DISCOVERY=https://discovery.etcd.io/3a98fcf52d3d647f52af0ff7722fadf2"
Environment="ETCD_ADDR=23.253.125.100:4001"
Environment="ETCD_PEER_ADDR=23.253.125.100:7001"
Environment="ETCD_NAME=af157bdee0f74c93a39e9fd95a7e9c6b"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment