From acd54ba601e34dafac063f94054bb80348e73dcd Mon Sep 17 00:00:00 2001
From: "Suren A. Chilingaryan" <csa@suren.me>
Date: Sun, 6 Oct 2019 04:43:13 +0200
Subject: Script to fullhy clean-up outdated rc

---
 scripts/provision/hawakular.sh     | 18 ++++++++++++++++++
 scripts/provision/kube-ops-view.sh | 12 ++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100755 scripts/provision/hawakular.sh
 create mode 100755 scripts/provision/kube-ops-view.sh

(limited to 'scripts/provision')

diff --git a/scripts/provision/hawakular.sh b/scripts/provision/hawakular.sh
new file mode 100755
index 0000000..73e3a87
--- /dev/null
+++ b/scripts/provision/hawakular.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+case $1 in 
+ "stop")
+    oc -n openshift-infra scale --replicas 0 rc/hawkular-metrics
+    oc -n openshift-infra scale --replicas 0 rc/heapster
+    oc -n openshift-infra scale --replicas 0 dc/hawkular-cassandra
+    ;;
+  "start")
+    oc -n openshift-infra scale --replicas 0 dc/hawkular-cassandra
+    sleep 1
+    oc -n openshift-infra scale --replicas 0 rc/heapster
+    sleep 1
+    oc -n openshift-infra scale --replicas 0 rc/hawkular-metrics
+    ;;
+ *)
+    echo "Usage: $0 stop/start"
+esac
diff --git a/scripts/provision/kube-ops-view.sh b/scripts/provision/kube-ops-view.sh
new file mode 100755
index 0000000..ca1389e
--- /dev/null
+++ b/scripts/provision/kube-ops-view.sh
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+NS=mon
+
+
+oc -n $NS new-project ocp-ops-view
+oc -n $NS create sa kube-ops-view
+oc -n $NS adm policy add-scc-to-user anyuid -z kube-ops-view
+oc -n $NS adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:mon:kube-ops-view
+oc -n $NS apply -f https://raw.githubusercontent.com/raffaelespazzoli/kube-ops-view/ocp/deploy-openshift/kube-ops-view.yaml
+oc -n $NS expose svc kube-ops-view
+oc -n $NS get route | grep kube-ops-view | awk '{print $2}'
-- 
cgit v1.2.3