Add more detailed running instructions.

Fixes #290
This commit is contained in:
Victor Marmol 2014-11-03 17:21:38 -08:00
parent 84da7270da
commit c53641c29f
2 changed files with 50 additions and 1 deletions

View File

@ -24,7 +24,7 @@ sudo docker run \
cAdvisor is now running (in the background) on `http://localhost:8080`. The setup includes directories with Docker state cAdvisor needs to observe.
**Note**: On CentOS and RHEL 6, run cAdvisor with an additional option ```--volume=/cgroup:/cgroup \```
**Note**: If you're running on CentOS, RHEL, or are using LXC take a look at our [running instructions](docs/running.md).
If you want to build your own cAdvisor Docker image, take a look at `deploy/Dockerfile` and `deploy/build.sh`.

49
docs/running.md Normal file
View File

@ -0,0 +1,49 @@
# Running cAdvisor
## With Docker
We have a Docker image that includes everything you need to get started. Simply run:
```
sudo docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--publish=8080:8080 \
--detach=true \
--name=cadvisor \
google/cadvisor:latest
```
cAdvisor is now running (in the background) on `http://localhost:8080/`. The setup includes directories with Docker state cAdvisor needs to observe.
### CentOS and RHEL
On CentOS and RHEL the cgroup hierarchies are mounted in `/cgroup` so run cAdvisor with an additional Docker option of `--volume=/cgroup:/cgroup \`.
### LXC Docker exec driver
If you are using Docker with the LXC exec driver, then you need to manually specify all cgroup mounts by adding the:
```
--volume=/cgroup/cpu:/cgroup/cpu \
--volume=/cgroup/cpuacct:/cgroup/cpuacct \
--volume=/cgroup/cpuset:/cgroup/cpuset \
--volume=/cgroup/memory:/cgroup/memory \
--volume=/cgroup/blkio:/cgroup/blkio \
```
## Standalone
cAdvisor is a static Go binary with no external dependencies. To run it standalone all you should need to do is run it! Note that some data sources may require root priviledges. cAdvisor will gracefully degrade its features to those it can expose with the access given.
```
$ sudo cadvisor
```
cAdvisor is now running (in the foreground) on `http://localhost:8080/`.
## I need help!
We aim to have cAdvisor run everywhere! If you run into issues getting it running, feel free to file an issue. We are very responsive in supporting our users and update our documentation with new setups.