Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions elements/ipa-extra-hardware-hp/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
=====================
ipa-extra-hardware-hp
=====================
Installs HP specific software required for cardiff
(`hardware <https://pypi.org/project/hardware/>`_) benchmarks

* ``DIB_IPA_EXTRA_HARDWARE_CONREP_RPM``: URL of an RPM file that provides the ``conrep`` utility.
See `<ddr-timings https://github.com/stackhpc/ddr-timings>`_.
For example:

.. code-block::

export DIB_IPA_EXTRA_HARDWARE_CONREP_RPM="https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1201555626/v164819/rhel7/x86_64/hp-scripting-tools-11.40-9.rhel7.x86_64.rpm"
3 changes: 3 additions & 0 deletions elements/ipa-extra-hardware-hp/element-deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rpm
proliant-tools
ipa-extra-hardware
16 changes: 16 additions & 0 deletions elements/ipa-extra-hardware-hp/environment.d/10-extra-rpms
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# RPMS needed for cardiff data collection:
#
# HP tools:
# hp-scripting-tools - provides conrep for bios version, settings etc.

# FIXME: RedHat family only

CONREP_RPM=${DIB_IPA_EXTRA_HARDWARE_CONREP_RPM:-"https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1201555626/v164819/rhel7/x86_64/hp-scripting-tools-11.40-9.rhel7.x86_64.rpm"}
DIB_RPMS_EXTRA="$CONREP_RPM"

# prepend packages to the existing list if it has been defined
if [ ! -z ${DIB_RPMS:+x} ]; then
export DIB_RPMS="$DIB_RPMS_EXTRA $DIB_RPMS"
else
export DIB_RPMS="$DIB_RPMS_EXTRA"
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use more up to date version of proliant tools
export DIB_SSACLI_URL=${DIB_SSACLI_URL:-https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1857046646/v165910/ssacli-4.15-6.0.x86_64.rpm}
12 changes: 12 additions & 0 deletions elements/ipa-extra-hardware-ram/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
======================
ipa-extra-hardware-ram
======================
Collects DDR timing info on Intel processors.

* ``DIB_DDR_TIMINGS_VERSION``: Version of ddr-timings to use.
See `<ddr-timings https://github.com/stackhpc/ddr-timings>`_.
For example:

.. code-block::

export DIB_DDR_TIMINGS_VERSION=1.0.0
1 change: 1 addition & 0 deletions elements/ipa-extra-hardware-ram/element-deps
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ipa-extra-hardware
19 changes: 19 additions & 0 deletions elements/ipa-extra-hardware-ram/finalise.d/99-ddr-timings-cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail

install-packages -e gcc
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can uninstall make as well, although I expect that's trivial in size compared to gcc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mainly basing this off the ironic-agent element which brings in make as a transitive dependency and doesn't uninstall it:

https://github.com/openstack/diskimage-builder/blob/168127b60ac314c7226bb7e8bee758cb7911de59/diskimage_builder/elements/ironic-agent/finalise.d/99-remove-extra-packages#L19

probably best to build a package so that you only need the run time dependencies, but that could be improved at a later point in time.


if $(which yum > /dev/null 2>&1); then

${YUM:-yum} clean all

# Rebuilding the rpm database after removing packages will reduce
# its size
rpm --rebuilddb

fi
15 changes: 15 additions & 0 deletions elements/ipa-extra-hardware-ram/install.d/10-ddr-timings
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

if [ "${DIB_DEBUG_TRACE:-1}" -gt 0 ]; then
set -x
fi
set -u
set -o pipefail

VERSION=${DIB_DDR_TIMINGS_VERSION:-1.0.0}

pushd /tmp
curl -k -L -o ddr-timings.tar.gz https://github.com/stackhpc/ddr-timings/archive/$VERSION.tar.gz
tar -xvf ddr-timings.tar.gz
cd ddr-timings-$VERSION && make install
popd
2 changes: 2 additions & 0 deletions elements/ipa-extra-hardware-ram/package-installs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gcc:
make:
1 change: 1 addition & 0 deletions elements/ipa-extra-hardware/package-installs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ pciutils:
sdparm:
smartmontools:
sysbench:
lsb_release:
10 changes: 10 additions & 0 deletions elements/ipa-extra-hardware/pkg-map
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"family": {
"redhat": {
"lsb_release": "redhat-lsb-core"
}
},
"default": {
"lsb_release": ""
}
}
12 changes: 12 additions & 0 deletions elements/rpm/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
===
rpm
===
So you found a random RPM on the interwebs and now want to install it into
your cloud image, panic not, this element's for you.

* ``DIB_RPMS``: A whitespace separated list of rpms to install. This is a required parameter.
For example:

.. code-block::

export DIB_RPMS="https://example.org/first.rpm https://example.org/second.rpm"
18 changes: 18 additions & 0 deletions elements/rpm/install.d/10-extra-rpms
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [ "${DIB_DEBUG_TRACE:-1}" -gt 0 ]; then
set -x
fi
set -u
set -o pipefail

if $(which yum > /dev/null 2>&1); then
yum install -y $DIB_RPMS
elif $(which zypper > /dev/null 2>&1); then
pushd /tmp
for pkg in DIB_RPMS; do
curl -O "$pkg"
zypper -n in $(basename "$pkg")
done
popd
fi