mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-07 04:51:39 +00:00
Removed support for SLES 12 and updated pre-commit versions
This commit is contained in:
parent
10d602791d
commit
100fab8fbe
11 changed files with 108 additions and 230 deletions
|
@ -2,7 +2,7 @@
|
|||
minimum_pre_commit_version: 1.15.2
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: check-merge-conflict # Check for files that contain merge conflict strings.
|
||||
- id: trailing-whitespace # Trims trailing whitespace.
|
||||
|
@ -12,12 +12,12 @@ repos:
|
|||
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
|
||||
|
||||
- repo: https://github.com/executablebooks/mdformat
|
||||
rev: 0.7.14
|
||||
rev: 0.7.17
|
||||
hooks:
|
||||
- id: mdformat
|
||||
|
||||
- repo: https://github.com/s0undt3ch/python-tools-scripts
|
||||
rev: "0.12.0"
|
||||
rev: "0.18.6"
|
||||
hooks:
|
||||
- id: tools
|
||||
alias: actionlint
|
||||
|
@ -30,7 +30,7 @@ repos:
|
|||
- actionlint
|
||||
|
||||
- repo: https://github.com/jazzband/pip-tools
|
||||
rev: 6.13.0
|
||||
rev: 7.3.0
|
||||
hooks:
|
||||
- id: pip-compile
|
||||
files: ^requirements/release\.(in|txt)$
|
||||
|
@ -38,20 +38,20 @@ repos:
|
|||
- requirements/release.in
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.37.3
|
||||
rev: v3.15.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
name: Rewrite Code to be Py3.9+
|
||||
args: [--py39-plus]
|
||||
|
||||
- repo: https://github.com/asottile/reorder_python_imports
|
||||
rev: v3.8.2
|
||||
rev: v3.12.0
|
||||
hooks:
|
||||
- id: reorder-python-imports
|
||||
args: [--py39-plus]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.6.0
|
||||
rev: 24.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: []
|
||||
|
|
|
@ -54,6 +54,7 @@ Daniel Wallace gtmanfred danielwallace@gtmanfred.com
|
|||
Darko Cerdic darkocerdic
|
||||
Daryl Turner darylturner d.turner@arkadin.com
|
||||
David J. Felix DavidJFelix
|
||||
David Murphy daithi david-dm.murphy@broadcom.com
|
||||
denmat denmat
|
||||
Denys Havrysh vutny denys.gavrysh@gmail.com
|
||||
deployboy deployboy
|
||||
|
|
173
CONTRIBUTING.md
173
CONTRIBUTING.md
|
@ -21,20 +21,20 @@ Please read the following guidelines before you
|
|||
1. **Use the GitHub issue search** -- check if the issue has
|
||||
already been reported. If it has been, please comment on the existing issue.
|
||||
|
||||
2. **Check if the issue has been fixed** -- If you found a possible problem, or bug,
|
||||
1. **Check if the issue has been fixed** -- If you found a possible problem, or bug,
|
||||
please try to bootstrap using the bootstrap scirpt from the develop branch. The
|
||||
issue you are having might have already been fixed and it's just not yet included
|
||||
in the stable release.
|
||||
|
||||
```
|
||||
curl -o bootstrap-salt.sh -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git master
|
||||
```
|
||||
```
|
||||
curl -o bootstrap-salt.sh -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git master
|
||||
```
|
||||
|
||||
3. **Isolate the demonstrable problem** -- make sure that the
|
||||
1. **Isolate the demonstrable problem** -- make sure that the
|
||||
code in the project's repository is *definitely* responsible for the issue.
|
||||
|
||||
4. **Include a reproducible example** -- Provide the steps which
|
||||
1. **Include a reproducible example** -- Provide the steps which
|
||||
led you to the problem.
|
||||
|
||||
Please try to be as detailed as possible in your report. What is your
|
||||
|
@ -163,8 +163,8 @@ The release process consists of the following steps:
|
|||
1. Merge in any outstanding PRs that are ready.
|
||||
1. Add new contributors to the [AUTHORS](https://github.com/saltstack/salt-bootstrap/blob/develop/AUTHORS.rst) file.
|
||||
1. Update the [ChangeLog](https://github.com/saltstack/salt-bootstrap/blob/develop/ChangeLog).
|
||||
1. Update the version number in the bootstrap script. The version number is date-based, `<year.month.day>`.
|
||||
For example, version `2018.08.15` was released on August 15, 2018.
|
||||
1. Update the version number in the bootstrap script. The version number is number-based major version with minor version, `<300X.Y>`.
|
||||
For example, version `3006.6` is major version `3006` and minior version `6`.
|
||||
1. Merge the `develop` branch into the `stable` branch.
|
||||
1. Update `bootstrap.saltproject.io` with the new stable release. The checksum on the
|
||||
[README page](https://github.com/saltstack/salt-bootstrap/blob/develop/README.rst)
|
||||
|
@ -177,83 +177,82 @@ The following operating systems are detected, but Salt and its dependency
|
|||
installation functions are not developed yet:
|
||||
|
||||
- BSD:
|
||||
- NetBSD
|
||||
- NetBSD
|
||||
- Linux:
|
||||
- Slackware
|
||||
- Slackware
|
||||
- SunOS:
|
||||
- OpenIndiana
|
||||
- Oracle Solaris
|
||||
- OmniOS (Illumos)
|
||||
|
||||
- OpenIndiana
|
||||
- Oracle Solaris
|
||||
- OmniOS (Illumos)
|
||||
|
||||
In order to install Salt for a distribution, you need to define the following:
|
||||
|
||||
1. To Install Dependencies, which is required, one of:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_deps
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_deps
|
||||
install_<distro>_<major_version>_deps
|
||||
install_<distro>_<major_version>_<minor_version>_deps
|
||||
install_<distro>_<install_type>_deps
|
||||
install_<distro>_deps
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_deps
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_deps
|
||||
install_<distro>_<major_version>_deps
|
||||
install_<distro>_<major_version>_<minor_version>_deps
|
||||
install_<distro>_<install_type>_deps
|
||||
install_<distro>_deps
|
||||
```
|
||||
|
||||
2. Optionally, define a minion configuration function, which will be called if the
|
||||
``-c`` option is passed. One of:
|
||||
1. Optionally, define a minion configuration function, which will be called if the
|
||||
`-c` option is passed. One of:
|
||||
|
||||
```
|
||||
config_<distro>_<major_version>_<install_type>_salt
|
||||
config_<distro>_<major_version>_<minor_version>_<install_type>_salt
|
||||
config_<distro>_<major_version>_salt
|
||||
config_<distro>_<major_version>_<minor_version>_salt
|
||||
config_<distro>_<install_type>_salt
|
||||
config_<distro>_salt
|
||||
config_salt (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
```
|
||||
config_<distro>_<major_version>_<install_type>_salt
|
||||
config_<distro>_<major_version>_<minor_version>_<install_type>_salt
|
||||
config_<distro>_<major_version>_salt
|
||||
config_<distro>_<major_version>_<minor_version>_salt
|
||||
config_<distro>_<install_type>_salt
|
||||
config_<distro>_salt
|
||||
config_salt (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
|
||||
3. Optionally, define a Salt master pre-seed function, which will be called if the
|
||||
``-k`` (pre-seed master keys) option is passed. One of:
|
||||
1. Optionally, define a Salt master pre-seed function, which will be called if the
|
||||
`-k` (pre-seed master keys) option is passed. One of:
|
||||
|
||||
```
|
||||
preseed_<distro>_<major_version>_<install_type>_master
|
||||
preseed_<distro>_<major_version>_<minor_version>_<install_type>_master
|
||||
preseed_<distro>_<major_version>_master
|
||||
preseed_<distro>_<major_version>_<minor_version>_master
|
||||
preseed_<distro>_<install_type>_master
|
||||
preseed_<distro>_master
|
||||
preseed_master (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
```
|
||||
preseed_<distro>_<major_version>_<install_type>_master
|
||||
preseed_<distro>_<major_version>_<minor_version>_<install_type>_master
|
||||
preseed_<distro>_<major_version>_master
|
||||
preseed_<distro>_<major_version>_<minor_version>_master
|
||||
preseed_<distro>_<install_type>_master
|
||||
preseed_<distro>_master
|
||||
preseed_master (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
|
||||
4. To install salt, which, of course, is required, one of:
|
||||
1. To install salt, which, of course, is required, one of:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>
|
||||
install_<distro>_<install_type>
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>
|
||||
install_<distro>_<install_type>
|
||||
```
|
||||
|
||||
5. Optionally, define a post install function, one of:
|
||||
1. Optionally, define a post install function, one of:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_post
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_post
|
||||
install_<distro>_<major_version>_post
|
||||
install_<distro>_<major_version>_<minor_version>_post
|
||||
install_<distro>_<install_type>_post
|
||||
install_<distro>_post
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_post
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_post
|
||||
install_<distro>_<major_version>_post
|
||||
install_<distro>_<major_version>_<minor_version>_post
|
||||
install_<distro>_<install_type>_post
|
||||
install_<distro>_post
|
||||
```
|
||||
|
||||
6. Optionally, define a start daemons function, one of:
|
||||
1. Optionally, define a start daemons function, one of:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_restart_daemons
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_restart_daemons
|
||||
install_<distro>_<major_version>_restart_daemons
|
||||
install_<distro>_<major_version>_<minor_version>_restart_daemons
|
||||
install_<distro>_<install_type>_restart_daemons
|
||||
install_<distro>_restart_daemons
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_restart_daemons
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_restart_daemons
|
||||
install_<distro>_<major_version>_restart_daemons
|
||||
install_<distro>_<major_version>_<minor_version>_restart_daemons
|
||||
install_<distro>_<install_type>_restart_daemons
|
||||
install_<distro>_restart_daemons
|
||||
```
|
||||
|
||||
**NOTE**
|
||||
|
||||
|
@ -262,26 +261,26 @@ start if they're not running.
|
|||
|
||||
7. Optionally, define a daemons running function, one of:
|
||||
|
||||
```
|
||||
daemons_running_<distro>_<major_version>_<install_type>
|
||||
daemons_running_<distro>_<major_version>_<minor_version>_<install_type>
|
||||
daemons_running_<distro>_<major_version>
|
||||
daemons_running_<distro>_<major_version>_<minor_version>
|
||||
daemons_running_<distro>_<install_type>
|
||||
daemons_running_<distro>
|
||||
daemons_running (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
```
|
||||
daemons_running_<distro>_<major_version>_<install_type>
|
||||
daemons_running_<distro>_<major_version>_<minor_version>_<install_type>
|
||||
daemons_running_<distro>_<major_version>
|
||||
daemons_running_<distro>_<major_version>_<minor_version>
|
||||
daemons_running_<distro>_<install_type>
|
||||
daemons_running_<distro>
|
||||
daemons_running (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
|
||||
8. Optionally, check enabled Services:
|
||||
1. Optionally, check enabled Services:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_check_services
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_check_services
|
||||
install_<distro>_<major_version>_check_services
|
||||
install_<distro>_<major_version>_<minor_version>_check_services
|
||||
install_<distro>_<install_type>_check_services
|
||||
install_<distro>_check_services
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_check_services
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_check_services
|
||||
install_<distro>_<major_version>_check_services
|
||||
install_<distro>_<major_version>_<minor_version>_check_services
|
||||
install_<distro>_<install_type>_check_services
|
||||
install_<distro>_check_services
|
||||
```
|
||||
|
||||
**NOTE**
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ubuntu-upstart:14.04
|
||||
FROM ubuntu:20.04
|
||||
MAINTAINER "SaltStack Team"
|
||||
|
||||
# Bootstrap script options: install Salt Master by default
|
||||
|
|
2
Vagrantfile
vendored
2
Vagrantfile
vendored
|
@ -10,7 +10,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
# please see the online documentation at vagrantup.com.
|
||||
|
||||
# Every Vagrant virtual environment requires a box to build off of.
|
||||
config.vm.box = "ubuntu/xenial64"
|
||||
config.vm.box = "ubuntu/focal64"
|
||||
|
||||
# The url from where the 'config.vm.box' box will be fetched if it
|
||||
# doesn't already exist on the user's system.
|
||||
|
|
|
@ -7426,128 +7426,6 @@ install_suse_15_restart_daemons() {
|
|||
#
|
||||
#######################################################################################################################
|
||||
|
||||
#######################################################################################################################
|
||||
#
|
||||
# SUSE Enterprise 12
|
||||
#
|
||||
|
||||
install_suse_12_stable_deps() {
|
||||
__opensuse_prep_install || return 1
|
||||
|
||||
|
||||
## TBD DGM Suse 12 appears to be Python 2 - what to do here
|
||||
|
||||
# YAML module is used for generating custom master/minion configs
|
||||
# requests is still used by many salt modules
|
||||
# Salt needs python-zypp installed in order to use the zypper module
|
||||
__PACKAGES="python-PyYAML python-requests python-zypp"
|
||||
|
||||
if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then
|
||||
__PACKAGES="${__PACKAGES} python-apache-libcloud"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086,SC2090
|
||||
__zypper_install "${__PACKAGES}" || return 1
|
||||
|
||||
# SLES 11 SP3 ships with both python-M2Crypto-0.22.* and python-m2crypto-0.21 and we will be asked which
|
||||
# we want to install, even with --non-interactive.
|
||||
# Let's try to install the higher version first and then the lower one in case of failure
|
||||
|
||||
## TBD DGM what to do about these
|
||||
## DGM __zypper_install 'python-M2Crypto>=0.22' || __zypper_install 'python-M2Crypto>=0.21' || return 1
|
||||
|
||||
if [ "${_EXTRA_PACKAGES}" != "" ]; then
|
||||
echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}"
|
||||
# shellcheck disable=SC2086
|
||||
__zypper_install "${_EXTRA_PACKAGES}" || return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_git_deps() {
|
||||
install_suse_12_stable_deps || return 1
|
||||
|
||||
if ! __check_command_exists git; then
|
||||
__zypper_install git-core || return 1
|
||||
fi
|
||||
|
||||
__git_clone_and_checkout || return 1
|
||||
|
||||
__PACKAGES=""
|
||||
# shellcheck disable=SC2089
|
||||
__PACKAGES="${__PACKAGES} libzmq4 python-Jinja2 python-msgpack-python python-pycrypto"
|
||||
__PACKAGES="${__PACKAGES} python-pyzmq python-xml"
|
||||
|
||||
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then
|
||||
# We're on the master branch, install whichever tornado is on the requirements file
|
||||
__REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
|
||||
if [ "${__REQUIRED_TORNADO}" != "" ]; then
|
||||
__PACKAGES="${__PACKAGES} python-tornado"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then
|
||||
__PACKAGES="${__PACKAGES} python-apache-libcloud"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
__zypper_install "${__PACKAGES}" || return 1
|
||||
|
||||
# Let's trigger config_salt()
|
||||
if [ "$_TEMP_CONFIG_DIR" = "null" ]; then
|
||||
_TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/"
|
||||
CONFIG_SALT_FUNC="config_salt"
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_onedir_deps() {
|
||||
install_suse_12_stable_deps || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_stable() {
|
||||
install_opensuse_stable || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_git() {
|
||||
install_opensuse_git || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_onedir() {
|
||||
install_opensuse_stable || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_stable_post() {
|
||||
install_opensuse_stable_post || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_git_post() {
|
||||
install_opensuse_git_post || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_onedir_post() {
|
||||
install_opensuse_stable_post || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_suse_12_restart_daemons() {
|
||||
install_opensuse_restart_daemons || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# End of SUSE Enterprise 12
|
||||
#
|
||||
#######################################################################################################################
|
||||
|
||||
|
||||
#######################################################################################################################
|
||||
#
|
||||
|
|
|
@ -14,6 +14,7 @@ provisioner:
|
|||
|
||||
platforms:
|
||||
- name: macos-12
|
||||
- name: macos-13
|
||||
|
||||
suites:
|
||||
- name: stable-3006
|
||||
|
|
|
@ -138,17 +138,17 @@ platforms:
|
|||
- name: ubuntu-20.04
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: photon-3
|
||||
- name: photon-4
|
||||
driver:
|
||||
image: photon:3.0
|
||||
image: photon:4.0
|
||||
provision_command:
|
||||
- tdnf -y install rpm procps-ng coreutils gawk
|
||||
- echo "PubkeyAcceptedKeyTypes +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- sed -ie 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
- systemctl enable sshd.service
|
||||
- name: photon-4
|
||||
- name: photon-5
|
||||
driver:
|
||||
image: photon:4.0
|
||||
image: photon:5.0
|
||||
provision_command:
|
||||
- tdnf -y install rpm procps-ng coreutils gawk
|
||||
- echo "PubkeyAcceptedKeyTypes +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
|
@ -252,7 +252,6 @@ suites:
|
|||
- openbsd-6
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- ubuntu-1804
|
||||
|
||||
- name: quickstart
|
||||
provisioner:
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
pre-commit
|
||||
python-tools-scripts >= 0.12.0
|
||||
python-tools-scripts >= 0.18.6
|
||||
boto3
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# This file is autogenerated by pip-compile with Python 3.10
|
||||
# by the following command:
|
||||
#
|
||||
# pip-compile '.\requirements\release.in'
|
||||
# pip-compile requirements/release.in
|
||||
#
|
||||
attrs==23.1.0
|
||||
# via python-tools-scripts
|
||||
boto3==1.28.79
|
||||
# via -r .\requirements\release.in
|
||||
# via -r requirements/release.in
|
||||
botocore==1.31.79
|
||||
# via
|
||||
# boto3
|
||||
|
@ -39,13 +39,13 @@ nodeenv==1.8.0
|
|||
platformdirs==3.11.0
|
||||
# via virtualenv
|
||||
pre-commit==3.5.0
|
||||
# via -r .\requirements\release.in
|
||||
# via -r requirements/release.in
|
||||
pygments==2.16.1
|
||||
# via rich
|
||||
python-dateutil==2.8.2
|
||||
# via botocore
|
||||
python-tools-scripts==0.18.1
|
||||
# via -r .\requirements\release.in
|
||||
python-tools-scripts==0.18.6
|
||||
# via -r requirements/release.in
|
||||
pyyaml==6.0.1
|
||||
# via pre-commit
|
||||
requests==2.31.0
|
||||
|
|
|
@ -47,7 +47,7 @@ def target_python_version():
|
|||
|
||||
@pytest.fixture(scope="session")
|
||||
def target_salt_version():
|
||||
bootstrap_types = ("git", "stable", "old", "stable", "onedir", "onedir_rc")
|
||||
bootstrap_types = ("git", "stable", "onedir", "onedir_rc")
|
||||
|
||||
# filter out any bootstrap types and then join
|
||||
target_salt = ".".join(
|
||||
|
|
Loading…
Add table
Reference in a new issue