risu

command module
v0.0.0-...-60dd4b1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2015 License: MIT Imports: 23 Imported by: 0

README

RISU (Rapid Image Supplying Unit)

Risu is a build tool for docker image with original cache mechanism.

Quick Start

First, run risu server as docker container.

$ docker run \
    --name risu \
    -e GITHUB_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXX \
    -e DOCKER_AUTH_USER_NAME=your_name \
    -e DOCKER_AUTH_USER_PASSWORD=your_password \
    -e DOCKER_AUTH_USER_EMAIL=your_email \
    -p 8080:8080 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    quay.io/wantedly/risu:latest

Second, trigger a new build via risu API.

$ curl -n -X POST https://<your-risu-server>.com/builds \
  -H "Content-Type: application/json" \
 \
  -d '{
  "source_repo": "wantedly/risu",
  "source_branch": "master",
  "image_name": "quay.io/wantedly/risu:latest",
  "dockerfile": "Dockerfile.dev",
  "cache_directories": [
    {
      "source": "vendor/bundle",
      "container": "/app/vendor/bundle"
    },
    {
      "source": "vendor/assets",
      "container": "/app/vendor/assets"
    }
  ]
}'

Then, risu server build docker image with original cache mechanism and push it to docker registry.

That's it!

Documentation

HTTP API

Requirements

  • GITHUB_ACCESS_TOKEN
  • DOCKER_AUTH_USER_NAME
  • DOCKER_AUTH_USER_PASSWORD
  • DOCKER_AUTH_USER_EMAIL

How It Works

TBD

Registry Backend

localfs Backend Registry
$ docker run \
    --name risu \
    -e GITHUB_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXX \
    -e DOCKER_AUTH_USER_NAME=your_name \
    -e DOCKER_AUTH_USER_PASSWORD=your_password \
    -e DOCKER_AUTH_USER_EMAIL=your_email \
    -p 8080:8080 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    quay.io/wantedly/risu:latest
etcd Backend Registry
$ docker run \
    --name risu \
    -e GITHUB_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXX \
    -e DOCKER_AUTH_USER_NAME=your_name \
    -e DOCKER_AUTH_USER_PASSWORD=your_password \
    -e DOCKER_AUTH_USER_EMAIL=your_email \
    -e REGISTRY_BACKEND=etcd \
    -e REGISTRY_ENDPOINT=http://172.17.8.101:4001 \
    -p 8080:8080 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    quay.io/wantedly/risu:latest

Cache Backend

localfs
$ docker run \
    --name risu \
    -e GITHUB_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXX \
    -e DOCKER_AUTH_USER_NAME=your_name \
    -e DOCKER_AUTH_USER_PASSWORD=your_password \
    -e DOCKER_AUTH_USER_EMAIL=your_email \
    -p 8080:8080 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    quay.io/wantedly/risu:latest
S3
$ docker run \
    --name risu \
    -e GITHUB_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXX \
    -e DOCKER_AUTH_USER_NAME=your_name \
    -e DOCKER_AUTH_USER_PASSWORD=your_password \
    -e DOCKER_AUTH_USER_EMAIL=your_email \
    -e CACHE_BACKEND=s3 \
    -e AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX \
    -e AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
    -e AWS_REGION=xx-yyyy-0 \
    -e RISU_CACHE_BUCKET=xxxx \
    -p 8080:8080 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    quay.io/wantedly/risu:latest

Contribution

  1. Fork it ( http://github.com/wantedly/risu )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Documentation

The Go Gopher

There is no documentation for this package.

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/aws/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
Package aws provides core functionality for making requests to AWS services.
_workspace/src/github.com/aws/aws-sdk-go/aws/awserr
Package awserr represents API error interface accessors for the SDK.
Package awserr represents API error interface accessors for the SDK.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds
Package stscreds are credential Providers to retrieve STS AWS credentials.
Package stscreds are credential Providers to retrieve STS AWS credentials.
_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints
Package endpoints validates regional endpoints for services.
Package endpoints validates regional endpoints for services.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query
Package query provides serialisation of AWS query requests, and responses.
Package query provides serialisation of AWS query requests, and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest
Package rest provides RESTful serialization of AWS requests and responses.
Package rest provides RESTful serialization of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/restxml
Package restxml provides RESTful XML serialisation of AWS requests and responses.
Package restxml provides RESTful XML serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil
Package xmlutil provides XML serialisation of AWS requests and responses.
Package xmlutil provides XML serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4
Package v4 implements signing for AWS V4 signer
Package v4 implements signing for AWS V4 signer
_workspace/src/github.com/aws/aws-sdk-go/service/s3
Package s3 provides a client for Amazon Simple Storage Service.
Package s3 provides a client for Amazon Simple Storage Service.
_workspace/src/github.com/aws/aws-sdk-go/service/s3/s3iface
Package s3iface provides an interface for the Amazon Simple Storage Service.
Package s3iface provides an interface for the Amazon Simple Storage Service.
_workspace/src/github.com/codegangsta/negroni
Package negroni is an idiomatic approach to web middleware in Go.
Package negroni is an idiomatic approach to web middleware in Go.
_workspace/src/github.com/fsouza/go-dockerclient
Package docker provides a client for the Docker remote API.
Package docker provides a client for the Docker remote API.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/parsers
Package parsers provides helper functions to parse and validate different type of string.
Package parsers provides helper functions to parse and validate different type of string.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools
Package pools provides a collection of pools which provide various data types with buffers.
Package pools provides a collection of pools which provide various data types with buffers.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ulimit
Package ulimit provides structure and helper function to parse and represent resource limits (Rlimit and Ulimit, its human friendly version).
Package ulimit provides structure and helper function to parse and represent resource limits (Rlimit and Ulimit, its human friendly version).
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/units
Package units provides helper function to parse and print size and time units in human-readable format.
Package units provides helper function to parse and print size and time units in human-readable format.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/fsouza/go-dockerclient/external/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/fsouza/go-dockerclient/testing
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
_workspace/src/github.com/joho/godotenv
Package godotenv is a go port of the ruby dotenv library (https://github.com/bkeepers/dotenv) Examples/readme can be found on the github page at https://github.com/joho/godotenv The TL;DR is that you make a .env file that looks something like SOME_ENV_VAR=somevalue and then in your go code you can call godotenv.Load() and all the env vars declared in .env will be avaiable through os.Getenv("SOME_ENV_VAR")
Package godotenv is a go port of the ruby dotenv library (https://github.com/bkeepers/dotenv) Examples/readme can be found on the github page at https://github.com/joho/godotenv The TL;DR is that you make a .env file that looks something like SOME_ENV_VAR=somevalue and then in your go code you can call godotenv.Load() and all the env vars declared in .env will be avaiable through os.Getenv("SOME_ENV_VAR")
_workspace/src/github.com/julienschmidt/httprouter
Package httprouter is a trie based high performance HTTP request router.
Package httprouter is a trie based high performance HTTP request router.
_workspace/src/github.com/ugorji/go/codec
High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json.
High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json.
_workspace/src/github.com/ugorji/go/codec/codecgen
codecgen generates codec.Selfer implementations for a set of types.
codecgen generates codec.Selfer implementations for a set of types.
_workspace/src/github.com/unrolled/render
Package render is a package that provides functionality for easily rendering JSON, XML, binary data, and HTML templates.
Package render is a package that provides functionality for easily rendering JSON, XML, binary data, and HTML templates.
_workspace/src/github.com/vaughan0/go-ini
Package ini provides functions for parsing INI configuration files.
Package ini provides functions for parsing INI configuration files.

Jump to

Keyboard shortcuts

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