Skip to content

Commit

Permalink
Merge pull request #69 from ellisonbg/nbgrader-command
Browse files Browse the repository at this point in the history
Fix file things related to jupyterhub and nbgrader
  • Loading branch information
ellisonbg committed Jan 14, 2017
2 parents b22df9e + 1faf657 commit a34abde
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
when: use_cull_idle_servers is defined and use_cull_idle_servers
- role: nbgrader
when: use_nbgrader is defined and use_nbgrader
- role: start_jupyterhub
environment:
PATH: "/opt/conda/bin:{{ default_path.stdout }}"
6 changes: 0 additions & 6 deletions roles/jupyterhub/tasks/supervisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,3 @@
- name: install jupyterhub launch script
template: src=start-jupyterhub.sh.j2 dest={{jupyterhub_srv_dir}}/start-jupyterhub.sh mode=0700
become: true

- name: load jupyterhub supervisor config
supervisorctl: name=jupyterhub state=present

- name: restart jupyterhub with supervisor
supervisorctl: name=jupyterhub state=restarted
3 changes: 2 additions & 1 deletion roles/jupyterhub/templates/jupyterhub_config.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ c.JupyterHub.services = [
'admin': True,
'url': 'http://127.0.0.1:{{course.port}}',
'user': '{{course.owner}}',
'cwd': '{{home_dir}}/{{course.owner}}/nbgrader/{{course.course_id}}'
'cwd': '{{home_dir}}/{{course.owner}}/nbgrader/{{course.course_id}}',
'command': ['nbgrader', 'formgrade']
},
{% endfor -%}
{% endif %}
Expand Down
7 changes: 7 additions & 0 deletions roles/start_jupyterhub/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

- name: load jupyterhub supervisor config
supervisorctl: name=jupyterhub state=present

- name: restart jupyterhub with supervisor
supervisorctl: name=jupyterhub state=restarted

0 comments on commit a34abde

Please sign in to comment.