In this document we show how to set up a test/minimal cluster instance. For more details, please refer to the full Installation.
Install a light weight cluster by k3s (minimum 20GB of storage).
curl -sfL https://get.k3s.io | sh - sudo chmod +r /etc/rancher/k3s/k3s.yaml
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml sudo apt install open-iscsi curl https://get.helm.sh/helm-v3.1.2-linux-amd64.tar.gz | tar xfz -
sudo mv linux-amd64/helm /usr/local/bin/helmClone the project repository and cd into it:
git clone https://github.com/Smile-SA/rating-operator.gitInstall Longhorn
git clone https://github.com/longhorn/longhorn ./quickstart/longhorn/longhorn
kubectl apply -f ./quickstart/longhorn/longhorn/deploy/longhorn.yamlWait a minute, then verify everything is working as expected by running:
kubectl get pods -n longhorn-system helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
./quickstart/prometheus/install.shWait a minute, then verify everything is working as expected by running:
kubectl get pods -n monitoring RATING_NAMESPACE=rating hack/install.shTo check if everything is running correctly:
kubectl -n rating get podsWhile inside the rating operator repo, and inside the rating namespace, run:
sudo kubectl config set-context --current --namespace=ratingThen we can access rating operator components:
Rating-api
./hack/forward-apifor more details about the API, please consult API endpoints
Prometheus
./hack/forward-prometheusGrafana
./hack/forward-grafana