From 568bfb2513b5c29416b1d2be27786c911327ebe5 Mon Sep 17 00:00:00 2001 From: Bradley Cicenas Date: Wed, 14 Jun 2017 12:17:44 +0000 Subject: [PATCH] v0.6 doc updates --- README.md | 25 +++++++++++-------------- _docs/connectors.md | 28 ++++++++++++++++++++++++++++ _docs/connectors/runc.md | 13 ------------- 3 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 _docs/connectors.md delete mode 100644 _docs/connectors/runc.md diff --git a/README.md b/README.md index 68b436e..4835222 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ # -![release][release] ![homebrew][homebrew] - Top-like interface for container metrics `ctop` provides a concise and condensed overview of real-time metrics for multiple containers: @@ -11,7 +9,7 @@ Top-like interface for container metrics as well as an [expanded view][expanded_view] for inspecting a specific container. -`ctop` currently comes with built-in support for Docker; connectors for other container and cluster systems are planned for future releases. +`ctop` comes with built-in support for Docker and runC; connectors for other container and cluster systems are planned for future releases. ## Install @@ -20,7 +18,7 @@ Fetch the [latest release](https://github.com/bcicen/ctop/releases) for your pla #### Linux ```bash -sudo wget https://github.com/bcicen/ctop/releases/download/v0.5/ctop-0.5-linux-amd64 -O /usr/local/bin/ctop +sudo wget https://github.com/bcicen/ctop/releases/download/v0.6/ctop-0.6-linux-amd64 -O /usr/local/bin/ctop sudo chmod +x /usr/local/bin/ctop ``` @@ -31,13 +29,17 @@ brew install ctop ``` or ```bash -sudo curl -Lo /usr/local/bin/ctop https://github.com/bcicen/ctop/releases/download/v0.5/ctop-0.5-darwin-amd64 +sudo curl -Lo /usr/local/bin/ctop https://github.com/bcicen/ctop/releases/download/v0.6/ctop-0.6-darwin-amd64 sudo chmod +x /usr/local/bin/ctop ``` -or run via Docker: +#### Docker + ```bash -docker run -ti --name ctop --rm -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest +docker run --rm -ti \ + --name=ctop \ + -v /var/run/docker.sock:/var/run/docker.sock \ + quay.io/vektorlab/ctop:latest ``` `ctop` is also available for Arch in the [AUR](https://aur.archlinux.org/packages/ctop-bin/) @@ -48,11 +50,7 @@ Build steps can be found [here][build]. ## Usage -`ctop` requires no arguments and will configure itself using the `DOCKER_HOST` environment variable -```bash -export DOCKER_HOST=tcp://127.0.0.1:4243 -ctop -``` +`ctop` requires no arguments and uses Docker host variables by default. See [connectors][connectors] for further configuration options. ### Options @@ -79,6 +77,5 @@ r | Reverse container sort order q | Quit ctop [build]: _docs/build.md +[connectors]: _docs/connectors.md [expanded_view]: _docs/expanded.md -[release]: https://img.shields.io/github/release/bcicen/ctop.svg "ctop" -[homebrew]: https://img.shields.io/homebrew/v/ctop.svg "ctop" diff --git a/_docs/connectors.md b/_docs/connectors.md new file mode 100644 index 0000000..fe468e0 --- /dev/null +++ b/_docs/connectors.md @@ -0,0 +1,28 @@ +# connectors + +`ctop` comes with the below native connectors, enabled via the `--connector` option. + +Default connector behavior can be changed by setting the relevant environment variables. + +## Docker + +Default connector, configurable via standard [Docker commandline varaibles](https://docs.docker.com/engine/reference/commandline/cli/#environment-variables) + +### Options + +Var | Description +--- | --- +DOCKER_HOST | Daemon socket to connect to (default: `unix://var/run/docker.sock`) + +## RunC + +Using this connector requires full privileges to the local runC root dir (default: `/run/runc`) + +### Options + +Default connector behavior can be changed by setting the below environment variables: + +Var | Description +--- | --- +RUNC_ROOT | path to runc root (default: `/run/runc`) +RUNC_SYSTEMD_CGROUP | if set, enable systemd cgroups diff --git a/_docs/connectors/runc.md b/_docs/connectors/runc.md deleted file mode 100644 index b96f6a9..0000000 --- a/_docs/connectors/runc.md +++ /dev/null @@ -1,13 +0,0 @@ -# runc - -`ctop` comes with a native connector for runc containers and can be enabled via the `--connector runc` option. - -## Options - -Default connector behavior can be changed by setting the below environment variables: - -Var | Description ---- | --- -RUNC_ROOT | path to runc root (default: `/run/runc`) -RUNC_SYSTEMD_CGROUP | if set, enable systemd cgroups -