Skip to content

Commit 90a1e14

Browse files
authored
docs: Update README for local development
1 parent 978c814 commit 90a1e14

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,46 @@ Unless otherwise noted, the source code of this project is covered under Crown C
1414

1515
The Canada wordmark and related graphics associated with this distribution are protected under trademark law and copyright law. No permission is granted to use them outside the parameters of the Government of Canada's corporate identity program. For more information, see [Federal identity requirements](https://www.canada.ca/en/treasury-board-secretariat/topics/government-communications/federal-identity-requirements.html).
1616

17+
## Developement
18+
_Set up CLI tools to interact with Kubernetes (connect to remote AKS cluster):_
19+
1. Install Azure CLI `az` and `kubectl`
20+
2. Login with `az` and set your subscription
21+
3. Run `az aks get-credentials` for the desired remote cluster
22+
4. Clone this repository
23+
24+
_Frontend:_
25+
1. Install `Go`
26+
2. From `jupyter-apis/`, run `. -spawner-config samples/spawner_ui_config.yaml`
27+
3. From `jupyter-apis/frontend`, run `npm install`
28+
- This will install all of the project dependencies and prepare your system for development.
29+
4. To start a development environment, run `npm start`
30+
- This runs [webpack](https://webpack.js.org/) over the front-end code and starts
31+
the dev-server at http://localhost:4200/jupyter/.
32+
5. Open browser to `http://localhost:4200/jupyter/`, update Namespace.
33+
34+
### Connect this jupyter-apis component to local instance of Kubeflow:
35+
_Set up local Kubeflow cluster using [MiniKF](https://www.kubeflow.org/docs/started/workstation/getting-started-minikf/):_
36+
37+
Note: Need at least 50GB of disk space
38+
1. Install Vagrant and Virtual Box
39+
2. Create a new directory and run `vagrant init arrikto/minikf` and then `vagrant up` (takes about 20 minutes to boot)
40+
3. Navigate to http://10.10.10.10
41+
4. Follow on-screen steps to start Kubeflow and Rok (takes about another 20 minutes)
42+
5. From here, you can use Kubeflow and Rok
43+
44+
_Configure a `kubectl` context for that cluster:_
45+
1. Have `kubectl` CLI set up and `Go` installed
46+
2. From http://10.10.10.10, download the MiniKF kubeconfig file
47+
- Can either move this file into your `.kube/` directory and rename it to `config` or can change the default config file name and path in [`main.go`](https://github.com/StatCan/jupyter-apis/blob/master/main.go#L69) to the path and name of the `minikf-kubeconfig` downloaded file
48+
3. From `jupyter-apis/`, run `. -spawner-config samples/spawner_ui_config.yaml`
49+
- Can update the [YAML file](https://github.com/StatCan/jupyter-apis/blob/master/samples/spawner_ui_config.yaml#L17) if you want to put your custom images into the notebook server image dropdown list.
50+
4. From `jupyter-apis/frontend` folder, run `npm install` and `KF_USER_ID=<username given by MiniKF> npm start`
51+
- Usually, the `KF_USER_ID` will be `user` because that may be the default username MiniKF always gives
52+
5. Navigate to http://localhost:4200/jupyter/
53+
6. Set Namespace to `kubeflow-user`
54+
55+
**To connect to MiniKF, have to go into directory created and run `vagrant up` every time, then navigate to http://10.10.10.10**
56+
1757
______________________
1858

1959
## Interface de programmation d'applications Jupyter

0 commit comments

Comments
 (0)