The steps have been tried on OpenShift 4.9
- Clone the Monitoring Stack Operator repository
- Login into your quay repository
- Export environment variables
- Building images
- Deploy the operator
Clone and cd
into directory of the repo.
git clone [email protected]:rhobs/monitoring-stack-operator.git
cd monitoring-stack-operator
You will need a quay.io account and docker installed on your local machine.
docker login quay.io
IMAGE_BASE
and VERSION
needs to be exported before building an image.
export IMAGE_BASE = quay.io/<your_quay_username>/monitoring-stack-operator
eg: export IMAGE_BASE = quay.io/tsisodia10/monitoring-stack-operator
export VERSION = 0.0.1
We need to build Operator
, Bundle
, Catalog
images and push it to our quay repository.
IMAGE_BASE=quay.io/tsisodia10/monitoring-stack-operator make release
You'll see similar output like this -
...
docker build -f build/Dockerfile . -t quay.io/tsisodia10/monitoring-stack-operator:0.0.1
...
docker push quay.io/tsisodia10/monitoring-stack-operator:0.0.1
...
docker build -f bundle.Dockerfile . -t quay.io/tsisodia10/monitoring-stack-operator-bundle:0.0.1
...
docker push quay.io/tsisodia10/monitoring-stack-operator-bundle:0.0.1
...
docker build -f catalog.Dockerfile . -t quay.io/tsisodia10/monitoring-stack-operator-catalog:0.0.1
...
docker push quay.io/tsisodia10/monitoring-stack-operator-catalog:0.0.1
Quay should have 3 images listed as below -
REPOSITORY NAME LAST MODIFIED ACTIVITY STAR
tsisodia10/monitoring-stack-operator-catalog Yesterday at 1:57 PM
tsisodia10/monitoring-stack-operator-bundle Yesterday at 1:57 PM
tsisodia10/monitoring-stack-operator Yesterday at 1:57 PM
For this you need to first have Openshift cluster up and running.
- Apply Catalog source
# Apply this to add a new catalog to OLM
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
annotations:
name: monitoring-operators
namespace: openshift-marketplace
spec:
displayName: Monitoring Test Operator
icon:
base64data: ""
mediatype: ""
image: quay.io/tsisodia10/monitoring-stack-operator-catalog:latest
publisher: Twinkll Sisodia
sourceType: grpc
updateStrategy:
registryPoll:
interval: 1m0s
oc create -f hack/olm/catalog-src.yaml
- On Openshift UI
- Navigate to Openshift UI --->
OperatorHub
and Search forMonitoring Stack Operator
- Install the operator with
development
channel - Navigate to
Installed operators
and you'll see themonitoring stack operator
getting installed - Once installed, you can create
monitoring-stack
starburst instance
apiVersion: monitoring.rhobs/v1alpha1
kind: MonitoringStack
metadata:
name: starburst
spec:
logLevel: debug # debug
Once the monitoringStack instance is up and running, Prometheus
AlertManager
and Grafana
would be available and you can access those components under Networking
--> Routes
Great work!