From: Naga Sugguna Date: Thu, 13 Jun 2019 00:21:22 +0000 (+0000) Subject: Merge "Fix OS Dockerfile" X-Git-Tag: 2.0.0~73 X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=validation.git;a=commitdiff_plain;h=96ca0cb7cc0f1ab18124d289f7d20c882f271928;hp=1d08b602be21788f553670eb2166bf0936f26f4d Merge "Fix OS Dockerfile" --- diff --git a/bluval/bluval-base.yaml b/bluval/bluval-base.yaml index 924a476..7a49b83 100644 --- a/bluval/bluval-base.yaml +++ b/bluval/bluval-base.yaml @@ -36,8 +36,8 @@ blueprint: # true or false, default is false show_stopper: false - - name: baremetal_hw - what: baremetal_hw + name: hp_baremetal + what: hp_baremetal os: &os_base - name: cyclictest diff --git a/bluval/bluval-dummy.yaml b/bluval/bluval-dummy.yaml index 0f8a89b..11e8fc2 100644 --- a/bluval/bluval-dummy.yaml +++ b/bluval/bluval-dummy.yaml @@ -31,8 +31,8 @@ blueprint: # true or false, default is false show_stopper: false - - name: baremetal_hw - what: baremetal_hw + name: hp_baremetal + what: hp_baremetal os: &os_base - name: cyclictest diff --git a/docker/hw/Dockerfile b/docker/hw/Dockerfile new file mode 100644 index 0000000..5b25e76 --- /dev/null +++ b/docker/hw/Dockerfile @@ -0,0 +1,53 @@ +############################################################################## +# Copyright (c) 2019 AT&T, ENEA AB, Nokia and others # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you maynot use this file except in compliance with the License. # +# # +# You may obtain a copy of the License at # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +############################################################################## + +# ref: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#use-multi-stage-builds +FROM python:3.6-alpine3.9 as build + +# Install dependencies +COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt + +RUN apk --no-cache add --update \ + gcc \ + git \ + libc-dev \ + libffi \ + libffi-dev \ + make \ + openssl-dev + +# Build binaries +WORKDIR /wheels +RUN pip3 install wheel +RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt +RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation + +# Copy binaries in the final contaier and install robot framework +FROM python:3.6-alpine3.9 +COPY --from=build /wheels /wheels +COPY --from=build /opt/akraino/validation /opt/akraino/validation + +RUN pip3 install -r /wheels/requirements/pip-requirements.txt \ + -f /wheels && \ + rm -rf /wheels && \ + rm -rf /root/.cache/pip/* + +# Install blueval dependencies +RUN pip install -r /opt/akraino/validation/bluval/requirements.txt + +# Install curl +RUN apk --no-cache add --update \ + curl diff --git a/docker/hw/Makefile b/docker/hw/Makefile new file mode 100644 index 0000000..a5b4099 --- /dev/null +++ b/docker/hw/Makefile @@ -0,0 +1,23 @@ +############################################################################## +# Copyright (c) 2019 AT&T, ENEA AB, Nokia and others # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you maynot use this file except in compliance with the License. # +# # +# You may obtain a copy of the License at # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +############################################################################## + +.PHONY: all +all: .push_image .push_manifest + +.PHONY: build +build: .build + +include ../build.mk diff --git a/docker/hw/pip-requirements.txt b/docker/hw/pip-requirements.txt new file mode 100644 index 0000000..6139a45 --- /dev/null +++ b/docker/hw/pip-requirements.txt @@ -0,0 +1,4 @@ +robotframework +robotframework-httplibrary +robotframework-requests +robotframework-sshlibrary diff --git a/tests/hardware/hp_baremetal/hp_baremetal.robot b/tests/hardware/hp_baremetal/hp_baremetal.robot new file mode 100644 index 0000000..676b109 --- /dev/null +++ b/tests/hardware/hp_baremetal/hp_baremetal.robot @@ -0,0 +1,77 @@ +############################################################################## +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you maynot use this file except in compliance with the License. # +# # +# You may obtain a copy of the License at # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +############################################################################## + +*** Settings *** +Documentation HP Bare metal HW test cases to verify configuration +... from given blueprint +Library OperatingSystem +Library BuiltIn +Library Process + +*** Variables *** +${LOGHWHP} ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log + +*** Test Cases *** +Verify cluster connectivity + [Documentation] Wait a few seconds to prove connectivity + @{nodes} Create List ${HOST_MR} ${HOST_WR1} ${HOST_WR2} ${HOST_WR3} ${HOST_WR4} + FOR ${node} IN @{nodes} + ${output}= Run ping ${node} -c 3 + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} 3 packets transmitted, 3 received + END + +Verify hw health status + [Documentation] HW health should be ok + ${output}= Run curl ${BASE_URI} -k | python -m json.tool | grep -A4 '"System":' + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} OK + +Verify chassis details + [Documentation] Data should match chassis input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Chassis/1/ -k | python -m json.tool | grep "SerialNumber" + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${CHASSIS} + +Verify iDRAC settings + [Documentation] Data should match idrac input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Managers/1/EthernetInterfaces/1/ -k | python -m json.tool | grep -A2 IPv4Addresses + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${IDRACIP} + +Verify boot registry + [Documentation] Data should match boot input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Systems/1/ -k | python -m json.tool | grep BootSourceOverrideMode + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${BOOTSEQ} + +Verify bios version + [Documentation] Data should match bios input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Systems/1/ -k | python -m json.tool | grep BiosVersion + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${BIOSVER} + +Verify firmware version + [Documentation] Data should match firmware input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Managers/1/ -k | python -m json.tool | grep "FirmwareVersion" + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${FIRMWARE} diff --git a/tests/variables.yaml b/tests/variables.yaml index 016f31b..2949440 100644 --- a/tests/variables.yaml +++ b/tests/variables.yaml @@ -23,7 +23,34 @@ # smallcase and Robot variables notation is UPPERCASE so industry is follwoing # this. -host: aknode109 -username: localadmin +### Input variables cluster's master host +host: aknode109 # cluster's master host address +username: mm747b # user credentials +home: /home/mm747b # Public keys location + +### Input variables for bios_version_dell.robot sysinfo: PowerEdge R740xd bios_revision: 1.3 + +### Input variables for bare metal hw test dell or hp +base_uri: https://192.168.XX.XX/redfish/v1/ # OOB Redfish link address +ipmiuser: ipmi_user # ipmi user +ipmipwrd: ipmi_pwd # ipmi password +host_mr: master_host_ip # cluster's master host address +host_wr1: worker_host_ip # cluster's worker1 host address +host_wr2: worker_host_ip # cluster's worker2 host address +host_wr3: worker_host_ip # cluster's worker3 host address +host_wr4: worker_host_ip # cluster's worker4 host address +macaddr: mac_input # host mac address +chassis: serial_number # host serial number +idracip: idrac_ip # idrac ip address +bootseq: boot_input # boot status +biosver: bios_version # host bios version +firmware: firmware_version # host firmware + +### Input variables for containerized ceph test +nodename: targetnode # target node to test ceph + +### Input variables for ltp +rootuser: rootuser # Required root user to log in to the host +rootpswd: rootpassword # Required root password to log in to the host