-
Notifications
You must be signed in to change notification settings - Fork 5
Setting TLJH with Azure
The PVSC Python Tutorial uses the Littlest JupyterHub (TLJH) set up on Azure. To set up TLJH on Azure, follow the instructions posted here.
Before getting started, log into Azure, or sign for a free account. You will need a credit card, and supposedly your first year is free, but let's just wait and see.
-
Sign into https://portal.azure.com
-
Visit https://tljh.jupyter.org/en/latest/ docs
-
Q1: when to use tljh vs. z2jh
- Single machine (tljh) vs. containers or many machines (z2jh)
-
Jump to installation on azure: https://tljh.jupyter.org/en/latest/install/azure.html
-
Add a virtual machine
-
Enter desired vm name: pvsc-pvlib-tutorial-tljh
- This automatically creates the resource group with the same name
-
Choose region (US) East US region
-
Change auth to password
-
Add http and https to inbound ports on network page
-
Copy the cloud init script, and update the admin user name
-
Review, cost is about 8.7-cents/hour, create
-
Wait for VM to be deployed, last time this didn’t work, and I had to do something manual, but I can’t remember what, maybe I logged in remotely using ssh and entered the cloud init commands from the terminal? This time it just worked! However, I guess you still need to wait awhile when it’s still installing TLJH?
-
Click go to resource, and copy the public IP, until TLJH is finished installing I still see 404 host not found, it took less than 5 minutes, then voila!
-
It’s alive!
-
Go to control panel -> admin and add us all as users – I used our email addresses, okay?
-
Open jupyter terminal, insert conda-forge channel, install packages, and clone github repo
$ sudo -E conda config --add channels conda-forge
I guess the sudo -E is really important!
$ sudo -E conda install pvlib-python pandas matplotlib
Yikes, I hope I don’t break anything!
$ sudo -E git clone https://github.com/mikofski/PVSC48-Python-Tutorial.git
Hooray it works! Sort of, I can access any python package, but not the github files
There are a few things still to do, but there's good instructions in the docs, if you can find them
- setup domain name at Freenom "https://pvsc-python-tutorial.ml/"
- Use TLS/HTTPS - see https://tljh.jupyter.org/en/latest/howto/admin/https.html
- create shared space and scratch in
skel- see https://tljh.jupyter.org/en/latest/howto/content/share-data.html - see the Home page on setting up and linking to domain name "https://pvsc-python-tutorial.ml/" and using nbgitpuller