OpenShift console install
The instructions below are for installation via OpenShift console, as an option you can use Kubectl command line installation.
Create a lpar2rrd service account
You can choice whatever else account name than lpar2rrd.
Insert content below:
apiVersion: v1
kind: ServiceAccount
metadata:
name: lpar2rrd
namespace: default
Click on "lpar2rrd-token-xxxxx" under to "Secrets"
Copy lpar2rrd token
Create a lpar2rrd role
Insert content below:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: lpar2rrd
rules:
- apiGroups: ["","metrics.k8s.io","apps","config.openshift.io","machine.openshift.io","machineconfiguration.openshift.io","monitoring.coreos.com","project.openshift.io","route.openshift.io","storage.k8s.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
Create a lpar2rrd role binding
Select Binding type "Cluster-wide Role Binding", type the role binding name to "lpar2rrd" and select Role Name "lpar2rrd"
Select Subject "Service Account" and type "lpar2rrd" as Subject Name
Configure RedHat OpenShift in LPAR2RRD
-
Open network connection to the RedHat OpenShift from LPAR2RRd server.
If it is in Google Cloud then port 443, if it is in Kubernetes then port 6443.
-
LPAR2RRD UI ➡ Settings icon ➡ RedHat OpenShift ➡ New
- Make sure cron job for OpenShift is in place (upgrade script might do it for you automatically)
Skip this step if you install the Virtual Appliance - it is already taken care of.
$ crontab -l | grep "load_openshift.sh"
$
Add following lines to crontab if necessary
$ crontab -e
# Openshift support
0,20,40 * * * * /home/lpar2rrd/lpar2rrd/load_openshift.sh > /home/lpar2rrd/lpar2rrd/load_openshift.out 2>&1
- Wait 30 minutes and then go to the web UI: http://<your web server>/lpar2rrd/
Use Ctrl-F5 to refresh the web browser cache.
Kubectl install
The instructions below are for installation via the
kubectl command line as an option to OpenShift console installation
Create a lpar2rrd service account
You can choice whatever else account name than lpar2rrd.
$ kubectl create serviceaccount lpar2rrd
Create a clusterrole
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: lpar2rrd
rules:
- apiGroups: ["","metrics.k8s.io","apps","config.openshift.io","machine.openshift.io","machineconfiguration.openshift.io","monitoring.coreos.com","project.openshift.io","route.openshift.io","storage.k8s.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
Apply it by:
$ kubectl apply -f ClusterRole.yml
Create a clusterrolebinding
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: lpar2rrd
subjects:
- kind: ServiceAccount
name: lpar2rrd
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: lpar2rrd
Apply it by:
$ kubectl apply -f ClusterRoleBinding.yml
Get lpar2rrd token
$ kubectl get serviceaccounts lpar2rrd -o yaml
$ kubectl describe secret lpar2rrd-token-fkkxp
Get cluster endpoint
$ kubectl config view
Configure RedHat OpenShift in LPAR2RRD
-
LPAR2RRD UI ➡ Settings icon ➡ RedHat OpenShift ➡ New
- Make sure cron job for OpenShift is in place (upgrade script might do it for you automatically)
Skip this step if you install the Virtual Appliance - it is already taken care of.
$ crontab -l | grep "load_openshift.sh"
$
Add following lines to crontab if necessary
$ crontab -e
# Openshift support
0,20,40 * * * * /home/lpar2rrd/lpar2rrd/load_openshift.sh > /home/lpar2rrd/lpar2rrd/load_openshift.out 2>&1
- Wait 30 minutes and then go to the web UI: http://<your web server>/lpar2rrd/
Use Ctrl-F5 to refresh the web browser cache.