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
# Remote Gateway Node to Login to App Servers - 192.168.1.1 | |
Host app_proxy1 | |
Hostname 192.168.1.1 | |
LocalForward 8080 192.168.1.100:8080 | |
LocalForward 8081 192.168.1.101:8080 | |
LocalForward 8082 192.168.1.102:8080 | |
Host app_proxy2 | |
Hostname 192.168.1.1 | |
LocalForward 8090 192.168.1.100:8081 |
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
## Client: | |
# Environment Variables to Forward to Remote Host | |
# .ssh/config | |
SendEnv VARIABLE1 | |
SendEnv VARIABLE2 | |
.. | |
SendEnv VARIABLEn |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'optparse' | |
o = {} | |
OptionParser.new do |opts| | |
opts.on("-h", "--help", "help") { |h| o[:help] = 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
* git[/opt/git_sync] action sync | |
================================================================================ | |
Error executing action `sync` on resource 'git[/opt/git_sync]' | |
================================================================================ | |
Mixlib::ShellOut::ShellCommandFailed | |
------------------------------------ | |
Expected process to exit with [0], but received '1' | |
---- Begin output of git ls-remote "[email protected]:GITHUB_ACCOUNT/REPOSITORY.git" GITHUB_TAG* ---- |
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
syntax enable | |
set encoding=utf-8 | |
filetype plugin indent on " load file type plugins + indentation | |
set nowrap " don't wrap lines | |
set expandtab " use spaces, not tabs (optional) | |
set backspace=indent,eol,start " backspace through everything in insert mode | |
set ignorecase " searches are case insensitive... | |
set smartcase " ... unless they contain at least one capital letter | |
set nocompatible " Use vim defaults | |
set ls=2 " Always show status line |
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
{ | |
"default_attributes": { | |
"sysctl": { | |
"params": { | |
"fs": { | |
"file-max": "100000" | |
}, | |
"net": { | |
"ipv4": { | |
"ip_local_port_range": "11000 65000", |
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
global | |
log 127.0.0.1 local1 | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 350000 | |
user haproxy | |
group haproxy | |
nbproc 2 | |
cpu-map 1 0 | |
cpu-map 2 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
# Install Packages | |
yum install kernel-headers kernel-devel # reboot instance if possible | |
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel patch telnet mdadm nfs-utils openssl-devel git libxml2 libxml2-devel libxslt libxslt-devel wget libtool pkgconfig nasm | |
# Set ENV Variables | |
export PATH=$PATH:/usr/local/bin | |
export FMP=/usr/local | |
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig |
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
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'json' | |
require 'date' | |
enable = true # set to false for dry run | |
retention_days = 30 # retention period | |
today_date = Date.today | |
deleted_any = false |
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
response=$(cat -) | |
payload=$(echo $response | sed -e 's/^.*"Payload":"\([^"]*\)".*$/\1/') | |
# action string "runme" == byte "cnVubWU=" , replace "runme" with your payload data | |
if [ "$payload" == "cnVubWU=" ]; then | |
logger restarting ntpd, consul triggered by payload $payload | |
# /usr/bin/sudo /sbin/service ntpd restart | |
else | |
logger skipping ntpd restart, consul triggered by payload $payload | |
fi |
OlderNewer