aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJingLu5 <lvjing5@huawei.com>2016-11-04 15:21:50 +0800
committerJingLu5 <lvjing5@huawei.com>2016-11-09 11:54:24 +0800
commit791868bdaabb08237fadae957a19c496a1892905 (patch)
tree3d4403c2683903a225bd9aad04e4de931b83a671 /tools
parente80a6484956de102d14b2b42349ac1e90510cd82 (diff)
Upgrade yardstick VM image from Ubuntu 14.04 to 16.04
JIRA: YARDSTICK-365 This patch upgrades the base Ubuntu version of Yardstick VM image from trusty(14.04) to xenial(16.04). If you still want to use Ubuntu 14.04 to build Yardstick custom image you can use command: sudo ./tools/yardstick-img-modify tools/ubuntu-server-cloudimg-modify.sh trusty And now the "yardstick-trusty-server" is rename as "yardstick-image". Change-Id: I0765f3aee2d17eea1ad2257d0f576cdb9ef2b18d Signed-off-by: JingLu5 <lvjing5@huawei.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/yardstick-img-lxd-modify7
-rwxr-xr-xtools/yardstick-img-modify7
2 files changed, 8 insertions, 6 deletions
diff --git a/tools/yardstick-img-lxd-modify b/tools/yardstick-img-lxd-modify
index 31194554c..4ca4eb489 100755
--- a/tools/yardstick-img-lxd-modify
+++ b/tools/yardstick-img-lxd-modify
@@ -32,21 +32,22 @@ die() {
exit 1
}
-test $# -eq 1 || die "no image specific script as argument"
+test $# -eq 1 -o $# -eq 2 || die "no image specific script as argument"
test $(id -u) -eq 0 || die "should invoke using sudo"
cmd=$1
+RELEASE=$2
test -x $cmd
mountdir="/mnt/yardstick"
workspace=${WORKSPACE:-"/tmp/workspace/yardstick"}
host=${HOST:-"cloud-images.ubuntu.com"}
-release=${RELEASE:-"trusty"}
+release=${RELEASE:-"xenial"}
image_path="${release}/current/${release}-server-cloudimg-amd64-root.tar.gz"
image_url=${IMAGE_URL:-"https://${host}/${image_path}"}
md5sums_path="${release}/current/MD5SUMS"
md5sums_url=${MD5SUMS_URL:-"https://${host}/${md5sums_path}"}
-imgfile="${workspace}/yardstick-${release}-server.tar.gz"
+imgfile="${workspace}/yardstick-image.tar.gz"
filename=$(basename $image_url)
# download and checksum base image, conditionally if local copy is outdated
diff --git a/tools/yardstick-img-modify b/tools/yardstick-img-modify
index 07f10b3ce..c28e2ad59 100755
--- a/tools/yardstick-img-modify
+++ b/tools/yardstick-img-modify
@@ -32,21 +32,22 @@ die() {
exit 1
}
-test $# -eq 1 || die "no image specific script as argument"
+test $# -eq 1 -o $# -eq 2 || die "no image specific script as argument"
test $(id -u) -eq 0 || die "should invoke using sudo"
cmd=$1
+RELEASE=$2
test -x $cmd
mountdir="/mnt/yardstick"
workspace=${WORKSPACE:-"/tmp/workspace/yardstick"}
host=${HOST:-"cloud-images.ubuntu.com"}
-release=${RELEASE:-"trusty"}
+release=${RELEASE:-"xenial"}
image_path="${release}/current/${release}-server-cloudimg-${YARD_IMG_ARCH}-disk1.img"
image_url=${IMAGE_URL:-"https://${host}/${image_path}"}
md5sums_path="${release}/current/MD5SUMS"
md5sums_url=${MD5SUMS_URL:-"https://${host}/${md5sums_path}"}
-imgfile="${workspace}/yardstick-${release}-server.img"
+imgfile="${workspace}/yardstick-image.img"
raw_imgfile="${workspace}/yardstick-${release}-server.raw"
filename=$(basename $image_url)