From a336478623befc8b22499ab00c724358723be9e6 Mon Sep 17 00:00:00 2001 From: ScriptAutomate Date: Tue, 26 Nov 2024 10:16:06 -0600 Subject: [PATCH] Update README script help output and scriptversions --- README.rst | 169 ++++++++++++++++++++++++--------------------- bootstrap-salt.ps1 | 2 +- bootstrap-salt.sh | 2 +- 3 files changed, 92 insertions(+), 81 deletions(-) diff --git a/README.rst b/README.rst index 929d93315..db15cc47a 100644 --- a/README.rst +++ b/README.rst @@ -84,112 +84,123 @@ To view the latest options and descriptions for ``salt-bootstrap``, use ``-h`` a Usage : bootstrap-salt.sh [options] [install-type-args] Installation types: - - stable Install latest stable release. This is the default - install type - - stable [branch] Install latest version on a branch. Only supported - for packages available at packages.broadcom.com - - stable [version] Install a specific version. Only supported for - packages available at packages.broadcom.com - To pin a 3xxx minor version, specify it as 3xxx.0 - - testing RHEL-family specific: configure EPEL testing repo - - git Install from the head of the master branch - - git [ref] Install from any git ref (such as a branch, tag, or - commit) + - stable Install latest stable release. This is the default + install type + - stable [branch] Install latest version on a branch. Only supported + for packages available at packages.broadcom.com + - stable [version] Install a specific version. Only supported for + packages available at packages.broadcom.com + To pin a 3xxx minor version, specify it as 3xxx.0 + - testing RHEL-family specific: configure EPEL testing repo + - git Install from the head of the master branch + - git [ref] Install from any git ref (such as a branch, tag, or + commit) + - onedir Install latest onedir release. + - onedir [version] Install a specific version. Only supported for + onedir packages available at packages.broadcom.com + + - onedir_rc Install latest onedir RC release. + - onedir_rc [version] Install a specific version. Only supported for + onedir RC packages available at packages.broadcom.com Examples: - bootstrap-salt.sh - bootstrap-salt.sh stable - - bootstrap-salt.sh stable 3006.7 - - bootstrap-salt.sh stable v3006.8 + - bootstrap-salt.sh stable 3006 + - bootstrap-salt.sh stable 3006.1 - bootstrap-salt.sh testing - bootstrap-salt.sh git + - bootstrap-salt.sh git 3006.7 + - bootstrap-salt.sh git v3006.8 - bootstrap-salt.sh git 3007.1 - bootstrap-salt.sh git v3007.1 - bootstrap-salt.sh git 06f249901a2e2f1ed310d58ea3921a129f214358 + - bootstrap-salt.sh onedir + - bootstrap-salt.sh onedir 3006 + - bootstrap-salt.sh onedir_rc + - bootstrap-salt.sh onedir_rc 3008 + Options: - -h Display this message - -v Display script version - -n No colours - -D Show debug output + -a Pip install all Python pkg dependencies for Salt. Requires -V to install + all pip pkgs into the virtualenv. + (Only available for Ubuntu based distributions) + -A Pass the salt-master DNS name or IP. This will be stored under + \${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf + -b Assume that dependencies are already installed and software sources are + set up. If git is selected, git tree is still checked out as dependency + step. -c Temporary configuration directory - -g Salt Git repository URL. Default: https://github.com/saltstack/salt.git - -w Install packages from downstream package repository rather than - upstream, saltstack package repository. This is currently only - implemented for SUSE. - -k Temporary directory holding the minion keys which will pre-seed - the master. - -s Sleep time used when waiting for daemons to start, restart and when - checking for the services running. Default: 3 - -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 + -C Only run the configuration function. Implies -F (forced overwrite). + 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. You can also do this by touching /tmp/disable_salt_checks on the target - host. Default: ${BS_FALSE} - -P Allow pip based installations. On some distributions the required salt - packages or its dependencies are not available as a package for that - distribution. Using this flag allows the script to use pip as a last - resort method. NOTE: This only works for functions which actually - implement pip based installations. - -U If set, fully upgrade the system prior to bootstrapping Salt + host. Default: \${BS_FALSE} + -D Show debug output + -f Force shallow cloning for git installations. + This may result in an "n/a" in the version number. + -F Allow copied files to overwrite existing (config, init.d, etc) + -g Salt Git repository URL. Default: https://github.com/saltstack/salt.git + -h Display this message + -H Use the specified HTTP proxy for all download URLs (including https://). + For example: http://myproxy.example.com:3128 + -i Pass the salt-minion id. This will be stored under + \${BS_SALT_ETC_DIR}/minion_id -I If set, allow insecure connections while downloading any files. For example, pass '--no-check-certificate' to 'wget' or '--insecure' to 'curl'. On Debian and Ubuntu, using this option with -U allows obtaining GnuPG archive keys insecurely if distro has changed release signatures. - -F Allow copied files to overwrite existing (config, init.d, etc) - -K If set, keep the temporary files in the temporary directories specified - with -c and -k - -C Only run the configuration function. Implies -F (forced overwrite). - To overwrite Master or Syndic configs, -M or -S, 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. - -A Pass the salt-master DNS name or IP. This will be stored under - ${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf - -i Pass the salt-minion id. This will be stored under - ${BS_SALT_ETC_DIR}/minion_id - -p Extra-package to install while installing Salt dependencies. One package - per -p flag. You are responsible for providing the proper package name. - -H Use the specified HTTP proxy for all download URLs (including https://). - For example: http://myproxy.example.com:3128 - -b Assume that dependencies are already installed and software sources are - set up. If git is selected, git tree is still checked out as dependency - step. - -f Force shallow cloning for git installations. - This may result in an "n/a" in the version number. - -l Disable ssl checks. When passed, switches "https" calls to "http" where - possible. - -V Install Salt into virtualenv - (only available for Ubuntu based distributions) - -a Pip install all Python pkg dependencies for Salt. Requires -V to install - all pip pkgs into the virtualenv. - (Only available for Ubuntu based distributions) - -r Disable all repository configuration performed by this script. This - option assumes all necessary repository configuration is already present - on the system. - -R Specify a custom repository URL. Assumes the custom repository URL - points to a repository that mirrors Salt packages located at - packages.broadcom.com. The option passed with -R replaces the - "packages.broadcom.com". If -R is passed, -r is also set. Currently only - works on CentOS/RHEL and Debian based distributions. - -J Replace the Master config file with data passed in as a JSON string. If - a Master config file is found, a reasonable effort will be made to save + -j Replace the Minion config file with data passed in as a JSON string. If + a Minion config file is found, a reasonable effort will be made to save the file with a ".bak" extension. If used in conjunction with -C or -F, no ".bak" file will be created as either of those options will force a complete overwrite of the file. - -j Replace the Minion config file with data passed in as a JSON string. If - a Minion config file is found, a reasonable effort will be made to save + -J Replace the Master config file with data passed in as a JSON string. If + a Master config file is found, a reasonable effort will be made to save the file with a ".bak" extension. If used in conjunction with -C or -F, no ".bak" file will be created as either of those options will force a complete overwrite of the file. + -k Temporary directory holding the minion keys which will pre-seed + the master. + -K If set, keep the temporary files in the temporary directories specified + with -c and -k + -l Disable ssl checks. When passed, switches "https" calls to "http" where + possible. + -L Also install salt-cloud and required python-libcloud package + -M Also install salt-master + -n No colours + -N Do not install salt-minion + -p Extra-package to install while installing Salt dependencies. One package + per -p flag. You are responsible for providing the proper package name. + -P Allow pip based installations. On some distributions the required salt + packages or its dependencies are not available as a package for that + distribution. Using this flag allows the script to use pip as a last + resort method. NOTE: This only works for functions which actually + implement pip based installations. -q Quiet salt installation from git (setup.py install -q) - -x Changes the Python version used to install Salt (default: Python 3) - Python 2.7 is not longer supported. -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 + packages.broadcom.com. The option passed with -R replaces the + "packages.broadcom.com". If -R is passed, -r is also set. Currently only + works on CentOS/RHEL and Debian based distributions and macOS. + -s Sleep time used when waiting for daemons to start, restart and when + checking for the services running. Default: 3 + -S Also install salt-syndic + -r Disable all repository configuration performed by this script. This + option assumes all necessary repository configuration is already present + on the system. + -U If set, fully upgrade the system prior to bootstrapping Salt + -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 The Salt Bootstrap script has a wide variety of options that can be passed as well as several ways of obtaining the bootstrap script itself. Note that the use of ``sudo`` diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index fd665c902..cd70eebad 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -108,7 +108,7 @@ if ($help) { exit 0 } -$__ScriptVersion = "2024.11.21" +$__ScriptVersion = "2024.11.26" $ScriptName = $myInvocation.MyCommand.Name # We'll check for the Version next, because it also has no requirements diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 314d2de5e..ea0f9f391 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -26,7 +26,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2024.11.25" +__ScriptVersion="2024.11.26" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0"