From 850563bef2f903135cbccd4774cd89dab2ac42b7 Mon Sep 17 00:00:00 2001 From: Salt Project Packaging Date: Wed, 28 Jun 2023 20:31:21 +0000 Subject: [PATCH 1/7] Update README.rst with 2023.06.28 release sha256sum --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 8594bd0..7d906ef 100644 --- a/README.rst +++ b/README.rst @@ -32,6 +32,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file. The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is: +- 2023.06.28: ``f45f5da8abee27ef385131f5cfa9382d3a15863d0a05688a0404d2f057b27776`` - 2023.04.26: ``516fa9cc2e258cb8484ff360b9674b46918f657985c21ca9301e42a3dd263d60`` - 2023.04.21: ``e364428aa7a25f8e2c5e18e36e222351724c6cf35a1d57158f3357cde1e0a0f0`` - 2023.04.06: ``994bf7e8bd92fe6d70d291c7562aff299f5651046b4e76dfa506cee0d9bb0843`` From 77ea3983859789bde70bf4480dbcaf05f106052e Mon Sep 17 00:00:00 2001 From: Jamie Murphy Date: Wed, 12 Jul 2023 00:05:00 +0100 Subject: [PATCH 2/7] fix rhel_onedir_repository for nightly gpg file --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 29f0413..97619e0 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4671,7 +4671,7 @@ __install_saltstack_rhel_onedir_repository() { if [ "${ONEDIR_REV}" = "nightly" ] ; then base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/" fi - if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ]; then + if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ] || [ "${ONEDIR_REV}" = "nightly" ]; then if [ "${DISTRO_MAJOR_VERSION}" -eq 9 ]; then gpg_key="SALTSTACK-GPG-KEY2.pub" else From 01b3886fd7bc853b6e665b687898ab90b7a49578 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Wed, 12 Jul 2023 20:44:43 -0700 Subject: [PATCH 3/7] Initial pass at adding a quick start option to the bootstrap script. --- bootstrap-salt.sh | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 97619e0..432054c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -395,6 +395,8 @@ __usage() { resort method. NOTE: This only works for functions which actually implement pip based installations. -q Quiet salt installation from git (setup.py install -q) + -Q Quickstart, install the Salt master and the Salt minion. + And automatically accept the minion key. -R Specify a custom repository URL. Assumes the custom repository URL points to a repository that mirrors Salt packages located at repo.saltproject.io. The option passed with -R replaces the @@ -426,7 +428,7 @@ EOT } # ---------- end of function __usage ---------- -while getopts ':hvnDc:g:Gyx:k:s:MSNXCPFUKIA:i:Lp:dH:bflV:J:j:rR:aq' opt +while getopts ':hvnDc:g:Gyx:k:s:MSNXCPFUKIA:i:Lp:dH:bflV:J:j:rR:aqQ' opt do case "${opt}" in @@ -470,6 +472,7 @@ do J ) _CUSTOM_MASTER_CONFIG=$OPTARG ;; j ) _CUSTOM_MINION_CONFIG=$OPTARG ;; q ) _QUIET_GIT_INSTALLATION=$BS_TRUE ;; + Q ) _QUICK_START=$BS_TRUE ;; x ) _PY_EXE="$OPTARG" ;; y ) _INSTALL_PY="$BS_TRUE" ;; @@ -600,6 +603,21 @@ if [ "$#" -gt 0 ];then shift fi +# Doing a quick start, so install master +# set master address to 127.0.0.1 +if [ "$_QUICK_START" -eq "$BS_TRUE" ]; then + # make sure we're installing the master + _INSTALL_MASTER=$BS_TRUE + # override incase install minion + # is set to false + _INSTALL_MINION=$BS_TRUE + # Set master address to loopback IP + _SALT_MASTER_ADDRESS="127.0.0.1" + # Auto accept the minion key + # when the install is done. + _AUTO_ACCEPT_MINION_KEYS=$BS_TRUE +fi + # Check installation type if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git|onedir|onedir_rc|old-stable)')" = "" ]; then echoerror "Installation type \"$ITYPE\" is not known..." @@ -9699,6 +9717,11 @@ if [ "$DAEMONS_RUNNING_FUNC" != "null" ] && [ ${_START_DAEMONS} -eq $BS_TRUE ]; fi fi +if [ "$_AUTO_ACCEPT_MINION_KEYS" -eq "$BS_TRUE" ]; then + echoinfo "Accepting the Salt Minion Keys" + salt-key -yA +fi + # Done! if [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then echoinfo "Salt installed!" @@ -9706,6 +9729,13 @@ else echoinfo "Salt configured!" fi +if [ "$_QUICK_START" -eq "$BS_TRUE" ]; then + echoinfo "Congratulations!" + echoinfo "A couple of commands to try:" + echoinfo " salt \* test.ping" + echoinfo " salt \* test.version" +fi + exit 0 # vim: set sts=4 ts=4 et From 0f636544eb11851fd2c42e874563f5c29194f870 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Thu, 13 Jul 2023 10:17:33 -0700 Subject: [PATCH 4/7] moving the logic for quickstart down to ensure install type and install revision are set correctly for quickstart. --- bootstrap-salt.sh | 40 +++++++++++++++++++++++++--------------- kitchen.yml | 4 ++++ 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 432054c..2897276 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -603,21 +603,6 @@ if [ "$#" -gt 0 ];then shift fi -# Doing a quick start, so install master -# set master address to 127.0.0.1 -if [ "$_QUICK_START" -eq "$BS_TRUE" ]; then - # make sure we're installing the master - _INSTALL_MASTER=$BS_TRUE - # override incase install minion - # is set to false - _INSTALL_MINION=$BS_TRUE - # Set master address to loopback IP - _SALT_MASTER_ADDRESS="127.0.0.1" - # Auto accept the minion key - # when the install is done. - _AUTO_ACCEPT_MINION_KEYS=$BS_TRUE -fi - # Check installation type if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git|onedir|onedir_rc|old-stable)')" = "" ]; then echoerror "Installation type \"$ITYPE\" is not known..." @@ -733,6 +718,31 @@ elif [ "$ITYPE" = "onedir_rc" ]; then fi fi +# Doing a quick start, so install master +# set master address to 127.0.0.1 +if [ "$_QUICK_START" -eq "$BS_TRUE" ]; then + # make install type is stable + ITYPE="stable" + + # make sure the revision is latest + STABLE_REV="latest" + ONEDIR_REV="latest" + + # make sure we're installing the master + _INSTALL_MASTER=$BS_TRUE + + # override incase install minion + # is set to false + _INSTALL_MINION=$BS_TRUE + + # Set master address to loopback IP + _SALT_MASTER_ADDRESS="127.0.0.1" + + # Auto accept the minion key + # when the install is done. + _AUTO_ACCEPT_MINION_KEYS=$BS_TRUE +fi + # Check for any unparsed arguments. Should be an error. if [ "$#" -gt 0 ]; then __usage diff --git a/kitchen.yml b/kitchen.yml index f5b0ddf..4ed6e6d 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -397,6 +397,10 @@ suites: - opensuse-tumbleweed - ubuntu-1804 + - name: quickstart + provisioner: + salt_bootstrap_options: -Q + verifier: name: shell remote_exec: false From ab7bf7901ccdca60658280cbf52fb2be6283d058 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Thu, 13 Jul 2023 10:36:49 -0700 Subject: [PATCH 5/7] need some defaults for quickstart and auto accept keys. --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2897276..5a03c88 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -277,6 +277,8 @@ _MINIMUM_PIP_VERSION="9.0.1" _MINIMUM_SETUPTOOLS_VERSION="9.1" _POST_NEON_PIP_INSTALL_ARGS="--prefix=/usr" _PIP_DOWNLOAD_ARGS="" +_QUICK_START="$BS_FALSE" +_AUTO_ACCEPT_MINION_KEYS="$BS_FALSE" # Defaults for install arguments ITYPE="stable" From fc63231b3c37bd114c2b4412c9f495e27e34b23f Mon Sep 17 00:00:00 2001 From: Jamie Murphy Date: Tue, 18 Jul 2023 17:13:37 +0100 Subject: [PATCH 6/7] fix install_amazon_linux_ami_2_onedir nightly gpg key path --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5a03c88..0b6e43e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -6495,7 +6495,7 @@ install_amazon_linux_ami_2_onedir_deps() { base_url="$HTTP_VAL://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/amazon/2/\$basearch/" fi - if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ]; then + if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ] || [ "${ONEDIR_REV}" = "nightly" ]; then gpg_key="${base_url}SALTSTACK-GPG-KEY.pub,${base_url}base/RPM-GPG-KEY-CentOS-7" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then gpg_key="${base_url}SALTSTACK-GPG-KEY.pub" From ad48035b7e55de929c990662d23a96d2c2d498e9 Mon Sep 17 00:00:00 2001 From: Salt Project Packaging Date: Tue, 25 Jul 2023 20:04:28 +0000 Subject: [PATCH 7/7] Update develop branch for the v2023.07.25 release --- CHANGELOG.md | 14 ++++++++++++++ bootstrap-salt.sh | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4100b6..22fa57c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# v2023.07.25 + +## What's Changed + +- fix gpg pub key name for nightly rhel_onedir_repository by @ITJamie in https://github.com/saltstack/salt-bootstrap/pull/1943 +- Adding quickstart option by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1945 +- fix install_amazon_linux_ami_2_onedir nightly gpg key path by @ITJamie in https://github.com/saltstack/salt-bootstrap/pull/1949 + +## New Contributors + +- @ITJamie made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1943 + +**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2023.06.28...v2023.07.25 + # v2023.06.28 ## What's Changed diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 0b6e43e..4eaa40e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -23,7 +23,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2023.06.28" +__ScriptVersion="2023.07.25" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0"