Setup a pre-configured Codespace for Azure metadata analysis.
The Docker container for this Codespace is based on Ubuntu 20.04 with the following software pre-installed:
- buildpack-deps: Git, Curl, GCC
- Python 3.8
- Node.js 12
In the Codespace the following is installed for the codespace
user:
- Pipx
- Virtualenv
- Virtualenvwrapper
- Jupyter Lab
- Plotly Widgets
A Visual Studio Code workspace and a corresponding virtualenv called myproject
is created in $HOME/workspace/myproject
. It is recommended to switch to this workspace and clone your azmeta-based code and notebooks from Git to there.
The myproject
virtualenv has some typicaly libraries for Azure metadata analysis pre-installed:
- azmeta
- azmeta-notebook
- azmeta-dataflow
- dagster
- jupyter (to support editing notebooks in Visual Studio Code)
- kqlmagic
- matplotlib
- pandas
- papermill
- openpyxl
sudo
is enabled for the codespace
user and the default password is codespace
.
-
Create a Codespaces plan.
-
Deploy an instance of this Codespace.
Git Repository:
wpbrown/azmeta-codespace
-
Wait for setup of your Codespace to complete.
-
Use
Ctrl+`
(graven accent) to open a terminal and run the commandcode ../myproject
to open a preconfigured azmeta workspace. A new browser tab will open in themyproject
workspace. -
Open a terminal again in the new workspace and login to the Azure CLI with the
az login
command.
Your Codespace and all of your code runs in Azure regardless of how you interface with the it.
Note: Connecting to Jupyter Lab via a browser-based Codespaces session is not yet supported.
Go to https://online.visualstudio.com/environments
and click your Codespace to resume it and connect in the browser.
To quickly jump in to the myproject
workspace in your Codespace, bookmark https://online.visualstudio.com/environment/{CODESPACE_ID}?folder=%2Fhome%2Fcodespace%2Fworkspace%2Fmyproject
where {CODESPACE_ID}
is the GUID of your Codespace.
Install the Codespaces extension in Visual Studio Code. Click your Codespace in the extension to connect in Visual Studio Code.