| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 1 | ***Settings*** | 
|  | 2 | Documentation      Keywords for system related tools installation. | 
|  | 3 | ...                For HTX refer to https://github.com/open-power/HTX | 
|  | 4 |  | 
|  | 5 |  | 
| George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 6 | Resource     ../lib/boot_utils.robot | 
| George Keishing | a28061a | 2023-12-15 14:46:54 +0530 | [diff] [blame] | 7 | Resource     ../lib/os_utilities.robot | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 8 |  | 
|  | 9 | ***Keywords*** | 
|  | 10 |  | 
|  | 11 | Prep OS For HTX Installation | 
|  | 12 | [Documentation]  Prepare OS for HTX tool installation. | 
|  | 13 |  | 
|  | 14 | Boot To OS | 
| George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 15 | ${status}=  Run Keyword And Return Status  Tool Exist  htxcmdline | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 16 |  | 
|  | 17 | Return From Keyword If  '${status}' == 'True' | 
|  | 18 | ...  HTX tool already installed. | 
|  | 19 |  | 
|  | 20 | # Downloads the package lists from the repositories and "update" | 
|  | 21 | # them to get information on the newest versions of packages and | 
|  | 22 | # their dependencies. | 
|  | 23 | Log To Console  \n Update package list. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 24 | OS Execute Command  sudo apt-get update | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 25 |  | 
|  | 26 | # Download and install Git. | 
|  | 27 | Log To Console  \n Install Git. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 28 | OS Execute Command  sudo apt-get -y install git | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 29 |  | 
|  | 30 |  | 
| George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 31 | Prep OS For OPAL PRD Installation | 
|  | 32 | [Documentation]  Prepare OS for OPAL PRD tool installation. | 
|  | 33 |  | 
|  | 34 | Boot To OS | 
|  | 35 | ${status}=  Run Keyword And Return Status  Tool Exist  opal-gard | 
|  | 36 |  | 
|  | 37 | Return From Keyword If  '${status}' == 'True'  ${False} | 
|  | 38 |  | 
|  | 39 |  | 
|  | 40 | # Downloads the package lists from the repositories and "updates" | 
|  | 41 | # them to get information on the newest versions of packages and | 
|  | 42 | # their dependencies. | 
|  | 43 | Log To Console  \n Update package list. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 44 | OS Execute Command  sudo apt-get update | 
| George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 45 |  | 
|  | 46 |  | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 47 | Setup HTX On OS | 
|  | 48 | [Documentation]  Download and install HTX exerciser tool from github. | 
|  | 49 |  | 
|  | 50 | # Download HTX source code from github. | 
|  | 51 | Log To Console  \n Download HTX source code from github. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 52 | OS Execute Command  sudo git clone https://www.github.com/open-power/HTX | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 53 |  | 
|  | 54 | # Download and install pre-requisite packages before compiling HTX. | 
|  | 55 | Log To Console  \n Download pre-requisite packages before compiling HTX. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 56 | OS Execute Command | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 57 | ...  sudo apt-get -y install gcc make libncurses5 g++ libdapl-dev | 
|  | 58 |  | 
|  | 59 | # To fix ncurse compile warning and errors. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 60 | OS Execute Command | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 61 | ...  sudo apt-get -y install libncurses5-dev libncursesw5-dev | 
|  | 62 |  | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 63 | OS Execute Command | 
|  | 64 | ...  sudo apt-get -y install libibverbs-dev librdmacm-dev | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 65 |  | 
|  | 66 | # Compile HTX source code and install. | 
|  | 67 | Log To Console  \n Compile HTX source code. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 68 | OS Execute Command  cd HTX && sudo make all | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 69 |  | 
|  | 70 | Log To Console  \n Installed compiled HTX binaries. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 71 | OS Execute Command  sudo make install | 
| George Keishing | fece979 | 2017-05-05 10:28:33 -0500 | [diff] [blame] | 72 |  | 
| George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 73 |  | 
| Joy Onyerikwu | 56fd36a | 2018-04-10 10:09:07 -0500 | [diff] [blame] | 74 | Install HTX On RedHat | 
|  | 75 | [Documentation]  Download and install HTX on Red Hat. | 
|  | 76 | [Arguments]  ${htx_rpm} | 
|  | 77 | # Description of argument(s): | 
|  | 78 | # htx_rpm    The url of the rqm file for htx | 
|  | 79 | #            (e.g. http://server.com/projects/htx_package.rpm ) | 
|  | 80 |  | 
|  | 81 |  | 
| Joy Onyerikwu | a807417 | 2018-04-20 07:08:19 -0500 | [diff] [blame] | 82 | ${stdout}  ${stderr}  ${rc}  OS Execute Command | 
|  | 83 | ...  wget ${htx_rpm}  ignore_err=1 | 
|  | 84 | Should Not Contain  ${stderr}  ERROR | 
| Joy Onyerikwu | 56fd36a | 2018-04-10 10:09:07 -0500 | [diff] [blame] | 85 | @{str}=  Split String From Right  ${htx_rpm}  /  1 | 
| Joy Onyerikwu | a807417 | 2018-04-20 07:08:19 -0500 | [diff] [blame] | 86 |  | 
| Joy Onyerikwu | 56fd36a | 2018-04-10 10:09:07 -0500 | [diff] [blame] | 87 | # Remove the old version. | 
|  | 88 | OS Execute Command  rpm -e `rpm -qa | grep htx`  ignore_err=1 | 
|  | 89 | OS Execute Command  rpm -Uvh ${str[1]} | 
|  | 90 | Tool Exist  htxcmdline | 
|  | 91 |  | 
|  | 92 |  | 
| George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 93 | Setup Opal Prd On OS | 
|  | 94 | [Documentation]  Download and install opal prd tool. | 
|  | 95 |  | 
|  | 96 | # Download and install PRD packages. | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 97 | OS Execute Command  sudo apt-get install opal-prd | 
|  | 98 | OS Execute Command  sudo apt-get install opal-utils | 
| George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 99 |  | 
|  | 100 | # Reboot OS to activate installation. | 
|  | 101 | Host Reboot | 
|  | 102 |  | 
| Joy Onyerikwu | 98e775c | 2018-05-14 13:16:26 -0500 | [diff] [blame] | 103 | # Verify opal prd installation working. | 
|  | 104 | ${out}  ${stderr}  ${rc}=  OS Execute Command  opal-gard list | 
| George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 105 | Should Contain  ${out}  No GARD entries to display |