Merge pull request #3868 from dokku/remove-ps-command

Remove ps command
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2020-02-22 04:25:24 -05:00
commit 9beefe923f
6 files changed
+10 -57

No files matched your search

@@ -13,6 +13,7 @@ The following commands were previously deprecated and were removed in this relea
- `plugin`: Use `plugin:list` instead. - `plugin`: Use `plugin:list` instead.
- `proxy`: Use `proxy:report` instead. - `proxy`: Use `proxy:report` instead.
- `trace`: Use `trace:on` or `trace:off` instead. - `trace`: Use `trace:on` or `trace:off` instead.
- `ps`: Use `enter` with a container ID instead to run `ps auxww` within a container.
## Deprecations ## Deprecations
-9
View File
@@ -3,7 +3,6 @@
> New as of 0.3.14, Enhanced in 0.7.0 > New as of 0.3.14, Enhanced in 0.7.0
``` ```
ps <app> # List processes running in app container(s)
ps:inspect <app> # Displays a sanitized version of docker inspect for an app ps:inspect <app> # Displays a sanitized version of docker inspect for an app
ps:rebuild <app> # Rebuild an app from source ps:rebuild <app> # Rebuild an app from source
ps:rebuildall # Rebuild all apps from source ps:rebuildall # Rebuild all apps from source
@@ -25,14 +24,6 @@ By default, Dokku will only start a single `web` process - if defined - though p
## Usage ## Usage
### Listing processes running in an app container
To find out if your application's containers are running the commands you expect, simply run the `ps` command against that application.
```shell
dokku ps node-js-app
```
### Inspecting app containers ### Inspecting app containers
> New as of 0.13.0 > New as of 0.13.0
+2 -25
View File
@@ -1,29 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_AVAILABLE_PATH/ps/help-functions"
cmd-ps-default() { cmd-ps-help "ps:help"
declare desc="shows running processes in all running app containers"
declare cmd="ps"
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
dokku_log_warn "Deprecated: Please use ps:report"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
! (is_deployed "$APP") && dokku_log_warn "App $APP has not been deployed" && exit 0
local DOKKU_APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP" 2>/dev/null)
local CID
for CID in $DOKKU_APP_RUNNING_CONTAINER_IDS; do
has_tty && local DOKKU_RUN_OPTS="-i -t"
dokku_log_info1_quiet "running processes in container: $CID"
# shellcheck disable=SC2086
"$DOCKER_BIN" container exec $DOKKU_RUN_OPTS $CID /bin/sh -c "ps auxwww"
done
}
cmd-ps-default "$@"
-11
View File
@@ -12,17 +12,6 @@ teardown() {
global_teardown global_teardown
} }
# @test "(ps) dockerfile base" {
# # 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
# skip "circleci does not support docker exec at the moment."
# run /bin/bash -c "dokku ps $TEST_APP | grep -q \"node web.js\""
# echo "output: $output"
# echo "status: $status"
# assert_success
# }
@test "(ps) dockerfile" { @test "(ps) dockerfile" {
deploy_app dockerfile deploy_app dockerfile
run /bin/bash -c "dokku ps:stop $TEST_APP" run /bin/bash -c "dokku ps:stop $TEST_APP"
+7
View File
@@ -13,10 +13,17 @@ teardown() {
} }
@test "(ps) ps:help" { @test "(ps) ps:help" {
run /bin/bash -c "dokku ps"
echo "output: $output"
echo "status: $status"
assert_output_contains "Manage container processes"
help_output="$output"
run /bin/bash -c "dokku ps:help" run /bin/bash -c "dokku ps:help"
echo "output: $output" echo "output: $output"
echo "status: $status" echo "status: $status"
assert_output_contains "Manage container processes" assert_output_contains "Manage container processes"
assert_output "$help_output"
} }
@test "(ps) ps:inspect" { @test "(ps) ps:inspect" {
-12
View File
@@ -13,18 +13,6 @@ teardown() {
global_teardown global_teardown
} }
# @test "(ps) herokuish base" {
# # 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
# skip "circleci does not support docker exec at the moment."
# deploy_app
# run /bin/bash -c "dokku ps $TEST_APP | grep -q \"node web.js\""
# echo "output: $output"
# echo "status: $status"
# assert_success
# }
@test "(ps) herokuish" { @test "(ps) herokuish" {
deploy_app deploy_app
run /bin/bash -c "dokku ps:stop $TEST_APP" run /bin/bash -c "dokku ps:stop $TEST_APP"