goship

command module
v0.0.0-...-51e85b4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2014 License: Apache-2.0 Imports: 23 Imported by: 0

README

GoShip

A simple tool for deploying code to servers.

pirate gopher

What it does:

GoShip SSHes into the machines that you list in your config.yml file and gets 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.

GoShip Index Page Screenshot

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
projects:
    - my_project:
        project_name: My Project
        repo_owner: github-user
        repo_name: my-project
        environments:
            - 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

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

 -b [bind address]  Address to bind (default localhost: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)
 -d [data path]     Path to data directory (default ./data/)
Chat Notifications

To notify a chat room when the Deploy button is pushed, create a script that takes a message as an argument and sends the message to the room, and then add it to the config like so:

notify: ./notifications/notify.sh

Sevabot is a good choice for Skype.

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

The GoShip logo is an adaptation of the Go gopher created by Renee French under the Creative Commons Attribution 3.0 license.

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/agent
Package agent implements a client to an ssh-agent daemon.
Package agent implements a client to an ssh-agent daemon.
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/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