From 1dde11d3b422f1c649244078c2b2ef945b0a0e2c Mon Sep 17 00:00:00 2001 From: "chenshuai@huawei.com" Date: Thu, 14 Jul 2016 06:16:22 -0400 Subject: Support Ubuntu 14.04 and Ubuntu 16.04 in one ISO JIRA: COMPASS-431 Change-Id: I3134b558835081e04d29a666f5d3d79486b2c7a9 Signed-off-by: chenshuai@huawei.com --- build.sh | 9 +++++++-- build/build.conf | 3 ++- deploy/adapters/cobbler/snippets/preseed_post_anamon | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index e359572b..5ec8973b 100755 --- a/build.sh +++ b/build.sh @@ -78,8 +78,9 @@ function download_local() function download_packages() { - for i in $CENTOS_BASE $COMPASS_CORE $COMPASS_WEB $COMPASS_INSTALL $TRUSTY_JUNO_PPA $TRUSTY_LIBERTY_PPA $TRUSTY_MITAKA_PPA $XENIAL_MITAKA_PPA $UBUNTU_ISO \ - $CENTOS_ISO $CENTOS7_JUNO_PPA $CENTOS7_KILO_PPA $CENTOS7_LIBERTY_PPA $CENTOS7_MITAKA_PPA $LOADERS $CIRROS $APP_PACKAGE $COMPASS_PKG \ + for i in $CENTOS_BASE $COMPASS_CORE $COMPASS_WEB $COMPASS_INSTALL $TRUSTY_JUNO_PPA $TRUSTY_LIBERTY_PPA $TRUSTY_MITAKA_PPA \ + $XENIAL_MITAKA_PPA $UBUNTU_ISO $UBUNTU_ISO1 $CENTOS_ISO $CENTOS7_JUNO_PPA $CENTOS7_KILO_PPA $CENTOS7_LIBERTY_PPA \ + $CENTOS7_MITAKA_PPA $LOADERS $CIRROS $APP_PACKAGE $COMPASS_PKG \ $PIP_REPO $ANSIBLE_MODULE; do if [[ ! $i ]]; then @@ -112,6 +113,10 @@ function copy_file() cp $CACHE_DIR/`basename $UBUNTU_ISO` $new/repos/cobbler/ubuntu/iso/ -rf fi + if [[ $UBUNTU_ISO1 ]]; then + cp $CACHE_DIR/`basename $UBUNTU_ISO1` $new/repos/cobbler/ubuntu/iso/ -rf + fi + if [[ $TRUSTY_JUNO_PPA ]]; then cp $CACHE_DIR/`basename $TRUSTY_JUNO_PPA` $new/repos/cobbler/ubuntu/ppa/ -rf fi diff --git a/build/build.conf b/build/build.conf index 138a2420..c6e0f7a1 100644 --- a/build/build.conf +++ b/build/build.conf @@ -18,7 +18,8 @@ export ANSIBLE_MODULE=${ANSIBLE_MODULE:-https://github.com/openstack-ansible/ope # OS ISO for provisioning export CENTOS_ISO=${CENTOS_ISO:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1511.iso} -export UBUNTU_ISO=${UBUNTU_ISO:-$PACKAGE_URL/ubuntu-14.04.3-server-amd64.iso} +export UBUNTU_ISO=${UBUNTU_ISO:-$PACKAGE_URL/ubuntu-16.04-server-amd64.iso} # ubuntu 16.04 +export UBUNTU_ISO1=${UBUNTU_ISO1:-$PACKAGE_URL/ubuntu-14.04.3-server-amd64.iso} # ubuntu 14.04 # OpenStack Packages for deployment #export TRUSTY_JUNO_PPA=${TRUSTY_JUNO_PPA:-$PACKAGE_URL/trusty-juno-ppa.tar.gz} diff --git a/deploy/adapters/cobbler/snippets/preseed_post_anamon b/deploy/adapters/cobbler/snippets/preseed_post_anamon index 6d889bb7..76bbfad4 100644 --- a/deploy/adapters/cobbler/snippets/preseed_post_anamon +++ b/deploy/adapters/cobbler/snippets/preseed_post_anamon @@ -66,6 +66,7 @@ cat << EOF > /etc/init.d/set_state # Description: set_state runs the first time a machine is booted after # installation. #end raw +sleep 100 wget -O /tmp/os_state --post-data='{"ready": true}' --header=Content-Type:application/json "http://$srv/api/hosts/${hostname}/state_internal" update-rc.d -f set_state remove mv /etc/init.d/set_state /tmp/set_state -- cgit 1.2.3-korg