diff --git a/.drone.jsonnet b/.drone.jsonnet index a3dafff..40f1c94 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -27,9 +27,10 @@ local distros = [ { name: 'CentOS 7', slug: 'centos-7', multiplier: 4, depends: [] }, { name: 'CentOS 8', slug: 'centos-8', multiplier: 5, depends: [] }, { name: 'Debian 8', slug: 'debian-8', multiplier: 6, depends: [] }, - { name: 'Debian 9', slug: 'debian-9', multiplier: 5, depends: [] }, - { name: 'Debian 10', slug: 'debian-10', multiplier: 4, depends: [] }, - { name: 'Fedora 30', slug: 'fedora-30', multiplier: 3, depends: [] }, + { name: 'Debian 9', slug: 'debian-9', multiplier: 7, depends: [] }, + { name: 'Debian 10', slug: 'debian-10', multiplier: 5, depends: [] }, + { name: 'Fedora 30', slug: 'fedora-30', multiplier: 4, depends: [] }, + { name: 'Fedora 31', slug: 'fedora-31', multiplier: 3, depends: [] }, { name: 'Opensuse 15.1', slug: 'opensuse-15', multiplier: 2, depends: [] }, { name: 'Ubuntu 16.04', slug: 'ubuntu-1604', multiplier: 1, depends: [] }, { name: 'Ubuntu 18.04', slug: 'ubuntu-1804', multiplier: 0, depends: [] }, @@ -59,11 +60,14 @@ local py3_distros = [ 'ubuntu-1604', 'ubuntu-1804', 'fedora-30', + 'fedora-31', ]; local py2_blacklist = [ 'centos-8', 'debian-10', + 'fedora-30', + 'fedora-31', ]; local blacklist_2018 = [ diff --git a/.drone.yml b/.drone.yml index 20eddb9..ee3cba3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -628,7 +628,7 @@ steps: - name: throttle-build image: alpine commands: - - sh -c 't=240; echo Sleeping 240 seconds; sleep 240' + - sh -c 't=336; echo Sleeping 336 seconds; sleep 336' - name: create image: saltstack/drone-salt-bootstrap-testing @@ -772,7 +772,7 @@ steps: - name: throttle-build image: alpine commands: - - sh -c 't=48; echo Sleeping 48 seconds; sleep 48' + - sh -c 't=60; echo Sleeping 60 seconds; sleep 60' - name: create image: saltstack/drone-salt-bootstrap-testing @@ -838,7 +838,7 @@ steps: - name: throttle-build image: alpine commands: - - sh -c 't=144; echo Sleeping 144 seconds; sleep 144' + - sh -c 't=96; echo Sleeping 96 seconds; sleep 96' - name: create image: saltstack/drone-salt-bootstrap-testing @@ -853,58 +853,6 @@ steps: depends_on: - throttle-build -- name: Py2 2018.3(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2018-3-fedora-30 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - -- name: Py2 2019.2(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2019-2-fedora-30 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - -- name: Py2 2018.3(Stable) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-stable-2018-3-fedora-30 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - -- name: Py2 2019.2(Stable) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-stable-2019-2-fedora-30 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py3 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -970,6 +918,72 @@ node: depends_on: - Lint +--- +kind: pipeline +name: Fedora 31 + +platform: + os: linux + arch: amd64 + +steps: +- name: throttle-build + image: alpine + commands: + - sh -c 't=36; echo Sleeping 36 seconds; sleep 36' + +- name: create + image: saltstack/drone-salt-bootstrap-testing + commands: + - bundle install --with docker --without opennebula ec2 windows vagrant + - echo 'Waiting for docker to start' + - sleep 20 + - docker ps -a + - bundle exec kitchen create fedora-31 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + +- name: Py3 2018.3(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2018-3-fedora-31 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2019-2-fedora-31 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +services: +- name: docker + image: saltstack/drone-salt-bootstrap-testing + command: + - --storage-driver=overlay2 + privileged: true + +node: + project: open + +depends_on: +- Lint + --- kind: pipeline name: Opensuse 15.1 @@ -1326,6 +1340,6 @@ depends_on: --- kind: signature -hmac: 9c01a5f3f8d8fe0b09aad2cc73976678a432edf3c81aafdff0d17e52ce4cc7f8 +hmac: 08cacaea37ae92bd156f41af4af3c80da1f2aa535bc41a9efe2f2922c7b51e99 ... diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index ed6b914..c92f9cf 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -41,12 +41,13 @@ jobs: - uses: actions/checkout@v1 - name: ShellCheck run: | - shellcheck -s sh -f checkstyle bootstrap-salt.sh + shellcheck -s sh -f tty bootstrap-salt.sh py2-stable-2019-2-amazon-2: name: Amazon 2 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -92,6 +93,7 @@ jobs: py2-git-2019-2-amazon-2: name: Amazon 2 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -137,6 +139,7 @@ jobs: py3-stable-2019-2-amazon-2: name: Amazon 2 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -182,6 +185,7 @@ jobs: py3-git-2019-2-amazon-2: name: Amazon 2 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -227,6 +231,7 @@ jobs: py2-git-3000-amazon-2: name: Amazon 2 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -272,6 +277,7 @@ jobs: py3-git-3000-amazon-2: name: Amazon 2 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -314,9 +320,102 @@ jobs: bundle exec kitchen destroy py3-git-3000-amazon-2 + py2-git-master-amazon-2: + name: Amazon 2 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-amazon-2 || bundle exec kitchen create py2-git-master-amazon-2 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-amazon-2 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-amazon-2 + + + py3-git-master-amazon-2: + name: Amazon 2 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-amazon-2 || bundle exec kitchen create py3-git-master-amazon-2 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-amazon-2 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-amazon-2 + + latest-amazon-2: name: Amazon 2 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -362,6 +461,7 @@ jobs: py2-git-2018-3-arch: name: Arch v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -404,54 +504,10 @@ jobs: bundle exec kitchen destroy py2-git-2018-3-arch - py3-git-2018-3-arch: - name: Arch v2018.3 Py3 Git - runs-on: ubuntu-latest - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-2018-3-arch || bundle exec kitchen create py3-git-2018-3-arch - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-2018-3-arch - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-2018-3-arch - - py2-git-2019-2-arch: name: Arch v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -494,54 +550,10 @@ jobs: bundle exec kitchen destroy py2-git-2019-2-arch - py3-git-2019-2-arch: - name: Arch v2019.2 Py3 Git - runs-on: ubuntu-latest - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-2019-2-arch || bundle exec kitchen create py3-git-2019-2-arch - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-2019-2-arch - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-2019-2-arch - - py2-git-3000-arch: name: Arch v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -584,9 +596,10 @@ jobs: bundle exec kitchen destroy py2-git-3000-arch - py3-git-3000-arch: - name: Arch v3000 Py3 Git + py2-git-master-arch: + name: Arch Master Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -617,21 +630,22 @@ jobs: - name: Create Test Container run: | - bundle exec kitchen create py3-git-3000-arch || bundle exec kitchen create py3-git-3000-arch + bundle exec kitchen create py2-git-master-arch || bundle exec kitchen create py2-git-master-arch - name: Test Bootstrap In Test Container run: | - bundle exec kitchen verify py3-git-3000-arch + bundle exec kitchen verify py2-git-master-arch - name: Destroy Test Container if: always() run: | - bundle exec kitchen destroy py3-git-3000-arch + bundle exec kitchen destroy py2-git-master-arch py2-stable-2018-3-centos-6: name: CentOS 6 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -677,6 +691,7 @@ jobs: py2-git-2018-3-centos-6: name: CentOS 6 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -722,6 +737,7 @@ jobs: py2-stable-2019-2-centos-6: name: CentOS 6 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -767,6 +783,7 @@ jobs: py2-git-2019-2-centos-6: name: CentOS 6 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -812,6 +829,7 @@ jobs: py2-git-3000-centos-6: name: CentOS 6 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -854,9 +872,56 @@ jobs: bundle exec kitchen destroy py2-git-3000-centos-6 + py2-git-master-centos-6: + name: CentOS 6 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-centos-6 || bundle exec kitchen create py2-git-master-centos-6 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-centos-6 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-centos-6 + + latest-centos-6: name: CentOS 6 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -902,6 +967,7 @@ jobs: py2-stable-2018-3-centos-7: name: CentOS 7 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -947,6 +1013,7 @@ jobs: py2-git-2018-3-centos-7: name: CentOS 7 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -992,6 +1059,7 @@ jobs: py3-stable-2018-3-centos-7: name: CentOS 7 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1037,6 +1105,7 @@ jobs: py3-git-2018-3-centos-7: name: CentOS 7 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1082,6 +1151,7 @@ jobs: py2-stable-2019-2-centos-7: name: CentOS 7 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1127,6 +1197,7 @@ jobs: py2-git-2019-2-centos-7: name: CentOS 7 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1172,6 +1243,7 @@ jobs: py3-stable-2019-2-centos-7: name: CentOS 7 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1217,6 +1289,7 @@ jobs: py3-git-2019-2-centos-7: name: CentOS 7 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1262,6 +1335,7 @@ jobs: py2-git-3000-centos-7: name: CentOS 7 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1307,6 +1381,7 @@ jobs: py3-git-3000-centos-7: name: CentOS 7 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1349,9 +1424,102 @@ jobs: bundle exec kitchen destroy py3-git-3000-centos-7 + py2-git-master-centos-7: + name: CentOS 7 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-centos-7 || bundle exec kitchen create py2-git-master-centos-7 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-centos-7 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-centos-7 + + + py3-git-master-centos-7: + name: CentOS 7 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-centos-7 || bundle exec kitchen create py3-git-master-centos-7 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-centos-7 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-centos-7 + + latest-centos-7: name: CentOS 7 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1397,6 +1565,7 @@ jobs: py3-stable-2019-2-centos-8: name: CentOS 8 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1442,6 +1611,7 @@ jobs: py3-git-2019-2-centos-8: name: CentOS 8 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1487,6 +1657,7 @@ jobs: py3-git-3000-centos-8: name: CentOS 8 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1529,9 +1700,56 @@ jobs: bundle exec kitchen destroy py3-git-3000-centos-8 + py3-git-master-centos-8: + name: CentOS 8 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-centos-8 || bundle exec kitchen create py3-git-master-centos-8 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-centos-8 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-centos-8 + + py3-stable-2019-2-debian-10: name: Debian 10 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1577,6 +1795,7 @@ jobs: py3-git-2019-2-debian-10: name: Debian 10 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1622,6 +1841,7 @@ jobs: py3-git-3000-debian-10: name: Debian 10 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1664,9 +1884,56 @@ jobs: bundle exec kitchen destroy py3-git-3000-debian-10 + py3-git-master-debian-10: + name: Debian 10 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-debian-10 || bundle exec kitchen create py3-git-master-debian-10 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-debian-10 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-debian-10 + + py2-stable-2018-3-debian-8: name: Debian 8 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1712,6 +1979,7 @@ jobs: py2-git-2018-3-debian-8: name: Debian 8 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1757,6 +2025,7 @@ jobs: py2-stable-2019-2-debian-8: name: Debian 8 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1802,6 +2071,7 @@ jobs: py2-git-2019-2-debian-8: name: Debian 8 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1847,6 +2117,7 @@ jobs: py2-git-3000-debian-8: name: Debian 8 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1889,9 +2160,56 @@ jobs: bundle exec kitchen destroy py2-git-3000-debian-8 + py2-git-master-debian-8: + name: Debian 8 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-debian-8 || bundle exec kitchen create py2-git-master-debian-8 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-debian-8 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-debian-8 + + latest-debian-8: name: Debian 8 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1937,6 +2255,7 @@ jobs: py2-stable-2018-3-debian-9: name: Debian 9 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1982,6 +2301,7 @@ jobs: py2-git-2018-3-debian-9: name: Debian 9 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2027,6 +2347,7 @@ jobs: py3-stable-2018-3-debian-9: name: Debian 9 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2072,6 +2393,7 @@ jobs: py3-git-2018-3-debian-9: name: Debian 9 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2117,6 +2439,7 @@ jobs: py2-stable-2019-2-debian-9: name: Debian 9 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2162,6 +2485,7 @@ jobs: py2-git-2019-2-debian-9: name: Debian 9 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2207,6 +2531,7 @@ jobs: py3-stable-2019-2-debian-9: name: Debian 9 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2252,6 +2577,7 @@ jobs: py3-git-2019-2-debian-9: name: Debian 9 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2297,6 +2623,7 @@ jobs: py2-git-3000-debian-9: name: Debian 9 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2342,6 +2669,7 @@ jobs: py3-git-3000-debian-9: name: Debian 9 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2384,9 +2712,102 @@ jobs: bundle exec kitchen destroy py3-git-3000-debian-9 + py2-git-master-debian-9: + name: Debian 9 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-debian-9 || bundle exec kitchen create py2-git-master-debian-9 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-debian-9 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-debian-9 + + + py3-git-master-debian-9: + name: Debian 9 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-debian-9 || bundle exec kitchen create py3-git-master-debian-9 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-debian-9 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-debian-9 + + latest-debian-9: name: Debian 9 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2429,99 +2850,10 @@ jobs: bundle exec kitchen destroy latest-debian-9 - py2-stable-2018-3-fedora-30: - name: Fedora 30 v2018.3 Py2 Stable - runs-on: ubuntu-latest - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-stable-2018-3-fedora-30 || bundle exec kitchen create py2-stable-2018-3-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-stable-2018-3-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-stable-2018-3-fedora-30 - - - py2-git-2018-3-fedora-30: - name: Fedora 30 v2018.3 Py2 Git - runs-on: ubuntu-latest - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-git-2018-3-fedora-30 || bundle exec kitchen create py2-git-2018-3-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-git-2018-3-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-git-2018-3-fedora-30 - - py3-stable-2018-3-fedora-30: name: Fedora 30 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2567,6 +2899,7 @@ jobs: py3-git-2018-3-fedora-30: name: Fedora 30 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2609,99 +2942,10 @@ jobs: bundle exec kitchen destroy py3-git-2018-3-fedora-30 - py2-stable-2019-2-fedora-30: - name: Fedora 30 v2019.2 Py2 Stable - runs-on: ubuntu-latest - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-stable-2019-2-fedora-30 || bundle exec kitchen create py2-stable-2019-2-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-stable-2019-2-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-stable-2019-2-fedora-30 - - - py2-git-2019-2-fedora-30: - name: Fedora 30 v2019.2 Py2 Git - runs-on: ubuntu-latest - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-git-2019-2-fedora-30 || bundle exec kitchen create py2-git-2019-2-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-git-2019-2-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-git-2019-2-fedora-30 - - py3-stable-2019-2-fedora-30: name: Fedora 30 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2747,6 +2991,7 @@ jobs: py3-git-2019-2-fedora-30: name: Fedora 30 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2789,54 +3034,10 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-fedora-30 - py2-git-3000-fedora-30: - name: Fedora 30 v3000 Py2 Git - runs-on: ubuntu-latest - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-git-3000-fedora-30 || bundle exec kitchen create py2-git-3000-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-git-3000-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-git-3000-fedora-30 - - py3-git-3000-fedora-30: name: Fedora 30 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2879,9 +3080,56 @@ jobs: bundle exec kitchen destroy py3-git-3000-fedora-30 + py3-git-master-fedora-30: + name: Fedora 30 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-fedora-30 || bundle exec kitchen create py3-git-master-fedora-30 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-fedora-30 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-fedora-30 + + latest-fedora-30: name: Fedora 30 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2924,9 +3172,378 @@ jobs: bundle exec kitchen destroy latest-fedora-30 + py3-stable-2018-3-fedora-31: + name: Fedora 31 v2018.3 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-2018-3-fedora-31 || bundle exec kitchen create py3-stable-2018-3-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-2018-3-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-2018-3-fedora-31 + + + py3-git-2018-3-fedora-31: + name: Fedora 31 v2018.3 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-2018-3-fedora-31 || bundle exec kitchen create py3-git-2018-3-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-2018-3-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-2018-3-fedora-31 + + + py3-stable-2019-2-fedora-31: + name: Fedora 31 v2019.2 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-2019-2-fedora-31 || bundle exec kitchen create py3-stable-2019-2-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-2019-2-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-2019-2-fedora-31 + + + py3-git-2019-2-fedora-31: + name: Fedora 31 v2019.2 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-2019-2-fedora-31 || bundle exec kitchen create py3-git-2019-2-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-2019-2-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-2019-2-fedora-31 + + + py3-git-3000-fedora-31: + name: Fedora 31 v3000 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-fedora-31 || bundle exec kitchen create py3-git-3000-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-fedora-31 + + + py3-git-master-fedora-31: + name: Fedora 31 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-fedora-31 || bundle exec kitchen create py3-git-master-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-fedora-31 + + + latest-fedora-31: + name: Fedora 31 Latest packaged release + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create latest-fedora-31 || bundle exec kitchen create latest-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify latest-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy latest-fedora-31 + + + latest-fedora-32: + name: Fedora 32 Latest packaged release + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create latest-fedora-32 || bundle exec kitchen create latest-fedora-32 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify latest-fedora-32 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy latest-fedora-32 + + py2-git-2018-3-opensuse-15: name: Opensuse 15 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2969,9 +3586,56 @@ jobs: bundle exec kitchen destroy py2-git-2018-3-opensuse-15 + py3-git-2018-3-opensuse-15: + name: Opensuse 15 v2018.3 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-2018-3-opensuse-15 || bundle exec kitchen create py3-git-2018-3-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-2018-3-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-2018-3-opensuse-15 + + py2-git-2019-2-opensuse-15: name: Opensuse 15 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3014,9 +3678,56 @@ jobs: bundle exec kitchen destroy py2-git-2019-2-opensuse-15 + py3-git-2019-2-opensuse-15: + name: Opensuse 15 v2019.2 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-2019-2-opensuse-15 || bundle exec kitchen create py3-git-2019-2-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-2019-2-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-2019-2-opensuse-15 + + py2-git-3000-opensuse-15: name: Opensuse 15 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3059,9 +3770,148 @@ jobs: bundle exec kitchen destroy py2-git-3000-opensuse-15 + py3-git-3000-opensuse-15: + name: Opensuse 15 v3000 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-opensuse-15 || bundle exec kitchen create py3-git-3000-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-opensuse-15 + + + py2-git-master-opensuse-15: + name: Opensuse 15 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-opensuse-15 || bundle exec kitchen create py2-git-master-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-opensuse-15 + + + py3-git-master-opensuse-15: + name: Opensuse 15 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-opensuse-15 || bundle exec kitchen create py3-git-master-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-opensuse-15 + + latest-opensuse-15: name: Opensuse 15 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3107,6 +3957,7 @@ jobs: py2-stable-2018-3-ubuntu-1604: name: Ubuntu 16.04 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3152,6 +4003,7 @@ jobs: py2-git-2018-3-ubuntu-1604: name: Ubuntu 16.04 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3197,6 +4049,7 @@ jobs: py3-stable-2018-3-ubuntu-1604: name: Ubuntu 16.04 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3242,6 +4095,7 @@ jobs: py3-git-2018-3-ubuntu-1604: name: Ubuntu 16.04 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3287,6 +4141,7 @@ jobs: py2-stable-2019-2-ubuntu-1604: name: Ubuntu 16.04 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3332,6 +4187,7 @@ jobs: py2-git-2019-2-ubuntu-1604: name: Ubuntu 16.04 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3377,6 +4233,7 @@ jobs: py3-stable-2019-2-ubuntu-1604: name: Ubuntu 16.04 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3422,6 +4279,7 @@ jobs: py3-git-2019-2-ubuntu-1604: name: Ubuntu 16.04 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3467,6 +4325,7 @@ jobs: py2-git-3000-ubuntu-1604: name: Ubuntu 16.04 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3512,6 +4371,7 @@ jobs: py3-git-3000-ubuntu-1604: name: Ubuntu 16.04 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3554,9 +4414,102 @@ jobs: bundle exec kitchen destroy py3-git-3000-ubuntu-1604 + py2-git-master-ubuntu-1604: + name: Ubuntu 16.04 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-ubuntu-1604 || bundle exec kitchen create py2-git-master-ubuntu-1604 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-ubuntu-1604 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-ubuntu-1604 + + + py3-git-master-ubuntu-1604: + name: Ubuntu 16.04 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-ubuntu-1604 || bundle exec kitchen create py3-git-master-ubuntu-1604 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-ubuntu-1604 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-ubuntu-1604 + + latest-ubuntu-1604: name: Ubuntu 16.04 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3602,6 +4555,7 @@ jobs: py2-stable-2018-3-ubuntu-1804: name: Ubuntu 18.04 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3647,6 +4601,7 @@ jobs: py2-git-2018-3-ubuntu-1804: name: Ubuntu 18.04 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3692,6 +4647,7 @@ jobs: py3-stable-2018-3-ubuntu-1804: name: Ubuntu 18.04 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3737,6 +4693,7 @@ jobs: py3-git-2018-3-ubuntu-1804: name: Ubuntu 18.04 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3782,6 +4739,7 @@ jobs: py2-stable-2019-2-ubuntu-1804: name: Ubuntu 18.04 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3827,6 +4785,7 @@ jobs: py2-git-2019-2-ubuntu-1804: name: Ubuntu 18.04 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3872,6 +4831,7 @@ jobs: py3-stable-2019-2-ubuntu-1804: name: Ubuntu 18.04 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3917,6 +4877,7 @@ jobs: py3-git-2019-2-ubuntu-1804: name: Ubuntu 18.04 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3962,6 +4923,7 @@ jobs: py2-git-3000-ubuntu-1804: name: Ubuntu 18.04 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -4007,6 +4969,7 @@ jobs: py3-git-3000-ubuntu-1804: name: Ubuntu 18.04 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -4049,9 +5012,102 @@ jobs: bundle exec kitchen destroy py3-git-3000-ubuntu-1804 + py2-git-master-ubuntu-1804: + name: Ubuntu 18.04 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-ubuntu-1804 || bundle exec kitchen create py2-git-master-ubuntu-1804 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-ubuntu-1804 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-ubuntu-1804 + + + py3-git-master-ubuntu-1804: + name: Ubuntu 18.04 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-ubuntu-1804 || bundle exec kitchen create py3-git-master-ubuntu-1804 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-ubuntu-1804 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-ubuntu-1804 + + latest-ubuntu-1804: name: Ubuntu 18.04 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint diff --git a/.github/.workflows/templates/generate.py b/.github/.workflows/templates/generate.py index a912db8..c9fda1f 100755 --- a/.github/.workflows/templates/generate.py +++ b/.github/.workflows/templates/generate.py @@ -16,7 +16,8 @@ LINUX_DISTROS = [ 'debian-8', 'debian-9', 'fedora-30', - #'fedora-31', + 'fedora-31', + 'fedora-32', 'opensuse-15', 'ubuntu-1604', 'ubuntu-1804' @@ -41,14 +42,17 @@ STABLE_DISTROS = [ PY2_BLACKLIST = [ 'centos-8', 'debian-10', + 'fedora-30', 'fedora-31', + 'fedora-32' ] PY3_BLACKLIST = [ + 'arch', # Defaults to Py3.8 'amazon-1', 'centos-6', 'debian-8', - 'opensuse-15' + 'fedora-32' # Defaults to Py3.8 ] BLACKLIST_2018 = [ @@ -61,6 +65,7 @@ SALT_BRANCHES = [ '2018-3', '2019-2', '3000', + 'master', 'latest' ] @@ -68,6 +73,7 @@ BRANCH_DISPLAY_NAMES = { '2018-3': 'v2018.3', '2019-2': 'v2019.2', '3000': 'v3000', + 'master': 'Master', 'latest': 'Latest' } @@ -93,6 +99,7 @@ DISTRO_DISPLAY_NAMES = { 'debian-9': 'Debian 9', 'fedora-30': 'Fedora 30', 'fedora-31': 'Fedora 31', + 'fedora-32': 'Fedora 32', 'opensuse-15': 'Opensuse 15', 'ubuntu-1604': 'Ubuntu 16.04', 'ubuntu-1804': 'Ubuntu 18.04' @@ -133,6 +140,8 @@ def generate_test_jobs(): for python_version in ('py2', 'py3'): for bootstrap_type in ('stable', 'git'): + if bootstrap_type == 'stable' and branch == 'master': + continue if bootstrap_type == 'stable' and distro not in STABLE_DISTROS: continue diff --git a/.github/.workflows/templates/lint.yml b/.github/.workflows/templates/lint.yml index 204056c..273e115 100644 --- a/.github/.workflows/templates/lint.yml +++ b/.github/.workflows/templates/lint.yml @@ -9,4 +9,4 @@ - uses: actions/checkout@v1 - name: ShellCheck run: | - shellcheck -s sh -f checkstyle bootstrap-salt.sh + shellcheck -s sh -f tty bootstrap-salt.sh diff --git a/.github/.workflows/templates/linux.yml b/.github/.workflows/templates/linux.yml index ae066bf..90379bb 100644 --- a/.github/.workflows/templates/linux.yml +++ b/.github/.workflows/templates/linux.yml @@ -1,6 +1,7 @@ {python_version}-{bootstrap_type}-{branch}-{distro}: name: {display_name} runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint diff --git a/.kitchen.yml b/.kitchen.yml index a4a369e..7f75ee6 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -49,6 +49,8 @@ platforms: provision_command: - pacman -Syu --noconfirm --needed systemd grep awk procps which - systemctl enable sshd + provisioner: + salt_bootstrap_options: -MPfq -D -y -x python2 git %s - name: centos-8 driver_config: run_command: /usr/lib/systemd/systemd @@ -77,10 +79,20 @@ platforms: driver_config: image: fedora:30 run_command: /usr/lib/systemd/systemd + provision_command: + - dnf -y install procps-ng - name: fedora-31 driver_config: image: fedora:31 run_command: /usr/lib/systemd/systemd + provision_command: + - dnf -y install procps-ng + - name: fedora-32 + driver_config: + image: fedora:32 + run_command: /usr/lib/systemd/systemd + provision_command: + - dnf -y install procps-ng - name: opensuse-15 driver_config: image: opensuse/leap:15.1 @@ -118,6 +130,9 @@ suites: excludes: - arch - opensuse-15 + - fedora-30 + - fedora-31 + - fedora-32 - name: py2-stable-2019-2 provisioner: salt_version: 2019.2 @@ -125,6 +140,9 @@ suites: excludes: - arch - opensuse-15 + - fedora-30 + - fedora-31 + - fedora-32 - name: py3-git-2018-3 provisioner: @@ -134,17 +152,16 @@ suites: - amazon-1 - centos-6 - debian-8 - - opensuse-15 - amazon-2 - name: py3-git-3000 provisioner: salt_version: 3000 salt_bootstrap_options: -x python3 -MPfq git %s excludes: + - arch - amazon-1 - centos-6 - debian-8 - - opensuse-15 - name: py3-git-2019-2 provisioner: salt_version: 2019.2 @@ -153,7 +170,6 @@ suites: - amazon-1 - centos-6 - debian-8 - - opensuse-15 - name: py3-stable-2018-3 provisioner: salt_version: 2018.3 @@ -174,6 +190,17 @@ suites: - debian-8 - opensuse-15 - arch + - name: py3-git-master + provisioner: + salt_version: master + salt_bootstrap_options: -x python3 -MPfq -D git %s + excludes: + - arch + - amazon-1 + - centos-6 + - debian-8 + - fedora-32 + - opensuse-15 - name: latest provisioner: diff --git a/ChangeLog b/ChangeLog index 1304dd1..d17d3d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ Version TBD (In Progress on the Develop Branch): +Version 2020.02.04: + * Add support for the Salt Neon(3000) release (s0undt3ch) #1424 + * Drop support for Fedora < 30 (s0undt3ch) #1424 + * Drop support for Debian < 8 (s0undt3ch) #1424 + Version 2020.01.29: * FreeBSD fixes (cedwards) #1413 * Support the upcoming Neon release (s0undt3ch) #1420 diff --git a/README.rst b/README.rst index eb3f315..b2ed30c 100644 --- a/README.rst +++ b/README.rst @@ -28,6 +28,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file. The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is: +- 2020.01.29: ``e9afdfa877998c1c7f0e141a6728b33d0d24348e197aab2b9bde4fe6bc6db1b2`` - 2020.01.21: ``53299aa0dfbf7ab381f3856bb7babfc04a1d6525be11db0b9466277b1e4d0c1a`` - 2019.11.04: ``905924fccd4ebf168d19ba598bf10af53efe02302b792aeb15433e73fd3ad1d2`` - 2019.10.03: ``34f196f06d586ce9e1b9907660ea6e67caf57abcecfea66e0343697e3fd0d17d`` @@ -357,13 +358,15 @@ this offering, while limited, is as follows: - CentOS 7 - Centos 8 +- Debian 8 - Debian 9 - Debian 10 - Fedora (only git installations) - Ubuntu 16.04 - Ubuntu 18.04 -On Fedora 28, PIP installation must be allowed (-P) due to incompatibility with the shipped Tornado library. +On Fedora, PIP installation must be allowed (-P) due to incompatibility with the shipped Tornado +library. Installing the Python 3 packages for Salt is done via the ``-x`` option: @@ -434,6 +437,18 @@ The ``Dockerfile`` here inherits the Ubuntu 14.04 public image with Upstart conf system. Use it as an example or starting point of how to make your own Docker images with suitable Salt components, custom configurations, and even `pre-accepted Minion keys`_ already installed. +Updating Drone Pipelines +======================== + +You should install and configure the drone-cli as shown here: https://docs.drone.io/cli/install/ + +Make edits to .drone.jsonnet and then save them into the .drone.yml by doing the following: + +.. code:: console + + drone jsonnet --format --stream + drone sign saltstack/salt-bootstrap --save + .. _Contributing Guidelines: https://github.com/saltstack/salt-bootstrap/blob/develop/CONTRIBUTING.md .. _Docker: https://www.docker.com/ .. _`pre-accepted Minion keys`: https://docs.saltstack.com/en/latest/topics/tutorials/preseed_key.html diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 3b92520..8caba2f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -23,7 +23,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2020.01.29" +__ScriptVersion="2020.02.04" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -272,6 +272,9 @@ _PY_EXE="" _INSTALL_PY="$BS_FALSE" _TORNADO_MAX_PY3_VERSION="5.0" _POST_NEON_INSTALL=$BS_FALSE +_MINIMUM_PIP_VERSION="8.0.0" +_MINIMUM_SETUPTOOLS_VERSION="9.1" +_POST_NEON_PIP_INSTALL_ARGS="--prefix=/usr" # Defaults for install arguments ITYPE="stable" @@ -512,6 +515,7 @@ __exit_cleanup() { # shellcheck disable=SC2164 cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}" rm -rf "${_SALT_GIT_CHECKOUT_DIR}" + #rm -rf "${_SALT_GIT_CHECKOUT_DIR}/deps" else echowarn "Not cleaning up the Salt Temporary git repository on request" echowarn "Note that if you intend to re-run this script using the git approach, you might encounter some issues" @@ -1556,7 +1560,7 @@ __check_end_of_life_versions() { case "${DISTRO_NAME_L}" in debian) # Debian versions below 7 are not supported - if [ "$DISTRO_MAJOR_VERSION" -lt 7 ]; then + if [ "$DISTRO_MAJOR_VERSION" -lt 8 ]; then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " https://wiki.debian.org/DebianReleases" @@ -1618,7 +1622,7 @@ __check_end_of_life_versions() { fedora) # Fedora lower than 27 are no longer supported - if [ "$DISTRO_MAJOR_VERSION" -lt 27 ]; then + if [ "$DISTRO_MAJOR_VERSION" -lt 30 ]; then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " https://fedoraproject.org/wiki/Releases" @@ -1859,16 +1863,15 @@ if [ "$ITYPE" = "git" ]; then if [ "$_POST_NEON_INSTALL" -eq $BS_TRUE ]; then echo - echowarn "Post Neon git based installations will always install salt and it's dependencies using pip" - echowarn "You have 10 seconds to cancel and stop the bootstrap process" + echowarn "Post Neon git based installations will always install salt" + echowarn "and it's dependencies using pip which will be upgraded to" + echowarn "at least v${_MINIMUM_PIP_VERSION}, and, in case the setuptools version is also" + echowarn "too old, it will be upgraded to at least v${_MINIMUM_SETUPTOOLS_VERSION}" + echo + echowarn "You have 10 seconds to cancel and stop the bootstrap process..." echo sleep 10 _PIP_ALLOWED=$BS_TRUE - # 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 fi fi @@ -2022,6 +2025,14 @@ __yum_install_noinput() { fi } # ---------- end of function __yum_install_noinput ---------- +#--- FUNCTION ------------------------------------------------------------------------------------------------------- +# NAME: __dnf_install_noinput +# DESCRIPTION: (DRY) dnf install with noinput options +#---------------------------------------------------------------------------------------------------------------------- +__dnf_install_noinput() { + + dnf -y install "${@}" || return $? +} # ---------- end of function __dnf_install_noinput ---------- #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __git_clone_and_checkout @@ -2572,7 +2583,11 @@ __install_pip_pkgs() { __apt_get_install_noinput ${__PACKAGES} || return 1 else __PACKAGES="${__PACKAGES} ${_py_pkg}-devel" - __yum_install_noinput ${__PACKAGES} || return 1 + if [ "$DISTRO_NAME_L" = "fedora" ];then + __dnf_install_noinput ${__PACKAGES} || return 1 + else + __yum_install_noinput ${__PACKAGES} || return 1 + fi fi fi @@ -2644,31 +2659,119 @@ __install_salt_from_repo_post_neon() { echodebug "__install_salt_from_repo_post_neon py_exe=$_py_exe" - _py_pkg=$(echo "$_py_exe" | sed -E "s/\\.//g") - _pip_cmd="${_py_exe} -m pip" + _py_version=$(${_py_exe} -c "import sys; print('{0}.{1}'.format(*sys.version_info))") + _pip_cmd="pip${_py_version}" + if ! __check_command_exists "${_pip_cmd}"; then + echodebug "The pip binary '${_pip_cmd}' was not found in PATH" + _pip_cmd="pip$(echo "${_py_version}" | cut -c -1)" + if ! __check_command_exists "${_pip_cmd}"; then + echodebug "The pip binary '${_pip_cmd}' was not found in PATH" + _pip_cmd="pip" + if ! __check_command_exists "${_pip_cmd}"; then + echoerror "Unable to find a pip binary" + return 1 + fi + fi + fi __check_pip_allowed - # Install pip and pip dependencies - if ! __check_command_exists "${_pip_cmd} --version"; then - __PACKAGES="${_py_pkg}-pip gcc" - # shellcheck disable=SC2086 - if [ "$DISTRO_NAME_L" = "debian" ];then - __PACKAGES="${__PACKAGES} ${_py_pkg}-dev" - __apt_get_install_noinput ${__PACKAGES} || return 1 - else - __PACKAGES="${__PACKAGES} ${_py_pkg}-devel" - __yum_install_noinput ${__PACKAGES} || return 1 - fi + echodebug "Installed pip version: $(${_pip_cmd} --version)" + CHECK_PIP_VERSION_SCRIPT=$(cat << EOM +import sys +try: + import pip + installed_pip_version=tuple([int(part.strip()) for part in pip.__version__.split('.') if part.isdigit()]) + desired_pip_version=($(echo ${_MINIMUM_PIP_VERSION} | sed 's/\./, /g' )) + if installed_pip_version < desired_pip_version: + print('Desired pip version {!r} > Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) + sys.exit(1) + print('Desired pip version {!r} < Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) + sys.exit(0) +except ImportError: + print('Failed to import pip') + sys.exit(1) +EOM +) + if ! ${_py_exe} -c "$CHECK_PIP_VERSION_SCRIPT"; then + # Upgrade pip to at least 1.2 which is when we can start using "python -m pip" + echodebug "Running '${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} pip>=${_MINIMUM_PIP_VERSION}'" + ${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} -v "pip>=${_MINIMUM_PIP_VERSION}" + sleep 1 + echodebug "PATH: ${PATH}" + _pip_cmd="pip${_py_version}" + if ! __check_command_exists "${_pip_cmd}"; then + echodebug "The pip binary '${_pip_cmd}' was not found in PATH" + _pip_cmd="pip$(echo "${_py_version}" | cut -c -1)" + if ! __check_command_exists "${_pip_cmd}"; then + echodebug "The pip binary '${_pip_cmd}' was not found in PATH" + _pip_cmd="pip" + if ! __check_command_exists "${_pip_cmd}"; then + echoerror "Unable to find a pip binary" + return 1 + fi + fi + fi + echodebug "Installed pip version: $(${_pip_cmd} --version)" fi - ${_pip_cmd} install -U pip + # We also lock setuptools to <45 which is the latest release to support both py2 and py3 + echodebug "Running '${_pip_cmd} install wheel setuptools>=${_MINIMUM_SETUPTOOLS_VERSION},<45'" + ${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} wheel "setuptools>=${_MINIMUM_SETUPTOOLS_VERSION},<45" echoinfo "Installing salt using ${_py_exe}" cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 - ${_pip_cmd} install . || return 1 + mkdir /tmp/git/deps + echoinfo "Downloading Salt Dependencies from PyPi" + echodebug "Running '${_pip_cmd} download -d /tmp/git/deps .'" + ${_pip_cmd} download -d /tmp/git/deps . || (echo "Failed to download salt dependencies" && return 1) + + echoinfo "Installing Downloaded Salt Dependencies" + echodebug "Running '${_pip_cmd} install --ignore-installed ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/*'" + ${_pip_cmd} install --ignore-installed ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/* || return 1 + rm -f /tmp/git/deps/* + + echoinfo "Building Salt Python Wheel" + + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + SETUP_PY_INSTALL_ARGS="-v" + fi + + echodebug "Running '${_py_exe} setup.py --salt-config-dir=$_SALT_ETC_DIR --salt-cache-dir=${_SALT_CACHE_DIR} ${SETUP_PY_INSTALL_ARGS} bdist_wheel'" + ${_py_exe} setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} bdist_wheel || return 1 + mv dist/salt*.whl /tmp/git/deps/ || return 1 + + cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}" || return 1 + + echoinfo "Installing Built Salt Wheel" + ${_pip_cmd} uninstall --yes salt 2>/dev/null || true + echodebug "Running '${_pip_cmd} install --no-deps --force-reinstall ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/salt*.whl'" + ${_pip_cmd} install --no-deps --force-reinstall \ + ${_POST_NEON_PIP_INSTALL_ARGS} \ + --global-option="--salt-config-dir=$_SALT_ETC_DIR --salt-cache-dir=${_SALT_CACHE_DIR} ${SETUP_PY_INSTALL_ARGS}" \ + /tmp/git/deps/salt*.whl || return 1 + + echoinfo "Checking if Salt can be imported using ${_py_exe}" + CHECK_SALT_SCRIPT=$(cat << EOM +import os +import sys +try: + import salt + import salt.version + print('\nInstalled Salt Version: {}'.format(salt.version.__version__)) + print('Installed Salt Package Path: {}\n'.format(os.path.dirname(salt.__file__))) + sys.exit(0) +except ImportError: + print('\nFailed to import salt\n') + sys.exit(1) +EOM +) + if ! ${_py_exe} -c "$CHECK_SALT_SCRIPT"; then + return 1 + fi + return 0 } # ---------- end of function __install_salt_from_repo_post_neon ---------- @@ -2912,50 +3015,55 @@ install_ubuntu_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + PY_PKG_VER=3 + else + PY_PKG_VER="" fi - __PACKAGES="" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - # See how we are installing packages - if [ "${_PIP_ALL}" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python-dev swig libssl-dev libzmq3 libzmq3-dev" + __PACKAGES="" - if ! __check_command_exists pip; then - __PACKAGES="${__PACKAGES} python-setuptools python-pip" - fi + # See how we are installing packages + if [ "${_PIP_ALL}" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python-dev swig libssl-dev libzmq3 libzmq3-dev" - # Get just the apt packages that are required to build all the pythons - # shellcheck disable=SC2086 - __apt_get_install_noinput ${__PACKAGES} || return 1 - # Install the pythons from requirements (only zmq for now) - __install_pip_deps "${_SALT_GIT_CHECKOUT_DIR}/requirements/zeromq.txt" || return 1 - else - install_ubuntu_stable_deps || return 1 + if ! __check_command_exists pip; then + __PACKAGES="${__PACKAGES} python-setuptools python-pip" + fi - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - PY_PKG_VER=3 - - __PACKAGES="${__PACKAGES} python3-setuptools" + # Get just the apt packages that are required to build all the pythons + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 + # Install the pythons from requirements (only zmq for now) + __install_pip_deps "${_SALT_GIT_CHECKOUT_DIR}/requirements/zeromq.txt" || return 1 else - PY_PKG_VER="" + install_ubuntu_stable_deps || return 1 - # There is no m2crypto package for Py3 at this time - only install for Py2 - __PACKAGES="${__PACKAGES} python-m2crypto" + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __PACKAGES="${__PACKAGES} python3-setuptools" + else + # There is no m2crypto package for Py3 at this time - only install for Py2 + __PACKAGES="${__PACKAGES} python-m2crypto" + fi + + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-yaml" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-zmq" + __PACKAGES="${__PACKAGES} python-concurrent.futures" + + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + # Install python-libcloud if asked to + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud" + fi + + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 fi - - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-yaml" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-zmq" - __PACKAGES="${__PACKAGES} python-concurrent.futures" - - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - # Install python-libcloud if asked to - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud" - fi - + else + __PACKAGES="python${PY_PKG_VER}-dev python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 fi @@ -3004,7 +3112,16 @@ install_ubuntu_git() { fi if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + # We can use --prefix on debian based ditributions + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + _POST_NEON_PIP_INSTALL_ARGS="--target=/usr/lib/python3/dist-packages --install-option=--install-scripts=/usr/bin" + else + _POST_NEON_PIP_INSTALL_ARGS="--target=/usr/lib/python2.7/dist-packages --install-option=--install-scripts=/usr/bin" + fi + _POST_NEON_PIP_INSTALL_ARGS="" + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 + sed -i 's:/usr/bin:/usr/local/bin:g' pkg/*.service return 0 fi @@ -3122,6 +3239,10 @@ install_ubuntu_restart_daemons() { systemctl start salt-$fname.service && continue # We failed to start the service, let's test the SysV code below echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi fi if [ -f /sbin/initctl ]; then @@ -3280,36 +3401,32 @@ install_debian_git_pre() { } install_debian_git_deps() { - if ! __check_command_exists git; then - __apt_get_install_noinput git || return 1 + install_debian_deps || return 1 + install_debian_git_pre || return 1 + + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + PY_PKG_VER=3 + else + PY_PKG_VER="" fi - if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then - __apt_get_install_noinput ca-certificates - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-backports.ssl-match-hostname" + __PACKAGES="${__PACKAGES} python-crypto python-jinja2 python-msgpack python-m2crypto" + __PACKAGES="${__PACKAGES} python-requests python-tornado python-yaml python-zmq" - __git_clone_and_checkout || return 1 + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + # Install python-libcloud if asked to + __PACKAGES="${__PACKAGES} python-libcloud" + fi - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - - __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-backports.ssl-match-hostname" - __PACKAGES="${__PACKAGES} python-crypto python-jinja2 python-msgpack python-m2crypto" - __PACKAGES="${__PACKAGES} python-requests python-tornado python-yaml python-zmq" - - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - # Install python-libcloud if asked to - __PACKAGES="${__PACKAGES} python-libcloud" - fi - - # shellcheck disable=SC2086 - __apt_get_install_noinput ${__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" + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 + else + __PACKAGES="python${PY_PKG_VER}-dev python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" + echodebug "install_debian_git_deps() Installing ${__PACKAGES}" + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 fi return 0 @@ -3323,6 +3440,13 @@ install_debian_7_git_deps() { } install_debian_8_git_deps() { + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + echodebug "CALLING install_debian_git_deps" + install_debian_git_deps || return 1 + return 0 + fi + install_debian_deps || return 1 if ! __check_command_exists git; then @@ -3335,10 +3459,6 @@ install_debian_8_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-crypto python-jinja2" __PACKAGES="${__PACKAGES} python-m2crypto python-msgpack python-requests python-systemd" __PACKAGES="${__PACKAGES} python-yaml python-zmq python-concurrent.futures" @@ -3391,22 +3511,15 @@ install_debian_8_git_deps() { } install_debian_9_git_deps() { - install_debian_deps || return 1 - - if ! __check_command_exists git; then - __apt_get_install_noinput git || return 1 - fi - - if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then - __apt_get_install_noinput ca-certificates - fi - - __git_clone_and_checkout || return 1 if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + install_debian_git_deps || return 1 return 0 fi + install_debian_deps || return 1 + install_debian_git_pre || return 1 + __PACKAGES="libzmq5 lsb-release" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then @@ -3430,22 +3543,19 @@ install_debian_9_git_deps() { # shellcheck disable=SC2086 __apt_get_install_noinput ${__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_debian_10_git_deps() { - install_debian_git_pre || return 1 if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + install_debian_git_deps || return 1 return 0 fi + install_debian_deps || return 1 + install_debian_git_pre || return 1 + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then _py=${_PY_EXE} PY_PKG_VER=3 @@ -3511,7 +3621,16 @@ install_debian_git() { fi if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + # We can use --prefix on debian based ditributions + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + _POST_NEON_PIP_INSTALL_ARGS="--target=/usr/lib/python3/dist-packages --install-option=--install-scripts=/usr/bin" + else + _POST_NEON_PIP_INSTALL_ARGS="--target=/usr/lib/python2.7/dist-packages --install-option=--install-scripts=/usr/bin" + fi + _POST_NEON_PIP_INSTALL_ARGS="" + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 + sed -i 's:/usr/bin:/usr/local/bin:g' pkg/*.service return 0 fi @@ -3604,7 +3723,11 @@ install_debian_restart_daemons() { if [ -f /bin/systemctl ]; then # Debian 8 uses systemd /bin/systemctl stop salt-$fname > /dev/null 2>&1 - /bin/systemctl start salt-$fname.service + /bin/systemctl start salt-$fname.service && continue + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi elif [ -f /etc/init.d/salt-$fname ]; then # Still in SysV init /etc/init.d/salt-$fname stop > /dev/null 2>&1 @@ -3647,27 +3770,24 @@ install_fedora_deps() { fi __PACKAGES="${__PACKAGES:=}" - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - # Packages are named python3- - PY_PKG_VER=3 - __PACKAGES="${__PACKAGES} python3-m2crypto python3-PyYAML" - else - PY_PKG_VER=2 - __PACKAGES="${__PACKAGES} m2crypto" - if [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then - __PACKAGES="${__PACKAGES} python2-pyyaml" - else - __PACKAGES="${__PACKAGES} PyYAML" - fi + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -lt 3 ]; then + echoerror "There are no Python 2 stable packages for Fedora, only Py3 packages" + return 1 fi + + # Salt on Fedora is Py3 + PY_PKG_VER=3 + __PACKAGES="${__PACKAGES} dnf-utils libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pip python${PY_PKG_VER}-m2crypto python${PY_PKG_VER}-pyyaml" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd" if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" fi # shellcheck disable=SC2086 - dnf install -y ${__PACKAGES} ${_EXTRA_PACKAGES} || return 1 + __dnf_install_noinput ${__PACKAGES} ${_EXTRA_PACKAGES} || return 1 return 0 } @@ -3689,7 +3809,30 @@ install_fedora_stable() { fi # shellcheck disable=SC2086 - dnf install -y ${__PACKAGES} || return 1 + __dnf_install_noinput ${__PACKAGES} || return 1 + + __python="python3" + if ! __check_command_exists python3; then + echoerror "Could not find a python3 binary?!" + return 1 + fi + + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt" + __installed_tornado_rpm=$(rpm -qa | grep python${PY_PKG_VER}-tornado) + if [ -n "${__installed_tornado_rpm}" ]; then + echodebug "Removing system package ${__installed_tornado_rpm}" + rpm -e --nodeps "${__installed_tornado_rpm}" || return 1 + fi + __get_site_packages_dir_code=$(cat << EOM +import site +print([d for d in site.getsitepackages() if d.startswith('/usr/lib/python')][0]) +EOM +) + __target_path=$(${__python} -c "${__get_site_packages_dir_code}") + echodebug "Running '${__python}' -m pip install --target ${__target_path} 'tornado<5.0'" + "${__python}" -m pip install --target "${__target_path}" "tornado<5" || return 1 + fi return 0 } @@ -3718,43 +3861,59 @@ install_fedora_git_deps() { PY_PKG_VER=2 fi - __PACKAGES="${__PACKAGES:=}" + __PACKAGES="" + if ! __check_command_exists ps; then + __PACKAGES="${__PACKAGES} procps-ng" + fi if ! __check_command_exists git; then __PACKAGES="${__PACKAGES} git" fi - install_fedora_deps || return 1 + + if [ -n "${__PACKAGES}" ]; then + # shellcheck disable=SC2086 + __dnf_install_noinput ${__PACKAGES} || return 1 + __PACKAGES="" + fi __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - __PACKAGES="${__PACKAGES:=}" - if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then - __PACKAGES="${__PACKAGES} ca-certificates" - fi - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud python${PY_PKG_VER}-netaddr" - fi - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd" + if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then + __PACKAGES="${__PACKAGES} ca-certificates" + fi + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud python${PY_PKG_VER}-netaddr" + fi - # Fedora 28+ ships with tornado 5.0+ which is broken for salt on py3 - # https://github.com/saltstack/salt-bootstrap/issues/1220 - if [ "${PY_PKG_VER}" -lt 3 ] || [ "$DISTRO_MAJOR_VERSION" -lt 28 ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado" - fi + install_fedora_deps || return 1 - install_fedora_deps || return 1 + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + if __check_command_exists python3; then + __python="python3" + fi + elif [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then + if __check_command_exists python2; then + __python="python2" + fi + else + if ! __check_command_exists python; then + echoerror "Unable to find a python binary?!" + return 1 + fi + # Let's hope it's the right one + __python="python" + fi - # Fedora 28+ needs tornado <5.0 from pip - # https://github.com/saltstack/salt-bootstrap/issues/1220 - if [ "${PY_PKG_VER}" -eq 3 ] && [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then - __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt on Python 3" grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" | while IFS=' -' read -r dep; do - "${_PY_EXE}" -m pip install "${dep}" || return 1 - done + ' read -r dep; do + echodebug "Running '${__python}' -m pip install '${dep}'" + "${__python}" -m pip install "${dep}" || return 1 + done + else + __PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" + # shellcheck disable=SC2086 + __dnf_install_noinput ${__PACKAGES} || return 1 fi # Let's trigger config_salt() @@ -3820,7 +3979,12 @@ install_fedora_restart_daemons() { [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue systemctl stop salt-$fname > /dev/null 2>&1 - systemctl start salt-$fname.service + systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi done } @@ -4043,86 +4207,107 @@ install_centos_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - __PACKAGES="" - _install_m2crypto_req=false + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - _py=${_PY_EXE} - if [ "$DISTRO_MAJOR_VERSION" -gt 6 ]; then - _install_m2crypto_req=true - fi if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then # Packages are named python3- PY_PKG_VER=3 + __PACKAGES="${__PACKAGES} python3" else # Packages are named python36- PY_PKG_VER=36 + __PACKAGES="${__PACKAGES} python36" fi else - if [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then - _install_m2crypto_req=true - fi - _py="python" PY_PKG_VER="" - - # Only Py2 needs python-futures - __PACKAGES="${__PACKAGES} python-futures" - - # There is no systemd-python3 package as of this writing - if [ "$DISTRO_MAJOR_VERSION" -ge 7 ]; then - __PACKAGES="${__PACKAGES} systemd-python" + if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then + __PACKAGES="${__PACKAGES} python2" + elif [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then + PY_PKG_VER=27 + __PACKAGES="${__PACKAGES} python27" + else + __PACKAGES="${__PACKAGES} python" fi fi - if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then - __install_tornado_pip ${_py} || return 1 - __PACKAGES="${__PACKAGES} python3-m2crypto" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + _install_m2crypto_req=false + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + _py=${_PY_EXE} + if [ "$DISTRO_MAJOR_VERSION" -gt 6 ]; then + _install_m2crypto_req=true + fi + else + if [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then + _install_m2crypto_req=true + fi + _py="python" + + # Only Py2 needs python-futures + __PACKAGES="${__PACKAGES} python-futures" + + # There is no systemd-python3 package as of this writing + if [ "$DISTRO_MAJOR_VERSION" -ge 7 ]; then + __PACKAGES="${__PACKAGES} systemd-python" + fi + fi + + if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then + __install_tornado_pip ${_py} || return 1 + __PACKAGES="${__PACKAGES} python3-m2crypto" + else + __PACKAGES="${__PACKAGES} m2crypto python${PY_PKG_VER}-crypto" + fi + + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-jinja2" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-zmq" + + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud" + fi + + if [ "${_INSTALL_PY}" -eq "${BS_TRUE}" ]; then + # Install Python if "-y" was passed in. + __install_python || return 1 + fi + + if [ "${_PY_EXE}" != "" ] && [ "$_PIP_ALLOWED" -eq "$BS_TRUE" ]; then + # If "-x" is defined, install dependencies with pip based on the Python version given. + _PIP_PACKAGES="m2crypto!=0.33.0 jinja2 msgpack-python pycrypto PyYAML tornado<5.0 zmq futures>=2.0" + + # install swig and openssl on cent6 + if $_install_m2crypto_req; then + __yum_install_noinput openssl-devel swig || return 1 + fi + + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # Filter out any commented lines from the requirements file + _REQ_LINES="$(grep '^[^#]' "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + for SINGLE_PACKAGE in ${_PIP_PACKAGES}; do + __REQUIRED_VERSION="$(grep "${SINGLE_PACKAGE}" "${_REQ_LINES}")" + if [ "${__REQUIRED_VERSION}" != "" ]; then + _PIP_PACKAGES=$(echo "$_PIP_PACKAGES" | sed "s/${SINGLE_PACKAGE}/${__REQUIRED_VERSION}/") + fi + done + fi + + if [ "$_INSTALL_CLOUD" -eq "${BS_TRUE}" ]; then + _PIP_PACKAGES="${_PIP_PACKAGES} apache-libcloud" + fi + + __install_pip_pkgs "${_PIP_PACKAGES}" "${_PY_EXE}" || return 1 + else + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi else - __PACKAGES="${__PACKAGES} m2crypto python${PY_PKG_VER}-crypto" - fi - - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-jinja2" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-zmq" - - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud" - fi - - if [ "${_INSTALL_PY}" -eq "${BS_TRUE}" ]; then - # Install Python if "-y" was passed in. - __install_python || return 1 - fi - - if [ "${_PY_EXE}" != "" ] && [ "$_PIP_ALLOWED" -eq "$BS_TRUE" ]; then - # If "-x" is defined, install dependencies with pip based on the Python version given. - _PIP_PACKAGES="m2crypto!=0.33.0 jinja2 msgpack-python pycrypto PyYAML tornado<5.0 zmq futures>=2.0" - - # install swig and openssl on cent6 - if $_install_m2crypto_req; then - __yum_install_noinput openssl-devel swig || return 1 + if [ "${_INSTALL_PY}" -eq "${BS_TRUE}" ] && [ "$DISTRO_MAJOR_VERSION" -lt 8 ]; then + # Install Python if "-y" was passed in. + __install_python || return 1 fi - - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # Filter out any commented lines from the requirements file - _REQ_LINES="$(grep '^[^#]' "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - for SINGLE_PACKAGE in ${_PIP_PACKAGES}; do - __REQUIRED_VERSION="$(grep "${SINGLE_PACKAGE}" "${_REQ_LINES}")" - if [ "${__REQUIRED_VERSION}" != "" ]; then - _PIP_PACKAGES=$(echo "$_PIP_PACKAGES" | sed "s/${SINGLE_PACKAGE}/${__REQUIRED_VERSION}/") - fi - done - fi - - if [ "$_INSTALL_CLOUD" -eq "${BS_TRUE}" ]; then - _PIP_PACKAGES="${_PIP_PACKAGES} apache-libcloud" - fi - - __install_pip_pkgs "${_PIP_PACKAGES}" "${_PY_EXE}" || return 1 - else + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 fi @@ -4227,7 +4412,12 @@ install_centos_restart_daemons() { elif [ -f /usr/bin/systemctl ]; then # CentOS 7 uses systemd /usr/bin/systemctl stop salt-$fname > /dev/null 2>&1 - /usr/bin/systemctl start salt-$fname.service + /usr/bin/systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi fi done } @@ -4686,24 +4876,24 @@ install_alpine_linux_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - apk -U add python2 py2-pip || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + apk -U add python2 py-virtualenv py2-crypto py2-m2crypto py2-setuptools \ + py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ + py2-zmq zeromq py2-requests || return 1 + + 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 + apk -U add py2-tornado || return 1 + fi + fi + else + apk -U add python2 py2-pip py2-setuptools || return 1 _PY_EXE=python2 return 0 fi - apk -U add python2 py-virtualenv py2-crypto py2-m2crypto py2-setuptools \ - py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ - py2-zmq zeromq py2-requests || return 1 - - 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 - apk -U add py2-tornado || return 1 - fi - fi - # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -4906,14 +5096,15 @@ _eof fi - # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 - # which is already installed - __PACKAGES="m2crypto ${pkg_append}-crypto ${pkg_append}-jinja2 ${pkg_append}-PyYAML" - __PACKAGES="${__PACKAGES} ${pkg_append}-msgpack ${pkg_append}-requests ${pkg_append}-zmq" - __PACKAGES="${__PACKAGES} ${pkg_append}-futures" - - # shellcheck disable=SC2086 - __yum_install_noinput ${__PACKAGES} || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 + # which is already installed + __PACKAGES="m2crypto ${pkg_append}-crypto ${pkg_append}-jinja2 ${pkg_append}-PyYAML" + __PACKAGES="${__PACKAGES} ${pkg_append}-msgpack ${pkg_append}-requests ${pkg_append}-zmq" + __PACKAGES="${__PACKAGES} ${pkg_append}-futures" + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" @@ -4947,37 +5138,39 @@ install_amazon_linux_ami_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __PACKAGES="" + __PIP_PACKAGES="" - __PACKAGES="" - __PIP_PACKAGES="" - - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" - __PACKAGES="${__PACKAGES} python27-pip" - __PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION" - fi - - 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} ${pkg_append}-tornado" + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" + __PACKAGES="${__PACKAGES} python27-pip" + __PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION" fi - fi - if [ "${__PACKAGES}" != "" ]; then - # shellcheck disable=SC2086 + 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} ${pkg_append}-tornado" + fi + fi + + if [ "${__PACKAGES}" != "" ]; then + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi + + if [ "${__PIP_PACKAGES}" != "" ]; then + # shellcheck disable=SC2086 + ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 + fi + else + __PACKAGES="python27-pip python27-setuptools python27-devel gcc" + # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 fi - if [ "${__PIP_PACKAGES}" != "" ]; then - # shellcheck disable=SC2086 - ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 - fi - # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -4999,6 +5192,7 @@ install_amazon_linux_ami_2_git_deps() { fi PIP_EXE='/bin/pip3' _PY_EXE='python3' + PY_PKG_VER=3 else PIP_EXE='pip' if __check_command_exists python2.7; then @@ -5007,6 +5201,7 @@ install_amazon_linux_ami_2_git_deps() { fi PIP_EXE='/bin/pip' _PY_EXE='python2.7' + PY_PKG_VER=2 fi fi @@ -5016,46 +5211,49 @@ install_amazon_linux_ami_2_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - __PACKAGES="" - __PIP_PACKAGES="" + __PACKAGES="" + __PIP_PACKAGES="" - if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then - __check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" - if [ "$PARSED_VERSION" -eq "2" ]; then - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq "3" ]; then - __PACKAGES="${__PACKAGES} python3-pip" - __PIP_PACKAGES="${__PIP_PACKAGES} tornado<$_TORNADO_MAX_PY3_VERSION" + if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then + __check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" + if [ "$PARSED_VERSION" -eq "2" ]; then + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq "3" ]; then + __PACKAGES="${__PACKAGES} python3-pip" + __PIP_PACKAGES="${__PIP_PACKAGES} tornado<$_TORNADO_MAX_PY3_VERSION" + else + __PACKAGES="${__PACKAGES} python2-pip" + fi else - __PACKAGES="${__PACKAGES} python2-pip" + __PACKAGES="${__PACKAGES} python27-pip" fi - else - __PACKAGES="${__PACKAGES} python27-pip" + __PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION" fi - __PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION" - fi - 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} ${pkg_append}${PY_PKG_VER}-tornado" + 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} ${pkg_append}${PY_PKG_VER}-tornado" + fi fi - fi - if [ "${__PACKAGES}" != "" ]; then + if [ "${__PACKAGES}" != "" ]; then + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi + + if [ "${__PIP_PACKAGES}" != "" ]; then + # shellcheck disable=SC2086 + ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 + fi + else + __PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 fi - if [ "${__PIP_PACKAGES}" != "" ]; then - # shellcheck disable=SC2086 - ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 - fi - # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -5135,20 +5333,22 @@ _eof fi - # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 - # which is already installed - if [ "${PY_PKG_VER}" -eq 3 ]; then - __PACKAGES="${pkg_append}${PY_PKG_VER}-m2crypto ${pkg_append}${PY_PKG_VER}-pyyaml" - else - __PACKAGES="m2crypto PyYAML ${pkg_append}-futures" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 + # which is already installed + if [ -n "${PY_PKG_VER}" ] && [ "${PY_PKG_VER}" -eq 3 ]; then + __PACKAGES="${pkg_append}${PY_PKG_VER}-m2crypto ${pkg_append}${PY_PKG_VER}-pyyaml" + else + __PACKAGES="m2crypto PyYAML ${pkg_append}-futures" + fi + + __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-crypto ${pkg_append}${PY_PKG_VER}-jinja2 procps-ng" + __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-msgpack ${pkg_append}${PY_PKG_VER}-requests ${pkg_append}${PY_PKG_VER}-zmq" + + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 fi - __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-crypto ${pkg_append}${PY_PKG_VER}-jinja2 procps-ng" - __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-msgpack ${pkg_append}${PY_PKG_VER}-requests ${pkg_append}${PY_PKG_VER}-zmq" - - # shellcheck disable=SC2086 - __yum_install_noinput ${__PACKAGES} || return 1 - if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" # shellcheck disable=SC2086 @@ -5281,24 +5481,30 @@ install_arch_linux_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + pacman -R --noconfirm python2-distribute + pacman -Su --noconfirm --needed python2-crypto python2-setuptools python2-jinja \ + python2-m2crypto python2-futures python2-markupsafe python2-msgpack python2-psutil \ + python2-pyzmq zeromq python2-requests python2-systemd || return 1 - pacman -R --noconfirm python2-distribute - pacman -Su --noconfirm --needed python2-crypto python2-setuptools python2-jinja \ - python2-m2crypto python2-futures python2-markupsafe python2-msgpack python2-psutil \ - python2-pyzmq zeromq python2-requests python2-systemd || return 1 - - 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 - pacman -Su --noconfirm --needed python2-tornado + 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 + pacman -Su --noconfirm --needed python2-tornado + fi fi + else + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then + PY_PKG_VER=2 + else + PY_PKG_VER="" + fi + __PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" + # shellcheck disable=SC2086 + pacman -Su --noconfirm --needed ${__PACKAGES} fi - # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -5418,8 +5624,12 @@ install_arch_linux_restart_daemons() { if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl stop salt-$fname.service > /dev/null 2>&1 - /usr/bin/systemctl start salt-$fname.service - continue + /usr/bin/systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi fi /etc/rc.d/salt-$fname stop > /dev/null 2>&1 @@ -5470,21 +5680,22 @@ install_freebsd_deps() { install_freebsd_git_deps() { install_freebsd_deps || return 1 - SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search -R -d py37-salt | grep 'origin:' \ - | tail -n +2 | awk -F\" '{print $2}') - # shellcheck disable=SC2086 - /usr/local/sbin/pkg install -y ${SALT_DEPENDENCIES} python || return 1 - if ! __check_command_exists git; then /usr/local/sbin/pkg install -y git || return 1 fi __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - /usr/local/sbin/pkg install -y py37-requests || return 1 + SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search -R -d py37-salt | grep 'origin:' \ + | tail -n +2 | awk -F\" '{print $2}') + # shellcheck disable=SC2086 + /usr/local/sbin/pkg install -y ${SALT_DEPENDENCIES} python || return 1 + + /usr/local/sbin/pkg install -y py37-requests || return 1 + else + /usr/local/sbin/pkg install -y python python-pip python-setuptools || return 1 + fi echodebug "Adapting paths to FreeBSD" # The list of files was taken from Salt's BSD port Makefile @@ -5641,8 +5852,16 @@ install_openbsd_deps() { install_openbsd_git_deps() { install_openbsd_deps || return 1 - pkg_add -I -v git || return 1 + + if ! __check_command_exists git; then + pkg_add -I -v git || return 1 + fi __git_clone_and_checkout || return 1 + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + pkg_add -I -v py-pip py-setuptools + fi + # # Let's trigger config_salt() # @@ -5651,10 +5870,6 @@ install_openbsd_git_deps() { CONFIG_SALT_FUNC="config_salt" fi - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - return 0 } @@ -5787,32 +6002,36 @@ install_smartos_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # Install whichever tornado is in the requirements file - __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - __check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'" + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # Install whichever tornado is in the requirements file + __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + __check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'" - # Install whichever futures is in the requirements file - __REQUIRED_FUTURES="$(grep futures "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - __check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_FUTURES}'" + # Install whichever futures is in the requirements file + __REQUIRED_FUTURES="$(grep futures "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + __check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_FUTURES}'" - if [ "${__REQUIRED_TORNADO}" != "" ]; then - if ! __check_command_exists pip; then - pkgin -y install py27-pip + if [ "${__REQUIRED_TORNADO}" != "" ]; then + if ! __check_command_exists pip; then + pkgin -y install py27-pip + fi + pip install -U "${__REQUIRED_TORNADO}" fi - pip install -U "${__REQUIRED_TORNADO}" - fi - if [ "${__REQUIRED_FUTURES}" != "" ]; then - if ! __check_command_exists pip; then - pkgin -y install py27-pip + if [ "${__REQUIRED_FUTURES}" != "" ]; then + if ! __check_command_exists pip; then + pkgin -y install py27-pip + fi + pip install -U "${__REQUIRED_FUTURES}" fi - pip install -U "${__REQUIRED_FUTURES}" fi + else + if ! __check_command_exists pip; then + pkgin -y install py27-pip + fi + pkgin -y install py27-setuptools fi # Let's trigger config_salt() @@ -5968,8 +6187,8 @@ __check_and_refresh_suse_pkg_repo() { __version_lte() { if ! __check_command_exists python; then - zypper zypper --non-interactive install --replacefiles --auto-agree-with-licenses python || \ - zypper zypper --non-interactive install --auto-agree-with-licenses python || return 1 + zypper --non-interactive install --replacefiles --auto-agree-with-licenses python || \ + zypper --non-interactive install --auto-agree-with-licenses python || return 1 fi if [ "$(python -c 'import sys; V1=tuple([int(i) for i in sys.argv[1].split(".")]); V2=tuple([int(i) for i in sys.argv[2].split(".")]); print V1<=V2' "$1" "$2")" = "True" ]; then @@ -6065,24 +6284,24 @@ install_opensuse_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __zypper_install patch || return 1 - __zypper_install patch || return 1 + __PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml python-futures" - __PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml python-futures" - - 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" + 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 - fi - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python-apache-libcloud" + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python-apache-libcloud" + fi + else + __PACKAGES="python-pip python-setuptools gcc" fi # shellcheck disable=SC2086 @@ -6206,8 +6425,12 @@ install_opensuse_restart_daemons() { if [ -f /bin/systemctl ]; then systemctl stop salt-$fname > /dev/null 2>&1 - systemctl start salt-$fname.service - continue + systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi fi service salt-$fname stop > /dev/null 2>&1 @@ -6282,36 +6505,39 @@ install_opensuse_15_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - - # Py3 is the default bootstrap install for Leap 15 - # However, git installs might specify "-x python2" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then PY_PKG_VER=2 - - # This is required by some of the python2 packages below - __PACKAGES="libpython2_7-1_0 python2-futures python-ipaddress" else PY_PKG_VER=3 - __PACKAGES="" fi - __PACKAGES="${__PACKAGES} libzmq5 python${PY_PKG_VER}-Jinja2 python${PY_PKG_VER}-msgpack" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pycrypto python${PY_PKG_VER}-pyzmq" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-xml" + __PACKAGES="python${PY_PKG_VER}-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${PY_PKG_VER}-tornado" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + + # Py3 is the default bootstrap install for Leap 15 + # However, git installs might specify "-x python2" + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then + # This is required by some of the python2 packages below + __PACKAGES="${__PACKAGES} libpython2_7-1_0 python2-futures python-ipaddress" fi - fi - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-apache-libcloud" + __PACKAGES="${__PACKAGES} libzmq5 python${PY_PKG_VER}-Jinja2 python${PY_PKG_VER}-msgpack" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pycrypto python${PY_PKG_VER}-pyzmq" + + 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${PY_PKG_VER}-tornado" + fi + fi + + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-apache-libcloud" + fi + else + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" fi # shellcheck disable=SC2086 @@ -6706,7 +6932,12 @@ install_gentoo_restart_daemons() { if [ -d "/run/systemd/system" ]; then systemctl stop salt-$fname > /dev/null 2>&1 - systemctl start salt-$fname.service + systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi else /etc/init.d/salt-$fname stop > /dev/null 2>&1 /etc/init.d/salt-$fname start