From 699b7b87e650a5eb6555d8798f11b0949fa1cee9 Mon Sep 17 00:00:00 2001 From: Pravin Dsilva Date: Fri, 12 Mar 2021 06:43:24 -0800 Subject: [PATCH] Add updates to RSCT documentation Signed-off-by: Pravin Dsilva --- docs/rsct-deploy.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/rsct-deploy.md b/docs/rsct-deploy.md index 98687a2d..78a3c78e 100644 --- a/docs/rsct-deploy.md +++ b/docs/rsct-deploy.md @@ -7,6 +7,13 @@ These instructions will help you deploy the RSCT/RMC daemonset on an OCP cluster Use the instructions provided [here](https://github.com/ocp-power-automation/ocp4-playbooks#setting-up-inventory) to setup the inventory for your cluster. For deploying RSCT, you would only need to set the bastion host details in the inventory. +Provide the hostname or the IP address of the bastion node and the user name in the inventory file. An example of the inventory file would look like this: + +``` +$ cat inventory +[bastion] +192.168.26.155 ansible_connection=ssh ansible_user=root +``` **2. Set up the variables** @@ -24,6 +31,20 @@ The ocp-customization [module](https://github.com/ocp-power-automation/ocp4-play ansible-playbook -i inventory -e @rmc_vars.yaml playbooks/customization.yaml ``` +Use the following command in case a non-root user is specified in the inventory file. Upon running the playbook, enter the password of the user when prompted for the "BECOME password". + +``` +ansible-playbook -i inventory -e @rmc_vars.yaml playbooks/customization.yaml -K --become +``` + +Note: While running the playbook as a non-root user, you may see an error such as: "oc: command not found". Since the command to run the playbook uses the `become` privilege escalataion option, such errors may arise when the PATH environment variable for `sudo` may not be the same as your user. You can rectify this by modifying the `Defaults secure_path` section in the sudoers file. + +Example: If the `oc` client binary is present in the /usr/local/bin directory, run the `visudo` command and navigate to the `Defaults secure_path` section. Set the PATH by adding `/usr/local/bin` as given below, save the file and re-run the ansible playbook: + +``` +Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin +``` + **4. Post deployment checks** After the playbook execution completes, the daemonset and pods should be available in the `powervm-rmc` namespace on the cluster. Run the following command to list them: