Skip to content

Commit 096f111

Browse files
authored
Merge pull request #1281 from Ch3LL/merge_stable
[stable] Merge develop into stable for new release 2018.08.15
2 parents 36f8430 + de93938 commit 096f111

23 files changed

+225
-2164
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44

55
# Pycharm
66
.idea
7+
8+
# test-kitchen
9+
.bundle
10+
Gemfile.lock

.kitchen.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
driver:
3+
name: docker
4+
use_sudo: false
5+
hostname: salt
6+
privileged: true
7+
username: kitchen
8+
cap_add:
9+
- sys_admin
10+
disable_upstart: false
11+
12+
provisioner:
13+
name: salt_solo
14+
salt_install: bootstrap
15+
salt_bootstrap_url: bootstrap-salt.sh
16+
salt_bootstrap_options: -MPfq git %s
17+
install_after_init_environment: true
18+
log_level: info
19+
sudo: true
20+
require_chef: false
21+
formula: tests
22+
state_top:
23+
base:
24+
'*':
25+
- tests.accept_key
26+
27+
platforms:
28+
- name: fedora
29+
driver_config:
30+
image: fedora:latest
31+
run_command: /usr/lib/systemd/systemd
32+
- name: centos-7
33+
driver_config:
34+
run_command: /usr/lib/systemd/systemd
35+
- name: centos-6
36+
driver_config:
37+
run_command: /sbin/init
38+
provision_command:
39+
- yum install -y upstart
40+
provisioner:
41+
salt_bootstrap_options: -MPfq -y -x python2.7 git %s
42+
- name: amazon-1
43+
driver_config:
44+
image: amazonlinux:1
45+
platform: rhel
46+
run_command: /sbin/init
47+
provision_command:
48+
- yum install -y upstart
49+
- name: ubuntu-18.04
50+
driver_config:
51+
run_command: /lib/systemd/systemd
52+
- name: ubuntu-16.04
53+
driver_config:
54+
run_command: /lib/systemd/systemd
55+
- name: ubuntu-14.04
56+
driver_config:
57+
run_command: /sbin/init
58+
provision_command:
59+
- rm -f /sbin/initctl
60+
- dpkg-divert --local --rename --remove /sbin/initctl
61+
- name: debian-8
62+
driver_config:
63+
run_command: /lib/systemd/systemd
64+
provision_command:
65+
- apt-get install -y dbus
66+
- name: debian-9
67+
driver_config:
68+
run_command: /lib/systemd/systemd
69+
- name: arch
70+
driver_config:
71+
image: base/archlinux
72+
run_command: /usr/lib/systemd/systemd
73+
provision_command:
74+
- pacman -Syu --noconfirm systemd
75+
- systemctl enable sshd
76+
- name: opensuse
77+
driver_config:
78+
run_command: /usr/lib/systemd/systemd
79+
provision_command:
80+
- systemctl enable sshd.service
81+
82+
suites:
83+
- name: py2-git-2017.7
84+
provisioner:
85+
salt_version: 2017.7
86+
- name: py2-git-2018.3
87+
provisioner:
88+
salt_version: 2018.3
89+
- name: py2-git-fluorine
90+
provisioner:
91+
salt_version: fluorine
92+
- name: py2-git-develop
93+
provisioner:
94+
salt_version: develop
95+
- name: py2-stable-2017.7
96+
provisioner:
97+
salt_version: 2017.7
98+
salt_bootstrap_options: -MP stable %s
99+
excludes:
100+
- arch
101+
- centos-6
102+
- fedora
103+
- opensuse
104+
- name: py2-stable-2018.3
105+
provisioner:
106+
salt_version: 2018.3
107+
salt_bootstrap_options: -MP stable
108+
excludes:
109+
- centos-6
110+
111+
verifier:
112+
name: shell
113+
remote_exec: false
114+
command: pytest -v tests/integration/

.travis.yml

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,54 @@
1+
language: ruby
2+
3+
services:
4+
- docker
5+
6+
addons:
7+
apt:
8+
packages:
9+
- curl
10+
- git
11+
- shellcheck
12+
- python-pip
13+
14+
rvm:
15+
- ruby
16+
17+
env:
18+
matrix:
19+
- PLATFORM=fedora
20+
- PLATFORM=centos-7
21+
- PLATFORM=centos-6
22+
- PLATFORM=amazon-1
23+
- PLATFORM=ubuntu-1804
24+
- PLATFORM=ubuntu-1604
25+
- PLATFORM=ubuntu-1404
26+
- PLATFORM=debian-8
27+
- PLATFORM=debian-9
28+
- PLATFORM=arch
29+
- PLATFORM=opensuse
30+
31+
matrix:
32+
allow_failures:
33+
- env: PLATFORM=ubuntu-1804
34+
- env: PLATFORM=ubuntu-1604
35+
- env: PLATFORM=debian-8
36+
- env: PLATFORM=debian-9
37+
- env: PLATFORM=centos-6
38+
39+
sudo: true
40+
dist: trusty
41+
142
before_install:
2-
- "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then sudo pip install unittest2; fi"
3-
- sudo pip install --use-mirrors --mirrors=http://g.pypi.python.org/ --mirrors=http://c.pypi.python.org/ --mirrors=http://pypi.crate.io/ unittest-xml-reporting
4-
- sudo apt-get remove -y -o DPkg::Options::=--force-confold --purge libzmq3
5-
- sudo apt-get autoremove -y -o DPkg::Options::=--force-confold --purge
6-
- sudo ls -lah /etc/apt/sources.list.d/
7-
- sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3-source.list
8-
- sudo pip install git+https://github.com/saltstack/salt-testing.git#egg=SaltTesting
43+
- pip install --user -r tests/requirements.txt
944

1045
script:
11-
- BS_ECHO_DEBUG=1 sudo -E python tests/runtests.py -vv
46+
# Check shell scripts
47+
- shellcheck -s sh -f checkstyle bootstrap-salt.sh
48+
# Run test-kitchen with docker driver:
49+
- bundle exec kitchen create -l warn -c 6 "$PLATFORM"
50+
- bundle exec kitchen verify "$PLATFORM"
1251

13-
notifications:
14-
irc:
15-
channels: "irc.freenode.org#salt-devel"
16-
on_success: change
17-
on_failure: change
52+
after_script:
53+
- bundle exec kitchen list $PLATFORM
54+
- bundle exec kitchen destroy "$PLATFORM"

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Version TBD (In Progress on the Develop Branch):
22

3+
Version 2018.08.15:
4+
* Add tests using kitchen-salt #1279
5+
* Add python-futures to Py2 installs #1279
6+
37
Version 2018.08.13:
48
* Fedora Py3 fixes (The-Loeki) #1273
59
* Handle commented lines in the requirements files for pip pkgs (rallytime) #1271

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source "https://rubygems.org"
2+
3+
gem 'kitchen-salt', '~>0.2'
4+
gem 'kitchen-docker', :git => 'https://github.com/test-kitchen/kitchen-docker.git'

README.rst

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

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

31+
- 2018.08.13: ``98284bdc2b5ebaeb619b22090374e42a68e8fdefe6bff1e73bd1760db4407ed0``
3132
- 2018.04.25: ``e2e3397d6642ba6462174b4723f1b30d04229b75efc099a553e15ea727877dfb``
3233
- 2017.12.13: ``c127b3aa4a8422f6b81f5b4a40d31d13cec97bf3a39bca9c11a28f24910a6895``
3334
- 2017.08.17: ``909b4d35696b9867b34b22ef4b60edbc5a0e9f8d1ed8d05f922acb79a02e46e3``

bootstrap-salt.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#======================================================================================================================
1919
set -o nounset # Treat unset variables as an error
2020

21-
__ScriptVersion="2018.08.13"
21+
__ScriptVersion="2018.08.15"
2222
__ScriptName="bootstrap-salt.sh"
2323

