mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
remove the jupyter<->jupyterhub conflict. Make all jupyterhub
This commit is contained in:
parent
e9bb8fdb63
commit
2248b9fdad
9 changed files with 23 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
|||
notebook_dir: /opt/iiab/notebook
|
||||
jupyter_venv: /opt/iiab/jupyter
|
||||
jupyterhub_venv: /opt/iiab/jupyter
|
||||
jupyterhub_url: https://github.com/jupyterhub/the-littlest-jupyterhub
|
||||
jupyterhub_port: 8000
|
|
@ -10,8 +10,8 @@
|
|||
enabled: yes
|
||||
state: restarted
|
||||
with_items:
|
||||
- jupyter
|
||||
when: jupyter_enabled
|
||||
- jupyterhub.service
|
||||
when: jupyterhub_enabled
|
||||
|
||||
- name: Disable jupyterhub
|
||||
systemd:
|
||||
|
@ -19,21 +19,21 @@
|
|||
enabled: no
|
||||
state: stopped
|
||||
with_items:
|
||||
- jupyter
|
||||
when: not jupyter_enabled
|
||||
- jupyterhub
|
||||
when: not jupyterhub_enabled
|
||||
|
||||
|
||||
- name: Put the nginx config file in place
|
||||
template:
|
||||
src: jupyter-nginx.conf
|
||||
src: jupyterhub-nginx.conf
|
||||
dest: "{{ nginx_conf_dir }}/"
|
||||
when: jupyter_enabled
|
||||
when: jupyterhub_enabled
|
||||
|
||||
- name: Disable jupyterhub
|
||||
file:
|
||||
path: "{{ nginx_conf_dir }}/jupyter-nginx.conf"
|
||||
path: "{{ nginx_conf_dir }}/jupyterhub-nginx.conf"
|
||||
state: absent
|
||||
when: not jupyter_enabled
|
||||
when: not jupyterhub_enabled
|
||||
|
||||
- name: Restart 'nginx' systemd service
|
||||
systemd:
|
|
@ -3,9 +3,9 @@
|
|||
state: directory
|
||||
path: '{{ item }}'
|
||||
with_items:
|
||||
- '{{ jupyter_venv }}/etc/jupyter'
|
||||
- '{{ jupyter_venv }}/etc/jupyterhub'
|
||||
- '{{ jupyter_venv }}/etc/systemd'
|
||||
- '{{ jupyterhub_venv }}/etc/jupyter'
|
||||
- '{{ jupyterhub_venv }}/etc/jupyterhub'
|
||||
- '{{ jupyterhub_venv }}/etc/systemd'
|
||||
|
||||
- name: "Set 'nodejs_install: True' and 'nodejs_enabled: True'"
|
||||
set_fact:
|
||||
|
@ -37,7 +37,7 @@
|
|||
- jupyterlab
|
||||
- jupyterhub_firstuseauthenticator
|
||||
- jupyterhub-systemdspawner
|
||||
virtualenv: "{{ jupyter_venv }}" # /opt/iiab/jupyter
|
||||
virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyter
|
||||
virtualenv_site_packages: no
|
||||
virtualenv_command: /usr/bin/virtualenv
|
||||
virtualenv_python: python3
|
||||
|
@ -47,9 +47,9 @@
|
|||
- name: Install the config file for jupyterhub
|
||||
template:
|
||||
src: jupyterhub_config.py
|
||||
dest: '{{ jupyter_venv }}/etc/jupyterhub/'
|
||||
dest: '{{ jupyterhub_venv }}/etc/jupyterhub/'
|
||||
|
||||
- name: Use systemd to start jupyterhub
|
||||
template:
|
||||
src: jupyter.service
|
||||
src: jupyterhub.service
|
||||
dest: /etc/systemd/system/
|
|
@ -1,6 +1,6 @@
|
|||
- name: Install Jupyter if jupyter_installed not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
|
||||
- name: Install Jupyter if jupyterhub_installed not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
|
||||
include_tasks: install.yml
|
||||
when: jupyter_installed is undefined
|
||||
when: jupyterhub_installed is undefined
|
||||
|
||||
|
||||
- include_tasks: enable-or-disable.yml
|
||||
|
@ -18,6 +18,6 @@
|
|||
- option: description
|
||||
value: '"Raspberry Pi Jupyter python programming environment"'
|
||||
- option: install
|
||||
value: "{{ jupyter_install }}"
|
||||
value: "{{ jupyterhub_install }}"
|
||||
- option: enabled
|
||||
value: "{{ jupyter_enabled }}"
|
||||
value: "{{ jupyterhub_enabled }}"
|
|
@ -4,8 +4,8 @@ After=syslog.target network.target
|
|||
|
||||
[Service]
|
||||
User=root
|
||||
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:{{ jupyter_venv }}/bin"
|
||||
ExecStart={{ jupyter_venv }}/bin/python3 -m jupyterhub -f {{ jupyter_venv }}/etc/jupyterhub/jupyterhub_config.py
|
||||
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:{{ jupyterhub_venv }}/bin"
|
||||
ExecStart={{ jupyterhub_venv }}/bin/python3 -m jupyterhub -f {{ jupyterhub_venv }}/etc/jupyterhub/jupyterhub_config.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -564,8 +564,8 @@ phpmyadmin_enabled: False
|
|||
vnstat_install: False
|
||||
vnstat_enabled: False
|
||||
|
||||
jupyter_install: False
|
||||
jupyter_enabled: False
|
||||
jupyterhub_install: False
|
||||
jupyterhub_enabled: False
|
||||
|
||||
# 9-LOCAL-ADDONS
|
||||
|
||||
|
|
Loading…
Reference in a new issue