aboutsummaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2017-11-29 08:49:22 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-29 08:49:22 +0000
commit86adce8b868f1144381134e8f8d2163ee91bb6a1 (patch)
tree6bc0571fc2b6af6dd9d01fc1cd65adee44670ed6 /mcp
parent7daf7f128714021711970557129a23a86cce2a72 (diff)
parentfeb877785544a31a18ae2f0ee2900a82e7ac4337 (diff)
Merge "AArch64: base image: pre-install salt-minion"
Diffstat (limited to 'mcp')
-rw-r--r--mcp/config/scenario/defaults-aarch64.yaml2
-rw-r--r--mcp/scripts/lib.sh8
-rw-r--r--mcp/scripts/user-data.template2
3 files changed, 10 insertions, 2 deletions
diff --git a/mcp/config/scenario/defaults-aarch64.yaml b/mcp/config/scenario/defaults-aarch64.yaml
index d9898191e..edcd8d9ac 100644
--- a/mcp/config/scenario/defaults-aarch64.yaml
+++ b/mcp/config/scenario/defaults-aarch64.yaml
@@ -17,6 +17,7 @@ virtual:
- https://linux.enea.com/mcp-repos/ocata/xenial/archive-mcpocata.key
repos:
# <repo name> <repo prio> deb [arch=<arch>] <repo url> <repo dist> <repo comp>
+ - saltstack 500 deb [arch=arm64] http://linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/2016.11 xenial main
- armband_openstack 1100 deb [arch=arm64] http://linux.enea.com/mcp-repos/ocata/xenial ocata main
- armband_mk_openstack 1100 deb [arch=arm64] http://linux.enea.com/apt-mk/xenial nightly ocata
# NOTE(armband): Empty repo, keep commented out as reference
@@ -25,6 +26,7 @@ virtual:
install:
- linux-image-generic-hwe-16.04-edge
- linux-headers-generic-hwe-16.04-edge
+ - salt-minion
control:
pkg:
install:
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 654f45e1f..8dd92e1ec 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -51,11 +51,15 @@ function mount_image {
OPNFV_LOOP_DEV=$(losetup -f)
export OPNFV_MNT_DIR OPNFV_LOOP_DEV
[ -n "${OPNFV_NBD_DEV}" ] && [ -n "${OPNFV_LOOP_DEV}" ] || exit 1
+ qemu-img resize "${image_dir}/${image}" 3G
sudo qemu-nbd --connect="${OPNFV_NBD_DEV}" --aio=native --cache=none \
"${image_dir}/${image}"
sleep 5 # /dev/nbdNp1 takes some time to come up
- # grub-update does not like /dev/nbd*, so use a loop device to work around it
# Hardcode partition index to 1, unlikely to change for Ubuntu UCA image
+ if sudo growpart "${OPNFV_NBD_DEV}" 1; then
+ sudo e2fsck -yf "${OPNFV_NBD_DEV}p1" && sudo resize2fs "${OPNFV_NBD_DEV}p1"
+ fi
+ # grub-update does not like /dev/nbd*, so use a loop device to work around it
sudo losetup "${OPNFV_LOOP_DEV}" "${OPNFV_NBD_DEV}p1"
mkdir -p "${OPNFV_MNT_DIR}"
sudo mount "${OPNFV_LOOP_DEV}" "${OPNFV_MNT_DIR}"
@@ -66,6 +70,8 @@ function mount_image {
sudo cp /etc/resolv.conf "${OPNFV_MNT_DIR}/run/resolvconf"
echo "GRUB_DISABLE_OS_PROBER=true" | \
sudo tee -a "${OPNFV_MNT_DIR}/etc/default/grub"
+ sudo sed -i -e 's/^\(GRUB_TIMEOUT\)=.*$/\1=1/g' -e 's/^GRUB_HIDDEN.*$//g' \
+ "${OPNFV_MNT_DIR}/etc/default/grub"
}
function apt_repos_pkgs_image {
diff --git a/mcp/scripts/user-data.template b/mcp/scripts/user-data.template
index 6752039bf..b6544774c 100644
--- a/mcp/scripts/user-data.template
+++ b/mcp/scripts/user-data.template
@@ -11,7 +11,7 @@ if [ "$(uname -i)" = "aarch64" ]; then
SALT_REPO=linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/2016.11
fi
wget -O - "https://${SALT_REPO}/SALTSTACK-GPG-KEY.pub" | sudo apt-key add -
-echo "deb https://${SALT_REPO} xenial main" > /etc/apt/sources.list.d/salt.list
+echo "deb https://${SALT_REPO} xenial main" > /etc/apt/sources.list.d/saltstack.list
apt update
apt-get install -y salt-minion
rm /etc/salt/minion_id