Skip to content

Instantly share code, notes, and snippets.

View uzyexe's full-sized avatar
🏠
Working from home

Shuji Yamada uzyexe

🏠
Working from home
  • Periplous / SAKURA internet
  • Asia/Tokyo
  • X @uzyexe
View GitHub Profile
coreos:
units:
- name: docker.service
command: restart
content: |
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.io
[Service]
@uzyexe
uzyexe / kickstart-for-pxeboot-coreos
Last active January 16, 2018 01:57
Kickstart default PXElinux for coreos
default coreos
prompt 1
timeout 15
display boot.msg
label coreos
menu default
kernel http://<your_server_name>/coreos_production_pxe.vmlinuz
append initrd=http://<your_server_name>/coreos_production_pxe_image.cpio.gz cloud-config-url=http://<your_server_name>/cloud-config.yml
coreos:
units:
- name: newrelic.service
command: start
content: |
[Unit]
Description=newrelic
Requires=docker.service
After=docker.service
@uzyexe
uzyexe / logentires-cloud-config.yml
Last active August 29, 2015 14:02
cloud-config.yml: Sending your CoreOS data to Logentries
coreos:
units:
- name: logentries.service
command: start
content: |
[Unit]
Description=logentires.service
[Service]
Environment=ACCESS_TOKEN=YOUR_LOGENTRIES_ACCESS_TOKEN
@uzyexe
uzyexe / logentires-systemd
Last active June 4, 2018 20:42
systemd: Sending your CoreOS data to Logentries
[Unit]
Description=logentires.service
[Service]
Environment=ACCESS_TOKEN=YOUR_LOGENTRIES_ACCESS_TOKEN
ExecStart=/bin/sh -c 'journalctl -o short -f | sed \"s/^/${ACCESS_TOKEN} \\0/g\" | ncat data.logentries.com 10000'
@uzyexe
uzyexe / systemctl-start-logentires
Last active August 29, 2015 14:02
sudo systemctl start logentries
sudo systemctl start logentries
@uzyexe
uzyexe / towncrier-install-rhel.sh
Last active August 29, 2015 14:03
towncrier::install
yum install -y perl-devel libxml2-devel
git clone https://github.com/robn/towncrier.git
cd towncrier
curl -L http://cpanmin.us | perl - Carton
carton install
cpanm Task::Plack
@uzyexe
uzyexe / gist:38dbc63da8f493dde857
Created July 14, 2014 14:39
towncrier-auth-config.yml
plugins:
"Auth::Basic":
paths:
"/admin/api":
realm: api
user: admin <= YOUR_USERNAME
password: secret <= YOUR_PASSWORD
@uzyexe
uzyexe / towncrier-fixtures.sh
Created July 14, 2014 14:55
towncrier-fixtures.sh
#!/bin/sh
PORT=5000
AUTH=admin:secret
# Create statuses
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/statuses -F name=Up -F description='The service is operating normally' -F icon=ok-sign
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/statuses -F name=Down -F description='The service is unavailable' -F icon=remove-sign
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/statuses -F name=Warning -F description='The service is operating in a degraded capacity' -F icon=warning-sign
PORT=5000
AUTH=admin:secret
curl -u $AUTH -i http://localhost:$PORT/admin/api/v1/services/first/events -F status=down -F message="oh my god."