Merge remote-tracking branch 'upstream/develop' into stable for v2015.07.22 release

This commit is contained in:
Pedro Algarvio 2015-07-22 13:18:28 +01:00
commit f8732ce6f2
4 changed files with 50 additions and 23 deletions

View file

@ -78,4 +78,5 @@ Vladimir Kozhukalov kozhukalov
Whit Morriss whitmo whit@nocoast.us Whit Morriss whitmo whit@nocoast.us
Wolodja Wentland babilen w@babilen5.org Wolodja Wentland babilen w@babilen5.org
Wout wfhg Wout wfhg
Yushi Nakai nyushi
========================== ===================== ============================ ========================== ===================== ============================

View file

@ -1,3 +1,8 @@
Version 2015.07.22:
* Fix tornado installation in Ubuntu. Thanks Yushi Nakai. #627
* Install tornado using pip on Ubuntu for Salt's v2015.8.xx onward stable releases.
* Install requests on Ubuntu from Chris Lea's PPA. #630
Version 2015.07.17: Version 2015.07.17:
* Make sure setuptools is installed before using it. #598. * Make sure setuptools is installed before using it. #598.
* `systemd` is only fully supported from 15.04 onwards. #602 * `systemd` is only fully supported from 15.04 onwards. #602

View file

@ -100,14 +100,14 @@ If ([IntPtr]::Size -eq 4) {
} }
# Download minion setup file # Download minion setup file
Write-Host "Downloading Salt minion installer Salt-Minion-$version-$arch-Setup.exe" Write-Host -NoNewline "Downloading Salt minion installer Salt-Minion-$version-$arch-Setup.exe"
$webclient = New-Object System.Net.WebClient $webclient = New-Object System.Net.WebClient
$url = "https://docs.saltstack.com/downloads/Salt-Minion-$version-$arch-Setup.exe" $url = "https://docs.saltstack.com/downloads/Salt-Minion-$version-$arch-Setup.exe"
$file = "C:\tmp\salt.exe" $file = "C:\tmp\salt.exe"
$webclient.DownloadFile($url, $file) $webclient.DownloadFile($url, $file)
# Install minion silently # Install minion silently
Write-Host "Installing Salt minion" Write-Host -NoNewline "Installing Salt minion"
#Wait for process to exit before continuing. #Wait for process to exit before continuing.
C:\tmp\salt.exe /S /minion-name=$minion /master=$master | Out-Null C:\tmp\salt.exe /S /minion-name=$minion /master=$master | Out-Null
@ -141,14 +141,14 @@ If($runservice) {
# If the salt-minion service is still not running, something probably # If the salt-minion service is still not running, something probably
# went wrong and user intervention is required - report failure. # went wrong and user intervention is required - report failure.
If ($service.Status -eq "Stopped") { If ($service.Status -eq "Stopped") {
Write-Host "Failed to start salt minion" Write-Host -NoNewline "Failed to start salt minion"
exit 1 exit 1
} }
} }
Else { Else {
Write-Host "Stopping salt minion and setting it to 'Manual'" Write-Host -NoNewline "Stopping salt minion and setting it to 'Manual'"
Set-Service "salt-minion" -startupType "Manual" Set-Service "salt-minion" -startupType "Manual"
Stop-Service "salt-minion" Stop-Service "salt-minion"
} }
Write-Host "Salt minion successfully installed" Write-Host -NoNewline "Salt minion successfully installed"

View file

