diff --git a/Makefile b/Makefile index c69d5bda4..042dc0266 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ DOKKU_VERSION = master SSHCOMMAND_URL ?= https://raw.github.com/progrium/sshcommand/master/sshcommand PLUGINHOOK_URL ?= https://s3.amazonaws.com/progrium-pluginhook/pluginhook_0.1.0_amd64.deb -STACK_URL ?= https://github.com/progrium/buildstep.git -PREBUILT_STACK_URL ?= https://github.com/progrium/buildstep/releases/download/2014-12-16/2014-12-16_42bd9f4aab.tar.gz +STACK_URL ?= https://github.com/gliderlabs/herokuish.git +PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest PLUGINS_PATH ?= /var/lib/dokku/plugins # If the first argument is "vagrant-dokku"... @@ -27,7 +27,7 @@ install: dependencies copyfiles plugin-dependencies plugins version release: deb-all package_cloud packer package_cloud: - package_cloud push dokku/dokku/ubuntu/trusty buildstep*.deb + package_cloud push dokku/dokku/ubuntu/trusty herokuish*.deb package_cloud push dokku/dokku/ubuntu/trusty sshcommand*.deb package_cloud push dokku/dokku/ubuntu/trusty pluginhook*.deb package_cloud push dokku/dokku/ubuntu/trusty rubygem*.deb @@ -105,11 +105,15 @@ endif stack: ifeq ($(shell test -e /var/run/docker.sock && touch -a -c /var/run/docker.sock && echo $$?),0) - @echo "Start building buildstep" + @echo "Start building herokuish" ifdef BUILD_STACK - @docker images | grep progrium/buildstep || (git clone ${STACK_URL} /tmp/buildstep && docker build -t progrium/buildstep /tmp/buildstep && rm -rf /tmp/buildstep) + @docker images | grep gliderlabs/herokuish || (git clone ${STACK_URL} /tmp/herokuish && docker build -t gliderlabs/herokuish /tmp/herokuish && rm -rf /tmp/herokuish) else - @docker images | grep progrium/buildstep || curl --silent -L ${PREBUILT_STACK_URL} | gunzip -cd | docker import - progrium/buildstep +ifeq ($(shell echo ${PREBUILT_STACK_URL} | egrep -q 'http.*://' && echo $$?),0) + @docker images | grep gliderlabs/herokuish || curl --silent -L ${PREBUILT_STACK_URL} | gunzip -cd | docker import - gliderlabs/herokuish +else + @docker pull ${PREBUILT_STACK_URL} +endif endif endif diff --git a/deb.mk b/deb.mk index b4e20398a..9f25b4d44 100644 --- a/deb.mk +++ b/deb.mk @@ -1,8 +1,8 @@ -BUILDSTEP_DESCRIPTION = 'Buildstep uses Docker and Buildpacks to build applications like Heroku' -BUILDSTEP_REPO_NAME ?= progrium/buildstep -BUILDSTEP_VERSION ?= 0.0.2 -BUILDSTEP_ARCHITECTURE = amd64 -BUILDSTEP_PACKAGE_NAME = buildstep_$(BUILDSTEP_VERSION)_$(BUILDSTEP_ARCHITECTURE).deb +HEROKUISH_DESCRIPTION = 'Herokish uses Docker and Buildpacks to build applications like Heroku' +HEROKUISH_REPO_NAME ?= gliderlabs/herokuish +HEROKUISH_VERSION ?= 0.0.1 +HEROKUISH_ARCHITECTURE = amd64 +HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb DOKKU_DESCRIPTION = 'Docker powered mini-Heroku in around 100 lines of Bash' DOKKU_REPO_NAME ?= progrium/dokku @@ -26,7 +26,7 @@ GOROOT = /usr/lib/go GOBIN = /usr/bin/go GOPATH = /home/vagrant/gocode -.PHONY: install-from-deb deb-all deb-buildstep deb-dokku deb-gems deb-pluginhook deb-setup deb-sshcommand +.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-gems deb-pluginhook deb-setup deb-sshcommand install-from-deb: echo "--> Initial apt-get update" @@ -54,7 +54,7 @@ install-from-deb: echo "--> Done!" -deb-all: deb-buildstep deb-dokku deb-gems deb-pluginhook deb-sshcommand +deb-all: deb-herokuish deb-dokku deb-gems deb-pluginhook deb-sshcommand mv /tmp/*.deb . echo "Done" @@ -65,31 +65,31 @@ deb-setup: command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc ssh -o StrictHostKeyChecking=no git@github.com || true -deb-buildstep: deb-setup - rm -rf /tmp/tmp /tmp/build $(BUILDSTEP_PACKAGE_NAME) +deb-herokuish: deb-setup + rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME) mkdir -p /tmp/tmp /tmp/build echo "-> Creating deb files" echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install echo "sleep 5" >> /tmp/tmp/post-install - echo "count=\`sudo docker images | grep progrium/buildstep | wc -l\`" >> /tmp/tmp/post-install + echo "count=\`sudo docker images | grep gliderlabs/herokuish | wc -l\`" >> /tmp/tmp/post-install echo 'if [ "$$count" -ne 0 ]; then' >> /tmp/tmp/post-install - echo " echo 'Removing old buildstep image'" >> /tmp/tmp/post-install - echo " sudo docker rmi progrium/buildstep" >> /tmp/tmp/post-install + echo " echo 'Removing old herokuish image'" >> /tmp/tmp/post-install + echo " sudo docker rmi gliderlabs/herokuish" >> /tmp/tmp/post-install echo "fi" >> /tmp/tmp/post-install - echo "echo 'Importing buildstep into docker (around 5 minutes)'" >> /tmp/tmp/post-install - echo "sudo docker build -t progrium/buildstep /var/lib/buildstep 1> /dev/null" >> /tmp/tmp/post-install + echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install + echo "sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null" >> /tmp/tmp/post-install echo "-> Cloning repository" - git clone -q "git@github.com:$(BUILDSTEP_REPO_NAME).git" /tmp/tmp/buildstep > /dev/null - rm -rf /tmp/tmp/buildstep/.git /tmp/tmp/buildstep/.gitignore + git clone -q "git@github.com:$(HEROKUISH_REPO_NAME).git" /tmp/tmp/herokuish > /dev/null + rm -rf /tmp/tmp/herokuish/.git /tmp/tmp/herokuish/.gitignore echo "-> Copying files into place" mkdir -p "/tmp/build/var/lib" - cp -rf /tmp/tmp/buildstep /tmp/build/var/lib/buildstep + cp -rf /tmp/tmp/herokuish /tmp/build/var/lib/herokuish - echo "-> Creating $(BUILDSTEP_PACKAGE_NAME)" - sudo fpm -t deb -s dir -C /tmp/build -n buildstep -v $(BUILDSTEP_VERSION) -a $(BUILDSTEP_ARCHITECTURE) -p $(BUILDSTEP_PACKAGE_NAME) --deb-pre-depends 'lxc-docker-1.6.2' --after-install /tmp/tmp/post-install --url "https://github.com/$(BUILDSTEP_REPO_NAME)" --description $(BUILDSTEP_DESCRIPTION) --license 'MIT License' . + echo "-> Creating $(HEROKUISH_PACKAGE_NAME)" + sudo fpm -t deb -s dir -C /tmp/build -n HEROKUISH -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'lxc-docker-1.6.2' --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' . mv *.deb /tmp deb-dokku: deb-setup diff --git a/debian/control b/debian/control index 4aaa8d13c..95bcc83cd 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Version: 0.3.12 Section: base Priority: optional Architecture: amd64 -Depends: locales, git, make, curl, software-properties-common, lxc-docker-1.6.2, gcc, python-software-properties, man-db, buildstep, sshcommand, pluginhook +Depends: locales, git, make, curl, software-properties-common, lxc-docker-1.6.2, gcc, python-software-properties, man-db, herokuish, sshcommand, pluginhook Pre-Depends: nginx, dnsutils, ruby, ruby-dev, rubygem-rack, rubygem-rack-protection, rubygem-sinatra, rubygem-tilt, apparmor, cgroup-lite Provides: dokku Maintainer: Jose Diaz-Gonzalez diff --git a/docs/advanced-installation.md b/docs/advanced-installation.md index f9ec9c36a..d06fcbc56 100644 --- a/docs/advanced-installation.md +++ b/docs/advanced-installation.md @@ -32,14 +32,14 @@ chmod +x bootstrap.sh sudo DOKKU_REPO=https://github.com/yourusername/dokku.git DOKKU_BRANCH=master ./bootstrap.sh ``` -## Custom buildstep build +## Custom herokuish build -Dokku ships with a pre-built version of version of the [buildstep](https://github.com/progrium/buildstep) component by default. If you want to build your own version you can specify that with an env variable. +Dokku ships with a pre-built version of version of the [herokuish](https://github.com/gliderlabs/herokuish) component by default. If you want to build your own version you can specify that with an env variable. ```shell git clone https://github.com/progrium/dokku.git cd dokku -sudo BUILD_STACK=true STACK_URL=https://github.com/progrium/buildstep.git make install +sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make install ``` ## Configuring diff --git a/docs/application-deployment.md b/docs/application-deployment.md index 7cb332b20..9ca0663ab 100644 --- a/docs/application-deployment.md +++ b/docs/application-deployment.md @@ -25,7 +25,7 @@ You're done! Dokku only supports deploying from its master branch, so if you'd like to deploy a different local branch use: ```git push dokku :master``` -Right now Buildstep supports buildpacks for Node.js, Ruby, Python, [and more](https://github.com/progrium/buildstep#supported-buildpacks). It's not hard to add more, [go add more](https://github.com/progrium/buildstep#adding-buildpacks)! +Right now Herokuish supports buildpacks for Node.js, Ruby, Python, [and more](https://github.com/gliderlabs/herokuish#buildpacks). It's not hard to add more, [go add more](https://github.com/progrium/buildstep#adding-buildpacks)! Please check the documentation for your particular build pack as you may need to include configuration files (such as a Procfile) in your project root. ## Deploying to server over SSH diff --git a/docs/checks-examples.md b/docs/checks-examples.md index 733674bc8..70aca9be2 100644 --- a/docs/checks-examples.md +++ b/docs/checks-examples.md @@ -53,7 +53,7 @@ ATTEMPTS=6 git push dokku master -----> Cleaning up... ------> Building myapp from buildstep... +-----> Building myapp from herokuish... -----> Adding BUILD_ENV to build environment... -----> Ruby app detected -----> Compiling Ruby/Rails @@ -71,13 +71,13 @@ git push dokku master http://localhost/check.txt => "simple_check" ! curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused - ! Check attempt 1/6 failed. + ! Check attempt 1/6 failed. -----> Attempt 2/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/check.txt => "simple_check" ! curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused - ! Check attempt 2/6 failed. + ! Check attempt 2/6 failed. -----> Attempt 3/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/check.txt => "simple_check" @@ -124,7 +124,7 @@ ATTEMPTS=6 git push dokku master -----> Cleaning up... ------> Building myapp from buildstep... +-----> Building myapp from herokuish... -----> Adding BUILD_ENV to build environment... -----> Ruby app detected -----> Compiling Ruby/Rails @@ -142,38 +142,38 @@ Running pre-flight checks http://localhost/ => "" ! curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused - ! Check attempt 1/6 failed. + ! Check attempt 1/6 failed. -----> Attempt 2/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" - ! + ! curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused - ! Check attempt 2/6 failed. + ! Check attempt 2/6 failed. -----> Attempt 3/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" - ! + ! curl: (22) The requested URL returned error: 500 Internal Server Error - ! Check attempt 3/6 failed. + ! Check attempt 3/6 failed. -----> Attempt 4/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" - ! + ! curl: (22) The requested URL returned error: 500 Internal Server Error - ! Check attempt 4/6 failed. + ! Check attempt 4/6 failed. -----> Attempt 5/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" - ! + ! curl: (22) The requested URL returned error: 500 Internal Server Error - ! Check attempt 5/6 failed. + ! Check attempt 5/6 failed. -----> Attempt 6/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" - ! + ! curl: (22) The requested URL returned error: 500 Internal Server Error Could not start due to 1 failed checks. - ! Check attempt 6/6 failed. + ! Check attempt 6/6 failed. =====> myapp container output: => Booting Thin => Rails 4.2.0 application starting in production on http://0.0.0.0:5000 diff --git a/docs/components.md b/docs/components.md index 200a538c1..a6bfa453f 100644 --- a/docs/components.md +++ b/docs/components.md @@ -1,7 +1,7 @@ # Components * [Docker](https://github.com/dotcloud/docker) - Container runtime and manager - * [Buildstep](https://github.com/progrium/buildstep) - Buildpack builder + * [Herokuish](https://github.com/gliderlabs/herokuish) - Buildpack builder * [pluginhook](https://github.com/progrium/pluginhook) - Shell based plugins and hooks * [sshcommand](https://github.com/progrium/sshcommand) - Fixed commands over SSH diff --git a/docs/development/pluginhooks.md b/docs/development/pluginhooks.md index 78e464d4d..036359442 100644 --- a/docs/development/pluginhooks.md +++ b/docs/development/pluginhooks.md @@ -83,7 +83,7 @@ esac ```shell #!/usr/bin/env bash -# Update the buildstep image from git source +# Update the herokuish image from git source set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x @@ -180,9 +180,9 @@ for file in */REDIRECT; do done ``` -### `pre-build-buildstep` +### `pre-build-herokuish` -- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using buildstep. +- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using herokuish. - Invoked by: `dokku build` - Arguments: `$APP` - Example: @@ -195,9 +195,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x # TODO ``` -### `post-build-buildstep` +### `post-build-herokuish` -- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildstep. +- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using herokuish. - Invoked by: `dokku build` - Arguments: `$APP` - Example: @@ -240,9 +240,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x # TODO ``` -### `pre-release-buildstep` +### `pre-release-herokuish` -- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using buildstep. +- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using herokuish. - Invoked by: `dokku release` - Arguments: `$APP` - Example: @@ -266,9 +266,9 @@ test $(docker wait $ID) -eq 0 docker commit $ID $IMAGE > /dev/null ``` -### `post-release-buildstep` +### `post-release-herokuish` -- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using buildstep. +- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using herokuish. - Invoked by: `dokku release` - Arguments: `$APP` - Example: diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d46f464f4..5b31486d5 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -27,9 +27,9 @@ A value of 64 would allow domains with up to 64 characters. Set it to 128 if you Save the file and try stopping nginx and starting it again: ``` -root@dockerapps:~/dokku/buildstep# /etc/init.d/nginx stop +root@dockerapps:~/dokku# /etc/init.d/nginx stop * Stopping nginx nginx [ OK ] -root@dockerapps:~/dokku/buildstep# /etc/init.d/nginx start +root@dockerapps:~/dokku# /etc/init.d/nginx start * Starting nginx nginx [ OK ] ``` diff --git a/docs/upgrading.md b/docs/upgrading.md index a2a02e4e6..0cda846d5 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -37,26 +37,26 @@ All changes will take effect upon next application deployment. To trigger a rebu dokku ps:rebuildall ``` -## Buildstep image +## Herokuish image -If dokku was installed via a debian package, you can upgrade buildstep via the following command: +If dokku was installed via a debian package, you can upgrade herokuish via the following command: ```shell -sudo apt-get install buildstep +sudo apt-get install Herokush ``` For unattended upgrades, you may run the following command: ```shell -sudo apt-get install -qq -y buildstep +sudo apt-get install -qq -y herokuish ``` -In some cases, it may be desirable to run a specific version of buildstep. To install/upgrade buildstep from source, run the following commands: +In some cases, it may be desirable to run a specific version of herokuish. To install/upgrade herokuish from source, run the following commands: ```shell cd /tmp -git clone https://github.com/progrium/buildstep.git -cd buildstep +git clone https://github.com/gliderlabs/herokuish.git +cd herokuish git pull origin master sudo make build ``` diff --git a/dokku b/dokku index 56e06f169..1fdb9fdea 100755 --- a/dokku +++ b/dokku @@ -3,7 +3,7 @@ set -eo pipefail shopt -s nullglob export DOKKU_DISTRO=${DOKKU_DISTRO:="ubuntu"} -export DOKKU_IMAGE=${DOKKU_IMAGE:="progrium/buildstep"} +export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish"} export DOKKU_ROOT=${DOKKU_ROOT:=~dokku} export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"} @@ -69,7 +69,7 @@ case "$1" in APP="$2"; IMAGE="dokku/$APP" pluginhook pre-deploy $APP - is_image_buildstep_based "$IMAGE" && DOKKU_BUILDSTEP=true + is_image_herokuish_based "$IMAGE" && DOKKU_HEROKUISH=true DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE" oldids=$(get_container_ids $APP) @@ -91,9 +91,9 @@ case "$1" in DOCKER_ARGS+=$(: | pluginhook docker-args-deploy $APP) BIND_EXTERNAL=$(pluginhook bind-external-ip $APP) - [[ -n "$DOKKU_BUILDSTEP" ]] && START_CMD="/start $PROC_TYPE" + [[ -n "$DOKKU_HEROKUISH" ]] && START_CMD="/start $PROC_TYPE" - if [[ -z "$DOKKU_BUILDSTEP" ]];then + if [[ -z "$DOKKU_HEROKUISH" ]];then DOKKU_DOCKERFILE_PORT=$(dokku config:get $APP DOKKU_DOCKERFILE_PORT || true) START_CMD=$(dokku config:get $APP DOKKU_DOCKERFILE_START_CMD || $START_CMD) fi diff --git a/plugins/00_dokku-standard/commands b/plugins/00_dokku-standard/commands index e6c6d5751..10a74e392 100755 --- a/plugins/00_dokku-standard/commands +++ b/plugins/00_dokku-standard/commands @@ -11,14 +11,14 @@ case "$1" in pushd "$TMP_WORK_DIR" &> /dev/null case "$IMAGE_SOURCE_TYPE" in - buildstep) + herokuish) id=$(tar -c . | docker run -i -a stdin $DOKKU_IMAGE /bin/bash -c "mkdir -p /app && tar -xC /app") test "$(docker wait $id)" -eq 0 docker commit $id $IMAGE > /dev/null [[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR # *DEPRECATED* in v0.4.0: `pluginhook pre-build` will be removed in future releases pluginhook pre-build "$APP" - pluginhook pre-build-buildstep "$APP" + pluginhook pre-build-herokuish "$APP" # *DEPRECATED* in v0.3.14: `pluginhook docker-args` will be removed in future releases # https://github.com/progrium/dokku/issues/896 & https://github.com/progrium/dokku/issues/906 @@ -31,7 +31,7 @@ case "$1" in # *DEPRECATED* in v0.4.0: `pluginhook post-build` will be removed in future releases pluginhook post-build "$APP" - pluginhook post-build-buildstep "$APP" + pluginhook post-build-herokuish "$APP" ;; dockerfile) @@ -39,7 +39,7 @@ case "$1" in DOCKERFILE_PORT=$(grep EXPOSE Dockerfile | head -1 | awk '{ print $2 }' || true) [[ -n "$DOCKERFILE_PORT" ]] && dokku config:set-norestart $APP DOKKU_DOCKERFILE_PORT=$DOCKERFILE_PORT - # buildstep pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!! + # herokuish pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!! pluginhook pre-build-dockerfile "$APP" [[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache" @@ -57,10 +57,10 @@ case "$1" in release) APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3" case "$IMAGE_SOURCE_TYPE" in - buildstep) + herokuish) # *DEPRECATED* in v0.4.0: `pluginhook pre-release` will be removed in future releases pluginhook pre-release "$APP" - pluginhook pre-release-buildstep "$APP" + pluginhook pre-release-herokuish "$APP" if [[ -f "$DOKKU_ROOT/ENV" ]]; then id=$(docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh" < "$DOKKU_ROOT/ENV") test "$(docker wait $id)" -eq 0 @@ -73,11 +73,11 @@ case "$1" in fi # *DEPRECATED* in v0.4.0: `pluginhook post-release` will be removed in future releases pluginhook post-release "$APP" - pluginhook post-release-buildstep "$APP" + pluginhook post-release-herokuish "$APP" ;; dockerfile) - # buildstep pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!! + # herokuish pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!! pluginhook pre-release-dockerfile "$APP" pluginhook post-release-dockerfile "$APP" ;; @@ -170,7 +170,7 @@ case "$1" in DOCKER_ARGS+=$(: | pluginhook docker-args-run $APP) [[ $DOKKU_RM_CONTAINER ]] && DOKKU_RUN_OPTS="--rm" has_tty && DOKKU_RUN_OPTS+=" -i -t" - is_image_buildstep_based "$IMAGE" && EXEC_CMD="/exec" + is_image_herokuish_based "$IMAGE" && EXEC_CMD="/exec" docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@" ;; diff --git a/plugins/common/functions b/plugins/common/functions index c7afd2bc1..f76935f08 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -131,7 +131,7 @@ verify_image() { fi } -is_image_buildstep_based() { +is_image_herokuish_based() { # circleci can't support --rm as they run lxc in lxc [[ ! -f "/home/ubuntu/.circlerc" ]] && local DOCKER_ARGS="--rm" docker run --entrypoint="/bin/bash" $DOCKER_ARGS "$@" -c "[[ -f /exec ]]" diff --git a/plugins/config/docker-args-deploy b/plugins/config/docker-args-deploy index 53bda2383..8d1f1ef24 100755 --- a/plugins/config/docker-args-deploy +++ b/plugins/config/docker-args-deploy @@ -5,7 +5,7 @@ source "$(dirname $0)/../common/functions" STDIN=$(cat); APP="$1"; IMAGE="dokku/$APP" DOCKERFILE_ENV_FILE="$DOKKU_ROOT/$APP/DOCKERFILE_ENV_FILE" -if ! is_image_buildstep_based "$IMAGE"; then +if ! is_image_herokuish_based "$IMAGE"; then > "$DOCKERFILE_ENV_FILE" [[ -f "$DOKKU_ROOT/ENV" ]] && sed -e "s:^export ::g" -e "s:=':=:g" -e "s:'$::g" "$DOKKU_ROOT/ENV" > "$DOCKERFILE_ENV_FILE" [[ -f "$DOKKU_ROOT/$APP/ENV" ]] && sed -e "s:^export ::g" -e "s:=':=:g" -e "s:'$::g" "$DOKKU_ROOT/$APP/ENV" >> "$DOCKERFILE_ENV_FILE" diff --git a/plugins/git/commands b/plugins/git/commands index 174ba12ab..a2b9e3cd6 100755 --- a/plugins/git/commands +++ b/plugins/git/commands @@ -23,7 +23,7 @@ git_build_app_repo() { if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]]; then dokku receive "$APP" "dockerfile" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" else - dokku receive "$APP" "buildstep" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" + dokku receive "$APP" "herokuish" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" fi } diff --git a/plugins/ps/functions b/plugins/ps/functions index e92632564..b41d46d8a 100755 --- a/plugins/ps/functions +++ b/plugins/ps/functions @@ -6,9 +6,9 @@ release_and_deploy() { source "$(dirname $0)/../common/functions" local APP="$1"; local IMAGE="dokku/$APP" - if verify_image "$IMAGE"; then - if is_image_buildstep_based "$IMAGE"; then - IMAGE_SOURCE_TYPE="buildstep" + if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then + if is_image_herokuish_based "$IMAGE"; then + IMAGE_SOURCE_TYPE="herokuish" else IMAGE_SOURCE_TYPE="dockerfile" fi diff --git a/tests/ci/parallel_runner.sh b/tests/ci/parallel_runner.sh index 2bec642e8..b1bb958c7 100755 --- a/tests/ci/parallel_runner.sh +++ b/tests/ci/parallel_runner.sh @@ -33,13 +33,13 @@ case "$CIRCLE_NODE_INDEX" in ;; 2) - echo "=====> make deploy-tests (buildstep release) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX" + echo "=====> make deploy-tests (herokuish release) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX" [[ "$MODE" == "setup" ]] && setup_circle && exit 0 sudo -E make -e deploy-tests ;; 3) - echo "=====> make deploy-tests (buildstep master) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX" + echo "=====> make deploy-tests (herokuish master) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX" [[ "$MODE" == "setup" ]] && setup_circle buildstack && exit 0 sudo -E make -e deploy-tests ;; diff --git a/tests/unit/config.bats b/tests/unit/config.bats index 187f90946..380db45fa 100644 --- a/tests/unit/config.bats +++ b/tests/unit/config.bats @@ -53,7 +53,7 @@ teardown() { assert_output "" } -@test "(config) global config (buildstep)" { +@test "(config) global config (herokuish)" { deploy_app run bash -c "dokku run $TEST_APP env | egrep '^global_test=true'" echo "output: "$output diff --git a/tests/unit/ps-buildstep.bats b/tests/unit/ps-herokuish.bats similarity index 97% rename from tests/unit/ps-buildstep.bats rename to tests/unit/ps-herokuish.bats index e10534239..c55a3468a 100644 --- a/tests/unit/ps-buildstep.bats +++ b/tests/unit/ps-herokuish.bats @@ -10,7 +10,7 @@ teardown() { destroy_app } -# @test "(ps) buildstep" { +# @test "(ps) herokuish" { # # CI support: 'Ah. I just spoke with our Docker expert -- # # looks like docker exec is built to work with docker-under-libcontainer, # # but we're using docker-under-lxc. I don't have an estimated time for the fix, sorry @@ -21,7 +21,7 @@ teardown() { # assert_success # } -@test "(ps) buildstep" { +@test "(ps) herokuish" { deploy_app run bash -c "dokku ps:stop $TEST_APP" echo "output: "$output @@ -68,7 +68,7 @@ teardown() { done } -@test "(ps:scale) buildstep" { +@test "(ps:scale) herokuish" { run bash -c "dokku ps:scale $TEST_APP web=2 worker=2" echo "output: "$output echo "status: "$status