Skip to content

Commit

Permalink
* Updated README.md with contributor instructions
Browse files Browse the repository at this point in the history
* Updated stackbrew/README.md with installation and deployment instructions
* brew and docker-brew can now be found in the stackbrew/ subfolder
* Unified requirements.txt
* Removed mentions of brew to replace them by stackbrew (clearer messaging)
  • Loading branch information
shin- committed Oct 18, 2013
1 parent 8f2639b commit 7240ebe
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 63 deletions.
59 changes: 23 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,8 @@
# docker-brew
# Stackbrew

docker-brew is a command-line tool used to build the docker standard library.

## Install instructions

1. Install python if it isn't already available on your OS of choice
1. Install the easy_install tool (`sudo apt-get install python-setuptools`
for Debian)
1. Install the python package manager, `pip` (`easy_install pip`)
1. Run the following command: `sudo pip install -r requirements.txt`
1. You should now be able to use the `docker-brew` script as such.

## Basics

./docker-brew -h

Display usage and help.

./docker-brew

Default build from the default repo/branch. Images will be created under the
`library/` namespace. Does not perform a remote push.

./docker-brew -n mycorp.com -b stable --push git://github.com/mycorp/docker

Will fetch the library definition files in the `stable` branch of the
`git://github.com/mycorp/docker` repository and create images under the
`mycorp.com` namespace (e.g. `mycorp.com/ubuntu`). Created images will then
be pushed to the official docker repository (pending: support for private
repositories)
Stackbrew is a web-application that performs continuous building of the docker
standard library. See `README.md` in the stackbrew subfolder for more
information.

## Library definition files

Expand All @@ -45,13 +19,13 @@ a single file, all images are expected to be created under a different tag.
### Instruction format

Each line represents a build instruction.
There are different formats that `docker-brew` is able to parse.
There are different formats that `stackbrew` is able to parse.

<git-url>
git://github.com/dotcloud/hipache
https://github.com/dotcloud/docker.git

The simplest format. `docker-brew` will fetch data from the provided git
The simplest format. `stackbrew` will fetch data from the provided git
repository from the `HEAD`of its `master` branch. Generated image will be
tagged as `latest`. Use of this format is discouraged because there is no
way to ensure stability.
Expand All @@ -77,8 +51,21 @@ repository from the provided reference (if it's a branch, brew will fetch its
`HEAD`). Generated image will be tagged as `<docker-tag>`. Recommended whenever
possible.

# stackbrew
## Contributing to the standard library

Stackbrew is a web-application that performs continuous building of the docker
standard library using brew. See `README.md` in the stackbrew subfolder for
more information.
Thank you for your interest in the stackbrew project! We strive to make these instructions as simple and straightforward as possible, but if you find yourself lost, don't hesitate to seek us out on IRC freenode, channel `#docker` or by creating a github issue.

### New repository.
* Create a new file in the library folder. Its name will be the name of your repository.
* Add your tag definitions using the provided syntax (see above).
* Add the following line to the MAINTAINERS file:
`repo: Your Name (github.name) <you@email.com>`
* Create a pull request from your git repository to this one. Don't hesitate to add details as to what your repository does.

### New tag in existing repository.
* Add your tag definition using the <provided syntax>
* Create a pull request from your git repository to this one. Don't hesitate to add details.
* In the pull request, mention the repository's maintainer using the `@` symbol.

### Change to an existing tag
* Propose a pull request to the origin repository. Don't hesitate to @-mention one of the stackbrew maintainers.
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

22 changes: 0 additions & 22 deletions setup.py

This file was deleted.

41 changes: 41 additions & 0 deletions stackbrew/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
Stackbrew is a web-application that performs continuous building of the docker
standard library using docker-brew.

## Install instructions

1. Install python if it isn't already available on your OS of choice
1. Install the easy_install tool (`sudo apt-get install python-setuptools`
for Debian/Ubuntu)
1. Install the python package manager, `pip` (`easy_install pip`)
1. Run the following command: `sudo pip install -r requirements.txt`
1. You should now be able to use the `brew-cli` script as such.

### Deploying stackbrew

These additional instructions are necessary for the stackbrew application to
function.

1. Install sqlite3 (`sudo apt-get install sqlite3` on Debian/Ubuntu)
1. Create the /opt/stackbrew/repos (`mkdir -p /opt/stackbrew/repos`) folder.
2. Run the `create_db.py` script (`python create_db.py`)
3. Edit `config.json` appropriately to your needs.
4. If you're using the `push` option, you will need to have a valid
`.dockercfg` file in your HOME directory.
5. You can start the application with the command `python app.py`

## Builds

Builds are performed regularly and pushed to the public index.
Expand Down Expand Up @@ -71,3 +93,22 @@ A small JSON API allows users to check the status of past builds.
"id": 19,
"repo_name": "ubuntu"
}

## Stackbrew CLI

./brew-cli -h

Display usage and help.

./brew-cli

Default build from the default repo/branch. Images will be created under the
`library/` namespace. Does not perform a remote push.

./brew-cli -n mycorp.com -b stable --push git://github.com/mycorp/docker

Will fetch the library definition files in the `stable` branch of the
`git://github.com/mycorp/docker` repository and create images under the
`mycorp.com` namespace (e.g. `mycorp.com/ubuntu`). Created images will then
be pushed to the official docker repository (pending: support for private

This comment has been minimized.

Copy link
@huangsam

huangsam Sep 19, 2014

What is causing this to be pending? Would like some clarification on this.

This comment has been minimized.

Copy link
@tianon

tianon Sep 19, 2014

Member

This commit is from Oct 18, 2013, so I'm not sure it's the best place to get "support". ;)

Maybe you should open an issue with your questions instead? :)

This comment has been minimized.

Copy link
@shin-

shin- Sep 19, 2014

Contributor

Also private registry != (hub) private repository != (git) private repository. That comment is about git private repos.

repositories)
7 changes: 5 additions & 2 deletions stackbrew/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import flask

sys.path.append('./lib')
sys.path.append('..')

import brew
import db
Expand Down Expand Up @@ -65,4 +64,8 @@ def build_task():
except RuntimeError:
app.logger.warning('Periodic build task already locked.')

app.run(debug=config['debug'])
app.run(
host=config.get('host', '127.0.0.1'),
port=config.get('port', 5000),
debug=config['debug']
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion stackbrew/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Flask==0.9
SQLAlchemy==0.8.2
-r ../requirements.txt
dulwich==0.9.0
docker-py==0.2.1

0 comments on commit 7240ebe

Please sign in to comment.