From 6a18f083a538eaba5af03332e7c76e5ff191898d Mon Sep 17 00:00:00 2001 From: Alastair Date: Mon, 13 Apr 2015 13:48:19 -0400 Subject: [PATCH] update docs --- docs/source/installation.rst | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 88d290f1a..cc81b152b 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -166,16 +166,18 @@ If you already have a dataset on your machine, you can download and deploy the a .. code-block:: bash - $ docker run -e GA4GH_DATA_SOURCE=/data -v my/ga4gh_data/:/data:ro -itd -p 8000:80 --name ga4gh_server afirth/ga4gh_apache_server:prod + $ docker run -e GA4GH_DATA_SOURCE=/data -v /my/ga4gh_data/:/data:ro -itd -p 8000:80 --name ga4gh_server afirth/ga4gh_apache_server:prod -If you do not have a dataset yet, you can deploy the a container which includes the demo data: +Replace ``/my/ga4gh_data/`` with the path to your data. + +If you do not have a dataset yet, you can deploy a container which includes the demo data: .. code-block:: bash $ docker run -itd -p 8000:80 --name ga4gh_demo afirth/ga4gh_server_apache:demo This will run the docker container in the background, and translate calls from your host environment -port 8000 to the docker container port 80. At that point you should be able to access it like a normal website. +port 8000 to the docker container port 80. At that point you should be able to access it like a normal website, albeit on port 8000. Running in boot2docker, you will need to forward the port from the boot2docker vm to the host. From a terminal on the host to forward traffic from localhost:8000 to the VM 8000 on OSX: @@ -183,16 +185,16 @@ From a terminal on the host to forward traffic from localhost:8000 to the VM 800 $ VBoxManage controlvm boot2docker-vm natpf1 "ga4gh,tcp,127.0.0.1,8000,,8000" -For more info see https://www.virtualbox.org/manual/ch06.html#natforward and https://github.com/CenturyLinkLabs/panamax-ui/wiki/How-To%3A-Port-Forwarding-on-VirtualBox +For more info on port forwarding see https://www.virtualbox.org/manual/ch06.html#natforward and https://github.com/CenturyLinkLabs/panamax-ui/wiki/How-To%3A-Port-Forwarding-on-VirtualBox ++++++++ Advanced ++++++++ If you want to build the images yourself, that is possible. The [afirth/ga4gh_server_apache repo](https://registry.hub.docker.com/u/afirth/ga4gh_server_apache/) -builds automatically on new commits, so this is only needed if you want to modify the Dockerfiles +builds automatically on new commits, so this is only needed if you want to modify the Dockerfiles, or build from a different source. -Build and run for production, serving a dataset on local host located at ``/my/dataset`` +Build the code at server/ and run for production, serving a dataset on local host located at ``/my/dataset`` .. code-block:: bash @@ -200,7 +202,7 @@ Build and run for production, serving a dataset on local host located at ``/my/d $ docker build -t my-repo/my-image . $ docker run -e GA4GH_DATA_SOURCE=/dataset -v /my/dataset:/dataset:ro -itd -p 8000:80 --name ga4gh_server my-repo/my-image -Build and run the production build, with the demo dataset in the container +Build and run the production build from above, with the demo dataset in the container (you will need to modify the FROM line in ``/deploy/variants/demo/Dockerfile`` if you want to use your image from above as the base): .. code-block:: bash @@ -209,7 +211,14 @@ Build and run the production build, with the demo dataset in the container $ docker build -t my-repo/my-demo-image . $ docker run -itd -p 8000:80 --name ga4gh_demo my-repo/my-demo-image +##### Variants ##### + Other Dockerfile implementations are available in the variants folder which install manually. +To build one of these images: + + $ cd server/deploy/variants/xxxx + $ docker build -t my-repo/my-image . + $ docker run -itd -p 8000:80 --name my_container my-repo/my-image ++++++++++++++++++++++ Troubleshooting Docker @@ -225,7 +234,7 @@ From a terminal on the host: $ eval "$(boot2docker shellinit)" $ boot2docker ssh - $ sudo udhcpc + > sudo udhcpc (password is tcuser) ##### DEBUG ##### @@ -237,3 +246,5 @@ To enable DEBUG on your docker server, call docker run with ``-e GA4GH_DEBUG=Tru $ docker run -itd -p 8000:80 --name ga4gh_demo -e GA4GH_DEBUG=True afirth/ga4gh_server_apache:demo This will set the environment variable which is read by config.py + +You can then get logs from the docker container by running ``docker logs (container)`` e.g. ``docker logs ga4gh_demo``