-
Notifications
You must be signed in to change notification settings - Fork 9
Add element that installs software needed for cardiff #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8b34669
Add an element to install RPMs
jovial 8d197cd
Add element that installs software for cardiff
jovial 78ce645
Add sysbench package
jovial ab17b92
Make the element split generic/hardware specific
jovial 7cfda86
Add an element to collect ddr timing information
jovial 41c2f13
Rename cleanup script
jovial f8ecd08
Allow URL for conrep to be specified
jovial efc6e41
Fix invalid json
jovial e916f7a
Follow redirects for download
jovial File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
16
elements/ipa-extra-hardware-hp/environment.d/10-extra-rpms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
2 changes: 2 additions & 0 deletions
2
elements/ipa-extra-hardware-hp/environment.d/10-proliant-tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ipa-extra-hardware |
19 changes: 19 additions & 0 deletions
19
elements/ipa-extra-hardware-ram/finalise.d/99-ddr-timings-cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| gcc: | ||
| make: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,4 @@ pciutils: | |
| sdparm: | ||
| smartmontools: | ||
| sysbench: | ||
| lsb_release: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "family": { | ||
| "redhat": { | ||
| "lsb_release": "redhat-lsb-core" | ||
| } | ||
| }, | ||
| "default": { | ||
| "lsb_release": "" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.