mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 01:30:21 +00:00
Merge branch 'develop' into stable for v2014.08.30 stable release
This commit is contained in:
commit
40c2289798
3 changed files with 51 additions and 14 deletions
|
@ -14,6 +14,7 @@ Boris Feld Lothiraldan
|
|||
bruce-one bruce-one
|
||||
Chris Rebert cvrebert chris.rebert@hulu.com
|
||||
Christer Edwards cedwards
|
||||
Dag Viggo Lokøen dagvl dag.viggo@lokoen.org
|
||||
Dan Mick dmick dan.mick@inktank.com
|
||||
deployboy deployboy
|
||||
Diego Woitasen diegows diego.woitasen@vhgroup.net
|
||||
|
|
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,12 @@
|
|||
Version 2014.08.30:
|
||||
* Skip service checks for `salt-api`, since this should be an opt-in service not necessarily
|
||||
meant to start at boot time.
|
||||
* Distro Support Fixes:
|
||||
* Also install the salt-api service on RHEL based distributions for git based
|
||||
installations.
|
||||
* Properly detect Arch Linux when lsb-release is available
|
||||
* Updated the URL for EPEL 7
|
||||
|
||||
Version 2014.08.23:
|
||||
* Avoid redirect breakage when installing EPEL with rpm on RHEL 5
|
||||
* Ensure python-apt is installed by the bootstrap script for Debian & Ubuntu minions. Thanks
|
||||
|
@ -15,7 +24,6 @@ Version 2014.08.23:
|
|||
running which ended up causing a most stubborn bug that's documented in
|
||||
https://github.com/saltstack/salt/issues/12248
|
||||
|
||||
|
||||
Version 2014.07.29:
|
||||
* Shallow clone Salt's repository for speed improvements. In case of failure, resume old
|
||||
behaviour.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# CREATED: 10/15/2012 09:49:37 PM WEST
|
||||
#======================================================================================================================
|
||||
set -o nounset # Treat unset variables as an error
|
||||
__ScriptVersion="2014.08.23"
|
||||
__ScriptVersion="2014.08.30"
|
||||
__ScriptName="bootstrap-salt.sh"
|
||||
|
||||
#======================================================================================================================
|
||||
|
@ -702,6 +702,9 @@ __gather_linux_system_info() {
|
|||
DISTRO_NAME="Oracle Linux"
|
||||
elif [ "${DISTRO_NAME}" = "AmazonAMI" ]; then
|
||||
DISTRO_NAME="Amazon Linux AMI"
|
||||
elif [ "${DISTRO_NAME}" = "Arch" ]; then
|
||||
DISTRO_NAME="Arch Linux"
|
||||
return
|
||||
fi
|
||||
rv=$(lsb_release -sr)
|
||||
[ "${rv}" != "" ] && DISTRO_VERSION=$(__parse_version_string "$rv")
|
||||
|
@ -1871,10 +1874,13 @@ install_ubuntu_restart_daemons() {
|
|||
|
||||
install_ubuntu_check_services() {
|
||||
for fname in minion master syndic api; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
if [ -f /sbin/initctl ] && [ -f /etc/init/salt-${fname}.conf ]; then
|
||||
__check_services_upstart salt-$fname || return 1
|
||||
|
@ -2314,10 +2320,13 @@ install_debian_restart_daemons() {
|
|||
|
||||
install_debian_check_services() {
|
||||
for fname in minion master syndic api; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ ! -f "/etc/init.d/salt-$fname" ]) && continue
|
||||
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ ! -f "/etc/init.d/salt-$fname" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
__check_services_debian salt-$fname || return 1
|
||||
done
|
||||
|
@ -2441,10 +2450,13 @@ install_fedora_restart_daemons() {
|
|||
|
||||
install_fedora_check_services() {
|
||||
for fname in minion master syndic api; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
__check_services_systemd salt-$fname || return 1
|
||||
done
|
||||
|
@ -2483,7 +2495,7 @@ __install_epel_repository() {
|
|||
elif [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then
|
||||
rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/6/${EPEL_ARCH}/epel-release-6-8.noarch.rpm" || return 1
|
||||
elif [ "$DISTRO_MAJOR_VERSION" -eq 7 ]; then
|
||||
rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/beta/7/${EPEL_ARCH}/epel-release-7-0.2.noarch.rpm" || return 1
|
||||
rpm -Uvh --force "http://download.fedoraproject.org/pub/epel/7/${EPEL_ARCH}/epel-release-7-1.noarch.rpm" || return 1
|
||||
else
|
||||
echoerror "Failed add EPEL repository support."
|
||||
return 1
|
||||
|
@ -2632,11 +2644,12 @@ install_centos_git() {
|
|||
}
|
||||
|
||||
install_centos_git_post() {
|
||||
for fname in master minion syndic; do
|
||||
for fname in minion master minion api; do
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
|
||||
# While the RPM's use init.d, so will we.
|
||||
|
@ -2718,10 +2731,13 @@ install_centos_testing_post() {
|
|||
|
||||
install_centos_check_services() {
|
||||
for fname in minion master syndic api; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
if [ -f /sbin/initctl ] && [ -f /etc/init/salt-${fname}.conf ]; then
|
||||
__check_services_upstart salt-$fname || return 1
|
||||
|
@ -2765,7 +2781,7 @@ __test_rhel_optionals_packages() {
|
|||
yum --config "${__YUM_CONF_FILE}" install -y ${package} --enablerepo=${_EPEL_REPO} >/dev/null 2>&1
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
echoerror "Failed to find an installable '${package}' package. The optional repository or it's subscription might be missing."
|
||||
echoerror "Failed to find an installable '${package}' package. The optional repository or its subscription might be missing."
|
||||
rm -rf "${__YUM_CONF_DIR}"
|
||||
return 1
|
||||
fi
|
||||
|
@ -3409,10 +3425,13 @@ install_arch_check_services() {
|
|||
fi
|
||||
|
||||
for fname in minion master syndic api; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
__check_services_systemd salt-$fname || return 1
|
||||
done
|
||||
|
@ -3822,7 +3841,7 @@ install_opensuse_stable_deps() {
|
|||
|
||||
zypper --gpg-auto-import-keys --non-interactive refresh
|
||||
if [ $? -ne 0 ] && [ $? -ne 4 ]; then
|
||||
# If the exit code is not 0, and it's not 4(failed to update a
|
||||
# If the exit code is not 0, and it's not 4 (failed to update a
|
||||
# repository) return a failure. Otherwise continue.
|
||||
return 1
|
||||
fi
|
||||
|
@ -3967,10 +3986,13 @@ install_opensuse_check_services() {
|
|||
fi
|
||||
|
||||
for fname in minion master syndic api; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
__check_services_systemd salt-$fname > /dev/null 2>&1 || __check_services_systemd salt-$fname.service > /dev/null 2>&1 || return 1
|
||||
done
|
||||
|
@ -4152,10 +4174,13 @@ install_suse_check_services() {
|
|||
fi
|
||||
|
||||
for fname in minion master syndic api; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
__check_services_systemd salt-$fname || return 1
|
||||
done
|
||||
|
@ -4294,10 +4319,13 @@ install_gentoo_check_services() {
|
|||
fi
|
||||
|
||||
for fname in minion master syndic api; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
[ $fname = "api" ] && continue
|
||||
|
||||
# Skip if not meant to be installed
|
||||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
#[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
__check_services_systemd salt-$fname || return 1
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue