goship

command module
v0.0.0-...-69b39bd Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2013 License: Apache-2.0 Imports: 26 Imported by: 0

README

GoShip

A simple tool for deploying code to servers.

GoShip was inspired by Rackspace's Dreadnot (UI image) and Etsy's Deployinator (UI image).

Installation
go get github.com/gengo/goship
go install github.com/gengo/goship
What it does:

GoShip SSHes into the machines that you list in your config.yml file and gets the SHA1 of the latest revision from the specified git repository. It then compares that to the latest revision on GitHub and, if they differ, shows a link to the diff as well as a Deploy button. You can then deploy by clicking the button, and will show you the output of the deployment command, as well as save the output, diff, and whether the command succeeded.

It also has a nice single view for open pull requests across all repositories in one or more organizations.

Usage

Export your GitHub API token:

export GITHUB_API_TOKEN="your-organization-github-token-here"

Create a config.yml file:

# The user that will SSH into the servers to get the latest git revisions
deploy_user: deployer
# Domain you'll host goship on
goship_host: goship.yourdomain.com
# used for getting open pull requests across all repos in an org
orgs:
    - myOrg
projects:
    - my_project:
        project_name: My Project
        repo_owner: github-user
        repo_name: my-project
        environments:
            - qa:
                deploy: /path/to/deployscripts/myproj_qa.sh
                repo_path: /path/to/myproject/.git
                hosts:
                    - qa.myproject.com
                branch: sprint_branch
            - staging:
                deploy: /path/to/deployscripts/myproj_staging.sh
                repo_path: /path/to/myproject/.git
                hosts:
                    - staging.myproject.com
                branch: code_freeze
            - production:
                deploy: /path/to/deployscripts/myproj_live.sh
                repo_path: /path/to/myproject/.git
                hosts:
                    - prod-01.myproject.com
                    - prod-02.myproject.com
                branch: master

Then run the server manually

go run goship.go -p 8888 -k ~/.ssh/id_rsa

or from the script:

$GOPATH/bin/goship

Available command line flags for the go run goship.go command are:

 -p [port]          Port number (default 8000)
 -c [config file]   Config file (default ./config.yml)
 -k [id_rsa key]    Path to private SSH key for connecting to Github (default id_rsa)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
third_party
code.google.com/p/go.crypto/ssh
Package ssh implements an SSH client and server.
Package ssh implements an SSH client and server.
code.google.com/p/go.crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
code.google.com/p/go.crypto/ssh/test
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
code.google.com/p/go.net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
code.google.com/p/goauth2/oauth
The oauth package provides support for making OAuth2-authenticated HTTP requests.
The oauth package provides support for making OAuth2-authenticated HTTP requests.
code.google.com/p/goauth2/oauth/example
This program makes a call to the specified API, authenticated with OAuth2.
This program makes a call to the specified API, authenticated with OAuth2.
code.google.com/p/goauth2/oauth/jwt
The jwt package provides support for creating credentials for OAuth2 service account requests.
The jwt package provides support for creating credentials for OAuth2 service account requests.
code.google.com/p/goauth2/oauth/jwt/example
This program makes a read only call to the Google Cloud Storage API, authenticated with OAuth2.
This program makes a read only call to the Google Cloud Storage API, authenticated with OAuth2.
github.com/google/go-github/github
Package github provides a client for using the GitHub API.
Package github provides a client for using the GitHub API.
github.com/google/go-querystring/query
Package query implements encoding of structs into URL query parameters.
Package query implements encoding of structs into URL query parameters.
github.com/gorilla/context
Package gorilla/context stores values shared during a request lifetime.
Package gorilla/context stores values shared during a request lifetime.
github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
github.com/kylelemons/go-gypsy/yaml
Gypsy is a simplified YAML parser written in Go.
Gypsy is a simplified YAML parser written in Go.

Jump to

Keyboard shortcuts

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