From d7e05db988d83a1801034d9f7ba5517063c3a7af Mon Sep 17 00:00:00 2001 From: Salt Project Packaging Date: Thu, 18 Jul 2024 16:25:21 +0000 Subject: [PATCH 1/7] Update README.rst with 2024.07.18 release sha256sum --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 7c63cced3..4546155ad 100644 --- a/README.rst +++ b/README.rst @@ -37,6 +37,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file. The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is: +- 2024.07.18: ``92a74e7ff8a9032a7713c2b3955991d66aaca08a4eb9494ce3dd66b5044f6bc3`` - 2024.07.16: ``4f76d1549c71d696a605f97645d8633b6269c4d9ae54b1fbdfedca1dcf893e7a`` - 2024.07.12: ``526f4a5383db308081a120e26988679238ca6add4bf7a82120cbe71d57ab826e`` - 2024.04.03: ``450ba5cde4af8d6cb5c56c66791f87b918bcda70ccdfb10abf3cc294143c8073`` From 98dc1368acf3e09a54797ca2d6373595c94cc985 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 19 Jul 2024 11:06:37 -0600 Subject: [PATCH 2/7] Updated link to Supported Operating Systems supported by Salt --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 4546155ad..ef7e4b004 100644 --- a/README.rst +++ b/README.rst @@ -373,7 +373,9 @@ Supported Operating Systems --------------------------- The salt-bootstrap script officially supports the distributions outlined in -`Salt's Supported Operating Systems`_ document, (BSD-based OSs, Solaris and AIX are no longer +`Salt's Supported Operating Systems +`_ +document, (BSD-based OSs, Solaris and AIX are no longer supported). The operating systems listed below should reflect this document but may become out of date. If an operating system is listed below, but is not listed on the official supported operating systems document, the level of support is "best-effort". From 10377e548da076210b5b7d137ce20615b4dcc6db Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 19 Jul 2024 11:13:00 -0600 Subject: [PATCH 3/7] Updated link for Salt Project Repository --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index ef7e4b004..1dd8037d8 100644 --- a/README.rst +++ b/README.rst @@ -380,7 +380,8 @@ supported). The operating systems listed below should reflect this document but date. If an operating system is listed below, but is not listed on the official supported operating systems document, the level of support is "best-effort". -Since Salt is written in Python, the packages available from the `Salt Project's repository`_ are +Since Salt is written in Python, the packages available from the `Salt Project's repository +`_ are CPU architecture independent and could be installed on any hardware supported by Linux kernel. However, the Salt Project does package Salt's binary dependencies only for ``x86_64`` (``amd64``) and ``AArch64`` (``arm64``). From ba565658e924151507a3845621aadcd69dcec232 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 19 Jul 2024 13:39:45 -0600 Subject: [PATCH 4/7] Cleanup use of the term 'Post Neon' given only support 3006 and up --- bootstrap-salt.sh | 72 +++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 774ce4bc5..f14bef493 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -272,7 +272,7 @@ _ONEDIR_NIGHTLY_DIR="salt-dev/${_ONEDIR_DIR}" _PY_EXE="python3" _MINIMUM_PIP_VERSION="9.0.1" _MINIMUM_SETUPTOOLS_VERSION="9.1" -_POST_NEON_PIP_INSTALL_ARGS="--prefix=/usr" +_PIP_INSTALL_ARGS="--prefix=/usr" _PIP_DOWNLOAD_ARGS="" _QUICK_START="$BS_FALSE" _AUTO_ACCEPT_MINION_KEYS="$BS_FALSE" @@ -1819,7 +1819,7 @@ if [ "$ITYPE" = "git" ]; then __NEW_VS_TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?3[0-9]{3}(\.[0-9]{1,2})?).*$/MATCH/') if [ "$__NEW_VS_TAG_REGEX_MATCH" = "MATCH" ]; then __TAG_REGEX_MATCH="${__NEW_VS_TAG_REGEX_MATCH}" - echodebug "Post Neon Tag Regex Match On: ${GIT_REV}" + echodebug "Tag Regex Match On: ${GIT_REV}" else __TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?[0-9]{1,4}\.[0-9]{1,2})(\.[0-9]{1,2})?.*$/MATCH/') echodebug "Pre Neon Tag Regex Match On: ${GIT_REV}" @@ -1829,7 +1829,7 @@ if [ "$ITYPE" = "git" ]; then __NEW_VS_TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed 's/^.*\(v\?3[[:digit:]]\{3\}\(\.[[:digit:]]\{1,2\}\)\?\).*$/MATCH/') if [ "$__NEW_VS_TAG_REGEX_MATCH" = "MATCH" ]; then __TAG_REGEX_MATCH="${__NEW_VS_TAG_REGEX_MATCH}" - echodebug "Post Neon Tag Regex Match On: ${GIT_REV}" + echodebug "Tag Regex Match On: ${GIT_REV}" else __TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed 's/^.*\(v\?[[:digit:]]\{1,4\}\.[[:digit:]]\{1,2\}\)\(\.[[:digit:]]\{1,2\}\)\?.*$/MATCH/') echodebug "Pre Neon Tag Regex Match On: ${GIT_REV}" @@ -1839,7 +1839,7 @@ if [ "$ITYPE" = "git" ]; then fi echo - echowarn "Post Neon git based installations will always install salt" + echowarn "git based installations will always install salt" echowarn "and its dependencies using pip which will be upgraded to" echowarn "at least v${_MINIMUM_PIP_VERSION}, and, in case the setuptools version is also" echowarn "too old, it will be upgraded to at least v${_MINIMUM_SETUPTOOLS_VERSION}" @@ -2596,19 +2596,19 @@ __install_pip_deps() { } # ---------- end of function __install_pip_deps ---------- #--- FUNCTION ------------------------------------------------------------------------------------------------------- -# NAME: __install_salt_from_repo_post_neon +# NAME: __install_salt_from_repo # DESCRIPTION: Return 0 or 1 if successfully able to install. Can provide a different python version to # install pip packages with. If $py_exe is not specified it will use the default python version. # PARAMETERS: py_exe #---------------------------------------------------------------------------------------------------------------------- -__install_salt_from_repo_post_neon() { +__install_salt_from_repo() { _py_exe="$1" if [ "${_py_exe}" = "" ]; then _py_exe="python3" fi - echodebug "__install_salt_from_repo_post_neon py_exe=$_py_exe" + echodebug "__install_salt_from_repo py_exe=$_py_exe" _py_version=$(${_py_exe} -c "import sys; print('{0}.{1}'.format(*sys.version_info))") _pip_cmd="pip${_py_version}" @@ -2647,8 +2647,8 @@ EOM ) if ! ${_py_exe} -c "$CHECK_PIP_VERSION_SCRIPT"; then # Upgrade pip to at least 1.2 which is when we can start using "python3 -m pip" - echodebug "Running '${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} pip>=${_MINIMUM_PIP_VERSION}'" - ${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} -v "pip>=${_MINIMUM_PIP_VERSION}" + echodebug "Running '${_pip_cmd} install ${_PIP_INSTALL_ARGS} pip>=${_MINIMUM_PIP_VERSION}'" + ${_pip_cmd} install ${_PIP_INSTALL_ARGS} -v "pip>=${_MINIMUM_PIP_VERSION}" sleep 1 echodebug "PATH: ${PATH}" _pip_cmd="pip${_py_version}" @@ -2681,8 +2681,8 @@ EOM echodebug "OS is greater than / equal Debian 12 or Ubuntu 24.04, using ${_USE_BREAK_SYSTEM_PACKAGES}" fi - echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --upgrade ${_POST_NEON_PIP_INSTALL_ARGS} wheel ${_setuptools_dep}" - ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --upgrade ${_POST_NEON_PIP_INSTALL_ARGS} wheel "${_setuptools_dep}" + echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --upgrade ${_PIP_INSTALL_ARGS} wheel ${_setuptools_dep}" + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --upgrade ${_PIP_INSTALL_ARGS} wheel "${_setuptools_dep}" echoinfo "Installing salt using ${_py_exe}" cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 @@ -2700,8 +2700,8 @@ EOM ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} . || (echo "Failed to download salt dependencies" && return 1) echoinfo "Installing Downloaded Salt Dependencies" - echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/*'" - ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/* || return 1 + echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/*'" + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/* || return 1 rm -f /tmp/git/deps/* echoinfo "Building Salt Python Wheel" @@ -2718,10 +2718,10 @@ EOM echoinfo "Installing Built Salt Wheel" ${_pip_cmd} uninstall --yes ${_USE_BREAK_SYSTEM_PACKAGES} salt 2>/dev/null || true - echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --no-deps --force-reinstall ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/salt*.whl'" + echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --no-deps --force-reinstall ${_PIP_INSTALL_ARGS} /tmp/git/deps/salt*.whl'" ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --no-deps --force-reinstall \ - ${_POST_NEON_PIP_INSTALL_ARGS} \ + ${_PIP_INSTALL_ARGS} \ --global-option="--salt-config-dir=$_SALT_ETC_DIR --salt-cache-dir=${_SALT_CACHE_DIR} ${SETUP_PY_INSTALL_ARGS}" \ /tmp/git/deps/salt*.whl || return 1 @@ -2744,12 +2744,12 @@ EOM return 1 fi return 0 -} # ---------- end of function __install_salt_from_repo_post_neon ---------- +} # ---------- end of function __install_salt_from_repo ---------- # shellcheck disable=SC2268 if [ "x${_PY_MAJOR_VERSION}" = "x" ]; then - # Default to python 3 for post Neon install + # Default to python 3 for install _PY_MAJOR_VERSION=3 fi @@ -3142,8 +3142,8 @@ install_ubuntu_git() { return 1 fi - _POST_NEON_PIP_INSTALL_ARGS="" - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + _PIP_INSTALL_ARGS="" + __install_salt_from_repo "${_PY_EXE}" || return 1 cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 # Account for new path for services files in later releases @@ -3556,9 +3556,9 @@ install_debian_git() { # We can use --prefix on debian based ditributions - _POST_NEON_PIP_INSTALL_ARGS="" + _PIP_INSTALL_ARGS="" - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + __install_salt_from_repo "${_PY_EXE}" || return 1 cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 # Account for new path for services files in later releases @@ -3817,7 +3817,7 @@ install_fedora_git() { return 1 fi - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + __install_salt_from_repo "${_PY_EXE}" || return 1 return 0 } @@ -4192,7 +4192,7 @@ install_centos_git() { fi echodebug "_PY_EXE: $_PY_EXE" - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + __install_salt_from_repo "${_PY_EXE}" || return 1 return 0 } @@ -5150,7 +5150,7 @@ install_alpine_linux_stable() { } install_alpine_linux_git() { - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + __install_salt_from_repo "${_PY_EXE}" || return 1 return 0 } @@ -5703,10 +5703,10 @@ install_arch_linux_git() { return 1 fi - _POST_NEON_PIP_INSTALL_ARGS="${_POST_NEON_PIP_INSTALL_ARGS} --use-pep517" + _PIP_INSTALL_ARGS="${_PIP_INSTALL_ARGS} --use-pep517" _PIP_DOWNLOAD_ARGS="${_PIP_DOWNLOAD_ARGS} --use-pep517" - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + __install_salt_from_repo "${_PY_EXE}" || return 1 return 0 } @@ -6353,7 +6353,7 @@ install_opensuse_stable() { } install_opensuse_git() { - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + __install_salt_from_repo "${_PY_EXE}" || return 1 return 0 } @@ -6556,7 +6556,7 @@ install_opensuse_15_git() { _PYEXE=python3 fi - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + __install_salt_from_repo "${_PY_EXE}" || return 1 return 0 } @@ -6698,9 +6698,15 @@ __gentoo_pre_dep() { mkdir /etc/portage fi - # Enable Python 3.7 target for Salt Neon using GIT - if [ "${ITYPE}" = "git" ] && [ "${GIT_REV}" = "v3000" ]; then - EXTRA_PYTHON_TARGET=python3_7 + # Enable Python 3.10 target for Salt 3006 or later, otherwise 3.7 as previously, using GIT + if [ "${ITYPE}" = "git" ]; then + GIT_REV_MAJOR=$(echo "${GIT_REV}" | awk -F "." '{print $1}') + if [ "${GIT_REV_MAJOR}" = "v3006" ] || [ "${GIT_REV_MAJOR}" = "v3007" ]; then + EXTRA_PYTHON_TARGET=python3_10 + else + # assume pre-3006, so leave it as Python 3.7 + EXTRA_PYTHON_TARGET=python3_7 + fi fi if [ -n "${EXTRA_PYTHON_TARGET:-}" ]; then @@ -6798,7 +6804,7 @@ install_gentoo_git() { _PYEXE=$(emerge --info | grep -oE 'PYTHON_SINGLE_TARGET="[^"]*"' | sed -e 's/"//g' -e 's/_/./g' | cut -d= -f2) fi - __install_salt_from_repo_post_neon "${_PYEXE}" || return 1 + __install_salt_from_repo "${_PYEXE}" || return 1 return 0 } @@ -7147,7 +7153,7 @@ install_macosx_git() { return 1 fi - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + __install_salt_from_repo "${_PY_EXE}" || return 1 return 0 } From 3e207e087f98ed3a0d9b66c4ca8f553a360dcfc4 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 23 Jul 2024 13:51:53 -0600 Subject: [PATCH 5/7] Added support with -W for installing salt-api --- README.rst | 1 + bootstrap-salt.sh | 64 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 1dd8037d8..b2da28c79 100644 --- a/README.rst +++ b/README.rst @@ -119,6 +119,7 @@ To view the latest options and descriptions for ``salt-bootstrap``, use ``-h`` a -L Also install salt-cloud and required python-libcloud package -M Also install salt-master -S Also install salt-syndic + -W Also install salt-api -N Do not install salt-minion -X Do not start daemons after installation -d Disables checking if Salt services are enabled to start on system boot. diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f14bef493..a2faf6365 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -26,7 +26,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2024.07.18" +__ScriptVersion="2024.07.23" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -228,6 +228,7 @@ _TEMP_KEYS_DIR="null" _SLEEP="${__DEFAULT_SLEEP}" _INSTALL_MASTER=$BS_FALSE _INSTALL_SYNDIC=$BS_FALSE +_INSTALL_SALT_API=$BS_FALSE _INSTALL_MINION=$BS_TRUE _INSTALL_CLOUD=$BS_FALSE _VIRTUALENV_DIR=${BS_VIRTUALENV_DIR:-"null"} @@ -339,7 +340,7 @@ __usage() { step. -c Temporary configuration directory -C Only run the configuration function. Implies -F (forced overwrite). - To overwrite Master or Syndic configs, -M or -S, respectively, must + To overwrite Master, Syndic or Api configs, -M,-S or -W, respectively, must also be specified. Salt installation will be ommitted, but some of the dependencies could be installed to write configuration with -j or -J. -d Disables checking if Salt services are enabled to start on system boot. @@ -397,6 +398,7 @@ __usage() { -s Sleep time used when waiting for daemons to start, restart and when checking for the services running. Default: ${__DEFAULT_SLEEP} -S Also install salt-syndic + -W Also install salt-api -r Disable all repository configuration performed by this script. This option assumes all necessary repository configuration is already present on the system. @@ -411,7 +413,7 @@ __usage() { EOT } # ---------- end of function __usage ---------- -while getopts ':hvnDc:g:Gx:k:s:MSNXCPFUKIA:i:Lp:dH:bflV:J:j:rR:aqQ' opt +while getopts ':hvnDc:g:Gx:k:s:MSWNXCPFUKIA:i:Lp:dH:bflV:J:j:rR:aqQ' opt do case "${opt}" in @@ -431,6 +433,7 @@ do s ) _SLEEP=$OPTARG ;; M ) _INSTALL_MASTER=$BS_TRUE ;; S ) _INSTALL_SYNDIC=$BS_TRUE ;; + W ) _INSTALL_SALT_API=$BS_TRUE ;; N ) _INSTALL_MINION=$BS_FALSE ;; X ) _START_DAEMONS=$BS_FALSE ;; C ) _CONFIG_ONLY=$BS_TRUE ;; @@ -718,7 +721,7 @@ if [ "$($whoami)" != "root" ]; then fi # Check that we're actually installing one of minion/master/syndic -if [ "$_INSTALL_MINION" -eq $BS_FALSE ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then +if [ "$_INSTALL_MINION" -eq $BS_FALSE ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && [ "$_INSTALL_SALT_API" -eq $BS_FALSE ] && [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then echowarn "Nothing to install or configure" exit 1 fi @@ -1767,6 +1770,14 @@ if [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ]; then fi fi +if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + if [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then + echoinfo "Installing salt api" + else + echoinfo "Configuring salt api" + fi +fi + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ] && [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then echoinfo "Installing salt-cloud and required python3-libcloud package" fi @@ -3123,6 +3134,10 @@ install_ubuntu_stable() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 @@ -3174,6 +3189,10 @@ install_ubuntu_onedir() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 @@ -3527,6 +3546,10 @@ install_debian_stable() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 @@ -3598,6 +3621,10 @@ install_debian_onedir() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 @@ -3948,6 +3975,10 @@ install_fedora_onedir() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -4093,6 +4124,10 @@ install_centos_stable() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -4289,6 +4324,10 @@ install_centos_onedir() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -5144,6 +5183,10 @@ install_alpine_linux_stable() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 apk -U add "${__PACKAGES}" || return 1 return 0 @@ -6150,6 +6193,10 @@ install_photon_onedir() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __tdnf_install_noinput ${__PACKAGES} || return 1 @@ -6346,6 +6393,10 @@ install_opensuse_stable() { __PACKAGES="${__PACKAGES} salt-syndic" fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-api" + fi + # shellcheck disable=SC2086 __zypper_install $__PACKAGES || return 1 @@ -7294,8 +7345,11 @@ config_salt() { if [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ] && [ "$_CONFIG_ONLY" -eq $BS_TRUE ]; then OVERWRITE_MASTER_CONFIGS=$BS_TRUE fi + if [ "$_INSTALL_SALT_API" -eq $BS_TRUE ] && [ "$_CONFIG_ONLY" -eq $BS_TRUE ]; then + OVERWRITE_MASTER_CONFIGS=$BS_TRUE + fi - if [ "$_INSTALL_MASTER" -eq $BS_TRUE ] || [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ] || [ "$OVERWRITE_MASTER_CONFIGS" -eq $BS_TRUE ] || [ "$_CUSTOM_MASTER_CONFIG" != "null" ]; then + if [ "$_INSTALL_MASTER" -eq $BS_TRUE ] || [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ] || [ "$_INSTALL_SALT_API" -eq $BS_TRUE ] || [ "$OVERWRITE_MASTER_CONFIGS" -eq $BS_TRUE ] || [ "$_CUSTOM_MASTER_CONFIG" != "null" ]; then # Create the PKI directory [ -d "$_PKI_DIR/master" ] || (mkdir -p "$_PKI_DIR/master" && chmod 700 "$_PKI_DIR/master") || return 1 From 62dc9124012c8da15534cc2eecd6a5afe4b09333 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 23 Jul 2024 14:16:11 -0600 Subject: [PATCH 6/7] Make help output alphabetical for option '-W' --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a2faf6365..c288ec057 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -398,7 +398,6 @@ __usage() { -s Sleep time used when waiting for daemons to start, restart and when checking for the services running. Default: ${__DEFAULT_SLEEP} -S Also install salt-syndic - -W Also install salt-api -r Disable all repository configuration performed by this script. This option assumes all necessary repository configuration is already present on the system. @@ -406,6 +405,7 @@ __usage() { -v Display script version -V Install Salt into virtualenv (only available for Ubuntu based distributions) + -W Also install salt-api -x Changes the Python version used to install Salt (default: Python 3). Python 2.7 is no longer supported. -X Do not start daemons after installation From 7d55680ddda97075b8d3730084ffbb9e2219461e Mon Sep 17 00:00:00 2001 From: Salt Project Packaging Date: Tue, 23 Jul 2024 21:45:31 +0000 Subject: [PATCH 7/7] Update develop branch for the v2024.07.23 release --- CHANGELOG.md | 10 ++++++++++ bootstrap-salt.ps1 | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d64ea0e..a1cb05914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# v2024.07.23 + +## What's Changed + +- Updated link for Supported Operating Systems and Repository supported by Salt by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2010 +- Cleanup use of the term 'Post Neon' given only support 3006 and up by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2011 +- Added support with -W for installing salt-api by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2013 + +**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.07.18...v2024.07.23 + # v2024.07.18 ## What's Changed diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index 7b23126bc..106e75ba3 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -110,7 +110,7 @@ if ($help) { exit 0 } -$__ScriptVersion = "2024.07.18" +$__ScriptVersion = "2024.07.23" $ScriptName = $myInvocation.MyCommand.Name # We'll check for the Version next, because it also has no requirements