Skip to content

Latest commit

 

History

History
107 lines (72 loc) · 3.48 KB

File metadata and controls

107 lines (72 loc) · 3.48 KB

CCE Installation

These are the instructions of installing and configuring cloudeye-exporter on an Open Telekom Cloud CCE cluster.

Encode clouds.yaml in base64 and insert value in Secret

Create a copy of clouds.tpl template, name it clouds.yaml and fill it in with your own values, then encode it to base64 with the following command:

 base64 -i clouds.yaml 

Take the encoded contents and replace the value of clouds.yaml in deploy/manifests/cloudeye-exporter-clouds-secret.yaml:

apiVersion: v1
kind: Secret
metadata:
  name: cloudeye-exporter-clouds
  namespace: default
type: Opaque
data:
  clouds.yaml: Z2xvYmFsOg************************************************************
  

Move to deploy/manifests directory:

cd deploy/manifests

Install kube-prometheus-stack & cloudeye-exporter artefacts

We are going to install Prometheus/Grafana stack via the kube-prometheus-stack chart. The configuration values used will be autogenerated at deploy/manifests/prometheus-stack/override.yaml. You could diff them with the default values default.yaml to figure out the changes.

Run ./install-stack.sh. This script will deploy, besides the kube-prometheus-stack, all the cloudeye-exporter related artefacts.

Export the Elastic Load Balancer's ID as an env variable

export ELB_ID="66872*****"

Install Nginx Ingress Controller

Next, we are going to install the Nginx Ingress Controller using the script ./install-ingress.sh:

envsubst < nginx-ingress-controller/override.tpl > nginx-ingress-controller/override.yaml
sleep 15

helm upgrade --install -f nginx-ingress-controller/override.yaml --install ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace

Install an Nginx Demo Workload

We are going to need a workload to test HPA and the autoscaling via our custom CloudEye derived metrics. For that matter we will deploy a dummy nginx deployment and service using the script ./install-workload.sh:

kubectl create namespace applications
kubectl apply -f deploy/manifests/nginx-deployment.yaml
kubectl apply -f deploy/manifests/nginx-ingress.yaml

Export the Elastic Load Balancer Listener's ID as an env variable

Choose the listener that corresponds to port 80, and copy the ID value:

export ELB_LISTENER_ID="94424*****"

Install prometheus-adapter

Next, and last step, of the installation sequence is the deployment of prometheus-adapter that will give an additional custom metrics api endpoint that will bind our custom CloudEye metrics with HPA. Before installing the chart, you need to get the Elastic Load Balancer Listener's ID from your Open Telekom Cloud Console and replace the value in ./install-adapter.sh:

envsubst < prometheus-adapter/override.tpl > prometheus-adapter/override.yaml
sleep 15

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update

helm upgrade --install --values prometheus-adapter/override.yaml prometheus-adapter prometheus-community/prometheus-adapter -n monitoring

The configuration values used for the prometheus-adapter chart will be autogenerated at deploy/manifests/prometheus-adapter/override.yaml. You could diff them with the default values default.yaml to figure out the changes.

Stress-test the Nginx Demo Workload

export ELB_ELASTIC_IP=80.xxx.xxx.xxx
while true; do wget -q -O- https://${ELB_ELASTIC_IP}/; done