raintank / raintank-docker

raintank docker images and dev stack DEPRECATED / UNMAINTAINED
https://blog.raintank.io/docker-based-development-environment/
16 stars 4 forks source link

raintank-docker screen based dev environment

This stack runs a development stack, using every component used at raintank (minus Grafana.net), that is:

This is a whole lot of stuff because this stack covers every possible flavour of deployment plus extra tools which may be useful, but often not.
In practice you'll probably only use a fraction and that's OK. In the future we may create different scripts to launch different, more minimal versions of the stack. But for now, this approach works well enough.

Note: raintank-apps like taskServer and taskAgent are currently disabled. See this issue

To provision a full dev stack using docker

for your convenience, this code may be all you need (tested on ubuntu 14.04) to get the stack up.

curl -sSL https://get.docker.com/ubuntu/ | sudo sh
curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

git clone git@github.com:raintank/raintank-docker.git
cd raintank-docker
./build_all.sh
./setup_dev.sh
./launch_dev.sh

When stuff goes wrong

Then run docker ps -a to identify which containers failed. You will see something like:

(...)
960f23654203      raintank/eventtank        "/start.sh -config /e"   About a minute ago   Up About a minute           0.0.0.0:6062->6060/tcp    raintank_eventtank_1
feb682f3a24a      raintank/metrictank       "/usr/bin/metrictank_"   About a minute ago   Exited (1) 54 seconds ago                             raintank_metrictank_1
386a2ee9fbe2      raintank/task-server      "/start.sh --config /"   About a minute ago   Up About a minute           0.0.0.0:8082->80/tcp      raintank_taskServer_1
(...)

Look for all the containers which exited, in the first column you can see their container id's. (note, this listing may also include old containers which have exited hours or days ago, which are not relevant. Be sure to start at the top and work your way down and look at the status column to see what's relevant.

Then, for the containers that failed, run docker logs <container-id from first column> this should help explain what failed. If it doesn't, please post the output of this command as well as docker ps -a in a github issue.

Switching branches

in a new raintank-docker branch, you can just run /build_all.sh, which updates the "latest" images. If your latest images have been overridden by being in a different branch, ./restore_branch_images.sh will sync up the latest tags to the images you last generated on this branch.