Local dev environment for the COOPGO Technical Platform, using [Tilt](https://tilt.dev) and a local Kubernetes cluster (such as [Rancher Desktop](https://rancherdesktop.io/), K3D, ...)
To preserve this change across reboots as a custom kernel parameter setting, add the same command inside your /etc/sysctl.conf file (or a dedicated /etc/sysctl.d/xxxxx.conf).
To avoid developing on another cluster than the one dedicated for dev, we whitelist the correct context. By default, the allowed context is 'rancher-desktop'. To change this, set ALLOWED_K8S_CONTEXT to the correct context name in .env :
Add `tilt-dev.svc.cluster.local parcoursmob.tilt-dev.svc.cluster.local mobility-accounts.tilt-dev.svc.cluster.local` to resolve `127.0.0.1` in your hosts config (`/etc/hosts` on Linux)
After some time (you can see the services loading -or failing, if there is an error- through Tilt UI), PARCOURSMOB should be available on <http://parcoursmob.tilt-dev.svc.cluster.local>
Tilt handles livereloading Kubernetes pods when something changes in the code. You just have to checkout your code in the directory you've specified in .env (see quickstart), start developing on exsting microservices, and see the changes.
## Acess useful internal components for debugging/tests
You can use the "nix shell" (<https://nixos.org/>) utility to set your environment without having to install every dependency individually.
Install Nix, run `nix-shell`, and benefit from a shell providing :
- Tilt command
- K3D
- Protocol buffer dependencies (protoc, protoc-gen-go, protobuf) needed to build gRPC protocol buffer definitions in the Golang microservices with the COOPGO Platform
More to come to provide a full dev environment dedicated to the COOPGO Technical Platform