Skip to content

Instantly share code, notes, and snippets.

View ssplatt's full-sized avatar

Brett Taylor ssplatt

  • Picwell
  • Philadelphia, PA
View GitHub Profile
beacons:
inotify:
- /sys/block:
mask:
- create
- delete
auto_add: True
- disable_during_state_run: True
network_settings:
- eth*:
@ssplatt
ssplatt / _test_curls.sh
Last active August 25, 2020 13:55
saltstack api based reactors and orchestration to configure and cleanup pxe install files. similar to The Foreman.
#########
# setup
########
curl -sSk https://192.168.50.2:8000/hook/pxe_setup \
-H 'Content-type: application/json' \
-H 'X-Salt-API-Key: testsecret' \
-d '{
"id": "myhost01",
"dc_id": "vagrant",
local:
beacons:
inotify:
/dev:
auto_add: true
exclude:
- \/dev\/(?!sd)\w+:
regex: true
- \/dev\/sd\w+\d:
regex: true
$DefaultNetstreamDriver gtls
$DefaultNetstreamDriverCAFile /etc/ssl/cacert.pem
$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog.crt
$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog.key
$ActionSendStreamDriverMode 1
$ActionSendStreamDriverAuthMode x509/certvalid
$PreserveFQDN on
# rbd info rbd-images/360 --debug-rbd=20 --debug-ms=1
2017-06-06 09:08:02.553941 7ffba03ef000 1 Processor -- start
2017-06-06 09:08:02.554092 7ffba03ef000 1 -- - start start
2017-06-06 09:08:02.554475 7ffba03ef000 1 -- - --> 10.0.0.10:6789/0 -- auth(proto 0 30 bytes epoch 0) v1 -- 0x55a973f9f140 con 0
2017-06-06 09:08:02.554662 7ffb89bdb700 1 -- 10.0.0.10:0/999315689 learned_addr learned my addr 10.0.0.10:0/999315689
2017-06-06 09:08:02.555152 7ffb7bfff700 1 -- 10.0.0.10:0/999315689 <== mon.1 10.0.0.10:6789/0 1 ==== mon_map magic: 0 v1 ==== 418+0+0 (2163738294 0 0) 0x7ffb7c002120 con 0x55a973fa5860
2017-06-06 09:08:02.555218 7ffb7bfff700 1 -- 10.0.0.10:0/999315689 <== mon.1 10.0.0.10:6789/0 2 ==== auth_reply(proto 2 0 (0) Success) v1 ==== 33+0+0 (2872788003 0 0) 0x7ffb7c002610 con 0x55a973fa5860
2017-06-06 09:08:02.555307 7ffb7bfff700 1 -- 10.0.0.10:0/999315689 --> 10.0.0.10:6789/0 -- auth(proto 2 32 bytes epoch 0) v1 -- 0x7ffb70001780 con 0
2017-06-06 09:08:02.555775 7ffb7bfff700 1 -- 10.0.0.10:0/99
# vim: ft=yaml
---
driver:
name: docker
use_sudo: false
#dockerfile: test/Dockerfile
image: ssplatt/systemd_jessie
provision_command:
- printf "UseDNS=no\nUsePAM=no\nPasswordAuthentication=yes\nUsePrivilegeSeparation=no\nPidFile=/tmp/sshd.pid" > /etc/ssh/sshd_config
- systemctl enable ssh
@ssplatt
ssplatt / docker-compose.yml
Created September 27, 2017 02:06
docker - owncloud with letsencrypt, mariadb, and redis
owncloud:
image: owncloud
links:
- mariadb:mysql
- redis:redis
ports:
- 8081:80
volumes:
- /opt/docker-persist/owncloud/apps:/var/www/html/apps
- /opt/docker-persist/owncloud/config:/var/www/html/config
@ssplatt
ssplatt / docker-compose.yml
Last active June 6, 2025 13:59
docker - prometheus with snmp_exporter, node_exporter, and cadvisor
version: "3"
services:
prometheus:
image: prom/prometheus
volumes:
- /opt/docker-persist/prometheus/data:/prometheus-data
ports:
- 9090:9090
restart: always
command: --config.file=/prometheus-data/prometheus.yml
@ssplatt
ssplatt / docker-compose.yml
Last active November 16, 2017 17:57
docker - consul + registrator for service discovery
version: "3"
services:
consul:
image: consul
restart: always
network_mode: host
volumes:
- /opt/docker-persist/consul/:/consul/data
command:
- agent
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11557 ceph 20 0 5378952 4.345g 28172 S 6.6 6.9 34:04.63 ceph-osd
12621 ceph 20 0 5790328 4.725g 27940 S 6.3 7.5 35:55.15 ceph-osd
9337 ceph 20 0 5773528 4.695g 28056 S 4.0 7.5 36:55.83 ceph-osd
11334 ceph 20 0 6068616 5.006g 28024 S 4.0 8.0 46:23.38 ceph-osd
7339 ceph 20 0 5838060 4.786g 27884 S 3.3 7.6 39:39.78 ceph-osd
11811 ceph 20 0 5520708 4.490g 28040 S 3.3 7.1 32:40.49 ceph-osd
12286 ceph 20 0 5491664 4.414g 28168 S 3.3 7.0 31:55.85 ceph-osd
9124 ceph 20 0 5820576 4.769g 28248 S 3.0 7.6 35:34.35 ceph-osd
7975 ceph 20 0 5658248 4.607g 27976 S 2.6 7.3 34:59.51 ceph-osd