You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Github actions doesn't have much in the way of loops. Using a matrix results
19
+
# in multiple separate jobs being run, which will try to overwrite one another.
20
+
# Any kind of loop shaped thing would be more elegant than this. Until then,
21
+
# when a container is added copy one of these and change then name in all four
22
+
# places
23
+
- name: update values.yaml for renderer
24
+
run: |
25
+
if [[ $(git diff remotes/origin/master -- images/renderer/) ]]; then
26
+
sed -i 's/tag: .* # renderer tag managed by github actions$/tag: pr-${{ github.event.number }} # renderer tag managed by github actions/' paws/values.yaml
27
+
fi
28
+
29
+
- name: update values.yaml for nbserve
30
+
run: |
31
+
if [[ $(git diff remotes/origin/master -- images/nbserve/) ]]; then
32
+
sed -i 's/tag: .* # nbserve tag managed by github actions$/tag: pr-${{ github.event.number }} # nbserve tag managed by github actions/' paws/values.yaml
33
+
fi
34
+
35
+
- name: update values.yaml for paws-hub
36
+
run: |
37
+
if [[ $(git diff remotes/origin/master -- images/paws-hub/) ]]; then
38
+
sed -i 's/tag: .* # paws-hub tag managed by github actions$/tag: pr-${{ github.event.number }} # paws-hub tag managed by github actions/' paws/values.yaml
39
+
fi
40
+
41
+
- name: update values.yaml for jobber
42
+
run: |
43
+
if [[ $(git diff remotes/origin/master -- images/jobber/) ]]; then
44
+
sed -i 's/tag: .* # jobber tag managed by github actions$/tag: pr-${{ github.event.number }} # jobber tag managed by github actions/' paws/values.yaml
45
+
fi
46
+
47
+
- name: update values.yaml for singleuser
48
+
run: |
49
+
if [[ $(git diff remotes/origin/master -- images/singleuser/) ]]; then
50
+
sed -i 's/tag: .* # singleuser tag managed by github actions$/tag: pr-${{ github.event.number }} # singleuser tag managed by github actions/' paws/values.yaml
51
+
fi
52
+
53
+
- uses: EndBug/add-and-commit@v7
54
+
with:
55
+
add: 'paws/values.yaml'
56
+
author_name: Github Action
57
+
author_email: auto@github.com
58
+
branch: ${{ github.head_ref }}
59
+
message: 'auto update of ${{ inputs.imagename }} tag'
Copy file name to clipboardExpand all lines: README.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,19 @@ to trigger a pull request or using a fork to set up a pull request.
16
16
### Settings up a development environment
17
17
18
18
It is possible to run a fully-functioning PAWS system inside [minikube](https://minikube.sigs.k8s.io/docs/)! You don't need
19
-
access to the secrets.yaml file to do it either, since the defaults mostly support it.
19
+
access to the secrets.yaml file to do it either, since the defaults mostly support it. At this time, you need to
20
+
set it up with a cluster version before 1.22, most likely.
20
21
21
-
You will need to install minikube and [helm](https://helm.sh) on your system. When you are confident those are working,
22
+
You will need to install minikube (tested on minikube 1.23) and [helm](https://helm.sh) and kubectl on your system. When you are confident those are working, start minikube with:
23
+
-`minikube start --kubernetes-version=v1.20.11`
24
+
-`minikube addons enable ingress`
25
+
(from the top level of this repo):
22
26
install the dependencies for the PAWS dev environment with these steps:
Then, you need to create a new namespace for paws (`kubectl create namespace paws-dev` for instance) and then install into it
28
-
with helm (from the top level of this repo):
29
-
`helm -n paws-dev install dev paws/`
30
+
-`kubectl create namespace paws-dev`
31
+
-`helm -n paws-dev install dev paws/ --timeout=50m`
30
32
31
33
The rest of the setup instructions will display on screen as long as the install is successful.
32
34
Please refer to the helm documentation from there.
@@ -40,6 +42,16 @@ If minikube is acting weird, it might be worth it to upgrade minikube or even to
40
42
increase the default memory:
41
43
`minikube config set memory 4096`
42
44
45
+
#### Working with images
46
+
There are 8 images that are part of PAWS, in particular in the images/ directory. If you start a dev environment, it will pull those images from quay.io by default, just like in Wikimedia Cloud Services. If you are making changes to the images and testing those locally, you'll need to build them and tag them for your local environment, possibly setting them in your local values file with the tags you set.
47
+
48
+
If you are using minikube, you need to make sure you are using minikube's docker, not your system's docker with `eval $(minikube docker-env)`. Now your docker commands will operate on the minikube environment.
49
+
50
+
For example, let's say you wanted to update the singleuser image (which is the actual notebook server image):
And then you should have the image with a tag of `tag-you-are-going-to-use:whatever` that you could edit into your values.yaml file for local helm work. If you were aiming to aggressively push a tag for deployment, dodging around the CI system to do so, you'd tag with `quay.io/wikimedia-paws-prod/singleuser:latest`, which will cause a later `docker push quay.io/wikimedia-paws-prod/singleuser:latest` to actually push that tag directly to the repo for deployment in Cloud Services. Don't do that unless you really know what you are doing.
43
55
## Useful libraries
44
56
### Accessing Database Replicas With Pandas and Sqlalchemy
0 commit comments