OMS-docker/OpenShift
saaror c7f913ad2f
Update ocp-ds-omsagent.yaml
2021-09-16 02:04:58 +05:30
..
README.md ocp configuration update (#66) 2017-08-02 13:39:17 -07:00
ocp-ds-omsagent.yaml Update ocp-ds-omsagent.yaml 2021-09-16 02:04:58 +05:30
ocp-omsagent.yaml Update ocp-omsagent.yaml 2021-09-16 01:58:47 +05:30
ocp-secret-template.yaml ocp configuration update (#65) 2017-07-31 18:06:20 -07:00
ocp-secretgen.sh ocp configuration update (#65) 2017-07-31 18:06:20 -07:00

README.md

How to use the OMS Agent daemon-set for Redhat Openshift yaml files

In this folder, you will have two daemon-set files:

  • ocp-omsagent.yaml (default daemon-set)
  • ocp-ds-omsagent.yaml (daemon-set which uses secrets)

Deploying OMS Agent daemon-sets without using secrets

  1. Run the following commands to create a project for OMS and set user account.
oadm new-project omslogging --node-selector='zone=default'
oc project omslogging
oc create serviceaccount omsagent
oadm policy add-cluster-role-to-user cluster-reader system:serviceaccount:omslogging:omsagent
oadm policy add-scc-to-user privileged system:serviceaccount:omslogging:omsagent
  1. Log on to the OpenShift master node and copy ocp-omsagent.yaml. Replace <WSID> and <KEY> section of the daemon-set yaml file with your OMS Workspace ID and Primary Key. Deploy the daemon-set by runining the following command: oc create -f ocp-omsagent.yaml

  2. To check whether everything is working fine, type the following command:

oc describe daemonset omsagent
oc get pods

Deploying OMS Agent daemon-sets with secrets

  1. Run the following commands to create a project for OMS and set user account.
oadm new-project omslogging --node-selector='zone=default'
oc project omslogging
oc create serviceaccount omsagent
oadm policy add-cluster-role-to-user cluster-reader system:serviceaccount:omslogging:omsagent
oadm policy add-scc-to-user privileged system:serviceaccount:omslogging:omsagent
  1. Log on to the Openshift master node and copy the secret generating script and secret template file. Secret generating script will ask for your OMS Workspace ID <WSID> and Primary Key <KEY>.
  • secretgen.sh ( secret generating script)
  • ocp-secret-template.yaml (secret template file)
  1. The script will generate ocp-secret.yaml file. Deploy the secret file.
oc create -f ocp-secret.yaml

Check with oc describe secret omsagent-secret.

  1. Copy the OMS Agent Daemon-set yaml file ocp-ds-omsagent.yaml to the master node. Deploy the OMS Agent daemon-set yaml file.
oc create -f ocp-ds-omsagent.yaml

And check with oc describe ds oms