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

Commit

Permalink
🔀 Merge remote-tracking branch 'grdryn/local-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
grdryn committed Aug 14, 2019
2 parents dc3dae5 + 7571c99 commit 9aed473
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 12 deletions.
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,24 @@ test/e2e:
cluster/prepare:
-kubectl apply -f deploy/crds/
-oc new-project $(NAMESPACE)
-kubectl create --insecure-skip-tls-verify -f deploy/rbac.yaml -n $(NAMESPACE)

.PHONY: cluster/clean
cluster/clean:
-kubectl delete role application-monitoring-operator -n $(NAMESPACE)
-kubectl delete rolebinding application-monitoring-operator -n $(NAMESPACE)
-kubectl delete crd application-monitorings.integreatly.org
-kubectl delete -n $(NAMESPACE) --all blackboxtargets
-kubectl delete -n $(NAMESPACE) --all grafanadashboards
-kubectl delete -n $(NAMESPACE) --all grafanadatasources
-kubectl delete -n $(NAMESPACE) --all applicationmonitorings
-kubectl delete -f ./deploy/roles
-kubectl delete crd grafanas.integreatly.org
-kubectl delete crd grafanadashboards.integreatly.org
-kubectl delete crd grafanadatasources.integreatly.org
-kubectl delete crd podmonitors.monitoring.coreos.com
-kubectl delete crd prometheuses.monitoring.coreos.com
-kubectl delete crd alertmanagers.monitoring.coreos.com
-kubectl delete crd prometheusrules.monitoring.coreos.com
-kubectl delete crd servicemonitors.monitoring.coreos.com
-kubectl delete crd blackboxtargets.applicationmonitoring.integreatly.org
-kubectl delete crd applicationmonitorings.applicationmonitoring.integreatly.org
-kubectl delete namespace $(NAMESPACE)

.PHONY: cluster/create/examples
Expand Down
31 changes: 23 additions & 8 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,37 @@
oc new-project application-monitoring
oc label namespace application-monitoring monitoring-key=middleware

# Application Monitoring Operator
# AMO CRD
oc apply -f ./deploy/crds/ApplicationMonitoring.yaml

# AMO Cluster Roles & RoleBindings
oc apply -f ./deploy/roles
oc apply -f ./deploy/operator_roles/service_account.yaml
oc apply -f ./deploy/operator_roles/role.yaml
oc apply -f ./deploy/operator_roles/role_binding.yaml

# BlackboxTarget
oc apply -f ./deploy/crds/BlackboxTarget.yaml

# 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
oc apply -f https://raw.githubusercontent.com/integr8ly/grafana-operator/master/deploy/crds/GrafanaDataSource.yaml

# BlackboxTarget
oc apply -f ./deploy/crds/BlackboxTarget.yaml
# Prometheus CRDs
oc apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/podmonitor.crd.yaml
oc apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheus.crd.yaml
oc apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/alertmanager.crd.yaml
oc apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheusrule.crd.yaml
oc apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/servicemonitor.crd.yaml

# Application Monitoring Operator
# AMO CRD
oc apply -f ./deploy/crds/ApplicationMonitoring.yaml

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

# AMO Deployment
until oc auth can-i create prometheus -n application-monitoring --as system:serviceaccount:application-monitoring:application-monitoring-operator; do
echo "Waiting for all CRDs and SA permissions to be applied before deploying operator..." && sleep 1
done

oc apply -f ./deploy/operator.yaml
oc apply -f ./deploy/examples/ApplicationMonitoring.yaml

0 comments on commit 9aed473

Please sign in to comment.