Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #39 from austincunningham/move-installation-to-mak…
Browse files Browse the repository at this point in the history
…efile

remove the installations commands from the readme and create an installation script
  • Loading branch information
david-martin authored May 22, 2019
2 parents 2837459 + 12014b1 commit 889e278
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 26 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ cluster/clean:
.PHONY: cluster/create/examples
cluster/create/examples:
-kubectl create -f deploy/examples/ApplicationMonitoring.yaml -n $(NAMESPACE)

.PHONY: cluster/install
cluster/install:
./scripts/install.sh
46 changes: 20 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,29 @@ An example GrafanaDashboard can be seen in the example app [template](https://gi
You will need cluster admin permissions to create CRDs, ClusterRoles & ClusterRoleBindings.
ClusterRoles are needed to allow the operators to watch multiple namespaces.

```bash
make cluster/install
```
oc new-project application-monitoring
oc label namespace application-monitoring monitoring-key=middleware
```

Grafana CRDs

```
oc apply -f https://raw.githubusercontent.com/integr8ly/grafana-operator/master/deploy/crds/Grafana.yaml
oc apply -f https://raw.githubusercontent.com/integr8ly/grafana-operator/master/deploy/crds/GrafanaDashboard.yaml
```

Cluster Roles & RoleBindings

```
oc apply -f ./deploy/roles
```

Application Monitoring Operator

```
oc apply -f ./deploy/operator_roles/
oc apply -f ./deploy/crds/ApplicationMonitoring.yaml
oc apply -f ./deploy/operator.yaml
oc apply -f ./deploy/examples/ApplicationMonitoring.yaml
```

You can access Grafana, Prometheus & AlertManager web consoles using the Routes in the project.

## Verify installation
Run the following commands
```bash
# Check the project exists
$ oc project
Using project "application-monitoring" on server "https://your-cluster-ip:8443"

# Check the pods exist e.g.
$ oc get pods
NAME READY STATUS RESTARTS AGE
alertmanager-application-monitoring-0 2/2 Running 0 1h
application-monitoring-operator-77cdbcbff-fbrnr 1/1 Running 0 1h
grafana-deployment-6dc8df6bb4-rxdjs 1/1 Running 0 49m
grafana-operator-7c4869cfdc-6sdv9 1/1 Running 0 1h
prometheus-application-monitoring-0 4/4 Running 1 36m
prometheus-operator-7547bb757b-46lwh 1/1 Running 0 1h
```

# Example Monitored Project

These steps create a new project with a simple server exposing a metrics endpoint.
Expand Down
18 changes: 18 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# create the project and add a label
oc new-project application-monitoring
oc label namespace application-monitoring monitoring-key=middleware

# Grafana CRDs
oc apply -f https://raw.githubusercontent.com/integr8ly/grafana-operator/master/deploy/crds/Grafana.yaml
oc apply -f https://raw.githubusercontent.com/integr8ly/grafana-operator/master/deploy/crds/GrafanaDashboard.yaml

# Cluster Roles & RoleBindings
oc apply -f ./deploy/roles

# Application Monitoring Operator
oc apply -f ./deploy/operator_roles/
oc apply -f ./deploy/crds/ApplicationMonitoring.yaml
oc apply -f ./deploy/operator.yaml
oc apply -f ./deploy/examples/ApplicationMonitoring.yaml

0 comments on commit 889e278

Please sign in to comment.