Skip to content

Setting TLJH with Azure

Mark Mikofski edited this page Jun 17, 2021 · 2 revisions

Introduction

The PVSC Python Tutorial uses the Littlest JupyterHub (TLJH) set up on Azure. To set up TLJH on Azure, follow the instructions posted here.

Sign up for Azure

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.

setup

  1. Sign into https://portal.azure.com

  2. Visit https://tljh.jupyter.org/en/latest/ docs

  3. Q1: when to use tljh vs. z2jh

    • Single machine (tljh) vs. containers or many machines (z2jh)
  4. Jump to installation on azure: https://tljh.jupyter.org/en/latest/install/azure.html

  5. Add a virtual machine

  6. Enter desired vm name: pvsc-pvlib-tutorial-tljh

    • This automatically creates the resource group with the same name
  7. Choose region (US) East US region

  8. Change auth to password

  9. Add http and https to inbound ports on network page

  10. Copy the cloud init script, and update the admin user name

  11. Review, cost is about 8.7-cents/hour, create

  12. 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?

  13. 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!

  14. It’s alive!

  15. Go to control panel -> admin and add us all as users – I used our email addresses, okay?

  16. 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

wrapup

There are a few things still to do, but there's good instructions in the docs, if you can find them

Clone this wiki locally