Skip to content

Commit

Permalink
Moving things around to hopefully get a functioning test
Browse files Browse the repository at this point in the history
  • Loading branch information
vanpelt committed May 25, 2022
1 parent f8a8df0 commit b7b1a2c
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 14 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ jobs:
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Temporary yaml patching (can be removed when --helm-extra-set-args is added post v3.5.1)
run:
echo "license: $LICENSE" >> charts/wandb/ci/basic-values.yaml

- name: Run chart-testing (lint)
run: ct lint --config ct.yaml

- name: Create kind cluster
uses: helm/[email protected]
# if: steps.list-changed.outputs.changed == 'true'
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
run: ct install --config ct.yaml --all
run: ct install --config ct.yaml
8 changes: 8 additions & 0 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
We make use of Github actions and [chart-testing](https://github.com/helm/chart-testing) from the helm team. When developing locally you can create a kind cluster that supports custom images by running: `./dev-kind-cluster.sh`.

## Releasing

```shell
helm package wandb
helm push wandb/wandb-$VERSION.tgz oci://us-central1-docker.pkg.dev/wandb-production/charts/wandb
```
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ export BUCKET=s3://my-bucket
export BUCKET_REGION=us-east-1
```

## A note on the database

Running a MySQL database in your k8s cluster is not recommended. This chart does not provide any way to backup the data or ensure the database can scale. You'll need to manually increase the resources requested for the database and the size of the volume as load increases. If possible you should use an external database service and set the following variables:

```shell
--set mysql.managed=false --set mysql.host=db.host --set mysql.user=wandb --set mysql.password=XXX --set mysql.database=wandb
```

You can create a database and grant the needed access with:

```sql
CREATE USER 'wandb'@'%' IDENTIFIED BY 'XXX';
CREATE DATABASE wandb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL ON wandb.* TO 'wandb'@'%' WITH GRANT OPTION;
```

## From our helm repo

```shell
Expand All @@ -27,11 +43,4 @@ Then provision your instance with:
git clone https://github.com/wandb/helm-charts.git
cd helm-charts
helm upgrade --namespace=wandb --create-namespace --install wandb ./charts/wandb --set license=$LICENSE --set bucket=$BUCKET --set bucketRegion=$BUCKET_REGION
```

## Releasing

```shell
helm package wandb
helm push wandb/wandb-$VERSION.tgz oci://us-central1-docker.pkg.dev/wandb-production/charts/wandb
```
1 change: 0 additions & 1 deletion charts/wandb/ci/basic-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
license: $LICENSE
resources:
requests:
cpu: 100m
Expand Down
3 changes: 1 addition & 2 deletions charts/wandb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,5 @@ spec:
{{- if not .Values.bucket }}
volumes:
- name: wandb-data
hostPath:
path: /wandb
emptyDir: {}
{{- end }}
3 changes: 2 additions & 1 deletion charts/wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ podAnnotations: {}

podSecurityContext:
fsGroup: 0
fsGroupChangePolicy: "OnRootMismatch"

securityContext:
runAsNonRoot: true
runAsUser: 100000
runAsUser: 999
runAsGroup: 0

service:
Expand Down
2 changes: 1 addition & 1 deletion ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ chart-dirs:
- charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
helm-extra-args: --timeout 600s
helm-extra-args: --timeout 900s
Empty file modified dev-kind-cluster.sh
100644 → 100755
Empty file.

0 comments on commit b7b1a2c

Please sign in to comment.