Skip to content

Commit

Permalink
Merge pull request #779 from TheHiddenLayer/update-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevilain authored Aug 2, 2024
2 parents d242ef2 + 760fcb6 commit 0396297
Showing 1 changed file with 42 additions and 8 deletions.
50 changes: 42 additions & 8 deletions docs/contributing/local-development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Prerequisites

- [Docker](https://docs.docker.com/engine/install/)
- [Docker](https://docs.docker.com/engine/install/) and [docker-buildx](https://github.com/docker/buildx)
- [Helm](https://helm.sh/)
- [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
- [tilt](https://docs.tilt.dev/install.html)
- [Golang](https://go.dev/doc/install)
Expand All @@ -10,14 +11,31 @@

Tilt offers a simple way of creating a local development environment.

## Create a kind cluster
## Create local k8s cluster

Create a kind cluster with a local registry:
```bash
make deploy-dev
```

Open the `tilt` browser UI by pressing the "space" key when prompted. Note that `tilt` sets up a directory watcher and will automatically redeploy any code changes!

You can check the "temporal-operator-controller-manager" Pod status with `kubectl get pods -n temporal-system -w`.

## Apply Manifests

Once the local cluster is created, start applying your desired manifests and let the temporal operator handle reconciliation:

```bash
make dev-cluster
# example
make artifacts
kubectl apply -f examples/cluster-postgres/00-namespace.yaml
kubectl apply -f examples/cluster-postgres/01-postgresql.yaml
kubectl apply -f examples/cluster-postgres/02-temporal-cluster.yaml
kubectl apply -f examples/cluster-postgres/03-temporal-namespace.yaml
```

Note: if you wish to interact with the Temporal Web UI or frontend gRPC service, you should port forward the services to localhost.

## Generate

Generate crd and docs when api is modified
Expand All @@ -26,12 +44,28 @@ Generate crd and docs when api is modified
make generate
```

## Run Tilt
## Test

Run tests with coverage report:

```bash
make test
```

Run end-to-end tests:

Then run:
```bash
make test-e2e
```

Run end-to-end tests on development computer using `kind`:

```bash
tilt up
make test-e2e-dev
```

Now, Tilt will automatically reload the deployment to your local cluster every time you make a code change.
## Gracefully Shutdown k8s Cluster

```bash
make clean-dev-cluster
```

0 comments on commit 0396297

Please sign in to comment.