Merge pull request #77 from asm89/bootstrap

Tune bootstrap/install script and documentation for advanced installation
This commit is contained in:
Jeff Lindsay
2013-07-04 22:55:05 -07:00
3 changed files with 35 additions and 16 deletions

View File

@@ -1,19 +1,19 @@
GITRECEIVE_URL = https://raw.github.com/progrium/gitreceive/master/gitreceive GITRECEIVE_URL ?= https://raw.github.com/progrium/gitreceive/master/gitreceive
SSHCOMMAND_URL = https://raw.github.com/progrium/sshcommand/master/sshcommand SSHCOMMAND_URL ?= https://raw.github.com/progrium/sshcommand/master/sshcommand
PLUGINHOOK_URL = https://s3.amazonaws.com/progrium-pluginhook/pluginhook_0.1.0_amd64.deb PLUGINHOOK_URL ?= https://s3.amazonaws.com/progrium-pluginhook/pluginhook_0.1.0_amd64.deb
DOCKER_URL = https://launchpad.net/~dotcloud/+archive/lxc-docker/+files/lxc-docker_0.4.2-1_amd64.deb DOCKER_URL ?= https://launchpad.net/~dotcloud/+archive/lxc-docker/+files/lxc-docker_0.4.2-1_amd64.deb
STACK_URL = https://s3.amazonaws.com/progrium-dokku/progrium_buildstep.tgz STACK_URL ?= https://s3.amazonaws.com/progrium-dokku/progrium_buildstep.tgz
all: dependencies stack install plugins all: dependencies stack install plugins
install: install:
cp dokku /usr/local/bin/dokku cp dokku /usr/local/bin/dokku
cp receiver /home/git/receiver cp receiver /home/git/receiver
plugins: pluginhook docker
mkdir -p /var/lib/dokku/plugins mkdir -p /var/lib/dokku/plugins
cp -r plugins/* /var/lib/dokku/plugins cp -r plugins/* /var/lib/dokku/plugins
dokku plugins
plugins: pluginhook docker
dokku plugins-install
dependencies: gitreceive sshcommand pluginhook docker stack dependencies: gitreceive sshcommand pluginhook docker stack
@@ -47,4 +47,4 @@ count:
@echo "Plugin lines:" @echo "Plugin lines:"
@find plugins -type f | xargs cat | wc -l @find plugins -type f | xargs cat | wc -l
@echo "Test lines:" @echo "Test lines:"
@find tests -type f | xargs cat | wc -l @find tests -type f | xargs cat | wc -l

View File

@@ -53,9 +53,24 @@ You're done!
## Advanced installation (for development) ## Advanced installation (for development)
The bootstrap script allows source URLs to be overridden to include customizations from your own If you plan on developing dokku, the easiest way to install from your own repository is cloning
repositories. The GITRECEIVE_URL and DOKKU_REPO environment variables the repository and calling the install script. Example:
may be set to override the defaults (see the bootstrap.sh script for how these apply). Example:
$ git clone https://github.com/yourusername/dokku.git
$ cd dokku
$ sudo make all
The `Makefile` allows source URLs to be overridden to include customizations from your own
repositories. The DOCKER_URL, GITRECEIVE_URL, PLUGINHOOK_URL, SSHCOMMAND_URL and STACK_URL
environment variables may be set to override the defaults (see the `Makefile` for how these
apply). Example:
$ sudo GITRECEIVE_URL=https://raw.github.com/yourusername/gitreceive/master/gitreceive make all
## Advanced installation (bootstrap a server from your own repository)
The bootstrap script allows the dokku repository URL to be overridden to bootstrap a host from
your own clone of dokku using the DOKKU_REPO environment variable. Example:
$ wget https://raw.github.com/progrium/dokku/master/bootstrap.sh $ wget https://raw.github.com/progrium/dokku/master/bootstrap.sh
$ chmod +x bootstrap.sh $ chmod +x bootstrap.sh

12
dokku
View File

@@ -13,7 +13,7 @@ case "$1" in
echo " $(dokku url $APP)" echo " $(dokku url $APP)"
echo echo
;; ;;
build) build)
IMAGE="$2" IMAGE="$2"
id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app") id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app")
@@ -24,7 +24,7 @@ case "$1" in
test $(docker wait $id) -eq 0 test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null docker commit $id $IMAGE > /dev/null
;; ;;
deploy) deploy)
APP="$2"; IMAGE="$3" APP="$2"; IMAGE="$3"
pluginhook pre-deploy $APP $IMAGE pluginhook pre-deploy $APP $IMAGE
@@ -46,8 +46,11 @@ case "$1" in
pluginhook post-deploy $APP $port pluginhook post-deploy $APP $port
;; ;;
plugins) plugins)
ls -1 -d $PLUGIN_PATH/*/ ls -1 -d $PLUGIN_PATH/*/
;;
plugins-install)
pluginhook install pluginhook install
;; ;;
@@ -55,6 +58,7 @@ case "$1" in
cat<<EOF | pluginhook commands help | sort cat<<EOF | pluginhook commands help | sort
help Print the list of commands help Print the list of commands
plugins Print active plugins plugins Print active plugins
plugins-install Install active plugins
EOF EOF
;; ;;
@@ -62,4 +66,4 @@ EOF
pluginhook commands "$@" pluginhook commands "$@"
;; ;;
esac esac