mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Found instructions for the Littlest Jupyterhub
This commit is contained in:
		
							parent
							
								
									17a6d030f7
								
							
						
					
					
						commit
						e91319bb27
					
				
					 4 changed files with 53 additions and 4 deletions
				
			
		
							
								
								
									
										25
									
								
								roles/jupyter/tasks/enable-or-disable.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								roles/jupyter/tasks/enable-or-disable.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| - name: systemd daemon-reload | ||||
|   systemd: | ||||
|     daemon_reload: yes | ||||
| 
 | ||||
| 
 | ||||
| # enable or disable  | ||||
| - name: Enable & Restart jupyterhub | ||||
|   systemd: | ||||
|     name: "{{ item }}" | ||||
|     enabled: yes | ||||
|     state: restarted | ||||
|   with_items: | ||||
|     - jupyter | ||||
|   when: jupyter_enabled | ||||
| 
 | ||||
| - name: Disable jupyterhub | ||||
|   systemd: | ||||
|     name: "{{ item }}" | ||||
|     enabled: no | ||||
|     state: stopped | ||||
|   with_items: | ||||
|     - jupyter | ||||
|   when: not jupyter_enabled | ||||
| 
 | ||||
| 
 | ||||
|  | @ -1,13 +1,16 @@ | |||
| - name: Make the directories to hold notebooks | ||||
|   file: | ||||
|     state: directory | ||||
|     path: '{{ notebook_dir }}' | ||||
|     path: '{{ item }}' | ||||
|   with_items: | ||||
|      - '{{ notebook_dir }}/etc/jupyter' | ||||
|      - '{{ notebook_dir }}/etc/jupyterhub' | ||||
|      - '{{ notebook_dir }}/etc/systemd' | ||||
| 
 | ||||
| - name: Use pip to install into a virtual environment | ||||
|   pip: | ||||
|     name: | ||||
|        - jupyterlab | ||||
|        #- jupyter_vim | ||||
|        - pip | ||||
|     virtualenv: "{{ jupyter_venv }}"    # /opt/iiab/jupyter | ||||
|     virtualenv_site_packages: no | ||||
|     virtualenv_command: /usr/bin/virtualenv | ||||
|  | @ -15,3 +18,13 @@ | |||
|     extra_args: "--no-cache-dir" | ||||
|   when: internet_available | ||||
|      | ||||
| - name: Fetch the Littlest JupyterHub code | ||||
|   ansible.builtin.git: | ||||
|      repo: '{{ jupyterhub_url }}  | ||||
|      dest: '{{ jupyter_venv }}' | ||||
| 
 | ||||
| - name: Install a bootstrap.py that permits installation on other than Ubunt | ||||
|   template: | ||||
|      src: bootstrap.py | ||||
|      dest: '{{ jupyter_venv }}' | ||||
|       | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
|   when: jupyter_installed is undefined | ||||
| 
 | ||||
| 
 | ||||
| #- include_tasks: enable-or-disable.yml | ||||
| - include_tasks: enable-or-disable.yml | ||||
| 
 | ||||
| 
 | ||||
| - name: Add 'jupyter' variable values to {{ iiab_ini_file }} | ||||
|  |  | |||
							
								
								
									
										11
									
								
								roles/jupyter/templates/jupyter.service
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								roles/jupyter/templates/jupyter.service
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| [Unit] | ||||
| Description=JupyterHub | ||||
| After=syslog.target network.target | ||||
| 
 | ||||
| [Service] | ||||
| User=hubuser | ||||
| Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/iiab/jupyterhub/bin" | ||||
| ExecStart=/opt/iiab/jupyterhub/bin/jupyterhub -f /opt/iiab/jupyterhub/etc/jupyterhub/jupyterhub_config.py | ||||
| 
 | ||||
| [Install] | ||||
| WantedBy=multi-user.target | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue