Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
barreiro committed Aug 14, 2023
1 parent 56f6c2a commit 873361a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

.PHONY: deploy-samples
deploy-samples: ## Deploy config/samples to the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/samples | kubectl apply -f -

.PHONY: undeploy-samples
undeploy-samples: ## Undeploy config/samples from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/samples | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

##@ Build Dependencies

## Location to install dependencies to
Expand Down
43 changes: 21 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# Horreum Operator

This operator installs [Horreum](https://github.com/Hyperfoil/Horreum), services it depends on - PostgreSQL database and Keycloak SSO - and for convenience also [Hyperfoil Report](https://github.com/Hyperfoil/report).
This operator installs [Horreum](https://github.com/Hyperfoil/Horreum) and services it depends on (Grafana, PostgreSQL database and Keycloak SSO)

## Deploy the operator in minikube

See an [example](deploy/crds/hyperfoil.io_v1alpha1_horreum_cr.yaml) of the `horreum` resource:
First start by [installing minikube](https://minikube.sigs.k8s.io/docs/start/). Start the cluster with `minikube start`. (*Suggestion:* use `minikube dashboard` to monitor the cluster) (*Note:* The QEMU driver on linux will not allow external access to the services in the cluster)

```yaml
apiVersion: hyperfoil.io/v1alpha1
kind: Horreum
metadata:
name: example-horreum
spec:
route:
host: horreum.apps.mycloud.example.com
keycloak:
route:
host: keycloak.apps.mycloud.example.com
postgres:
persistentVolumeClaim: horreum-postgres
report:
route:
host: hyperfoil-report.apps.mycloud.example.com
persistentVolumeClaim: hyperfoil-report
```
Build and install Hyperfoil operator (Go 1.19 is required) with `make build install`.

Deploy the example resource in [config/samples/_v1alpha1_horreum.yaml](config/samples/_v1alpha1_horreum.yaml) in the cluster with `make deploy-samples`

Run the operator with `make run`. Once the horreum has started the operator can be stopped, as it only reacts to changes.

Horreum should be running by now. The services can be accessed using the URLs at `minikube service --all --url`. (*Note:* It may be necessary to reconfigure the running Horreum custom resource with the external URLs to the services)

### Undeploy

Undeploy samples from cluster `make undeploy-samples` (*Note:* this does not require the operator to be running)

Stop the minikube cluster with `minikube stop`. Optionally delete the cluster with `minikube delete --all`

## Configuration

For detailed description of all properties [refer to the CRD](deploy/olm-catalog/horreum-operator/0.1.0/hyperfoil.io_horreums_crd.yaml).
For detailed description of all properties [refer to the CRD](config/crd/bases/hyperfoil.io_horreums.yaml).

When using persistent volumes make sure that the access rights are set correctly and the pods have write access; in particular the PostgreSQL database requires that the mapped directory is owned by user with id `999`.

Expand All @@ -39,7 +38,7 @@ oc get secret $NAME-keycloak-admin -o json | \
jq '{ user: .data.user | @base64d, password: .data.password | @base64d }'
```

For details of roles in Horreum please refer to [its documentation](https://github.com/Hyperfoil/Horreum)
For details of roles in Horreum please refer to [its documentation](https://horreum.hyperfoil.io/)

## Hyperfoil integration

Expand Down

0 comments on commit 873361a

Please sign in to comment.