diff options
-rwxr-xr-x | build.sh | 12 | ||||
-rwxr-xr-x | ci/deploy.sh | 2 | ||||
-rwxr-xr-x | deploy.sh | 2 | ||||
-rw-r--r-- | deploy/compass_vm.sh | 2 | ||||
-rwxr-xr-x | deploy/prepare.sh | 6 | ||||
-rw-r--r-- | util/ks.cfg | 3 |
6 files changed, 15 insertions, 12 deletions
@@ -17,7 +17,7 @@ function prepare_env() for i in createrepo genisoimage curl; do sudo $i --version >/dev/null 2>&1 if [[ $? -ne 0 ]]; then - sudo apt-get install $i -y + sudo apt-get install -y --force-yes $i fi done set -e @@ -91,15 +91,17 @@ function copy_file() new=$1 # main process - sudo mkdir -p $new/repos $new/compass $new/bootstrap $new/pip $new/guestimg $new/app_packages $new/ansible + sudo mkdir -p $new/compass $new/bootstrap $new/pip $new/guestimg $new/app_packages $new/ansible + sudo mkdir -p $new/repos/cobbler/{ubuntu,centos}/{iso,ppa} sudo cp -rf $SCRIPT_DIR/util/ks.cfg $new/isolinux/ks.cfg sudo rm -rf $new/.rr_moved - for i in $TRUSTY_JUNO_PPA $UBUNTU_ISO $CENTOS_ISO $CENTOS7_JUNO_PPA; do - sudo cp $CACHE_DIR/`basename $i` $new/repos/ -rf - done + sudo cp $CACHE_DIR/`basename $UBUNTU_ISO` $new/repos/cobbler/ubuntu/iso/ -rf + sudo cp $CACHE_DIR/`basename $TRUSTY_JUNO_PPA` $new/repos/cobbler/ubuntu/ppa/ -rf + sudo cp $CACHE_DIR/`basename $CENTOS_ISO` $new/repos/cobbler/centos/iso/ -rf + sudo cp $CACHE_DIR/`basename $CENTOS7_JUNO_PPA` $new/repos/cobbler/centos/ppa/ -rf sudo cp $CACHE_DIR/`basename $LOADERS` $new/ -rf || exit 1 sudo cp $CACHE_DIR/`basename $CIRROS` $new/guestimg/ -rf || exit 1 diff --git a/ci/deploy.sh b/ci/deploy.sh index 197bf63b..f879f799 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -2,7 +2,7 @@ COMPASS_DIR=`cd ${BASH_SOURCE[0]%/*}/../;pwd` export COMPASS_DIR -apt-get install screen +apt-get install -y --force-yes screen screen -ls |grep deploy|awk -F. '{print $1}'|xargs kill -9 screen -wipe #screen -dmSL deploy bash $COMPASS_DIR/ci/launch.sh $* @@ -6,7 +6,7 @@ for i in python-cheetah python-yaml screen; do if [[ `dpkg-query -l $i` == 0 ]]; then continue fi - sudo apt-get install $i + sudo apt-get install -y --force-yes $i done screen -ls |grep deploy|awk -F. '{print $1}'|xargs kill -9 diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh index 4c40c1e4..067918da 100644 --- a/deploy/compass_vm.sh +++ b/deploy/compass_vm.sh @@ -30,7 +30,7 @@ function install_compass_core() { function wait_ok() { log_info "wait_compass_ok enter" retry=0 - until timeout 1s ssh $ssh_args root@$MGMT_IP "exit" 2>/dev/null + until timeout 1s ssh $ssh_args root@$MGMT_IP "exit" >/dev/null 2>&1 do log_progress "os install time used: $((retry*100/$1))%" sleep 1 diff --git a/deploy/prepare.sh b/deploy/prepare.sh index 704b540a..67fc4b65 100755 --- a/deploy/prepare.sh +++ b/deploy/prepare.sh @@ -19,9 +19,9 @@ function download_iso() function prepare_env() { export PYTHONPATH=/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages sudo apt-get update -y - sudo apt-get install mkisofs bc curl - sudo apt-get install git python-pip python-dev -y - sudo apt-get install libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev -y + sudo apt-get install -y --force-yes mkisofs bc curl + sudo apt-get install -y --force-yes git python-pip python-dev + sudo apt-get install -y --force-yes libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev sudo pip install --upgrade pip sudo pip install --upgrade ansible sudo pip install --upgrade virtualenv diff --git a/util/ks.cfg b/util/ks.cfg index e3008819..7d70e6f2 100644 --- a/util/ks.cfg +++ b/util/ks.cfg @@ -220,11 +220,12 @@ rm -rf ${repodir}/source/bootstrap/ \ ${repodir}/source/pip/ \ ${repodir}/source/repos -mkdir -p /root/.ssh +mkdir -p /root/.ssh /var/www /opt/cobbler chmod 700 /root/.ssh cat ${SOURCE}/bootstrap/boot.rsa.pub >> /root/.ssh/authorized_keys cp -rf ${SOURCE}/compass/* /opt +cp -rf ${SOURCE}/repos/cobbler/* /opt/cobbler/ cp -rf ${SOURCE}/ansible/* /opt cp -rf ${SOURCE}/repos/* /opt cp -rf ${SOURCE}/loaders.tar.gz /opt |