Skip to content

Instantly share code, notes, and snippets.

View ssplatt's full-sized avatar

Brett Taylor ssplatt

  • Picwell
  • Philadelphia, PA
View GitHub Profile
@ssplatt
ssplatt / init.pp
Last active November 1, 2017 17:42
class myapp (){
file { '/opt/serverapp':
ensure => 'directory',
owner => 'myuser',
group => 'myuser'
}
nodejs::npm { 'express from the npm registry':
ensure => 'present',
package => 'express',
Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Nodejs::Npm[my-app] is already declared in file /tmp/kitchen/modules/my-app/manifests/init.pp:106; cannot redeclare at /tmp/kitchen/manifests/site.pp:18 at /tmp/kitchen/manifests/site.pp:18:3 on node 61adc4cc8c42
@ssplatt
ssplatt / common.yaml
Created November 1, 2017 13:35
puppet nodejs module hiera data
nodejs::repo_url_suffix: 6.x
nodejs::npm:
my-custom-app:
ensure: "present"
user: www
target: "/var/www/apps/my-custom-app"
use_package_json: true
@ssplatt
ssplatt / docker-compose.yml
Created October 19, 2017 03:00
znc and eggdrop bot, for irc
version: "3"
services:
znc:
image: znc
volumes:
- /opt/docker-persist/znc:/znc-data
ports:
- 5678:5678
restart: always
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
@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
@ssplatt
ssplatt / docker-compose.yml
Last active March 25, 2025 08:49
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
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
# 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
# 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