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
opts := &glacier.SetVaultNotificationsInput{ | |
VaultName: aws.String(d.Id()), | |
VaultNotificationConfig: &glacier.VaultNotificationConfig{ | |
SNSTopic: aws.String(sns_topic), | |
Events: aws.StringSlice(events), | |
}, | |
} |
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
var https = require('https'); | |
var util = require('util'); | |
exports.handler = function(event, context) { | |
try { | |
var message = JSON.parse(event.Records[0].Sns.Message); | |
var eventType = message.Event; | |
var autoScaleGroupName = message.AutoScalingGroupName; | |
var description = message.Description; |
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
# Run Elasticsearch as this user ID and group ID | |
#ES_USER=elasticsearch | |
{% if es_default_es_user is defined %}ES_USER={{ es_default_es_user }}{% endif %} | |
#ES_GROUP=elasticsearch | |
{% if es_default_es_group is defined %}ES_GROUP={{ es_default_es_group }}{% endif %} | |
# Heap Size (defaults to 256m min, 1g max) | |
#ES_HEAP_SIZE=2g | |
{% if es_default_es_heap_size is defined %}ES_HEAP_SIZE={{ es_default_es_heap_size }}{% endif %} |
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
{ | |
"variables": { | |
"ami_id": "", | |
"private_subnet_id": "", | |
"security_group_id": "", | |
"packer_build_number": "", | |
}, | |
"description": "ElasticSearch Image", | |
"builders": [ | |
{ |
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
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
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
log.console = file | |
log.console.level = info | |
log.console.file = $(platform_log_dir)/console.log | |
log.error.file = $(platform_log_dir)/error.log | |
log.syslog = off | |
log.crash = on | |
log.crash.file = $(platform_log_dir)/crash.log | |
log.crash.maximum_message_size = 64KB | |
log.crash.size = 10MB | |
log.crash.rotation = $D0 |
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
variable "vpc_id" {} | |
variable "ingress_cidr_blocks" {} | |
variable "key_name" {} | |
variable "ami" {} | |
variable "instance_type" {} | |
variable "private_subnets" {} | |
variable "public_subnets" {} | |
variable "availability_zones" {} | |
variable "cluster_name" {} | |
resource "aws_security_group" "consul_elb" { |
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
zookeeper-data-directory=/opt/zookeeper/snapshots | |
zookeeper-install-directory=/opt/zookeeper | |
zookeeper-log-directory=/opt/zookeeper/transactions | |
log-index-directory=/opt/zookeeper/transactions | |
cleanup-period-ms=300000 | |
check-ms=30000 | |
backup-period-ms=600000 | |
client-port=2181 | |
cleanup-max-files=20 | |
backup-max-store-ms=21600000 |
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
apt-get install nginx |