Skip to content

Instantly share code, notes, and snippets.

@arthur-c
arthur-c / example-app.yaml
Created January 18, 2018 13:47 — forked from tylerjl/example-app.yaml
Example kubernetes-vault with vaultenv config
apiVersion: v1
kind: ConfigMap
metadata:
name: logstash-secrets
data:
logstash.secrets: |
ELASTICSEARCH_USERNAME=elasticsearch/production#username
ELASTICSEARCH_PASSWORD=elasticsearch/production#password
---
apiVersion: v1
@arthur-c
arthur-c / function.js
Created February 13, 2016 22:24 — forked from vgeshel/function.js
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
#cloud-config
coreos:
update:
reboot-strategy: best-effort
# etcd2:
# initial-cluster: coreos-etcd-01=http://172.31.64.5:2380,coreos-etcd-02=http://172.31.65.5:2380,coreos-etcd-03=http://172.31.66.5:2380
# initial-cluster-token: etcd-cluster-01
# initial-advertise-peer-urls: http://privateip:2380
Jun 10 13:06:03 aws-beta-coreos-04 etcd2[617]: 2015/06/10 13:06:03 discovery: found 1 peer(s), waiting for 2 more
Jun 10 13:06:03 aws-beta-coreos-04 etcd2[617]: 2015/06/10 13:06:03 discovery: found self a9d4237f4663adad in the cluster
Jun 10 13:06:01 aws-beta-coreos-04 systemd[1]: Started Generate /run/coreos/motd.
Jun 10 13:06:01 aws-beta-coreos-04 systemd[1]: Starting Generate /run/coreos/motd...
Jun 10 13:06:01 aws-beta-coreos-04 etcd2[617]: 2015/06/10 13:06:01 discovery: during waiting for other nodes connection to https://discovery.etcd.io timed out, retrying
Jun 10 13:05:43 aws-beta-coreos-04 fleetd[618]: INFO client.go:292: Failed getting response from http://127.0.0.1:2379/: cancelled
Jun 10 13:05:43 aws-beta-coreos-04 fleetd[618]: DEBUG client.go:370: etcd: recv error response from PUT http://127.0.0.1:2379/v2/keys/_coreos.com/fleet/machines/b238488
Jun 10 13:05:42 aws-beta-coreos-04 fleetd[618]: DEBUG client.go:367: etcd: sending HTTP request PUT http://127.0.0.1:2379/v2/keys/_coreos.com/fleet/machi
systemctl restart etcd2^C
aws-beta-coreos-04 ~ # journalctl -u etcd2
-- Logs begin at Wed 2015-06-10 12:54:13 , end at Wed 2015-06-10 12:56:05 . --
Jun 10 12:54:37 aws-beta-coreos-04 systemd[1]: Started etcd2.
Jun 10 12:54:37 aws-beta-coreos-04 systemd[1]: Starting etcd2...
Jun 10 12:54:40 aws-beta-coreos-04 etcd2[617]: 2015/06/10 12:54:40 etcd: listening for peers on http://172.31.28.82:2380
Jun 10 12:54:40 aws-beta-coreos-04 etcd2[617]: 2015/06/10 12:54:40 etcd: listening for client requests on http://0.0.0.0:2379
Jun 10 12:54:40 aws-beta-coreos-04 etcd2[617]: 2015/06/10 12:54:40 etcdserver: datadir is valid for the 2.0.1 format
Jun 10 12:54:41 aws-beta-coreos-04 etcd2[617]: 2015/06/10 12:54:41 discovery: found self 3f0bf881864e2ad6 in the cluster
Jun 10 12:54:41 aws-beta-coreos-04 etcd2[617]: 2015/06/10 12:54:41 discovery: found 1 peer(s), waiting for 2 more
systemctl status etcd2
● etcd2.service - etcd2
Loaded: loaded (/usr/lib64/systemd/system/etcd2.service; static; vendor preset: disabled)
Drop-In: /run/systemd/system/etcd2.service.d
└─10-oem.conf, 20-cloudinit.conf
Active: active (running) since Wed 2015-06-10 12:54:37 ; 1min 9s ago
Main PID: 617 (etcd2)
CGroup: /system.slice/etcd2.service
└─617 /usr/bin/etcd2