1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00

remove the jupyter<->jupyterhub conflict. Make all jupyterhub

This commit is contained in:
George Hunt 2021-03-11 22:24:05 +00:00
parent e9bb8fdb63
commit 2248b9fdad
9 changed files with 23 additions and 23 deletions

View file

@ -1,4 +1,4 @@
notebook_dir: /opt/iiab/notebook 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_url: https://github.com/jupyterhub/the-littlest-jupyterhub
jupyterhub_port: 8000 jupyterhub_port: 8000

View file

@ -10,8 +10,8 @@
enabled: yes enabled: yes
state: restarted state: restarted
with_items: with_items:
- jupyter - jupyterhub.service
when: jupyter_enabled when: jupyterhub_enabled
- name: Disable jupyterhub - name: Disable jupyterhub
systemd: systemd:
@ -19,21 +19,21 @@
enabled: no enabled: no
state: stopped state: stopped
with_items: with_items:
- jupyter - jupyterhub
when: not jupyter_enabled when: not jupyterhub_enabled
- name: Put the nginx config file in place - name: Put the nginx config file in place
template: template:
src: jupyter-nginx.conf src: jupyterhub-nginx.conf
dest: "{{ nginx_conf_dir }}/" dest: "{{ nginx_conf_dir }}/"
when: jupyter_enabled when: jupyterhub_enabled
- name: Disable jupyterhub - name: Disable jupyterhub
file: file:
path: "{{ nginx_conf_dir }}/jupyter-nginx.conf" path: "{{ nginx_conf_dir }}/jupyterhub-nginx.conf"
state: absent state: absent
when: not jupyter_enabled when: not jupyterhub_enabled
- name: Restart 'nginx' systemd service - name: Restart 'nginx' systemd service
systemd: systemd:

View file

@ -3,9 +3,9 @@
state: directory state: directory
path: '{{ item }}' path: '{{ item }}'
with_items: with_items:
- '{{ jupyter_venv }}/etc/jupyter' - '{{ jupyterhub_venv }}/etc/jupyter'
- '{{ jupyter_venv }}/etc/jupyterhub' - '{{ jupyterhub_venv }}/etc/jupyterhub'
- '{{ jupyter_venv }}/etc/systemd' - '{{ jupyterhub_venv }}/etc/systemd'
- name: "Set 'nodejs_install: True' and 'nodejs_enabled: True'" - name: "Set 'nodejs_install: True' and 'nodejs_enabled: True'"
set_fact: set_fact:
@ -37,7 +37,7 @@
- jupyterlab - jupyterlab
- jupyterhub_firstuseauthenticator - jupyterhub_firstuseauthenticator
- jupyterhub-systemdspawner - jupyterhub-systemdspawner
virtualenv: "{{ jupyter_venv }}" # /opt/iiab/jupyter virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyter
virtualenv_site_packages: no virtualenv_site_packages: no
virtualenv_command: /usr/bin/virtualenv virtualenv_command: /usr/bin/virtualenv
virtualenv_python: python3 virtualenv_python: python3
@ -47,9 +47,9 @@
- name: Install the config file for jupyterhub - name: Install the config file for jupyterhub
template: template:
src: jupyterhub_config.py src: jupyterhub_config.py
dest: '{{ jupyter_venv }}/etc/jupyterhub/' dest: '{{ jupyterhub_venv }}/etc/jupyterhub/'
- name: Use systemd to start jupyterhub - name: Use systemd to start jupyterhub
template: template:
src: jupyter.service src: jupyterhub.service
dest: /etc/systemd/system/ dest: /etc/systemd/system/

View file

@ -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 include_tasks: install.yml
when: jupyter_installed is undefined when: jupyterhub_installed is undefined
- include_tasks: enable-or-disable.yml - include_tasks: enable-or-disable.yml
@ -18,6 +18,6 @@
- option: description - option: description
value: '"Raspberry Pi Jupyter python programming environment"' value: '"Raspberry Pi Jupyter python programming environment"'
- option: install - option: install
value: "{{ jupyter_install }}" value: "{{ jupyterhub_install }}"
- option: enabled - option: enabled
value: "{{ jupyter_enabled }}" value: "{{ jupyterhub_enabled }}"

View file

@ -4,8 +4,8 @@ After=syslog.target network.target
[Service] [Service]
User=root User=root
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:{{ jupyter_venv }}/bin" Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:{{ jupyterhub_venv }}/bin"
ExecStart={{ jupyter_venv }}/bin/python3 -m jupyterhub -f {{ jupyter_venv }}/etc/jupyterhub/jupyterhub_config.py ExecStart={{ jupyterhub_venv }}/bin/python3 -m jupyterhub -f {{ jupyterhub_venv }}/etc/jupyterhub/jupyterhub_config.py
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -564,8 +564,8 @@ phpmyadmin_enabled: False
vnstat_install: False vnstat_install: False
vnstat_enabled: False vnstat_enabled: False
jupyter_install: False jupyterhub_install: False
jupyter_enabled: False jupyterhub_enabled: False
# 9-LOCAL-ADDONS # 9-LOCAL-ADDONS