Skip to content

Commit 482b205

Browse files
committed
Merge develop into stable for v2023.07.25 release
2 parents 3dcbea6 + ad48035 commit 482b205

4 files changed

Lines changed: 65 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# v2023.07.25
2+
3+
## What's Changed
4+
5+
- fix gpg pub key name for nightly rhel_onedir_repository by @ITJamie in https://github.com/saltstack/salt-bootstrap/pull/1943
6+
- Adding quickstart option by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1945
7+
- fix install_amazon_linux_ami_2_onedir nightly gpg key path by @ITJamie in https://github.com/saltstack/salt-bootstrap/pull/1949
8+
9+
## New Contributors
10+
11+
- @ITJamie made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1943
12+
13+
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2023.06.28...v2023.07.25
14+
115
# v2023.06.28
216

317
## What's Changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file.
3232

3333
The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:
3434

35+
- 2023.06.28: ``f45f5da8abee27ef385131f5cfa9382d3a15863d0a05688a0404d2f057b27776``
3536
- 2023.04.26: ``516fa9cc2e258cb8484ff360b9674b46918f657985c21ca9301e42a3dd263d60``
3637
- 2023.04.21: ``e364428aa7a25f8e2c5e18e36e222351724c6cf35a1d57158f3357cde1e0a0f0``
3738
- 2023.04.06: ``994bf7e8bd92fe6d70d291c7562aff299f5651046b4e76dfa506cee0d9bb0843``

bootstrap-salt.sh

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#======================================================================================================================
2424
set -o nounset # Treat unset variables as an error
2525

26-
__ScriptVersion="2023.06.28"
26+
__ScriptVersion="2023.07.25"
2727
__ScriptName="bootstrap-salt.sh"
2828

2929
__ScriptFullName="$0"
@@ -277,6 +277,8 @@ _MINIMUM_PIP_VERSION="9.0.1"
277277
_MINIMUM_SETUPTOOLS_VERSION="9.1"
278278
_POST_NEON_PIP_INSTALL_ARGS="--prefix=/usr"
279279
_PIP_DOWNLOAD_ARGS=""
280+
_QUICK_START="$BS_FALSE"
281+
_AUTO_ACCEPT_MINION_KEYS="$BS_FALSE"
280282

281283
# Defaults for install arguments
282284
ITYPE="stable"
@@ -395,6 +397,8 @@ __usage() {
395397
resort method. NOTE: This only works for functions which actually
396398
implement pip based installations.
397399
-q Quiet salt installation from git (setup.py install -q)
400+
-Q Quickstart, install the Salt master and the Salt minion.
401+
And automatically accept the minion key.
398402
-R Specify a custom repository URL. Assumes the custom repository URL
399403
points to a repository that mirrors Salt packages located at
400404
repo.saltproject.io. The option passed with -R replaces the
@@ -426,7 +430,7 @@ EOT
426430
} # ---------- end of function __usage ----------
427431

428432

429-
while getopts ':hvnDc:g:Gyx:k:s:MSNXCPFUKIA:i:Lp:dH:bflV:J:j:rR:aq' opt
433+
while getopts ':hvnDc:g:Gyx:k:s:MSNXCPFUKIA:i:Lp:dH:bflV:J:j:rR:aqQ' opt
430434
do
431435
case "${opt}" in
432436

@@ -470,6 +474,7 @@ do
470474
J ) _CUSTOM_MASTER_CONFIG=$OPTARG ;;
471475
j ) _CUSTOM_MINION_CONFIG=$OPTARG ;;
472476
q ) _QUIET_GIT_INSTALLATION=$BS_TRUE ;;
477+
Q ) _QUICK_START=$BS_TRUE ;;
473478
x ) _PY_EXE="$OPTARG" ;;
474479
y ) _INSTALL_PY="$BS_TRUE" ;;
475480

@@ -714,6 +719,31 @@ elif [ "$ITYPE" = "onedir_rc" ]; then
714719
fi
715720
fi
716721

722+
# Doing a quick start, so install master
723+
# set master address to 127.0.0.1
724+
if [ "$_QUICK_START" -eq "$BS_TRUE" ]; then
725+
# make install type is stable
726+
ITYPE="stable"
727+
728+
# make sure the revision is latest
729+
STABLE_REV="latest"
730+
ONEDIR_REV="latest"
731+
732+
# make sure we're installing the master
733+
_INSTALL_MASTER=$BS_TRUE
734+
735+
# override incase install minion
736+
# is set to false
737+
_INSTALL_MINION=$BS_TRUE
738+
739+
# Set master address to loopback IP
740+
_SALT_MASTER_ADDRESS="127.0.0.1"
741+
742+
# Auto accept the minion key
743+
# when the install is done.
744+
_AUTO_ACCEPT_MINION_KEYS=$BS_TRUE
745+
fi
746+
717747
# Check for any unparsed arguments. Should be an error.
718748
if [ "$#" -gt 0 ]; then
719749
__usage
@@ -4670,7 +4700,7 @@ __install_saltstack_rhel_onedir_repository() {
46704700
if [ "${ONEDIR_REV}" = "nightly" ] ; then
46714701
base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/"
46724702
fi
4673-
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ]; then
4703+
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ] || [ "${ONEDIR_REV}" = "nightly" ]; then
46744704
if [ "${DISTRO_MAJOR_VERSION}" -eq 9 ]; then
46754705
gpg_key="SALTSTACK-GPG-KEY2.pub"
46764706
else
@@ -6464,7 +6494,7 @@ install_amazon_linux_ami_2_onedir_deps() {
64646494
base_url="$HTTP_VAL://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/amazon/2/\$basearch/"
64656495
fi
64666496

6467-
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ]; then
6497+
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ] || [ "${ONEDIR_REV}" = "nightly" ]; then
64686498
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub,${base_url}base/RPM-GPG-KEY-CentOS-7"
64696499
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
64706500
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub"
@@ -9698,13 +9728,25 @@ if [ "$DAEMONS_RUNNING_FUNC" != "null" ] && [ ${_START_DAEMONS} -eq $BS_TRUE ];
96989728
fi
96999729
fi
97009730

9731+
if [ "$_AUTO_ACCEPT_MINION_KEYS" -eq "$BS_TRUE" ]; then
9732+
echoinfo "Accepting the Salt Minion Keys"
9733+
salt-key -yA
9734+
fi
9735+
97019736
# Done!
97029737
if [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then
97039738
echoinfo "Salt installed!"
97049739
else
97059740
echoinfo "Salt configured!"
97069741
fi
97079742

9743+
if [ "$_QUICK_START" -eq "$BS_TRUE" ]; then
9744+
echoinfo "Congratulations!"
9745+
echoinfo "A couple of commands to try:"
9746+
echoinfo " salt \* test.ping"
9747+
echoinfo " salt \* test.version"
9748+
fi
9749+
97089750
exit 0
97099751

97109752
# vim: set sts=4 ts=4 et

kitchen.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,10 @@ suites:
397397
- opensuse-tumbleweed
398398
- ubuntu-1804
399399

400+
- name: quickstart
401+
provisioner:
402+
salt_bootstrap_options: -Q
403+
400404
verifier:
401405
name: shell
402406
remote_exec: false

0 commit comments

Comments
 (0)