This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# puppet client part: | |
# create the file /etc/puppet/csr_attributes.yaml with the PSK in it: | |
##--- | |
##extension_requests: | |
## pp_preshared_key: @the_psk@ | |
# puppet master part: | |
## puppet config set --section master autosign /usr/local/bin/autosign-psk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# filename: /etc/hotplug.d/block/10-mount | |
# automatically mount ntfs volumes into $BASEDIR with $LABEL or $UUID, depending on what's available. | |
# to be used with OpenWRT. | |
BASEDIR=/media | |
export PATH=/usr/bin:/usr/sbin:/bin:/sbin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name *.cdn.example.com; | |
set $origin_host 'nothing'; | |
if ( $host ~* ([^.]+\.[^.]+)\.cdn\.example\.com$ ) { | |
set $origin_host $1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All the changes that are fit to print. Droppin’ Mo’ Science 52 All Your IOPS Are Belong To Us: Ernie Souhrada, Database Engineer @ Pinterest - Percona Live MySQL Conference & Expo 2015 Full list of customizations / changes deployed: | |
- Linux kernel 3.18.7 | |
- irqbalance 1.0.8 | |
- RPS enabled | |
- Jemalloc instead of Glibc | |
- Disk IO scheduler = noop | |
- XFS + 64K RAID block size | |
- Mount options: - noatime,nobarrier,discard,inode64,logbsize=256k | |
- my.cnf changes: | |
innodb_max_dirty_pages_pct = 75 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name example.com; | |
root /var/www/example.com; | |
set $origin_host 'origin.example.com'; | |
access_log /var/log/nginx/example.com.access.log main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"datacenter": "dc1", | |
"data_dir": "/var/lib/consul", | |
"bind_addr": "5.6.7.8", | |
"log_level": "INFO", | |
"node_name": "node2", | |
"server": false, | |
"bootstrap" : false, | |
"retry_join": [ "1.2.3.4" ], | |
"rejoin_after_leave": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"services": [ | |
{ "id": "webservice-backup", | |
"name": "webservice", | |
"tags": ["backup"], | |
"port": 80, | |
"checks": [{ | |
"name": "DNS check ", | |
"script": "/usr/lib64/nagios/plugins/negate -s /usr/lib64/nagios/plugins/check_dns -H cdnhealth.service.cdn.example.com.", | |
"interval": "5s", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
fastcgi_cache_path /var/cache/nginx2 levels=1:2 keys_zone=microcache:5m max_size=1000m; | |
log_format cache '$remote_addr - $remote_user [$time_local] "$request" ' '$status $upstream_cache_status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osd_data_size = 6 | |
osd_journal_size = 6 | |
osd_path = '/d02/vagrant/virtualbox-ceph-disks' | |
hosts = { | |
'mon-1' => { | |
'ip' => '10.253.60.151', 'cpus' => 1, 'memory' => 1024, 'autostart' => true, | |
'data_disk_size' => osd_data_size * 1024, 'journal_disk_size' => osd_journal_size * 1024 }, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import re | |
import sys | |
import urllib3 | |
import boto3 | |
CERT_BUCKET_IAM_ROLE = os.environ['CERT_BUCKET_IAM_ROLE'] | |
CERT_BUCKET_NAME = os.environ['CERT_BUCKET_NAME'] |
OlderNewer