blob: 58640b1a244e21f88840b4be681054c38b6af360 [file] [log] [blame]
George Keishingfece9792017-05-05 10:28:33 -05001***Settings***
2Documentation Keywords for system related tools installation.
3... For HTX refer to https://github.com/open-power/HTX
4
5
6Resource utils_os.robot
George Keishing88366b32017-05-12 13:50:48 -05007Resource ../lib/boot_utils.robot
George Keishingfece9792017-05-05 10:28:33 -05008
9***Keywords***
10
11Prep OS For HTX Installation
12 [Documentation] Prepare OS for HTX tool installation.
13
14 Boot To OS
George Keishing88366b32017-05-12 13:50:48 -050015 ${status}= Run Keyword And Return Status Tool Exist htxcmdline
George Keishingfece9792017-05-05 10:28:33 -050016
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 Onyerikwu98e775c2018-05-14 13:16:26 -050024 OS Execute Command sudo apt-get update
George Keishingfece9792017-05-05 10:28:33 -050025
26 # Download and install Git.
27 Log To Console \n Install Git.
Joy Onyerikwu98e775c2018-05-14 13:16:26 -050028 OS Execute Command sudo apt-get -y install git
George Keishingfece9792017-05-05 10:28:33 -050029
30
George Keishing88366b32017-05-12 13:50:48 -050031Prep 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 Onyerikwu98e775c2018-05-14 13:16:26 -050044 OS Execute Command sudo apt-get update
George Keishing88366b32017-05-12 13:50:48 -050045
46
George Keishingfece9792017-05-05 10:28:33 -050047Setup 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 Onyerikwu98e775c2018-05-14 13:16:26 -050052 OS Execute Command sudo git clone https://www.github.com/open-power/HTX
George Keishingfece9792017-05-05 10:28:33 -050053
54 # Download and install pre-requisite packages before compiling HTX.
55 Log To Console \n Download pre-requisite packages before compiling HTX.
Joy Onyerikwu98e775c2018-05-14 13:16:26 -050056 OS Execute Command
George Keishingfece9792017-05-05 10:28:33 -050057 ... sudo apt-get -y install gcc make libncurses5 g++ libdapl-dev
58
59 # To fix ncurse compile warning and errors.
Joy Onyerikwu98e775c2018-05-14 13:16:26 -050060 OS Execute Command
George Keishingfece9792017-05-05 10:28:33 -050061 ... sudo apt-get -y install libncurses5-dev libncursesw5-dev
62
Joy Onyerikwu98e775c2018-05-14 13:16:26 -050063 OS Execute Command
64 ... sudo apt-get -y install libibverbs-dev librdmacm-dev
George Keishingfece9792017-05-05 10:28:33 -050065
66 # Compile HTX source code and install.
67 Log To Console \n Compile HTX source code.
Joy Onyerikwu98e775c2018-05-14 13:16:26 -050068 OS Execute Command cd HTX && sudo make all
George Keishingfece9792017-05-05 10:28:33 -050069
70 Log To Console \n Installed compiled HTX binaries.
Joy Onyerikwu98e775c2018-05-14 13:16:26 -050071 OS Execute Command sudo make install
George Keishingfece9792017-05-05 10:28:33 -050072
George Keishing88366b32017-05-12 13:50:48 -050073
Joy Onyerikwu56fd36a2018-04-10 10:09:07 -050074Install 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 Onyerikwua8074172018-04-20 07:08:19 -050082 ${stdout} ${stderr} ${rc} OS Execute Command
83 ... wget ${htx_rpm} ignore_err=1
84 Should Not Contain ${stderr} ERROR
Joy Onyerikwu56fd36a2018-04-10 10:09:07 -050085 @{str}= Split String From Right ${htx_rpm} / 1
Joy Onyerikwua8074172018-04-20 07:08:19 -050086
Joy Onyerikwu56fd36a2018-04-10 10:09:07 -050087 # 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 Keishing88366b32017-05-12 13:50:48 -050093Setup Opal Prd On OS
94 [Documentation] Download and install opal prd tool.
95
96 # Download and install PRD packages.
Joy Onyerikwu98e775c2018-05-14 13:16:26 -050097 OS Execute Command sudo apt-get install opal-prd
98 OS Execute Command sudo apt-get install opal-utils
George Keishing88366b32017-05-12 13:50:48 -050099
100 # Reboot OS to activate installation.
101 Host Reboot
102
Joy Onyerikwu98e775c2018-05-14 13:16:26 -0500103 # Verify opal prd installation working.
104 ${out} ${stderr} ${rc}= OS Execute Command opal-gard list
George Keishing88366b32017-05-12 13:50:48 -0500105 Should Contain ${out} No GARD entries to display