Skip to content

Instantly share code, notes, and snippets.

@nzoschke
nzoschke / heroku-secrets.md
Last active December 14, 2015 08:49
Heroku Secrets - Waza 2012

Twelve-Factor

  • Adam Wiggins' The Twelve-Factor App
  • Modern software design for software-as-a-service
  • Heroku enables and enforces these patterns

Continuous Deployment

  • One codebase - many deploys
  • 2 million releases in Feb alone
ROOT ?= $(shell pwd)
all: vendor/nginx
clean:
rm -rf $(ROOT)/src
rm -rf $(ROOT)/vendor
vendor/luajit: src
cd src/LuaJIT-2.0.2 \

as a buildpack maintainer

$ git clone https://github.com/heroku/heroku-buildpack-ruby.git  # or any other buildpack
$ cd heroku-buildpack-ruby
heroku-buildpack-ruby $ cat Dockerfile
FROM fabiokung/heroku-buildpack-base

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q ruby2.0
# more stuff specific to this buildpack...
#!/bin/bash
# Download and install Boot2Docker
curl -LO https://github.com/boot2docker/osx-installer/releases/download/v1.3.2/Boot2Docker-1.3.2.pkg
sudo installer -pkg Boot2Docker-1.3.2.pkg -target /Volumes/Macintosh\ HD && rm Boot2Docker-1.3.2.pkg
# Initialize Boot2Docker
boot2docker init
boot2docker start
$(boot2docker shellinit)

Keybase proof

I hereby claim:

  • I am nzoschke on github.
  • I am nzoschke (https://keybase.io/nzoschke) on keybase.
  • I have a public key whose fingerprint is 896A 3E7D 5D7A 0E42 DE9D 4FBD F904 F34A B283 9891

To claim this, I am signing this object:

Most web traffic should be available over HTTPS. AWS makes this easy with Elastic Load Balancers (ELBs). When configured with an SSL certificate, an ELB will perform SSL termination and forward the traffic onto our group of non-encrypted web server instances.

Using an ELB is advantageous to offload many responsibilities to Amazon:

Maintaining uptime for the primary service DNS name Balancing traffic to one or more instances Re-balancing traffic when instances are added, removed, or become unhealthy Storing and applying your mission-critical secret SSL certificate Configuring critical aspects of HTTP like what SSL protocols, cypher and options are available and permitted

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg id="svg" width="1080px" height="760px" viewBox="0 0 1080 760" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>assembly 2015</title>
<style>
.dark #background {
fill:black;
}
text {
fill: #ffffff;
}
@nzoschke
nzoschke / create-convox-support.sh
Last active October 24, 2017 19:40
Creating a convox-support IAM User and Login
$ aws iam create-user --user-name convox-support
{
"User": {
"UserName": "convox-support",
"Path": "/",
"CreateDate": "2015-08-09T15:16:09.027Z",
"UserId": "AIDAIEXRZQYWRHLT6NX6O",
"Arn": "arn:aws:iam::901416387788:user/convox-support"
}
}
# Save the AWS Convox API environment to .env
$ convox ps --app convox
ID NAME RELEASE SIZE STARTED COMMAND
7e41311911f7 registry 20160127162722 256 3 hours ago /docker-entrypoint.sh
7a3ef788202b web
$ convox exec --app convox 7a3ef788202b env > .env
# Start a Docker Machine environment