2424
__ScriptFullName="$0"
@@ -3140,7 +3140,7 @@ install_debian_8_git_deps() {
31403140

31413141
__PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-crypto python-jinja2"
31423142
__PACKAGES="${__PACKAGES} python-m2crypto python-msgpack python-requests python-systemd"
3143-
__PACKAGES="${__PACKAGES} python-yaml python-zmq"
3143+
__PACKAGES="${__PACKAGES} python-yaml python-zmq python-concurrent.futures"
31443144

31453145
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
31463146
# Install python-libcloud if asked to
@@ -3211,7 +3211,7 @@ install_debian_9_git_deps() {
32113211
PY_PKG_VER=""
32123212

32133213
# These packages are PY2-ONLY
3214-
__PACKAGES="${__PACKAGES} python-backports-abc python-m2crypto"
3214+
__PACKAGES="${__PACKAGES} python-backports-abc python-m2crypto python-concurrent.futures"
32153215
fi
32163216

32173217
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-apt python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
@@ -3429,7 +3429,7 @@ install_fedora_deps() {
34293429
fi
34303430
fi
34313431

3432-
__PACKAGES="${__PACKAGES} dnf-utils libyaml python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
3432+
__PACKAGES="${__PACKAGES} procps-ng dnf-utils libyaml python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
34333433
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq"
34343434

34353435
# shellcheck disable=SC2086
@@ -3800,7 +3800,7 @@ install_centos_git_deps() {
38003800
fi
38013801
fi
38023802

3803-
__PACKAGES="python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
3803+
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
38043804
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests"
38053805
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-zmq"
38063806

@@ -3815,7 +3815,7 @@ install_centos_git_deps() {
38153815

38163816
if [ "${_PY_EXE}" != "" ] && [ "$_PIP_ALLOWED" -eq "$BS_TRUE" ]; then
38173817
# If "-x" is defined, install dependencies with pip based on the Python version given.
3818-
_PIP_PACKAGES="m2crypto jinja2 msgpack-python pycrypto PyYAML tornado<5.0 zmq"
3818+
_PIP_PACKAGES="m2crypto jinja2 msgpack-python pycrypto PyYAML tornado<5.0 zmq futures>=2.0"
38193819

38203820
# install swig and openssl on cent6
38213821
if [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then
@@ -4608,6 +4608,7 @@ _eof
46084608
# which is already installed
46094609
__PACKAGES="m2crypto ${pkg_append}-crypto ${pkg_append}-jinja2 ${pkg_append}-PyYAML"
46104610
__PACKAGES="${__PACKAGES} ${pkg_append}-msgpack ${pkg_append}-requests ${pkg_append}-zmq"
4611+
__PACKAGES="${__PACKAGES} ${pkg_append}-futures"
46114612

46124613
# shellcheck disable=SC2086
46134614
__yum_install_noinput ${__PACKAGES} || return 1
@@ -4627,6 +4628,9 @@ install_amazon_linux_ami_git_deps() {
46274628
PIP_EXE='pip'
46284629
if __check_command_exists python2.7; then
46294630
if ! __check_command_exists pip2.7; then
4631+
if ! __check_command_exists easy_install-2.7; then
4632+
__yum_install_noinput python27-setuptools
4633+
fi
46304634
/usr/bin/easy_install-2.7 pip || return 1
46314635
fi
46324636
PIP_EXE='/usr/local/bin/pip2.7'
@@ -4646,7 +4650,7 @@ install_amazon_linux_ami_git_deps() {
46464650

46474651
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
46484652
__check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud"
4649-
__PACKAGES="${__PACKAGES} python-pip"
4653+
__PACKAGES="${__PACKAGES} python27-pip"
46504654
__PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
46514655
fi
46524656

@@ -4795,7 +4799,7 @@ install_arch_linux_stable() {
47954799
pacman -S --noconfirm --needed bash || return 1
47964800
pacman -Su --noconfirm || return 1
47974801
# We can now resume regular salt update
4798-
pacman -Syu --noconfirm salt || return 1
4802+
pacman -Syu --noconfirm salt python2-futures || return 1
47994803
return 0
48004804
}
48014805

@@ -5649,7 +5653,7 @@ install_opensuse_git_deps() {
56495653

56505654
__git_clone_and_checkout || return 1
56515655

5652-
__PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml"
5656+
__PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml python-futures"
56535657

56545658
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then
56555659
# We're on the develop branch, install whichever tornado is on the requirements file

tests/README.rst

Lines changed: 0 additions & 38 deletions
This file was deleted.

tests/accept_key.sls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
accept_minion_key:
2+
salt.wheel:
3+
- name: key.accept
4+
- match: salt

tests/bootstrap/__init__.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)