diff --git a/.travis.yml b/.travis.yml index cc3d13bcb..3e69ae66c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ addons: before_install: - firefox --version - make deps + - make pythondeps - python -c "import setuptools; print(setuptools.__version__)" - pip --version diff --git a/Makefile b/Makefile index 12f55fd2f..58519b1c2 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,20 @@ venv: deps: @echo "Installing apt dependencies" @echo "---------------------------" + if [ `uname -s` != "Linux" ]; then \ + echo "ERROR: Cannot run on non-Linux systems"; \ + false; \ + fi -sudo apt-get update - sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine npm nodejs-legacy python3-pip python3.4-venv + if [ `lsb_release -rs` = "14.04" ]; then \ + plat_packages="docker-engine python3.4-venv"; \ + else \ + plat_packages="docker.io python3-venv"; \ + fi; \ + sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y $$plat_packages npm nodejs-legacy python3-pip + +.PHONY: pythondeps +pythondeps: pip3 install --upgrade pip setuptools # Currently set to 1.4.0dev fixing X-Forward behavior npm install "git://github.com/jupyterhub/configurable-http-proxy.git#f54c6a46a235f17cb6c36046a913d37fa45ec95b" @@ -70,6 +82,11 @@ testimages: @echo "-------------------------" docker pull simphonyproject/simphonic-mayavi:latest docker pull simphonyproject/simphonic-paraview:latest + if ! [ $$TRAVIS ]; then \ + docker pull simphonyproject/filetransfer:latest; \ + docker pull simphonyproject/jupyter:latest; \ + fi + .PHONY: test test: pythontest jstest diff --git a/doc/source/deployment.rst b/doc/source/deployment.rst index c172b26ac..3f418dc36 100644 --- a/doc/source/deployment.rst +++ b/doc/source/deployment.rst @@ -15,18 +15,33 @@ Deployment of the complete system in a single machine/VM. git clone https://github.com/simphony/simphony-remote +#. Install dependencies. You might be prompted for the root password to execute this:: + + make deps + +#. Make sure your docker server is running, and your user is allowed to connect to + the docker server (check accessibility of `/var/run/docker.sock`). You obtain this by + running:: + + sudo service docker start + sudo addgroup your_username docker + + and logging out and in again. Check if your docker server is operative by running:: + + docker info + #. Create and activate a virtual environment:: make venv . venv/bin/activate -#. Install apt dependencies. You need to be root to execute this:: - - make aptdeps +#. Install the python dependencies:: + + make pythondeps -#. Install python dependencies:: +#. And install the package itself:: - make pythondeps + make install #. Generate the SSL certificates if you do not already have them. The resulting certificates will have names test.* because they are @@ -47,6 +62,20 @@ Deployment of the complete system in a single machine/VM. and verify that `jupyterhub_config.py` is correct for your deployment machine setup (see :ref:`configuration`). +#. If you are using virtual users (users that are not present on the system) you need to create + a temporary space where the virtual user homes are created:: + + mkdir /tmp/remoteapp + +#. You can now start the service:: + + sh start.sh + +#. Visit the site at:: + + https://127.0.0.1:8000 + + Setup docker containers ----------------------- diff --git a/doc/source/troubleshoot/docker.rst b/doc/source/troubleshoot/docker.rst index 1270298cf..b3d7ca285 100644 --- a/doc/source/troubleshoot/docker.rst +++ b/doc/source/troubleshoot/docker.rst @@ -13,3 +13,13 @@ you recently recreated your default docker machine, or the docker machine is no Make sure that your docker environment (DOCKER_HOST environment variable) is compatible with the docker machine current ip address (`docker-machine ip`). If not, reconfigure your docker machine environment with `eval $(docker-machine env)`. + +Error when connecting to docker: Permission denied +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Check if your `/var/run/docker.sock` is accessible and readable. The likely cause is +that your current user is not in the `docker` group. Fix this by running:: + + sudo addgroup your_username docker + +and then logging out and in again. diff --git a/requirements.txt b/requirements.txt index 2a6193174..b509ad0a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,9 @@ traitlets>=4.1 tornado>=4.3 # Fix to 2.10.0 due to docker-py needs (fails with 2.11.1) requests==2.10.0 -docker-py>=1.8 +# We want 1.8 because 1.10 uses API version 1.24 and the docker server +# on ubuntu uses 1.23, so they don't like each other. +docker-py==1.8 escapism>=0.0.1 jinja2>=2.8 git+git://github.com/jupyterhub/jupyterhub.git diff --git a/setup.py b/setup.py index bd774fafe..d53ec756b 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ # for our code to import on RTD. requirements.extend(["sqlalchemy>=1.0"]) else: - requirements.extend(["jupyterhub>=0.7.0dev0", "docker-py>=1.8"]) + requirements.extend(["jupyterhub>=0.7.0dev0", "docker-py==1.8"]) # main setup configuration class setup(