Skip to content

Commit

Permalink
Merge pull request #86 from OpenGeoscience/devops_enable_extension
Browse files Browse the repository at this point in the history
Enable geonotebook in devops scripts
  • Loading branch information
jbeezley authored Feb 2, 2017
2 parents 01cb9ba + bd6c73d commit 6d50a7a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
15 changes: 9 additions & 6 deletions devops/docker/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ RUN /usr/sbin/jupyter-notebook --generate-config \
&& sed -i s/#c.NotebookApp.token\ \=\ \'\'/c.NotebookApp.token\ \=\ \'\'/g \
/root/.jupyter/jupyter_notebook_config.py

RUN git clone https://github.com/OpenGeoscience/geonotebook.git /opt/geonotebook \
&& pushd /opt/geonotebook \
&& git checkout master \
&& pip2 install https://github.com/OpenGeoscience/KTile/archive/master.zip \
&& pip2 install .
RUN pip2 install https://github.com/OpenGeoscience/KTile/archive/master.zip

ADD . /opt/geonotebook
ADD devops/docker/jupyter.sh /jupyter.sh

RUN pushd /opt/geonotebook \
&& pip2 install . \
&& jupyter serverextension enable --py geonotebook --sys-prefix \
&& jupyter nbextension enable --py geonotebook --sys-prefix

VOLUME /notebooks
WORKDIR /notebooks
ADD jupyter.sh /jupyter.sh
CMD ../jupyter.sh
2 changes: 1 addition & 1 deletion devops/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Geonotebook relies on a complex stack of technologies that are not always easy to install and properly configure. To ease this complexity we provide a docker container for running the notebook on docker compatible systems. To install docker on your system please see docker's [documentation](https://docs.docker.com/engine/installation/) for your operating system.

## Build the container
First you must build the docker container. After checking out the current repository and navigating to ```devops/docker/``` you can run
First you must build the docker container. After checking out the current repository, you can run

```
docker build -t geonotebook .
Expand Down
10 changes: 10 additions & 0 deletions devops/roles/geonotebook/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,14 @@
state: present
when: geonotebook_auth_enabled

- name: Enable geonotebook server extension
command: "jupyter serverextension enable --user --py geonotebook"
args:
creates: "{{ ansible_user_dir }}/.jupyter/jupyter_notebook_config.json"

- name: Enable geonotebook notebook extension
command: "jupyter nbextension enable --user --py geonotebook"
args:
creates: "{{ ansible_user_dir }}/.jupyter/nbconfig/notebook.json"

- include: daemon.yml

0 comments on commit 6d50a7a

Please sign in to comment.