flynn-cli-dist

command module
v0.0.0-...-4410413 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2014 License: MIT Imports: 27 Imported by: 0

README

flynn-cli-dist

A suite of tools for building flynn-cli, generating binary diffs, and distributing them for updates.

Prerequisites

install godep to manage dependencies:

$ go get github.com/kr/godep

environment

DISTURL (build)

url for the flynn-cli directory server (e.g. https://flynn-cli.herokuapp.com)

S3DISTURL (build, gen, web)

url for the S3 bucket for distributing full flynn-cli binaries (e.g. https://flynn-cli-dist.s3.amazonaws.com/)

S3PATCHURL (gen)

url for the S3 bucket for distributing patches (e.g. https://flynn-cli-patch.s3.amazonaws.com/)

S3_ACCESS_KEY (build, gen), S3_SECRET_KEY (build, gen)

aws iam credentials

BUILDNAME (build)

the name of the binary to build (e.g. "flynn")

BUILDBRANCH (build)

the name of the git branch to build from (e.g. "master")

DATABASE_URL (web)

postgres:// url

PORT (web)

which tcp port to listen on

HKGENAPPNAME (build)

the name of the heroku app to generate diffs with

Creating a new release

To release a new version of flynn-cli:

  1. make a gpg-signed git tag of the form vYYYYMMDD or vYYYYMMDD.N

    $ git tag -sam "added a new feature" vYYYYMMDD
    
  2. push the release branch to that tag on github

    $ git co release
    $ git reset --hard vYYYYMMDD
    $ git push origin release
    
  3. run flynn-cli-dist build to build for all platforms and generate diffs

    ## Export environment variables for target build ##
    $ flynn-cli-dist build
      ...
    

Credits

This is a fork of Heroku's hkdist.

Documentation

Overview

Command flynn-cli-dist provides services for distributing flynn-cli binaries and updates.

It has three sub-commands: build, web, and gen.

$ flynn-cli-dist build [platforms]

This command builds cross-compiled binaries. The tool builds all known platforms by default, but will optionally build for a specified list of platforms instead. It first fetches the source code and termines the latest git tag on BUILDBRANCH. Then, for each platform, it builds a binary executable, uploads the binary to an S3 bucket, and posts its SHA-256 hash to the flynn-cli distribution server (flynn-cli.herokuapp.com in production).

$ flynn-cli-dist web

This command provides directory service for flynn-cli binary hashes.

$ flynn-cli-dist gen

This command polls the distribution server to learn about new releases, then generates byte-sequence patches between each pair of releases on each platform. It puts these patches in an S3 bucket so the flynn client can use them for self-update instead of downloading a (much larger) full release.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_workspace/src/github.com/bgentry/heroku-go
Package heroku is a client interface to the Heroku API.
Package heroku is a client interface to the Heroku API.
_workspace/src/github.com/gorilla/context
Package gorilla/context stores values shared during a request lifetime.
Package gorilla/context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/kr/binarydist
Package binarydist implements binary diff and patch as described on http://www.daemonology.net/bsdiff/.
Package binarydist implements binary diff and patch as described on http://www.daemonology.net/bsdiff/.
_workspace/src/github.com/kr/s3
Package s3 signs HTTP requests for Amazon S3 and compatible services.
Package s3 signs HTTP requests for Amazon S3 and compatible services.
_workspace/src/github.com/kr/s3/s3cp
Command s3cp copies a file to or from Amazon S3.
Command s3cp copies a file to or from Amazon S3.
_workspace/src/github.com/kr/s3/s3util
Package s3util provides streaming transfers to and from Amazon S3.
Package s3util provides streaming transfers to and from Amazon S3.
_workspace/src/github.com/kr/secureheader
Package secureheader adds some HTTP header fields widely considered to improve safety of HTTP requests.
Package secureheader adds some HTTP header fields widely considered to improve safety of HTTP requests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL