Kaynağa Gözat

* Updated README.md with contributor instructions
* 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)

shin- 12 yıl önce
ebeveyn
işleme
7240ebefe8

+ 23 - 36
README.md

@@ -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
 
@@ -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.
@@ -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) <[email protected]>`
+* 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.

+ 0 - 2
requirements.txt

@@ -1,2 +0,0 @@
-dulwich==0.9.0
-docker-py==0.2.1

+ 0 - 22
setup.py

@@ -1,22 +0,0 @@
-#!/usr/bin/env python
-import os
-from setuptools import setup
-
-ROOT_DIR = os.path.dirname(__file__)
-SOURCE_DIR = os.path.join(ROOT_DIR)
-
-test_requirements = []
-setup(
-    name="docker-brew",
-    version='0.0.1',
-    description="-",
-    packages=['dockerbrew'],
-    install_requires=['dulwich', 'docker'] + test_requirements,
-    zip_safe=False,
-    classifiers=['Development Status :: 3 - Alpha',
-                 'Environment :: Other Environment',
-                 'Intended Audience :: Developers',
-                 'Operating System :: OS Independent',
-                 'Programming Language :: Python',
-                 'Topic :: Utilities'],
-    )

+ 41 - 0
stackbrew/README.md

@@ -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.
@@ -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
+repositories)

+ 5 - 2
stackbrew/app.py

@@ -4,7 +4,6 @@ import json
 import flask
 
 sys.path.append('./lib')
-sys.path.append('..')
 
 import brew
 import db
@@ -65,4 +64,8 @@ try:
 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']
+)

+ 0 - 0
docker-brew → stackbrew/brew-cli


+ 0 - 0
brew/__init__.py → stackbrew/brew/__init__.py


+ 0 - 0
brew/brew.py → stackbrew/brew/brew.py


+ 0 - 0
brew/git.py → stackbrew/brew/git.py


+ 0 - 0
brew/summary.py → stackbrew/brew/summary.py


+ 2 - 1
stackbrew/requirements.txt

@@ -1,3 +1,4 @@
 Flask==0.9
 SQLAlchemy==0.8.2
--r ../requirements.txt
+dulwich==0.9.0
+docker-py==0.2.1