diff options
author | mbeierl <mark.beierl@dell.com> | 2017-09-12 16:34:24 -0400 |
---|---|---|
committer | mbeierl <mark.beierl@dell.com> | 2017-09-14 14:52:26 -0400 |
commit | f92f97f53e3ee43c5d3b75673122ec9f94db196e (patch) | |
tree | 51e284845da8b9d9797d05210a58660061f9d1fa /ci/create_glance_image.sh | |
parent | 9b2ba68b75ecd50600e6f375aeb4ea410cec0128 (diff) |
Add Multi Arch to Docker
Adds multi arch support to the launching of the
containers.
Change-Id: Iee89cfad3dc455fe8fdd7861d73fadbe314c2c1e
JIRA: STORPERF-220
Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'ci/create_glance_image.sh')
-rwxr-xr-x | ci/create_glance_image.sh | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/ci/create_glance_image.sh b/ci/create_glance_image.sh index 8811897..e99de8c 100755 --- a/ci/create_glance_image.sh +++ b/ci/create_glance_image.sh @@ -8,13 +8,38 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -echo "Checking for Ubuntu 16.04 image in Glance" -IMAGE=`openstack image list | grep "Ubuntu 16.04 x86_64"` +ARCH="${ARCH:-$(uname -m)}" + +IMAGE_NAME="Ubuntu 16.04 ${ARCH}" + +echo "Checking for ${IMAGE_NAME} in Glance" + +IMAGE="$(openstack image list | grep "${IMAGE_NAME}")" +PROPERTIES="" if [ -z "$IMAGE" ] then - wget -q https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img - openstack image create "Ubuntu 16.04 x86_64" --disk-format qcow2 --public \ - --container-format bare --file ubuntu-16.04-server-cloudimg-amd64-disk1.img + + case "${ARCH}" in + aarch64) + FILE=ubuntu-16.04-server-cloudimg-arm64-uefi1.img + PROPERTIES="--property hw_firmware_type=uefi --property hw_video_model=vga" + ;; + armhf) + FILE=ubuntu-16.04-server-cloudimg-armhf-disk1.img + ;; + x86_64) + FILE=ubuntu-16.04-server-cloudimg-amd64-disk1.img + ;; + *) + echo "Unsupported architecture: ${ARCH}" + exit 1 + ;; + esac + + wget --continue -q "https://cloud-images.ubuntu.com/releases/16.04/release/${FILE}" + openstack image create "${IMAGE_NAME}" --disk-format qcow2 --public \ + ${PROPERTIES} \ + --container-format bare --file "${FILE}" fi -openstack image show "Ubuntu 16.04 x86_64" +openstack image show "${IMAGE_NAME}" |