ForgeRock / forgeops

ForgeRock platform assets for Kubernetes deployment. Contains the files you need to build your own Docker images and to deploy the ForgeRock Identity Platform on Kubernetes clusters.
Other
165 stars 243 forks source link

Updated deployment for Prometheus/Grafana components #638

Closed jralmaraz closed 4 years ago

jralmaraz commented 4 years ago

The CDK and SRE documents make use of a script “Prometheus-deploy.sh” to deploy the monitoring components for the ForgeRock containers and they refers to helm, which is a reason for confusion as the rest of the deployment is now using Skaffold+Kustomize: (https://backstage.forgerock.com/docs/forgeops/6.5/eks-cookbook/).

From the release notes, the Prometheus/Grafana deployment script also uses helm: New scripts for installing third-party components -https://github.com/ForgeRock/forgeops/blob/master/bin/prometheus-deploy.sh

joalmaraz@bin % grep helm prometheus-deploy.sh

Add stable repo to helm

helm repo add stable https://kubernetes-charts.storage.googleapis.com helm upgrade -i prometheus-operator stable/prometheus-operator -f $PROM_VALUES --namespace=$NAMESPACE helm upgrade -i forgerock-metrics ${DIR}${ADDONS_DIR}/forgerock-metrics --namespace=$NAMESPACE helm uninstall prometheus-operator --namespace=$NAMESPACE helm delete forgerock-metrics --namespace=$NAMESPACE

joalmaraz@forgeops % git branch -a

helm upgrade -i prometheus-operator stable/prometheus-operator -f $PROM_VALUES --namespace=$NAMESPACE Release "prometheus-operator" does not exist. Installing it now. manifest_sorter.go:175: info: skipping unknown hook: "crd-install" manifest_sorter.go:175: info: skipping unknown hook: "crd-install" manifest_sorter.go:175: info: skipping unknown hook: "crd-install" manifest_sorter.go:175: info: skipping unknown hook: "crd-install" manifest_sorter.go:175: info: skipping unknown hook: "crd-install" manifest_sorter.go:175: info: skipping unknown hook: "crd-install" Error: failed pre-install: timed out waiting for the condition

Are you able to point out the updated way of deploying the monitoring components ?

Thanks.

Jose

wstrange commented 4 years ago

Helm is used for some non supported 3rd party components such as prometheus. There is a prometheus issue on kubenetes 1.16 related to the message you see above. Apparently it is a warning.

This is the issue to track: https://github.com/helm/charts/issues/17511

jralmaraz commented 4 years ago

Thanks @wstrange! I was also trying with helm version 3 and I don't think the prometheys/grafana charts were updated for that yet, right?

joalmaraz@bin % ./prometheus-deploy.sh monitoring namespace already exists "stable" has been added to your repositories Error: "helm upgrade" requires 2 arguments

Usage: helm upgrade [RELEASE] [CHART] [flags] joalmaraz@bin % helm version version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}

joalmaraz@bin % kubectl version Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-13T18:08:14Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:12:17Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}

lee-baines commented 4 years ago

Hi, these scripts are designed for Helm 3 only. I think due to the pressure to release Helm 3, not all of the changes were included initially. I see that you have Helm v3.0.0. Can you update it further?
This is my Helm version:

helm version version.BuildInfo{Version:"v3.1.2", GitCommit:"d878d4d45863e42fd5cff6743294a11d28a9abce", GitTreeState:"clean", GoVersion:"go1.13.8"}

wstrange commented 4 years ago

The forgeops master has been updated - the prometheus scripts should deploy fine now. Please reopen if this is not the case.