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
<?xml version="1.0"?> | |
<cluster config_version="7" name="pgcluster"> | |
<clusternodes> | |
<clusternode name="10.39.30.11" votes="1" nodeid="1"> | |
<fence/> | |
</clusternode> | |
<clusternode name="10.39.30.12" votes="1" nodeid="2"> | |
<fence/> | |
</clusternode> | |
</clusternodes> |
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 | |
# | |
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe | |
# mounted at /mnt. It should be run early on the first boot of the system. | |
# | |
# Beware, This script is NOT fully idempotent. | |
# | |
METADATA_URL_BASE="http://169.254.169.254/2012-01-12" |
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
# Consul Services | |
{{range services}} | |
backend {{.Name}} | |
balance roundrobin | |
option redispatch | |
option forwardfor | |
{{range service .Name}} server {{.Name}} {{.Address}}:{{.Port}} | |
{{end}} {{end}} | |
#End Consul services |
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
# Generate public key from private | |
ssh-keygen -f id_rsa -y > id_rsa.pub |
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
instance_profile=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/` | |
aws_access_key_id=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep AccessKeyId | cut -d':' -f2 | sed 's/[^0-9A-Z]*//g'` | |
aws_secret_access_key=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep SecretAccessKey | cut -d':' -f2 | sed 's/[^0-9A-Za-z/+=]*//g'` | |
export AWS_ACCESS_KEY_ID=${aws_access_key_id} | |
export AWS_SECRET_ACCESS_KEY=${aws_secret_access_key} |
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
2016/12/06 14:31:58.477298 [INFO] consul-template v0.16.0 | |
2016/12/06 14:31:58.477321 [INFO] (runner) creating new runner (dry: false, once: false) | |
2016/12/06 14:31:58.477615 [DEBUG] (runner) final config (tokens suppressed): | |
{ | |
"Path": "/usr/local/consul-template/config/nginx.hcl", | |
"Consul": "172.17.0.1:8500", | |
"Token": "", | |
"ReloadSignal": 1, | |
"DumpSignal": 3, |
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
On Vault: | |
$ vault auth-enable aws-ec2 | |
Successfully enabled 'aws-ec2' at 'aws-ec2'! | |
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
Error applying plan: | |
1 error(s) occurred: | |
* module.postgres.aws_db_instance.instance: aws_db_instance.instance: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue. | |
Please include the following information in your report: | |
Terraform Version: 0.9.2 | |
Resource ID: aws_db_instance.instance |
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
CREATE EXTERNAL TABLE IF NOT EXISTS alb_logs ( | |
type string, | |
time string, | |
elb string, | |
client_ip string, | |
client_port int, | |
target_ip string, | |
target_port int, | |
request_processing_time double, | |
target_processing_time double, |
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
frontend app1_ssl | |
bind *:443 ssl crt /etc/haproxy/certs.d/example.com.crt crt /etc/haproxy/certs.d/ no-sslv3 | |
option http-server-close | |
option forwardfor | |
reqadd X-Forwarded-Proto:\ https | |
reqadd X-Forwarded-Port:\ 443 | |
# set HTTP Strict Transport Security (HTST) header | |
rspadd Strict-Transport-Security:\ max-age=15768000 |
OlderNewer