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 | |
| 6 | Resource utils_os.robot |
George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 7 | Resource ../lib/boot_utils.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. |
| 24 | Execute Command On OS sudo apt-get update |
| 25 | |
| 26 | # Download and install Git. |
| 27 | Log To Console \n Install Git. |
| 28 | Execute Command On OS sudo apt-get -y install git |
| 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. |
| 44 | Execute Command On OS sudo apt-get update |
| 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. |
| 52 | Execute Command sudo git clone https://www.github.com/open-power/HTX |
| 53 | |
| 54 | # Download and install pre-requisite packages before compiling HTX. |
| 55 | Log To Console \n Download pre-requisite packages before compiling HTX. |
| 56 | Execute Command On OS |
| 57 | ... sudo apt-get -y install gcc make libncurses5 g++ libdapl-dev |
| 58 | |
| 59 | # To fix ncurse compile warning and errors. |
| 60 | Execute Command On OS |
| 61 | ... sudo apt-get -y install libncurses5-dev libncursesw5-dev |
| 62 | |
| 63 | Execute Command On OS sudo apt-get -y install libibverbs-dev librdmacm-dev |
| 64 | |
| 65 | # Compile HTX source code and install. |
| 66 | Log To Console \n Compile HTX source code. |
| 67 | Execute Command On OS cd HTX && sudo make all |
| 68 | |
| 69 | Log To Console \n Installed compiled HTX binaries. |
| 70 | Execute Command On OS sudo make install |
| 71 | |
George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 72 | |
Joy Onyerikwu | 56fd36a | 2018-04-10 10:09:07 -0500 | [diff] [blame] | 73 | Install HTX On RedHat |
| 74 | [Documentation] Download and install HTX on Red Hat. |
| 75 | [Arguments] ${htx_rpm} |
| 76 | # Description of argument(s): |
| 77 | # htx_rpm The url of the rqm file for htx |
| 78 | # (e.g. http://server.com/projects/htx_package.rpm ) |
| 79 | |
| 80 | |
Joy Onyerikwu | a807417 | 2018-04-20 07:08:19 -0500 | [diff] [blame] | 81 | ${stdout} ${stderr} ${rc} OS Execute Command |
| 82 | ... wget ${htx_rpm} ignore_err=1 |
| 83 | Should Not Contain ${stderr} ERROR |
Joy Onyerikwu | 56fd36a | 2018-04-10 10:09:07 -0500 | [diff] [blame] | 84 | @{str}= Split String From Right ${htx_rpm} / 1 |
Joy Onyerikwu | a807417 | 2018-04-20 07:08:19 -0500 | [diff] [blame] | 85 | |
Joy Onyerikwu | 56fd36a | 2018-04-10 10:09:07 -0500 | [diff] [blame] | 86 | # Remove the old version. |
| 87 | OS Execute Command rpm -e `rpm -qa | grep htx` ignore_err=1 |
| 88 | OS Execute Command rpm -Uvh ${str[1]} |
| 89 | Tool Exist htxcmdline |
| 90 | |
| 91 | |
George Keishing | 88366b3 | 2017-05-12 13:50:48 -0500 | [diff] [blame] | 92 | Setup Opal Prd On OS |
| 93 | [Documentation] Download and install opal prd tool. |
| 94 | |
| 95 | # Download and install PRD packages. |
| 96 | Execute Command sudo apt-get install opal-prd |
| 97 | Execute Command sudo apt-get install opal-utils |
| 98 | |
| 99 | # Reboot OS to activate installation. |
| 100 | Host Reboot |
| 101 | |
| 102 | # Login to OS and verify opal prd installation working. |
| 103 | Login To OS |
| 104 | ${out}= Execute Command opal-gard list |
| 105 | Should Contain ${out} No GARD entries to display |
| 106 | |