mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Merge pull request #12 from s0undt3ch/develop
Merge current develop into stable
This commit is contained in:
commit
81514c5035
3 changed files with 46 additions and 48 deletions
|
@ -10,6 +10,7 @@ Name Nick Email
|
||||||
Alec Koumjian akoumjian akoumjian@gmail.com
|
Alec Koumjian akoumjian akoumjian@gmail.com
|
||||||
Alex Van't Hof alexvh
|
Alex Van't Hof alexvh
|
||||||
Angelo Gründler plueschopath angelo.gruendler@w1r3.net
|
Angelo Gründler plueschopath angelo.gruendler@w1r3.net
|
||||||
|
Ari Aosved devaos ari.aosved@gmail.com
|
||||||
Boris Feld Lothiraldan
|
Boris Feld Lothiraldan
|
||||||
bruce-one bruce-one
|
bruce-one bruce-one
|
||||||
C. R. Oldham cro cr@saltstack.com
|
C. R. Oldham cro cr@saltstack.com
|
||||||
|
@ -22,6 +23,7 @@ Diego Woitasen diegows diego.woitasen@vhgroup.net
|
||||||
Elias Probst eliasp
|
Elias Probst eliasp
|
||||||
Erik Johnson terminalmage erik@saltstack.com
|
Erik Johnson terminalmage erik@saltstack.com
|
||||||
Forrest Alvarez gravyboat
|
Forrest Alvarez gravyboat
|
||||||
|
Fred Reimer freimer freimer@freimer.org
|
||||||
Geoff Garside geoffgarside geoff@geoffgarside.co.uk
|
Geoff Garside geoffgarside geoff@geoffgarside.co.uk
|
||||||
ggillies ggillies
|
ggillies ggillies
|
||||||
Giuseppe Iannello giannello giuseppe.iannello@brokenloop.net
|
Giuseppe Iannello giannello giuseppe.iannello@brokenloop.net
|
||||||
|
@ -52,6 +54,7 @@ Pedro Paulo pedropaulovc
|
||||||
ptonelli ptonelli
|
ptonelli ptonelli
|
||||||
Raymond Barbiero visualphoenix
|
Raymond Barbiero visualphoenix
|
||||||
Roberto Aguilar rca roberto@baremetal.io
|
Roberto Aguilar rca roberto@baremetal.io
|
||||||
|
Ronald van Zantvoort The-Loeki ronald@pcextreme.nl
|
||||||
Skyler Berg skylerberg skylertheberg@gmail.com
|
Skyler Berg skylerberg skylertheberg@gmail.com
|
||||||
Tate Eskew tateeskew
|
Tate Eskew tateeskew
|
||||||
Thomas S. Hatch thatch45 thatch45@saltstack.com
|
Thomas S. Hatch thatch45 thatch45@saltstack.com
|
||||||
|
|
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Version 2015.02.15:
|
||||||
|
* 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
|
||||||
|
|
||||||
Version 2015.01.12:
|
Version 2015.01.12:
|
||||||
* Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl).
|
* Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl).
|
||||||
* Make sure wget is installed on debian bare systems.
|
* Make sure wget is installed on debian bare systems.
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# CREATED: 10/15/2012 09:49:37 PM WEST
|
# CREATED: 10/15/2012 09:49:37 PM WEST
|
||||||
#======================================================================================================================
|
#======================================================================================================================
|
||||||
set -o nounset # Treat unset variables as an error
|
set -o nounset # Treat unset variables as an error
|
||||||
__ScriptVersion="2015.01.12"
|
__ScriptVersion="2015.02.15"
|
||||||
__ScriptName="bootstrap-salt.sh"
|
__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
|
# Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813
|
||||||
__PACKAGES="${__PACKAGES} python-pip"
|
__PACKAGES="${__PACKAGES} python-pip"
|
||||||
__PIP_PACKAGES="${__PIP_PACKAGES} requests"
|
__PIP_PACKAGES="${__PIP_PACKAGES} requests"
|
||||||
else
|
|
||||||
__PACKAGES="${__PACKAGES} python-requests"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
@ -2109,49 +2107,18 @@ install_debian_7_deps() {
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
wget $_WGET_ARGS -q http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key -O - | apt-key add - || return 1
|
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
|
apt-get update || return 1
|
||||||
echowarn "PyZMQ will be installed from PyPI in order to compile it against ZMQ3"
|
__apt_get_install_noinput -t wheezy-backports libzmq3 libzmq3-dev python-zmq python-requests python-apt || return 1
|
||||||
echowarn "This is required for long term stable minion connections to the master."
|
# Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813
|
||||||
echowarn "YOU WILL END UP WITH QUITE A FEW PACKAGES FROM DEBIAN UNSTABLE"
|
__PACKAGES="procps pciutils"
|
||||||
echowarn "Sleeping for 5 seconds so you can cancel..."
|
# shellcheck disable=SC2086
|
||||||
sleep 5
|
__apt_get_install_noinput ${__PACKAGES} || return 1
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
|
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
|
||||||
check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud"
|
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"
|
pip install -U "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2567,23 +2534,33 @@ __install_epel_repository() {
|
||||||
|
|
||||||
__install_saltstack_copr_zeromq_repository() {
|
__install_saltstack_copr_zeromq_repository() {
|
||||||
echoinfo "Installing Zeromq >=4 and PyZMQ>=14 from SaltStack's COPR 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
|
if [ "${DISTRO_NAME_L}" = "fedora" ]; then
|
||||||
__REPOTYPE="${DISTRO_NAME_L}"
|
__REPOTYPE="${DISTRO_NAME_L}"
|
||||||
else
|
else
|
||||||
__REPOTYPE="epel"
|
__REPOTYPE="epel"
|
||||||
fi
|
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
|
"http://copr.fedoraproject.org/coprs/saltstack/zeromq4/repo/${__REPOTYPE}-${DISTRO_MAJOR_VERSION}/saltstack-zeromq4-${__REPOTYPE}-${DISTRO_MAJOR_VERSION}.repo" || return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
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_centos_stable_deps() {
|
||||||
__install_epel_repository || return 1
|
__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
|
yum -y install python-hashlib || return 1
|
||||||
__install_saltstack_copr_zeromq_repository || return 1
|
__install_saltstack_copr_zeromq_repository || return 1
|
||||||
fi
|
fi
|
||||||
|
@ -2625,7 +2602,7 @@ install_centos_stable_deps() {
|
||||||
if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then
|
if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then
|
||||||
easy_install-2.6 "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
easy_install-2.6 "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
||||||
else
|
else
|
||||||
pip-python install "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
pip install "apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2651,9 +2628,13 @@ install_centos_stable() {
|
||||||
if [ "$_INSTALL_MINION" -eq $BS_TRUE ]; then
|
if [ "$_INSTALL_MINION" -eq $BS_TRUE ]; then
|
||||||
__PACKAGES="${__PACKAGES} salt-minion"
|
__PACKAGES="${__PACKAGES} salt-minion"
|
||||||
fi
|
fi
|
||||||
if [ "$_INSTALL_MASTER" -eq $BS_TRUE ] || [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ]; then
|
if [ "$_INSTALL_MASTER" -eq $BS_TRUE ];then
|
||||||
__PACKAGES="${__PACKAGES} salt-master"
|
__PACKAGES="${__PACKAGES} salt-master"
|
||||||
|
fi
|
||||||
|
if [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ];then
|
||||||
|
__PACKAGES="${__PACKAGES} salt-syndic"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DISTRO_NAME_L" = "oracle_linux" ]; then
|
if [ "$DISTRO_NAME_L" = "oracle_linux" ]; then
|
||||||
# We need to install one package at a time because --enablerepo=X disables ALL OTHER REPOS!!!!
|
# We need to install one package at a time because --enablerepo=X disables ALL OTHER REPOS!!!!
|
||||||
for package in ${__PACKAGES}; do
|
for package in ${__PACKAGES}; do
|
||||||
|
@ -2868,6 +2849,10 @@ install_centos_check_services() {
|
||||||
__test_rhel_optionals_packages() {
|
__test_rhel_optionals_packages() {
|
||||||
__install_epel_repository || return 1
|
__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
|
if [ "$DISTRO_MAJOR_VERSION" -ge 6 ]; then
|
||||||
# Let's enable package installation testing, kind of, --dry-run
|
# Let's enable package installation testing, kind of, --dry-run
|
||||||
echoinfo "Testing if packages usually on the optionals repository are available:"
|
echoinfo "Testing if packages usually on the optionals repository are available:"
|
||||||
|
|
Loading…
Add table
Reference in a new issue