Add nix shell informations

This commit is contained in:
Arnaud Delcasse 2024-11-27 19:21:16 +01:00
parent a68134667c
commit 3626abefe6
1 changed files with 36 additions and 24 deletions

View File

@ -13,21 +13,21 @@ Install Rancher Dektop or K3D or any other local Kubernetes. Make your Kubernete
Later, we will be using port 80 to access the cluster Ingress controller. On Linux, you must probably allow this.
```
$ sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80
sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80
```
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).
#### Rancher Desktop
See installation instructions here : https://docs.rancherdesktop.io/getting-started/installation
See installation instructions here : <https://docs.rancherdesktop.io/getting-started/installation>
#### K3D
Install K3D :
```
$ curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
```
Create config for the internal K3D registry to mirror your default docker images registry, for example in `/tmp/k3d-registry.yaml` :
@ -42,7 +42,7 @@ mirrors:
Create cluster :
```
$ k3d cluster create devcluster -p "80:80@loadbalancer" --registry-create devregistry:5000 --registry-config /tmp/k3d-registry.yaml
k3d cluster create devcluster -p "80:80@loadbalancer" --registry-create devregistry:5000 --registry-config /tmp/k3d-registry.yaml
```
### Install Tilt
@ -101,11 +101,11 @@ Add `tilt-dev.svc.cluster.local parcoursmob.tilt-dev.svc.cluster.local mobility-
Run `tilt up`
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
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>
Once you can acess PARCOURSMOB UI, you can connect with the initially created user :
- username: admin@parcoursmob.fr
- username: <admin@parcoursmob.fr>
- password: parcoursmob
Now, you're ready to code !
@ -137,3 +137,15 @@ By default, smtp4dev HTTP port is redirected to localhost:12345. You can change
```.env
SMTP4DEV_LOCAL_PORT=12345
```
## Use Nix shell to start easily
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