Skip to content

Commit

Permalink
Merge develop into stable for v2023.07.25 release
Browse files Browse the repository at this point in the history
  • Loading branch information
saltbot-open committed Jul 25, 2023
2 parents 3dcbea6 + ad48035 commit 482b205
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
50 changes: 46 additions & 4 deletions bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -395,6 +397,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
Expand Down Expand Up @@ -426,7 +430,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

Expand Down Expand Up @@ -470,6 +474,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" ;;

Expand Down Expand Up @@ -714,6 +719,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
Expand Down Expand Up @@ -4670,7 +4700,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
Expand Down Expand Up @@ -6464,7 +6494,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"
Expand Down Expand Up @@ -9698,13 +9728,25 @@ 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!"
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
4 changes: 4 additions & 0 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ suites:
- opensuse-tumbleweed
- ubuntu-1804

- name: quickstart
provisioner:
salt_bootstrap_options: -Q

verifier:
name: shell
remote_exec: false
Expand Down

0 comments on commit 482b205

Please sign in to comment.