From eaa486e88885ecb8ce777782343349804b0cab4c Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 2 Jul 2013 23:02:42 +0200 Subject: [PATCH 1/6] Separate plugin-install command --- Makefile | 3 ++- dokku | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5495ddebf..d641831f8 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ install: plugins: pluginhook docker mkdir -p /var/lib/dokku/plugins cp -r plugins/* /var/lib/dokku/plugins + dokku plugins-install dokku plugins dependencies: gitreceive sshcommand pluginhook docker stack @@ -47,4 +48,4 @@ count: @echo "Plugin lines:" @find plugins -type f | xargs cat | wc -l @echo "Test lines:" - @find tests -type f | xargs cat | wc -l \ No newline at end of file + @find tests -type f | xargs cat | wc -l diff --git a/dokku b/dokku index 4e384edcc..2831de942 100755 --- a/dokku +++ b/dokku @@ -13,7 +13,7 @@ case "$1" in echo " $(dokku url $APP)" echo ;; - + build) IMAGE="$2" 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 docker commit $id $IMAGE > /dev/null ;; - + deploy) APP="$2"; IMAGE="$3" pluginhook pre-deploy $APP $IMAGE @@ -46,8 +46,11 @@ case "$1" in pluginhook post-deploy $APP $port ;; - plugins) + plugins) ls -1 -d $PLUGIN_PATH/*/ + ;; + + plugins-install) pluginhook install ;; @@ -55,6 +58,7 @@ case "$1" in cat< Date: Tue, 2 Jul 2013 23:06:35 +0200 Subject: [PATCH 2/6] Move copying of plugins to install target --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d641831f8..163d3b16f 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,11 @@ all: dependencies stack install plugins install: cp dokku /usr/local/bin/dokku cp receiver /home/git/receiver - -plugins: pluginhook docker mkdir -p /var/lib/dokku/plugins cp -r plugins/* /var/lib/dokku/plugins + +plugins: pluginhook docker dokku plugins-install - dokku plugins dependencies: gitreceive sshcommand pluginhook docker stack From 713365f53d807bda10dabb031bf13bb8b47e3670 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 2 Jul 2013 23:20:45 +0200 Subject: [PATCH 3/6] Make it possible to override dependency urls --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 163d3b16f..0fe77e24d 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ -GITRECEIVE_URL = https://raw.github.com/progrium/gitreceive/master/gitreceive -SSHCOMMAND_URL = https://raw.github.com/progrium/sshcommand/master/sshcommand -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 -STACK_URL = https://s3.amazonaws.com/progrium-dokku/progrium_buildstep.tgz +GITRECEIVE_URL ?= https://raw.github.com/progrium/gitreceive/master/gitreceive +SSHCOMMAND_URL ?= https://raw.github.com/progrium/sshcommand/master/sshcommand +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 +STACK_URL ?= https://s3.amazonaws.com/progrium-dokku/progrium_buildstep.tgz all: dependencies stack install plugins From 99dcacd991fccc0d2e7469ec918f747b427e9034 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 2 Jul 2013 23:28:14 +0200 Subject: [PATCH 4/6] Tune "Advanced installation" documentation --- README.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 53c0f1a09..b090054fd 100644 --- a/README.md +++ b/README.md @@ -53,14 +53,29 @@ You're done! ## Advanced installation (for development) -The bootstrap script allows source URLs to be overridden to include customizations from your own -repositories. The GITRECEIVE_URL and DOKKU_REPO environment variables -may be set to override the defaults (see the bootstrap.sh script for how these apply). Example: +If you plan on developing dokku, the easiest way to install from your own repository is cloning +the repository and calling the install script. Example: - $ wget j.mp/dokku-bootstrap + $ git clone https://github.com/yourusername/dokku.git + $ cde 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/progrium/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 -O bootstrap.sh j.mp/dokku-bootstrap $ chmod +x bootstrap.sh $ sudo DOKKU_REPO=https://github.com/yourusername/dokku.git ./bootstrap.sh - + ## Upgrading Dokku is in active development. You can update the deployment step and the build step separately. From 621de7cbd1585f690f234197921e32a594c252c5 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 2 Jul 2013 23:41:48 +0200 Subject: [PATCH 5/6] We don't want the progrium version here ;) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b090054fd..08e50fca0 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ repositories. The DOCKER_URL, GITRECEIVE_URL, PLUGINHOOK_URL, SSHCOMMAND_URL and environment variables may be set to override the defaults (see the `Makefile` for how these apply). Example: - $ sudo GITRECEIVE_URL=https://raw.github.com/progrium/gitreceive/master/gitreceive make all + $ sudo GITRECEIVE_URL=https://raw.github.com/yourusername/gitreceive/master/gitreceive make all ## Advanced installation (bootstrap a server from your own repository) From 49f1c444c40e74272b5a5593f957daea7f1b71d4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 3 Jul 2013 09:06:08 +0200 Subject: [PATCH 6/6] cde -> cd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 08e50fca0..9ffa1bb7d 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ If you plan on developing dokku, the easiest way to install from your own reposi the repository and calling the install script. Example: $ git clone https://github.com/yourusername/dokku.git - $ cde dokku + $ cd dokku $ sudo make all The `Makefile` allows source URLs to be overridden to include customizations from your own