This is for porter developers. Users of porter should checkout the the documentation
- Simplicity
- Resiliency
- Security
- Operational visibility
- Self-service
- Remember that everything will fail all the time - from AWS running out of
m3.xlarge
instances ineu-west-1
to sharks chewing the fibre connecting continents - Know the fallacies of distributed computing
- Don't make assumptions about deployment environments
- Don't create concepts that don't exist in AWS, Docker, or one of porter's other dependencies. If you don't create new concepts then you don't have to do the 2nd hardest thing in computer science: name them. Your concept is probably ill-defined anyway and will lead to confusion for everyone.
- Work backward from the problem
- Think about every log message you create as if you have no idea how porter works. Each message must be clear and actionable.
- Golang 1.7.3
- godep
- Docker 1.11.2
The following are probably already installed which is part of why we use them - they're ubiquitous. The versions likely won't matter but they're here for reference incase of an issue.
- GNU Make 3.81
- Perl 5.18.2
curl -O https://storage.googleapis.com/golang/go1.7.3.darwin-amd64.pkg && open go1.7.3.darwin-amd64.pkg
Follow the instructions to install Go
cd && mkdir go && export GOPATH=~/go
go get github.com/tools/godep
curl -O http://download.virtualbox.org/virtualbox/5.0.12/VirtualBox-5.0.12-104815-OSX.dmg && open VirtualBox-5.0.12-104815-OSX.dmg
Follow the instructions to install VirtualBox
Add ~/bin
to your $PATH
and run
curl -Lo ~/bin/docker-machine https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-Darwin-x86_64 && chmod 0755 !#:2
curl -Lo ~/bin/docker https://get.docker.com/builds/Darwin/x86_64/docker-1.11.2 && chmod 0755 !#:2
docker-machine create \
--driver virtualbox \
--virtualbox-memory 4096 \
--virtualbox-disk-size 20480 \
--virtualbox-cpu-count "-1" \
--virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.11.2/boot2docker.iso \
default
Run docker-machine env
and follow the instructions to set environment
variables.
Once complete you should be able to run docker version
and see this output
[bcook:~]$ docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:20:08 2016
OS/Arch: darwin/amd64
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:20:08 2016
OS/Arch: linux/amd64
Ensure you have an S3 bucket to upload the porter linux binary. Set
PORTER_BIN_S3_BUCKET
to the bucket name and PORTER_BIN_S3_BUCKET_REGION
to
the region for that bucket.
These environment variables are used by the release_porter
script to
- Bake a URL into the binary produced by the
release_porter
script - Upload a build to a S3 bucket you control
- Form the URL porter places in EC2 UserData to download itself from (2)
Additionally export DEV_MODE=1
to bypass version validation.
Type make
The default behavior is to build a static binary for Mac and place it in
~/bin/
which should be in your $PATH
. You know everything is setup correctly
when you do make
followed by which porter
and see that it lives at
/Users/$(whoami)/bin/porter
aws
- abstractions on the AWS SDKcfn
- CloudFormation template struct definitionscfn_template
- CloudFormation template creationcommands
- CLI commands. Since most of porter is driven from the CLI you should start heredaemon
- a stateful daemon that runs on EC2files
- Non-Go files that are bundled with the porter binarypromote
- Instance promotion into ELBprovision
- High-level packaging and infrastructure provisioning APIsprune
- GC
DO NOT create files with package main