{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs",
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
# Simply add the following to the Userdata script so the | |
# instance bootstrap sequence transforms the debian jessie | |
# systemd init to good old sysvinit. | |
# initial method from | |
# http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation | |
# but using a safer and actually working `cat ><<EOF` method | |
apt-get -y install sysvinit-core sysvinit sysvinit-utils | |
apt-get remove --purge --auto-remove systemd | |
cat >/etc/apt/preferences.d/systemd<<EOF | |
Package: systemd |
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
from troposphere import Template, Ref, Parameter, Tags | |
from troposphere.autoscaling import LaunchConfiguration, AutoScalingGroup, Tag | |
t = Template() | |
params = { | |
'AmiId': 'Baked AMI Id', | |
'InstanceName': 'Name tag of the instance', | |
'SecurityGroup': 'Security Group' , | |
'KeyName': 'SSH Key Name' , |
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/sh | |
[ $# -lt 1 ] && echo "usage: $0 <path>" && exit 1 | |
bpath=$1 | |
# you might want to change these to suit your setup | |
bs=32k | |
count=30000 |
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 sys | |
import markdown | |
import yaml | |
import os | |
from jinja2 import Environment, FileSystemLoader | |
with open(sys.argv[2], 'r') as f: | |
content = yaml.safe_load(f.read()) | |
for k in content: |
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
package main | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"strconv" | |
"time" |
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 python | |
from troposphere import Join, Output | |
from troposphere import Parameter, Ref, Tags, Template | |
from troposphere.ec2 import PortRange | |
from troposphere.ec2 import NetworkAcl | |
from troposphere.ec2 import Route | |
from troposphere.ec2 import VPCGatewayAttachment | |
from troposphere.ec2 import SubnetRouteTableAssociation | |
from troposphere.ec2 import Subnet |
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 python | |
# $ cat ipsec_conf.tmpl | |
# {# | |
# | |
# cgw_in_addr: customer_gateway tunnel_inside_address ip_address | |
# cgw_in_cidr: customer_gateway tunnel_inside_address network_cidr | |
# vgw_in_addr: vpn_gateway tunnel_inside_address ip_address | |
# vgw_in_cidr: vpn_gateway tunnel_inside_address network_cidr | |
# cgw_out_addr: customer_gateway tunnel_outside_address |
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
<Plugin python> | |
ModulePath "/home/imil/collectd" | |
Import "ethermine" | |
<Module ethermine> | |
wallet "0xf00f00f00" | |
interval "300" | |
url "https://ethermine.org/api/miner_new" | |
</Module> | |
</Plugin> |
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
terraform apply tfplan | |
2018/12/06 14:44:36 [INFO] Terraform version: 0.11.10 17850e9a55d33c43d7c31fd6ac122ba97a51d899 | |
2018/12/06 14:44:36 [INFO] Go runtime version: go1.11.1 | |
2018/12/06 14:44:36 [INFO] CLI args: []string{"/home/imil/pkg/bin/terraform", "apply", "tfplan"} | |
2018/12/06 14:44:36 [DEBUG] Attempting to open CLI config file: /home/imil/.terraformrc | |
2018/12/06 14:44:36 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2018/12/06 14:44:36 [INFO] CLI command args: []string{"apply", "tfplan"} | |
2018/12/06 14:44:36 [INFO] command: initializing local backend from plan (not set) | |
2018/12/06 14:44:36 [DEBUG] checking for provider in "." | |
2018/12/06 14:44:36 [DEBUG] checking for provider in "/home/imil/pkg/bin" |