@ -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.07.17" __ScriptVersion="2015.07.22"
__ScriptName="bootstrap-salt.sh" __ScriptName="bootstrap-salt.sh"
#====================================================================================================================== #======================================================================================================================
@ -426,8 +426,8 @@ elif [ "$ITYPE" = "stable" ]; then
STABLE_REV="latest" STABLE_REV="latest"
else else
__check_unparsed_options "$*" __check_unparsed_options "$*"
if [ "$(echo "$1" | egrep '^(latest|1\.6|1\.7|2014\.1|2014\.7|2015\.5)$')" = "" ]; then if [ "$(echo "$1" | egrep '^(latest|1\.6|1\.7|2014\.1|2014\.7|2015\.5|2015\.8)$')" = "" ]; then
echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, latest)" echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, latest)"
exit 1 exit 1
else else
STABLE_REV="$1" STABLE_REV="$1"
@ -1758,39 +1758,50 @@ install_ubuntu_deps() {
__enable_universe_repository || return 1 __enable_universe_repository || return 1
__PIP_PACKAGES=""
# Minimal systems might not have upstart installed, install it # Minimal systems might not have upstart installed, install it
__apt_get_install_noinput upstart __PACKAGES="upstart"
# Need python-apt for managing packages via Salt # Need python-apt for managing packages via Salt
__apt_get_install_noinput python-apt __PACKAGES="${__PACKAGES} python-apt"
echoinfo "Installing Python Requests/Chardet from Chris Lea's PPA repository"
if [ "$DISTRO_MAJOR_VERSION" -gt 11 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -gt 04 ]); then
# Above Ubuntu 11.04 add a -y flag
add-apt-repository -y "ppa:chris-lea/python-requests" || return 1
add-apt-repository -y "ppa:chris-lea/python-chardet" || return 1
else
add-apt-repository "ppa:chris-lea/python-requests" || return 1
add-apt-repository "ppa:chris-lea/python-chardet" || return 1
fi
__PACKAGES="${__PACKAGES} python-requests"
if [ "$DISTRO_MAJOR_VERSION" -gt 12 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -gt 03 ]); then if [ "$DISTRO_MAJOR_VERSION" -gt 12 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -gt 03 ]); then
if ([ "$DISTRO_MAJOR_VERSION" -lt 15 ] && [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]); then if ([ "$DISTRO_MAJOR_VERSION" -lt 15 ] && [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]); then
echoinfo "Installing ZMQ>=4/PyZMQ>=14 from Chris Lea's PPA repository" echoinfo "Installing ZMQ>=4/PyZMQ>=14 from Chris Lea's PPA repository"
add-apt-repository -y ppa:chris-lea/zeromq || return 1 add-apt-repository -y ppa:chris-lea/zeromq || return 1
apt-get update
fi fi
__apt_get_install_noinput python-requests
__PIP_PACKAGES=""
else
check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package 'requests'"
__apt_get_install_noinput python-setuptools python-pip
# shellcheck disable=SC2089
__PIP_PACKAGES="requests>=$_PY_REQUESTS_MIN_VERSION"
fi fi
# 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
__apt_get_install_noinput procps pciutils || return 1 __PACKAGES="${__PACKAGES} procps pciutils"
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'"
if [ "${__PIP_PACKAGES}" = "" ]; then if [ "$(which pip)" = "" ]; then
__apt_get_install_noinput python-pip __PACKAGES="${__PACKAGES} python-setuptools python-pip"
fi fi
# shellcheck disable=SC2089 # shellcheck disable=SC2089
__PIP_PACKAGES="${__PIP_PACKAGES} 'apache-libcloud>=$_LIBCLOUD_MIN_VERSION'" __PIP_PACKAGES="${__PIP_PACKAGES} 'apache-libcloud>=$_LIBCLOUD_MIN_VERSION'"
fi fi
apt-get update
# shellcheck disable=SC2086,SC2090
__apt_get_install_noinput ${__PACKAGES} || return 1
if [ "${__PIP_PACKAGES}" != "" ]; then if [ "${__PIP_PACKAGES}" != "" ]; then
# shellcheck disable=SC2086,SC2090 # shellcheck disable=SC2086,SC2090
pip install -U ${__PIP_PACKAGES} pip install -U ${__PIP_PACKAGES}
@ -1828,6 +1839,16 @@ install_ubuntu_stable_deps() {
add-apt-repository "ppa:$STABLE_PPA" || return 1 add-apt-repository "ppa:$STABLE_PPA" || return 1
fi fi
if [ ! "$(echo "$STABLE_REV" | egrep '^(2015\.8|latest)$')" = "" ]; then
# We need a recent tornado package
__REQUIRED_TORNADO="tornado >= 4.0"
check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'"
if [ "$(which pip)" = "" ]; then
__apt_get_install_noinput python-setuptools python-pip
fi
pip install -U "${__REQUIRED_TORNADO}"
fi
apt-get update apt-get update
} }
@ -1874,7 +1895,7 @@ install_ubuntu_git_deps() {
if [ "$(which pip)" = "" ]; then if [ "$(which pip)" = "" ]; then
__apt_get_install_noinput python-setuptools python-pip __apt_get_install_noinput python-setuptools python-pip
fi fi
pip install -U "'${__REQUIRED_TORNADO}'" pip install -U "${__REQUIRED_TORNADO}"
fi fi
fi fi
@ -4226,7 +4247,7 @@ install_smartos_git_deps() {
if [ "$(which pip)" = "" ]; then if [ "$(which pip)" = "" ]; then
pkgin -y install py27-pip pkgin -y install py27-pip
fi fi
pip install -U "'${__REQUIRED_TORNADO}'" pip install -U "${__REQUIRED_TORNADO}"
fi fi
fi fi