From f974b104da26d82789d757b47baf9a23029a61a2 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 6 Nov 2014 16:20:34 +0100 Subject: [PATCH] update dockerfile and doc --- Dockerfile | 15 ++++++--- doc/source/dev.rst | 78 +++++++++++++++++++++++++--------------------- 2 files changed, 54 insertions(+), 39 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59123dd..03b9fe7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,19 +17,23 @@ from debian:stable maintainer Guillaume Pellerin +# install confs, keys and deps add ./deploy/apt-app.list /etc/apt/sources.list.d/ run apt-get update -run apt-get install -y wget apt-utils -run wget -O - http://debian.parisson.com/debian/conf/parisson.gpg.key | apt-key add - +run apt-get install -y apt-utils +run gpg --keyserver pgpkeys.mit.edu --recv-key E3298399DF14BB7C +run gpg -a --export E3298399DF14BB7C | apt-key add - run gpg --keyserver pgpkeys.mit.edu --recv-key 07DC563D1F41B907 run gpg -a --export 07DC563D1F41B907 | apt-key add - +run apt-get update +run apt-get upgrade -y --force-yes run apt-get install -y --force-yes build-essential vim run apt-get install -y python python-dev python-pip run apt-get -y -t wheezy-backports dist-upgrade run apt-get install -y --force-yes -t wheezy-backports nginx supervisor python-timeside git python-tables python-traits python-networkx ipython python-numexpr gstreamer0.10-alsa run apt-get clean -# install uwsgi now because it takes a little while +# install tools via pip run pip install uwsgi ipython # clone app @@ -41,9 +45,12 @@ run rm /etc/nginx/sites-enabled/default run ln -s /opt/TimeSide/deploy/nginx-app.conf /etc/nginx/sites-enabled/ run ln -s /opt/TimeSide/deploy/supervisor-app.conf /etc/supervisor/conf.d/ -# run pip install +# install new deps from the local repo run pip install -e /opt/TimeSide +# add dev repo path +run echo "export PYTHONPATH=$PYTHONPATH:/opt/Timeside" >> ~/.bashrc + # sandbox setup run /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput run /opt/TimeSide/examples/sandbox/manage.py migrate --noinput diff --git a/doc/source/dev.rst b/doc/source/dev.rst index b03256c..b92630e 100644 --- a/doc/source/dev.rst +++ b/doc/source/dev.rst @@ -9,22 +9,40 @@ Development .. |coveralls_dev| image:: https://coveralls.io/repos/Parisson/TimeSide/badge.png?branch=dev :target: https://coveralls.io/r/Parisson/TimeSide?branch=dev -First, install TimeSide (see Install). -Then:: +Docker (recommended) +-------------------- + +Docker is a great tool for developping and deploying processing environments! Our docker container includes all the necessary packages and environments for development and production with TimeSide. + +First, install Docker: https://docs.docker.com/installation/ + +Then, simply pull our dev image and run:: + + sudo docker pull parisson/timeside + sudo docker run parisson/timeside + +To get a shell:: + + sudo docker run -ti parisson/timeside bash + +More infos: https://registry.hub.docker.com/u/parisson/timeside/ + +To start the web server through the container:: + + sudo docker run -p 9000:80 parisson/timeside + +Finally browse http://localhost:9000/api/ + +To start a new development, it is advised to checkout the dev branch and build your own container:: + + sudo docker run -ti parisson/timeside bash + cd /opt/TimeSide + git checkout dev - sudo apt-get build-dep python-timeside - sudo apt-get install git - git clone https://github.com/Parisson/TimeSide.git - cd TimeSide - git checkout dev - sudo pip install -e . - echo "export PYTHONPATH=$PYTHONPATH:`pwd`" >> ~/.bashrc - source ~/.bashrc - tests/run_all_tests -VirtualBox and Vagrant ------------------------ +VirtualBox and Vagrant (deprecated) +----------------------------------- We also provide a vagrant box to install a virtual Debian system including TimeSide and all other dependencies. First, install Vagrant and VirtualVox:: @@ -49,29 +67,19 @@ To stop the virtual box:: vagrant halt -Docker +Native ------- -Docker is a great tool for developping and deploying processing environments! Our docker container includes all the necessary packages and environments for development and production with TimeSide. - -First, install Docker: https://docs.docker.com/installation/ - -Then, simply pull our dev image and run:: - - sudo docker pull parisson/timeside - sudo docker run -i -t parisson/timeside bash - -More infos: https://registry.hub.docker.com/u/parisson/timeside/ - -To start the web server through the container:: - - sudo docker run -p 9000:80 parisson/timeside supervisord -n - -Finally browse http://localhost:9000/api/ - -To start a new development, it is advised to checkout the dev branch and build your own container:: +First, install TimeSide (see Install). - cd TimeSide - git checkout dev - sudo docker build . +Then:: + sudo apt-get build-dep python-timeside + sudo apt-get install git + git clone https://github.com/Parisson/TimeSide.git + cd TimeSide + git checkout dev + sudo pip install -e . + echo "export PYTHONPATH=$PYTHONPATH:`pwd`" >> ~/.bashrc + source ~/.bashrc + tests/run_all_tests -- 2.39.5