Skip to content

Commit

Permalink
chore: make orbstrack install easier
Browse files Browse the repository at this point in the history
  • Loading branch information
leroyguillaume committed Jul 20, 2024
1 parent 4e6b89c commit 996b99c
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.tgz
/.local
/target
14 changes: 12 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,24 @@ cargo test

You need to have a local Kubernetes cluster (as K3S, Minikube, kind...).

To use SMTP locally, we recommand to use SMTP server as relay to GMail.
You can install the [Helm chart](charts/simpaas).

### Orbstack

If you're using Orbstack, you can use orbstrack-install script directly. It will install the complete stack by using chart [simpaas-orbstack](charts/simpaas-orbstack).

To use SMTP locally, you can use SMTP server as relay to GMail.

You need to create [app password](https://support.google.com/accounts/answer/185833).

```bash
export GMAIL_USER=your email
export GMAIL_PASSWORD=your token
./tools/install.sh
./tools/orbstack-install.sh
```

If you want to customize configuration, you can create a file `.local/values.yaml`.

### API

```bash
Expand All @@ -46,6 +54,8 @@ cargo run -- api

### Operator

If you run the operator locally, it is strongly recommend to set number of replicas to `0` for operator.

```bash
cargo run -- op
```
9 changes: 9 additions & 0 deletions charts/simpaas-orbstack/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: simpaas
repository: file://../simpaas
version: 0.1.0
- name: ingress-nginx
repository: https://kubernetes.github.io/ingress-nginx
version: 4.11.1
digest: sha256:189baca488968e697592cf135ae9dc0fbd3399c34b38ee64c8886e7cb8d4675b
generated: "2024-07-20T19:43:11.4167+02:00"
14 changes: 14 additions & 0 deletions charts/simpaas-orbstack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v2
name: simpaas-local
description: A Helm chart for local SimPaaS install
type: application
version: 0.1.0
appVersion: 0.1.0
dependencies:
- name: simpaas
repository: file://../simpaas
version: ~0
- name: ingress-nginx
repository: https://kubernetes.github.io/ingress-nginx
version: ~4
condition: ingress-nginx.enabled
31 changes: 31 additions & 0 deletions charts/simpaas-orbstack/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
simpaas:
common:
image:
tag: latest
pullPolicy: Always

logFilter: simpaas=debug,warn

ingress:
className: &ingressClassName simpaas-nginx
domain: simpaas.k8s.orb.local

smtp:
env:
- name: GMAIL_USER
valueFrom:
secretKeyRef:
name: simpaas-gmail
key: user
- name: GMAIL_PASSWORD
valueFrom:
secretKeyRef:
name: simpaas-gmail
key: password

ingress-nginx:
enabled: true

controller:
ingressClassResource:
name: *ingressClassName
1 change: 1 addition & 0 deletions charts/simpaas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ swaggerUi:

ingress:
enabled: true
className: ~
domain: ~
fqdn: ~
tls: false
Expand Down
27 changes: 0 additions & 27 deletions config/local.yaml

This file was deleted.

8 changes: 6 additions & 2 deletions tools/install.sh → tools/orbstack-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ if ! ./tools/gen-crds.sh; then
find charts/simpaas/crds -name '*.yaml' -exec kubectl apply -f {} \;
fi

if [ -f .local/values.yaml ]; then
set_values="--set-values .local/values.yaml"
fi

helm upgrade \
-n $ns \
--create-namespace \
--install \
--values config/local.yaml \
$set_values \
simpaas \
charts/simpaas
charts/simpaas-orbstack
kubectl -n $ns apply -f - <<EOF
apiVersion: v1
kind: Secret
Expand Down

0 comments on commit 996b99c

Please sign in to comment.