This script will pull down an S3 remote configuration before running any terraform actions. Assumes the following structure:
main.tf
terraform.cfg
env/dev/vars
env/staging/vars
env/whatever/vars
env/whatever/somefile.tf
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "An etcd cluster based off an auto scaling group", | |
"Mappings" : { | |
"RegionMap" : { | |
"eu-central-1" : { | |
"AMI" : "ami-840a0899" | |
}, | |
"ap-northeast-1" : { | |
"AMI" : "ami-6c5ac56c" |
#!/usr/bin/with-contenv sh | |
if [ ! -f /etc/dnsmasq-resolv.conf ] | |
then | |
cp -f /etc/resolv.conf /etc/dnsmasq-resolv.conf | |
echo "nameserver 127.0.0.1" > /etc/resolv.conf | |
fi | |
while ! ps -ef | grep -v grep | grep dnsmasq-resolv.conf | |
do | |
sleep 1 |
This script will pull down an S3 remote configuration before running any terraform actions. Assumes the following structure:
main.tf
terraform.cfg
env/dev/vars
env/staging/vars
env/whatever/vars
env/whatever/somefile.tf
Unit files to deploy an ElasticSearch cluster on CoreOS via Fleet.
Service discovery & registration is done via etcd.
[email protected] provides a dumb discovery service by registering an elasticsearch host if it should be up. [email protected] registers the service only if it is running.
A service & timer unit for elasticsearch curator is provided which does some housekeeping.
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
labels: | |
name: etcd | |
name: etcd | |
spec: | |
template: | |
metadata: | |
labels: |
#cloud-config | |
--- | |
coreos: | |
units: | |
- name: update-fleet-metadata.service | |
command: start | |
content: |- | |
[Unit] | |
Description=Update Fleet metadata tag | |
Before=fleet.service |
This uses terraform's template_file
resource to generate a yaml properties file for serverspec to use.
spec
directory and put spec_helper.rb
in ittemplates/properties.tmpl.yml
fileserverspec.tf
terraform apply
Tests will be matched based on roles defined for a given node.
# lib/authentications/authentication.rb | |
# @api auth | |
# Authentication base class | |
# | |
module Authentication | |
def self.included(base) | |
base.class_eval do | |
before :authenticate! | |
expose :current_user |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: minio | |
labels: | |
app: minio | |
spec: | |
clusterIP: None | |
ports: | |
- port: 9000 |
[Unit] | |
Description=Mount EBS volume at /var/lib/etcd2 | |
Requires=format-etcd-ebs.service | |
After=format-etcd-ebs.service | |
Before=etcd2.service | |
[Mount] | |
DirectoryMode=0777 | |
Type=ext4 | |
What=/dev/xvdb |