tests: Enable Elastic Network Adapter support for AWS

- this is required for arm64 but is present in all latest kernels
  so doesn't seem to hurt
- when registering the AMI mark its architecture properly
This commit is contained in:
Alexander Todorov 2020-01-13 14:47:21 +02:00
parent 350baad384
commit 6c35448feb

View File

@ -134,7 +134,12 @@ __EOF__
fi fi
# create an image from the imported selected snapshot # create an image from the imported selected snapshot
AMI_ARCH="$(uname -m)"
if [ "$AMI_ARCH" == "aarch64" ]; then
AMI_ARCH="arm64"
fi
AMI_ID=`aws ec2 register-image --name "Composer-Test-$UUID" --virtualization-type hvm --root-device-name /dev/sda1 \ AMI_ID=`aws ec2 register-image --name "Composer-Test-$UUID" --virtualization-type hvm --root-device-name /dev/sda1 \
--ena-support --architecture $AMI_ARCH \
--block-device-mappings "[{\"DeviceName\": \"/dev/sda1\", \"Ebs\": {\"SnapshotId\": \"$SNAPSHOT_ID\"}}]" | \ --block-device-mappings "[{\"DeviceName\": \"/dev/sda1\", \"Ebs\": {\"SnapshotId\": \"$SNAPSHOT_ID\"}}]" | \
grep ImageId | cut -f4 -d'"'` grep ImageId | cut -f4 -d'"'`