Skip to content

Commit

Permalink
doc: add development & testing instruction in CONTRIBUTING.md (immich…
Browse files Browse the repository at this point in the history
…-app#84)

* doc: add development & testing instruction in CONTRIBUTING.md

* fix: Chart.yaml no new release for doc change
  • Loading branch information
hiteshnayak305 authored Apr 10, 2024
1 parent 38898ab commit c5e3bf4
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,60 @@ Chart releases must be immutable. Any change to a chart warrants a chart version
### Versioning

The chart `version` should follow [semver](https://semver.org/).

### Development & Testing

1. Install `minikube` and `helm`.
2. Start a `minikube` cluster via

```bash
minikube start
```

3. Create `PersistentVolumeClaim` by executing following command in shell

```bash
minikube kubectl -- create -f - <<EOF
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-immich
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
EOF
```
4. From the `charts/immich` directory execute the following command.
This will install the dependencies listed in `Chart.yml` and deploy the current state of the helm chart found locally.
If you want to test a branch, make sure to switch to the respective branch first.
```bash
helm install --dependency-update immich . -f values.yaml --set immich.persistence.library.existingClaim=pvc-immich --set redis.enabled=true --set postgresql.enabled=true
```
5. Immich is now deployed in `minikube`.
To access it, it's port needs to be forwarded first from `minikube` to localhost first via
```bash
minikube kubectl -- port-forward svc/immich-server 3001:3001
```
Now Immich is accessible at [http://localhost:3001](http://localhost:3001) and volume contents at `/tmp/hostpath-provisioner/default`.
6. Clean resources after testing (can skip `delete pvc` and `minikube delete` if testing again, but it's good to test with fresh installation)
```bash
helm uninstall immich
minikube kubectl -- delete pvc pvc-immich data-immich-postgresql-0 redis-data-immich-redis-master-0
minikube stop
```
7. Delete `minikube` cluster (will delete all cached images and volumes) via
```bash
minikube delete
```

0 comments on commit c5e3bf4

Please sign in to comment.