diff --git a/install/cobbler.sh b/install/cobbler.sh index d971e75e..a93ec71e 100755 --- a/install/cobbler.sh +++ b/install/cobbler.sh @@ -241,11 +241,7 @@ libgt-0.3.11-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CENTOS_ liblogging-1.0.4-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CENTOS_IMAGE_ARCH}.rpm rsyslog-7.6.3-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CENTOS_IMAGE_ARCH}.rpm" for f in $centos_ppa_repo_rsyslog_packages; do - if [ "$REGION" == "asia" ]; then - download http://mirrors.yun-idc.com/epel/${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $? - else - download http://rpms.adiscon.com/v7-stable/epel-${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/RPMS/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $? - fi + download http://rpms.adiscon.com/v7-stable/epel-${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/RPMS/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $? done # download chef client for centos ppa repo diff --git a/install/install.conf b/install/install.conf index f28844af..f7003f0e 100755 --- a/install/install.conf +++ b/install/install.conf @@ -58,7 +58,7 @@ export UBUNTU_IMAGE_NAME=${UBUNTU_IMAGE_NAME:-"${UBUNTU_IMAGE_TYPE}-${UBUNTU_IMA export UBUNTU_IMAGE_ARCH=${UBUNTU_IMAGE_ARCH:-"x86_64"} export UBUNTU_IMAGE_ARCH_OTHER=${UBUNTU_IMAGE_ARCH_OTHER:-"amd64"} export UBUNTU_IMAGE_SOURCE=${UBUNTU_IMAGE_SOURCE:-"http://releases.ubuntu.com/${UBUNTU_IMAGE_VERSION}/${UBUNTU_IMAGE_TYPE,,}-${UBUNTU_IMAGE_VERSION}${UBUNTU_IMAGE_PATCH_VERSION}-server-${UBUNTU_IMAGE_ARCH_OTHER}.iso"} -export UBUNTU_IMAGE_SOURCE_ASIA=${UBUNTU_IMAGE_SOURCE:-"http://mirros.ustc.edu.cn/ubuntu-releases/${UBUNTU_IMAGE_VERSION}/${UBUNTU_IMAGE_TYPE,,}-${UBUNTU_IMAGE_VERSION}${UBUNTU_IMAGE_PATCH_VERSION}-server-${UBUNTU_IMAGE_ARCH_OTHER}.iso"} +export UBUNTU_IMAGE_SOURCE_ASIA=${UBUNTU_IMAGE_SOURCE_ASIA:-"http://mirros.ustc.edu.cn/ubuntu-releases/${UBUNTU_IMAGE_VERSION}/${UBUNTU_IMAGE_TYPE,,}-${UBUNTU_IMAGE_VERSION}${UBUNTU_IMAGE_PATCH_VERSION}-server-${UBUNTU_IMAGE_ARCH_OTHER}.iso"} export COBBLER_PASSWORD=${COBBLER_PASSWORD:-"cobbler"} diff --git a/install/prepare.sh b/install/prepare.sh index e69fabdd..8526bd45 100755 --- a/install/prepare.sh +++ b/install/prepare.sh @@ -221,7 +221,7 @@ yum-plugin-priorities-1.1.30-14.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION for f in $centos_ppa_repo_packages; do if [ "$REGION" == "asia" ]; then - download http://mirrors.yun-idc.com/${CENTOS_IMAGE_TYPE,,}/${CENTOS_IMAGE_VERSION}/os/${CENTOS_IMAGE_ARCH}/Packages/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $? + download http://mirrors.yun-idc.com/${CENTOS_IMAGE_TYPE,,}/${CENTOS_IMAGE_VERSION}/os/${CENTOS_IMAGE_ARCH}/Packages/$f $f || exit $? else download http://rpmfind.net/linux/${CENTOS_IMAGE_TYPE,,}/${CENTOS_IMAGE_VERSION}/os/${CENTOS_IMAGE_ARCH}/Packages/$f $f || exit $? fi @@ -235,11 +235,7 @@ liblogging-1.0.4-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CEN rsyslog-7.6.3-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CENTOS_IMAGE_ARCH}.rpm" for f in $centos_ppa_repo_rsyslog_packages; do - if [ "$REGION" == "asia" ]; then - download http://mirrors.yun-idc.com/epel/${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $? - else - download http://rpms.adiscon.com/v7-stable/epel-${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/RPMS/$f $f || exit $? - fi + download http://rpms.adiscon.com/v7-stable/epel-${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/RPMS/$f $f || exit $? done download $CHEF_CLIENT `basename $CHEF_CLIENT` || exit $? @@ -259,7 +255,9 @@ else fi # download local repo -download -f https://s3-us-west-1.amazonaws.com/compass-local-repo/local_repo.tar.gz local_repo.tar.gz || exit $? +if [[ $LOCAL_REPO = "y" ]]; then + download -f https://s3-us-west-1.amazonaws.com/compass-local-repo/local_repo.tar.gz local_repo.tar.gz || exit $? +fi # Install net-snmp echo "install snmp config" diff --git a/install/setup_env.sh b/install/setup_env.sh index caeef747..ec3c59b7 100755 --- a/install/setup_env.sh +++ b/install/setup_env.sh @@ -10,6 +10,6 @@ NEXTSERVER=\${NEXTSERVER:-$NEXTSERVER} IP_START=\${IP_START:-$IP_START} IP_END=\${IP_END:-$IP_END} LOCAL_REPO=\${LOCAL_REPO:-$LOCAL_REPO} -REGION=\$(REGION:-$REGION} +REGION=\${REGION:-$REGION} EOF chmod ugo+x $SCRIPT_DIR/env.conf