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/helm
Clone the project repository and cd
into it:
git clone https://github.com/Smile-SA/rating-operator.git
Install Longhorn
git clone https://github.com/longhorn/longhorn ./quickstart/longhorn/longhorn
kubectl apply -f ./quickstart/longhorn/longhorn/deploy/longhorn.yaml
Wait 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.sh
Wait a minute, then verify everything is working as expected by running:
kubectl get pods -n monitoring
RATING_NAMESPACE=rating hack/install.sh
To check if everything is running correctly:
kubectl -n rating get pods
While inside the rating operator repo, and inside the rating namespace, run:
sudo kubectl config set-context --current --namespace=rating
Then we can access rating operator components:
Rating-api
./hack/forward-api
for more details about the API, please consult API endpoints
Prometheus
./hack/forward-prometheus
Grafana
./hack/forward-grafana