From c7c1f613865980f985bfe21723e2695fa4177227 Mon Sep 17 00:00:00 2001 From: Pat O'Shea Date: Sat, 18 Jul 2015 09:14:57 -0600 Subject: [PATCH 01/12] Cleaning up output from write-host Just getting rid of new lines in output --- bootstrap-salt.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index 36c50b0..70d6c62 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -100,14 +100,14 @@ If ([IntPtr]::Size -eq 4) { } # 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 $url = "https://docs.saltstack.com/downloads/Salt-Minion-$version-$arch-Setup.exe" $file = "C:\tmp\salt.exe" $webclient.DownloadFile($url, $file) # Install minion silently -Write-Host "Installing Salt minion" +Write-Host -NoNewline "Installing Salt minion" #Wait for process to exit before continuing. 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 # went wrong and user intervention is required - report failure. If ($service.Status -eq "Stopped") { - Write-Host "Failed to start salt minion" + Write-Host -NoNewline "Failed to start salt minion" exit 1 } } 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" Stop-Service "salt-minion" } -Write-Host "Salt minion successfully installed" +Write-Host -NoNewline "Salt minion successfully installed" From 81534c11c20f50277e4c92e393ac66c2fc042e24 Mon Sep 17 00:00:00 2001 From: Yushi Nakai Date: Sun, 19 Jul 2015 21:06:50 +0900 Subject: [PATCH 02/12] Fix tornado installation on ubuntu --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2322298..5f5940d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1874,7 +1874,7 @@ install_ubuntu_git_deps() { if [ "$(which pip)" = "" ]; then __apt_get_install_noinput python-setuptools python-pip fi - pip install -U "'${__REQUIRED_TORNADO}'" + pip install -U "${__REQUIRED_TORNADO}" fi fi From e1c9c6ac32da87d7a3188ab8b81f9a32501ff50a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 19 Jul 2015 19:47:06 +0100 Subject: [PATCH 03/12] Update changes log --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 14dc60e..0bf193c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Version 2015.xx.xx: + * Fix tornado installation in Ubuntu. Thanks Yushi Nakai. #627 + Version 2015.07.17: * Make sure setuptools is installed before using it. #598. * `systemd` is only fully supported from 15.04 onwards. #602 From 9245195faa2e498f82d3b6b1066ca555238eb05b Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 19 Jul 2015 19:47:35 +0100 Subject: [PATCH 04/12] Add Yushi Nakai(@nyushi) to AUTHORS --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index d99284e..aa5bc52 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -78,4 +78,5 @@ Vladimir Kozhukalov kozhukalov Whit Morriss whitmo whit@nocoast.us Wolodja Wentland babilen w@babilen5.org Wout wfhg +Yushi Nakai nyushi ========================== ===================== ============================ From 4f62a022664ca4036023e8e06d0915da797d0858 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 19 Jul 2015 19:49:57 +0100 Subject: [PATCH 05/12] Fix bad quoting. --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5f5940d..b411119 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4226,7 +4226,7 @@ install_smartos_git_deps() { if [ "$(which pip)" = "" ]; then pkgin -y install py27-pip fi - pip install -U "'${__REQUIRED_TORNADO}'" + pip install -U "${__REQUIRED_TORNADO}" fi fi From 0b5524317258a715f2ceb4c69e89530f15bfe05f Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 22 Jul 2015 12:10:41 +0100 Subject: [PATCH 06/12] The upcoming v2015.8.xx stable releases also need Tornado --- bootstrap-salt.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b411119..d832196 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -426,8 +426,8 @@ elif [ "$ITYPE" = "stable" ]; then STABLE_REV="latest" else __check_unparsed_options "$*" - if [ "$(echo "$1" | egrep '^(latest|1\.6|1\.7|2014\.1|2014\.7|2015\.5)$')" = "" ]; then - echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, latest)" + 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, 2015.8, latest)" exit 1 else STABLE_REV="$1" @@ -1828,6 +1828,16 @@ install_ubuntu_stable_deps() { add-apt-repository "ppa:$STABLE_PPA" || return 1 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 } From b4ba316a6a072d0ea88bd98c4fcb09b9995dd286 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 22 Jul 2015 12:11:58 +0100 Subject: [PATCH 07/12] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 0bf193c..4304163 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ Version 2015.xx.xx: * Fix tornado installation in Ubuntu. Thanks Yushi Nakai. #627 + * Install tornado using pip on Ubuntu for Salt's v2015.8.xx onward stable releases. Version 2015.07.17: * Make sure setuptools is installed before using it. #598. From 6552bf8e6e4ce9e70eaae4cf277372ec9291a621 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 22 Jul 2015 12:54:37 +0100 Subject: [PATCH 08/12] Install requests from Chris Lea's PPA. Fixes #630 --- bootstrap-salt.sh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index d832196..e0b79bf 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1759,38 +1759,45 @@ install_ubuntu_deps() { __enable_universe_repository || return 1 # Minimal systems might not have upstart installed, install it - __apt_get_install_noinput upstart + __PACKAGES="upstart" # Need python-apt for managing packages via Salt - __apt_get_install_noinput python-apt + __PACKAGES="${__PACKAGES} python-apt" + + echoinfo "Installing Python Requests 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 + else + add-apt-repository "ppa:chris-lea/python-requests" || 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" -lt 15 ] && [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]); then echoinfo "Installing ZMQ>=4/PyZMQ>=14 from Chris Lea's PPA repository" add-apt-repository -y ppa:chris-lea/zeromq || return 1 - apt-get update 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 # 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 check_pip_allowed "You need to allow pip based installations (-P) in order to install 'apache-libcloud'" - if [ "${__PIP_PACKAGES}" = "" ]; then - __apt_get_install_noinput python-pip + if [ "$(which pip)" = "" ]; then + __PACKAGES="${__PACKAGES} python-setuptools python-pip" fi # shellcheck disable=SC2089 __PIP_PACKAGES="${__PIP_PACKAGES} 'apache-libcloud>=$_LIBCLOUD_MIN_VERSION'" fi + apt-get update + # shellcheck disable=SC2086,SC2090 + __apt_get_install_noinput ${__PACKAGES} || return 1 + if [ "${__PIP_PACKAGES}" != "" ]; then # shellcheck disable=SC2086,SC2090 pip install -U ${__PIP_PACKAGES} From b2bceffd44caae8b5d01472cfa327249ef94e59b Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 22 Jul 2015 12:55:36 +0100 Subject: [PATCH 09/12] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 4304163..908e203 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Version 2015.xx.xx: * 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: * Make sure setuptools is installed before using it. #598. From 532189460fe8a87773c2f78bb0e98f505a86b264 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 22 Jul 2015 13:11:01 +0100 Subject: [PATCH 10/12] We also need python-chardet from Chris Lea's PPA --- bootstrap-salt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index e0b79bf..816f46a 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1764,12 +1764,14 @@ install_ubuntu_deps() { # Need python-apt for managing packages via Salt __PACKAGES="${__PACKAGES} python-apt" - echoinfo "Installing Python Requests from Chris Lea's PPA repository" + 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" From bc1a74da0fac4911bcc91def00e4e0d44a6054a2 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 22 Jul 2015 13:13:25 +0100 Subject: [PATCH 11/12] Initialize an empty `__PIP_PACKAGES` --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 816f46a..c1150fb 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1758,6 +1758,8 @@ install_ubuntu_deps() { __enable_universe_repository || return 1 + __PIP_PACKAGES="" + # Minimal systems might not have upstart installed, install it __PACKAGES="upstart" From 93e566c5534d628b7cf785b49f6ab70d8d4e31a6 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 22 Jul 2015 13:17:54 +0100 Subject: [PATCH 12/12] Bump version for stable release --- ChangeLog | 2 +- bootstrap-salt.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 908e203..77ba1e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Version 2015.xx.xx: +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 diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index c1150fb..068f923 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -17,7 +17,7 @@ # CREATED: 10/15/2012 09:49:37 PM WEST #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2015.07.17" +__ScriptVersion="2015.07.22" __ScriptName="bootstrap-salt.sh" #======================================================================================================================