Merge "Add a new element hpdsa"

This commit is contained in:
Jenkins 2015-12-10 21:46:06 +00:00 committed by Gerrit Code Review
commit be5b669af1
6 changed files with 77 additions and 0 deletions

16
elements/hpdsa/README.rst Normal file
View File

@ -0,0 +1,16 @@
=====
hpdsa
=====
This is the hpdsa element.
This element enables the 'hpdsa' driver to be included in
the ramdisk when invoked during ramdisk/image creation.
This driver is required for deploying the HP Proliant Servers
Gen9 with Dynamic Smart Array Controllers.
Note: This element supports only Ubuntu image/ramdisk to be
updated with the hpdsa driver. It installs hp certificate
from https://downloads.linux.hp.com/SDR/hpPublicKey2048_key1.pub.
Since HP has released this currently only for trusty,
It has been restricted to work only for trusty.

View File

@ -0,0 +1,5 @@
build-essential:
curl:
phase: pre-install.d
linux-headers-generic:
hpdsa-dkms:

View File

@ -0,0 +1,14 @@
#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# Blacklist the ahci driver for hpdsa to recognize the disks.
# It can also be done with element "modprobe-blacklist" which
# would add the ahci driver to /etc/modprobe.d/blacklist.conf.
# To be on safer side, blacklist the driver ahci without the
# element "modprobe-blacklist" also.
echo "blacklist ahci" >> /etc/modprobe.d/install-hpdsa.conf
echo "hpdsa" >> /etc/modules

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# This is required for HPDSA driver to be included in the
# ramdisk of the image.
update-initramfs -u

View File

@ -0,0 +1,14 @@
#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# Add hpdsa repository
echo 'deb https://downloads.linux.hp.com/SDR/repo/ubuntu-hpdsa' $DIB_RELEASE ' main' \
>> /etc/apt/sources.list.d/ubuntu-hpdsa.list
# Add the key
curl https://downloads.linux.hp.com/SDR/hpPublicKey2048_key1.pub | apt-key add -

View File

@ -0,0 +1,17 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
if [ 'ubuntu' != $DISTRO_NAME ] ; then
echo "Only ubuntu is supported for hpdsa driver. The DISTRO is set to $DISTRO_NAME"
exit 1
fi
if [ 'trusty' != $DIB_RELEASE ] ; then
echo "Only trusty is supported for hpdsa driver. The DIB_RELEASE is set to $DIB_RELEASE"
exit 1
fi