mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Update the bootstrap script to latest stable v2015.02.27
* Try other tools besides wget when downloading the COPR repo file. Thanks Ronald van Zantvoort(The-Loeki) * No need to install packages from the Unstable repository for debian, use backports. Thanks Ari Aosved(devaos) * Fix an issue in CentOS where the syndic package wasn't being installed(since it's now a separate package). Thanks Ronald van Zantvoort(The-Loeki) * Enable the server-optionals repository for RHEL >= 7 * RHEL/CentOS 5 now uses the COPR repository. #533
This commit is contained in:
parent
1efcf4007f
commit
6248c6e133
@ -17,7 +17,7 @@
|
||||
# CREATED: 10/15/2012 09:49:37 PM WEST
|
||||
#======================================================================================================================
|
||||
set -o nounset # Treat unset variables as an error
|
||||
__ScriptVersion="2015.01.12"
|
||||
__ScriptVersion="2015.02.27"
|
||||
__ScriptName="bootstrap-salt.sh"
|
||||
|
||||
#======================================================================================================================
|
||||
@ -1957,8 +1957,6 @@ install_debian_deps() {
|
||||
# Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813
|
||||
__PACKAGES="${__PACKAGES} python-pip"
|
||||
__PIP_PACKAGES="${__PIP_PACKAGES} requests"
|
||||
else
|
||||
__PACKAGES="${__PACKAGES} python-requests"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
@ -2109,49 +2107,18 @@ install_debian_7_deps() {
|
||||
# shellcheck disable=SC2086
|
||||
wget $_WGET_ARGS -q http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key -O - | apt-key add - || return 1
|
||||
|
||||
if [ "$_PIP_ALLOWED" -eq $BS_TRUE ]; then
|
||||
echowarn "PyZMQ will be installed from PyPI in order to compile it against ZMQ3"
|
||||
echowarn "This is required for long term stable minion connections to the master."
|
||||
echowarn "YOU WILL END UP WITH QUITE A FEW PACKAGES FROM DEBIAN UNSTABLE"
|
||||
echowarn "Sleeping for 5 seconds so you can cancel..."
|
||||
sleep 5
|
||||
|
||||
if [ ! -f /etc/apt/sources.list.d/debian-unstable.list ]; then
|
||||
cat <<_eof > /etc/apt/sources.list.d/debian-unstable.list
|
||||
deb http://ftp.debian.org/debian unstable main
|
||||
deb-src http://ftp.debian.org/debian unstable main
|
||||
_eof
|
||||
|
||||
cat <<_eof > /etc/apt/preferences.d/libzmq3-debian-unstable.pref
|
||||
Package: libzmq3
|
||||
Pin: release a=unstable
|
||||
Pin-Priority: 800
|
||||
|
||||
Package: libzmq3-dev
|
||||
Pin: release a=unstable
|
||||
Pin-Priority: 800
|
||||
_eof
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
__apt_get_install_noinput -t unstable libzmq3 libzmq3-dev || return 1
|
||||
__PACKAGES="build-essential python-dev python-pip python-requests python-apt"
|
||||
# Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813
|
||||
__PACKAGES="${__PACKAGES} procps pciutils"
|
||||
# shellcheck disable=SC2086
|
||||
__apt_get_install_noinput ${__PACKAGES} || return 1
|
||||
else
|
||||
apt-get update || return 1
|
||||
__PACKAGES="python-zmq python-requests python-apt"
|
||||
# Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813
|
||||
__PACKAGES="${__PACKAGES} procps pciutils"
|
||||
# shellcheck disable=SC2086
|
||||
__apt_get_install_noinput ${__PACKAGES} || return 1
|
||||
|
||||
fi
|
||||
apt-get update || return 1
|
||||
__apt_get_install_noinput -t wheezy-backports libzmq3 libzmq3-dev python-zmq python-requests python-apt || return 1
|
||||
# Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813
|
||||
__PACKAGES="procps pciutils"
|
||||
# shellcheck disable=SC2086
|
||||
__apt_get_install_noinput ${__PACKAGES} || return 1
|
||||
|
||||
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
|
||||
check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud"
|
||||
__PACKAGES="build-essential python-dev python-pip"
|
||||
# shellcheck disable=SC2086
|
||||
__apt_get_install_noinput ${__PACKAGES} || return 1
|
||||
pip install -U "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
||||
fi
|
||||
|
||||
@ -2567,23 +2534,33 @@ __install_epel_repository() {
|
||||
|
||||
__install_saltstack_copr_zeromq_repository() {
|
||||
echoinfo "Installing Zeromq >=4 and PyZMQ>=14 from SaltStack's COPR repository"
|
||||
if [ ! -f /etc/yum.repos.d/saltstack-zeromq4.repo ]; then
|
||||
if [ ! -s /etc/yum.repos.d/saltstack-zeromq4.repo ]; then
|
||||
if [ "${DISTRO_NAME_L}" = "fedora" ]; then
|
||||
__REPOTYPE="${DISTRO_NAME_L}"
|
||||
else
|
||||
__REPOTYPE="epel"
|
||||
fi
|
||||
wget -O /etc/yum.repos.d/saltstack-zeromq4.repo \
|
||||
__fetch_url /etc/yum.repos.d/saltstack-zeromq4.repo \
|
||||
"http://copr.fedoraproject.org/coprs/saltstack/zeromq4/repo/${__REPOTYPE}-${DISTRO_MAJOR_VERSION}/saltstack-zeromq4-${__REPOTYPE}-${DISTRO_MAJOR_VERSION}.repo" || return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
__install_saltstack_copr_salt_el5_repository() {
|
||||
if [ ! -s /etc/yum.repos.d/saltstack-salt-el5-epel-5.repo ]; then
|
||||
__fetch_url /etc/yum.repos.d/saltstack-salt-el5-epel-5.repo \
|
||||
"http://copr.fedoraproject.org/coprs/saltstack/salt-el5/repo/epel-5/saltstack-salt-el5-epel-5.repo" || return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
install_centos_stable_deps() {
|
||||
__install_epel_repository || return 1
|
||||
if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then
|
||||
__install_saltstack_copr_salt_el5_repository || return 1
|
||||
fi
|
||||
|
||||
if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]; then
|
||||
if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ] && [ "$DISTRO_MAJOR_VERSION" -gt 5 ]; then
|
||||
yum -y install python-hashlib || return 1
|
||||
__install_saltstack_copr_zeromq_repository || return 1
|
||||
fi
|
||||
@ -2625,7 +2602,7 @@ install_centos_stable_deps() {
|
||||
if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then
|
||||
easy_install-2.6 "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
||||
else
|
||||
pip-python install "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
||||
pip install "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -2651,9 +2628,13 @@ install_centos_stable() {
|
||||
if [ "$_INSTALL_MINION" -eq $BS_TRUE ]; then
|
||||
__PACKAGES="${__PACKAGES} salt-minion"
|
||||
fi
|
||||
if [ "$_INSTALL_MASTER" -eq $BS_TRUE ] || [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ]; then
|
||||
if [ "$_INSTALL_MASTER" -eq $BS_TRUE ];then
|
||||
__PACKAGES="${__PACKAGES} salt-master"
|
||||
fi
|
||||
if [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ];then
|
||||
__PACKAGES="${__PACKAGES} salt-syndic"
|
||||
fi
|
||||
|
||||
if [ "$DISTRO_NAME_L" = "oracle_linux" ]; then
|
||||
# We need to install one package at a time because --enablerepo=X disables ALL OTHER REPOS!!!!
|
||||
for package in ${__PACKAGES}; do
|
||||
@ -2868,6 +2849,10 @@ install_centos_check_services() {
|
||||
__test_rhel_optionals_packages() {
|
||||
__install_epel_repository || return 1
|
||||
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 7 ]; then
|
||||
yum-config-manager --enable \*server-optional || return 1
|
||||
fi
|
||||
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 6 ]; then
|
||||
# Let's enable package installation testing, kind of, --dry-run
|
||||
echoinfo "Testing if packages usually on the optionals repository are available:"
|
||||
|
Loading…
Reference in New Issue
Block a user