1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Packaging for PR #2719 to promote JupyterHub Notebooks

This commit is contained in:
root 2021-04-15 18:14:14 +00:00
parent 6b4b68de8b
commit 3fe1f66de0
8 changed files with 51 additions and 10 deletions

View file

@ -31,6 +31,11 @@
name: gitea
when: gitea_install
- name: JUPYTERHUB
include_role:
name: jupyterhub
when: jupyterhub_install
- name: LOKOLE
include_role:
name: lokole

View file

@ -1,7 +1,8 @@
### Jupyter Notebooks on Rpi Server
### JupyterHub programming environment with student Notebooks
* Jupyter Notebooks are widely used in the scientific community.
* This IIAB package permits individal users to start using their own notebook on the server without needing an individual server account.
* This IIAB package permits individual users to start using their own notebook on the server, without needing an individual server account.
* Once a user signs in with a user name, and password, these credentials are stored, and are used thereafter to gain access to the user's files.
* Individual folders are created for all student work in the path /var/lib/protected/. Individual students will only be able to see their own work in that directory.
* Individual folders are created for all student work in the path /var/lib/protected/. Individual students will only be able to see their own work in that directory.
* Students will not have any privileges outside of their own folder.
* They may upload jupyter notebooks from a local machine, and download the current state of their work via a normal browser download.
* They may upload Jupyter Notebooks from a local machine, and download the current state of their work via a normal browser download.

View file

@ -1,3 +1,24 @@
# "How do i fail a task in Ansible if the variable contains a boolean value?
# I want to perform input validation for Ansible playbooks"
# https://stackoverflow.com/questions/46664127/how-do-i-fail-a-task-in-ansible-if-the-variable-contains-a-boolean-value-i-want/46667499#46667499
# We assume 0-init/tasks/validate_vars.yml has DEFINITELY been run, so no need
# to re-check whether vars are defined here. As Ansible vars cannot be unset:
# https://serverfault.com/questions/856729/how-to-destroy-delete-unset-a-variable-value-in-ansible
- name: Assert that "jupyterhub_install is sameas true" (boolean not string etc)
assert:
that: jupyterhub_install is sameas true
fail_msg: "PLEASE SET 'jupyterhub_install: True' e.g. IN: /etc/iiab/local_vars.yml"
quiet: yes
- name: Assert that "jupyterhub_enabled | type_debug == 'bool'" (boolean not string etc)
assert:
that: jupyterhub_enabled | type_debug == 'bool'
fail_msg: "PLEASE GIVE VARIABLE 'jupyterhub_enabled' A PROPER (UNQUOTED) ANSIBLE BOOLEAN VALUE e.g. IN: /etc/iiab/local_vars.yml"
quiet: yes
- name: Install Jupyter if jupyterhub_installed not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: jupyterhub_installed is undefined
@ -14,9 +35,9 @@
value: "{{ item.value | string }}"
with_items:
- option: name
value: Jupyter
value: JupyterHub
- option: description
value: '"Raspberry Pi Jupyter python programming environment"'
value: '"High Schools may want to consider JupyterHub to integrate coding with dynamic interactive graphing — A New Way to Think About Programming allowing students to integrate science experiments results and program output within their notebook/document/blog."'
- option: install
value: "{{ jupyterhub_install }}"
- option: enabled

View file

@ -159,7 +159,7 @@ if [ "$wan" != "none" ]; then
$IPTABLES -A INPUT -p tcp --dport $sugarizer_port -m state --state NEW -i $wan -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport $transmission_http_port -m state --state NEW -i $wan -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport $transmission_http_port -m state --state NEW -i $wan -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport $transmission_peer_port -m state --state NEW -i $wan -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport $jupyterhub_port -m state --state NEW -i $wan -j ACCEPT
fi

View file

@ -380,6 +380,11 @@ gitea_enabled: False
gitea_url: /gitea
gitea_port: 61734
# JupyterHub programming environment with student Notebooks
jupyterhub_install: False
jupyterhub_enabled: False
jupyterhub_port: 8000
# Lokole (email for rural communities) from https://ascoderu.ca
lokole_install: False
lokole_enabled: False
@ -564,9 +569,6 @@ phpmyadmin_enabled: False
vnstat_install: False
vnstat_enabled: False
jupyterhub_install: False
jupyterhub_enabled: False
jupyterhub_port: 8000
# 9-LOCAL-ADDONS

View file

@ -253,6 +253,10 @@ elgg_enabled: True
gitea_install: True
gitea_enabled: True
# JupyterHub programming environment with student Notebooks
jupyterhub_install: True
jupyterhub_enabled: True
# Lokole (email for rural communities) from https://ascoderu.ca
lokole_install: True
lokole_enabled: True

View file

@ -253,6 +253,10 @@ elgg_enabled: False
gitea_install: False
gitea_enabled: False
# JupyterHub programming environment with student Notebooks
jupyterhub_install: False
jupyterhub_enabled: False
# Lokole (email for rural communities) from https://ascoderu.ca
lokole_install: False
lokole_enabled: False

View file

@ -253,6 +253,10 @@ elgg_enabled: False
gitea_install: False
gitea_enabled: False
# JupyterHub programming environment with student Notebooks
jupyterhub_install: False
jupyterhub_enabled: False
# Lokole (email for rural communities) from https://ascoderu.ca
lokole_install: False
lokole_enabled: False