Skip to content

Commit 612060b

Browse files
committed
update readme for deploy from cd
1 parent f4c360d commit 612060b

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
KUBECTL_VERSION: "v1.29.15"
2323
HELM_VERSION: "v3.12.0"
2424
KUBECONFIG: secrets/ovh-kubeconfig.yaml
25+
NBVIEWER_VERSION: "68472ab"
2526

2627
jobs:
2728
# In this dedicated job to deploy our staging environment we build and push

README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,41 @@
11
# nbviewer.org-deploy
22

3-
Tasks for running nbviewer.org in helm, with [invoke](http://pyinvoke.org).
3+
Deployment repo for nbviewer.org
44

5-
**TODO: helm automatiion have not yet been implemented,
6-
but are current run via `deploy.sh`.
7-
This assumes the `nbviewer` repo is adjacent to this repo
8-
and up-to-date.**
5+
## Overview
6+
7+
The nbviewer image and helm chart are defined in https://github.com/jupyter/nbviewer.
8+
The helm chart in that repo is not _published_ anywhere,
9+
so we use a local checkout.
10+
Helm upgrades are deployed via GitHub actions.
11+
12+
Some _very_ infrequent manual tasks (interacting with the fastly cache layer) are scripted in `tasks.py` for use with `pyinvoke`.
13+
We're mostly trying to move away from that, but tasks are infrequent enough.
14+
Let's not add to them, though.
15+
16+
## Automation progress
17+
18+
- helm upgrade is now in `.github/workflows/cd.yml`
19+
- updating nbviewer is still manual (`config.yaml` and `cd.yaml`)
920

1021
## Quickstart: upgrading nbviewer
1122

12-
Currently assumes you have helm, kubectl
23+
nbviewer helm upgrades are deployed via github actions.
24+
The nbviewer version is current in two palaces:
25+
26+
- the _chart_ version in `.github/workflows/cd.yml`
27+
- the _image_ version in `config/nbviewer.yaml`
1328

14-
1. clone nbviewer: `git clone https://github.com/jupyter/nbviewer`
15-
2. clone this repo: `git clone https://github.com/jupyter/nbviewer.org-deploy`
16-
3. Run helm upgrade `cd nbviewer.org-deploy; bash deploy.sh`
29+
To deploy an update from nbviewer to nbviewer.org:
1730

18-
**NOTE: The invoke tasks.py has not been updated**
31+
1. check the latest version of the nbviewer repo (https://github.com/jupyter/nbviewer/commits)
32+
2. store the latest commit in `NBVIEWER_VERSION` in [.github/workflows/cd.yaml](.github/workflows/cd.yml)
33+
3. check the latest tag of the [nbviewer image](https://hub.docker.com/r/jupyter/nbviewer/tags)
34+
4. update the tag in [config/nbviewer.yaml](config/nbviewer.yaml)
35+
36+
Open a pull request, and it should be deployed to nbviewer.org upon merge.
37+
38+
Generating these pull requests _should_ be automated, as is done [on mybinder.org-deploy](https://github.com/jupyterhub/mybinder.org-deploy/pull/3427).
1939

2040
## Current deployment
2141

@@ -25,17 +45,8 @@ Right now, nbviewer is run on OVHCloud via helm in the namespace `nbviewer`.
2545

2646
Python dependencies:
2747

28-
pip install -r requirements.txt
29-
30-
### Upgrading
31-
32-
To upgrade the deployment in-place:
33-
34-
```
35-
invoke upgrade
36-
```
48+
pip install -r requirements.in # (or requirements.txt for a locked env)
3749

38-
This will deploy the new helm configuration
3950

4051
## TODO
4152

deploy.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ echo "Is $nbviewer_chart up to date?"
1010
helm dep up $nbviewer_chart
1111

1212
upgrade="upgrade nbviewer $nbviewer_chart -f config/nbviewer.yaml -f secrets/config/nbviewer.yaml"
13-
helm diff -C 5 $upgrade
14-
exit 1
1513

1614
if [[ -z "${CI:-}" ]]; then
15+
helm diff -C 5 $upgrade
1716
echo "Deploy these changes? (y|[N]) "
1817
read confirm
1918

0 commit comments

Comments
 (0)