mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 10:10:25 +00:00
Compare commits
375 commits
v2023.11.0
...
develop
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dd49d607b9 | ||
![]() |
b5c92f7a28 | ||
![]() |
420dc293c6 | ||
![]() |
4498c20596 | ||
![]() |
911349a8d3 | ||
![]() |
fba522c464 | ||
![]() |
bb988c99d6 | ||
![]() |
b626403ace | ||
![]() |
b58596dec3 | ||
![]() |
a2b422512d | ||
![]() |
82faed1938 | ||
![]() |
2058991403 | ||
![]() |
db07164315 | ||
![]() |
e85ff18bbc | ||
![]() |
73475d2505 | ||
![]() |
1040775f56 | ||
![]() |
316e65a979 | ||
![]() |
0075aa9902 | ||
![]() |
651d50aa05 | ||
![]() |
f47986ffd5 | ||
![]() |
dc01eea317 | ||
![]() |
d4cc7c1184 | ||
![]() |
a3971ee993 | ||
![]() |
b6683d5e5e | ||
![]() |
9d69e8a49d | ||
![]() |
a0285f3e6e | ||
![]() |
852a98fce4 | ||
![]() |
ac14d1d0fe | ||
![]() |
fa5ae443bc | ||
![]() |
a4c84236d8 | ||
![]() |
e5c03a53aa | ||
![]() |
54243fea9c | ||
![]() |
0bd577de50 | ||
![]() |
04c959b723 | ||
![]() |
644dfd1c57 | ||
![]() |
1b98100152 | ||
![]() |
e4b43b099b | ||
![]() |
c4fdafaef3 | ||
![]() |
bbaa32a888 | ||
![]() |
ce687f4066 | ||
![]() |
1a016b6ed7 | ||
![]() |
5689a93c79 | ||
![]() |
670c0bfdd6 | ||
![]() |
777c3ad055 | ||
![]() |
ab523a74dc | ||
![]() |
5b183f4111 | ||
![]() |
eaf75272b7 | ||
![]() |
72254edd67 | ||
![]() |
578ee0eeeb | ||
![]() |
70219648f8 | ||
![]() |
677ecee801 | ||
![]() |
ff5d46dddd | ||
![]() |
535a53ea36 | ||
![]() |
5339251d59 | ||
![]() |
fdcfec993b | ||
![]() |
7492ff27f3 | ||
![]() |
bd9d776046 | ||
![]() |
3c0f302b77 | ||
![]() |
d0bd4612a6 | ||
![]() |
9b3055b1bd | ||
![]() |
e4b3164136 | ||
![]() |
a79cd05fa0 | ||
![]() |
b96a669d39 | ||
![]() |
124e62e9fa | ||
![]() |
7a445852b4 | ||
![]() |
8e3f5e1c83 | ||
![]() |
a336478623 | ||
![]() |
40e91846d8 | ||
![]() |
13e00e0bbc | ||
![]() |
ba0a5f2759 | ||
![]() |
6629b40bfc | ||
![]() |
6b27fc3e97 | ||
![]() |
d7d03738da | ||
![]() |
f8da32f34b | ||
![]() |
6360fd19f2 | ||
![]() |
543d831312 | ||
![]() |
8fa55b714e | ||
![]() |
86d1bb9662 | ||
![]() |
344b942c28 | ||
![]() |
320b3b787e | ||
![]() |
c2071bd443 | ||
![]() |
b5d70f024c | ||
![]() |
d0d73fa9f4 | ||
![]() |
360a923190 | ||
![]() |
6c22d58dac | ||
![]() |
e894ebce3e | ||
![]() |
0e00e1d3ca | ||
![]() |
6ac1dcddaa | ||
![]() |
f2abbd4e2f | ||
![]() |
aca7925571 | ||
![]() |
007c9663e6 | ||
![]() |
b37f1d8f32 | ||
![]() |
edaa710bcb | ||
![]() |
c7705ab73e | ||
![]() |
bcffbb3aff | ||
![]() |
9ef4b48bc5 | ||
![]() |
27461c79bb | ||
![]() |
a9cddcf5c6 | ||
![]() |
035d769e60 | ||
![]() |
cc583da80c | ||
![]() |
f6906be830 | ||
![]() |
95ff9355c5 | ||
![]() |
8f07647b1e | ||
![]() |
3de9da512b | ||
![]() |
12dd54c332 | ||
![]() |
5bd00aca9c | ||
![]() |
db5d548d1a | ||
![]() |
0c1de07494 | ||
![]() |
f2b7f56ceb | ||
![]() |
e16cda4c14 | ||
![]() |
043f8e0b78 | ||
![]() |
2a72acf0e4 | ||
![]() |
f33f58e6c4 | ||
![]() |
8a5c2d8598 | ||
![]() |
623b50e826 | ||
![]() |
90c19c02f7 | ||
![]() |
447e01db26 | ||
![]() |
d0d9fa7ed1 | ||
![]() |
0bbe715ad8 | ||
![]() |
5a704ec503 | ||
![]() |
ce84347128 | ||
![]() |
f52fea9e1d | ||
![]() |
736e8c0bc3 | ||
![]() |
a50227f2fe | ||
![]() |
dbfd3b0f19 | ||
![]() |
22c7173a22 | ||
![]() |
ba77751f99 | ||
![]() |
c1e7783a84 | ||
![]() |
f2a5fc19a4 | ||
![]() |
1f885ee091 | ||
![]() |
55f219224c | ||
![]() |
03fd45ba97 | ||
![]() |
1fa8125a51 | ||
![]() |
90fc657e71 | ||
![]() |
03d451820d | ||
![]() |
5776297744 | ||
![]() |
ef3d82c1a8 | ||
![]() |
0c255cfb80 | ||
![]() |
e1e8f208a0 | ||
![]() |
5d0e68b3ee | ||
![]() |
a902af3c53 | ||
![]() |
906d38d941 | ||
![]() |
c7e11a7637 | ||
![]() |
9dc22a8178 | ||
![]() |
78b4b24b42 | ||
![]() |
62040848a8 | ||
![]() |
a8b1804f18 | ||
![]() |
8782a3b79a | ||
![]() |
e6e5cd64e9 | ||
![]() |
b2545a20a7 | ||
![]() |
bf7943e78c | ||
![]() |
b01acd2fa4 | ||
![]() |
cda77be3a3 | ||
![]() |
549a47f94b | ||
![]() |
b13e9279d6 | ||
![]() |
ced8291c04 | ||
![]() |
2fe253a9c0 | ||
![]() |
24a275494a | ||
![]() |
ee72db1f2a | ||
![]() |
8cdedfbec2 | ||
![]() |
2a4e6a3552 | ||
![]() |
aaa123adef | ||
![]() |
3316de34f1 | ||
![]() |
f56ce5c866 | ||
![]() |
6414095b60 | ||
![]() |
94b61ec940 | ||
![]() |
1156b28cb2 | ||
![]() |
d018ef7ebb | ||
![]() |
8686ca3a39 | ||
![]() |
f1a5e97125 | ||
![]() |
7c350c4f48 | ||
![]() |
f36c2c06a3 | ||
![]() |
d013827c06 | ||
![]() |
f09afd7cee | ||
![]() |
2fa863a9e6 | ||
![]() |
de5f8d4292 | ||
![]() |
aef73e4b56 | ||
![]() |
0d4b031941 | ||
![]() |
4a6228abc4 | ||
![]() |
505e796387 | ||
![]() |
86bc98ad4d | ||
![]() |
e5f0e78c67 | ||
![]() |
081590b816 | ||
![]() |
1b8b907636 | ||
![]() |
687144336a | ||
![]() |
6335ea1eab | ||
![]() |
3c2af3b920 | ||
![]() |
ff6c817bfe | ||
![]() |
67a0bef81d | ||
![]() |
6050a0b217 | ||
![]() |
efe775e630 | ||
![]() |
46fdd9ed68 | ||
![]() |
7d5b7c1ace | ||
![]() |
ef6d6b6d7e | ||
![]() |
ded5813ead | ||
![]() |
581f650d6e | ||
![]() |
d5ff514a6b | ||
![]() |
0c7cf7353c | ||
![]() |
0a3b4f9b64 | ||
![]() |
0828aa5e41 | ||
![]() |
892c7cbadc | ||
![]() |
63bdbaf392 | ||
![]() |
b4a632180e | ||
![]() |
239f979957 | ||
![]() |
db974361f7 | ||
![]() |
0899e72c34 | ||
![]() |
e8236eedad | ||
![]() |
699ade0c04 | ||
![]() |
bc0e6be136 | ||
![]() |
8da0764163 | ||
![]() |
7e64ec0e2a | ||
![]() |
3d58d55fba | ||
![]() |
48a22b1722 | ||
![]() |
d67a79b3cb | ||
![]() |
12e5a8d80c | ||
![]() |
b2a38085d1 | ||
![]() |
8d0aca6ab7 | ||
![]() |
023e160b71 | ||
![]() |
ffaa18e7ae | ||
![]() |
681fd9a2db | ||
![]() |
0da4f9aa21 | ||
![]() |
09a36c52ca | ||
![]() |
27198d2b91 | ||
![]() |
6f36d5053c | ||
![]() |
f7eae7c3fa | ||
![]() |
a4b8359357 | ||
![]() |
425fb310f6 | ||
![]() |
ec457c25ae | ||
![]() |
7c6a4a0da7 | ||
![]() |
ae440cb321 | ||
![]() |
70558b1768 | ||
![]() |
da9ad0b8bf | ||
![]() |
d7baa83fc6 | ||
![]() |
fba26a227b | ||
![]() |
8c9e6621db | ||
![]() |
9848c3311e | ||
![]() |
6c37a9a9c3 | ||
![]() |
b17e02b4b3 | ||
![]() |
3c48309906 | ||
![]() |
064d13cf41 | ||
![]() |
725d18f6c8 | ||
![]() |
7d55680ddd | ||
![]() |
21137fb9ad | ||
![]() |
62dc912401 | ||
![]() |
3e207e087f | ||
![]() |
4f5a393916 | ||
![]() |
ba565658e9 | ||
![]() |
e5f785b422 | ||
![]() |
10377e548d | ||
![]() |
98dc1368ac | ||
![]() |
d7e05db988 | ||
![]() |
3d78111d7b | ||
![]() |
76519f2b7f | ||
![]() |
8696f41b7c | ||
![]() |
9473a4b52c | ||
![]() |
a8703157e1 | ||
![]() |
d88e9c3b3d | ||
![]() |
c6344035d6 | ||
![]() |
2068ae4024 | ||
![]() |
7c0c04dc4f | ||
![]() |
a52ba3b64d | ||
![]() |
9ef40698b0 | ||
![]() |
69a5a7c79c | ||
![]() |
b36f307bbc | ||
![]() |
0daa3c47d1 | ||
![]() |
79264af6eb | ||
![]() |
4637ef0863 | ||
![]() |
4554169a6a | ||
![]() |
bb8d8a892d | ||
![]() |
93e7841e4c | ||
![]() |
272ed35db8 | ||
![]() |
8166b71854 | ||
![]() |
aae98dbd9d | ||
![]() |
9a788851ff | ||
![]() |
bc7fa40ed7 | ||
![]() |
de725f809f | ||
![]() |
a5124f90e5 | ||
![]() |
0cc372f66b | ||
![]() |
06702a81aa | ||
![]() |
4029e24d74 | ||
![]() |
26f92489f3 | ||
![]() |
02aa3bbdfc | ||
![]() |
c2f0375167 | ||
![]() |
41563ad1de | ||
![]() |
9afa614e2a | ||
![]() |
b1d1ec6b26 | ||
![]() |
1c244ea427 | ||
![]() |
210db17a78 | ||
![]() |
e221fff82c | ||
![]() |
a8dba0748a | ||
![]() |
ca1d8d679f | ||
![]() |
8ee4de5ca4 | ||
![]() |
138b4ec78b | ||
![]() |
16ad6a8d0c | ||
![]() |
7881998765 | ||
![]() |
4351f20a34 | ||
![]() |
2ba74d33bc | ||
![]() |
f8cfdc5f07 | ||
![]() |
bb51f9fd63 | ||
![]() |
a79bffeb20 | ||
![]() |
1ca3e432ae | ||
![]() |
fdd6b3240b | ||
![]() |
69d2645f70 | ||
![]() |
97afdfbce5 | ||
![]() |
bbd6498cd8 | ||
![]() |
c43d47000a | ||
![]() |
91e7e8922f | ||
![]() |
0cc3cc57ac | ||
![]() |
5d9f9f89f0 | ||
![]() |
af44d56373 | ||
![]() |
7aad81c0a8 | ||
![]() |
4cb4fc8c2f | ||
![]() |
b178397b18 | ||
![]() |
02bf0e33c1 | ||
![]() |
3aaa73bbb4 | ||
![]() |
62b8a7341a | ||
![]() |
2feff7baa4 | ||
![]() |
74bae42128 | ||
![]() |
8ac6918056 | ||
![]() |
289a5a2d0b | ||
![]() |
969584dd95 | ||
![]() |
dddcd3b67c | ||
![]() |
06107058d9 | ||
![]() |
8a14ff6c04 | ||
![]() |
9716ff0b91 | ||
![]() |
f88a320855 | ||
![]() |
679bc97156 | ||
![]() |
1ad1dbe0fc | ||
![]() |
1812ec20e6 | ||
![]() |
bd84c9c4df | ||
![]() |
71094027fa | ||
![]() |
3535de7284 | ||
![]() |
69495e9ee0 | ||
![]() |
6f543b7a66 | ||
![]() |
64866eb574 | ||
![]() |
20c2d4cac8 | ||
![]() |
db9ce9ba03 | ||
![]() |
739784c608 | ||
![]() |
179b24d9f8 | ||
![]() |
8f36f1371b | ||
![]() |
67c52529d9 | ||
![]() |
100fab8fbe | ||
![]() |
10d602791d | ||
![]() |
78ecaec870 | ||
![]() |
15bea28fa9 | ||
![]() |
9fee6196f6 | ||
![]() |
93f001f94a | ||
![]() |
e77e9227d4 | ||
![]() |
a43d139520 | ||
![]() |
de361546ab | ||
![]() |
ac23048cd6 | ||
![]() |
1d1ef48353 | ||
![]() |
e55bccd52e | ||
![]() |
4987f08ad8 | ||
![]() |
88f935ed90 | ||
![]() |
ce4c9db3c6 | ||
![]() |
e8e28c0a4d | ||
![]() |
0c8f4470bc | ||
![]() |
84f02cf3ab | ||
![]() |
a0c99153f9 | ||
![]() |
e05d70558f | ||
![]() |
59af6ad185 | ||
![]() |
4b031af693 | ||
![]() |
dffac087f8 | ||
![]() |
ec283baa3f | ||
![]() |
cecea60a06 | ||
![]() |
e5a814c9df | ||
![]() |
d6ed8ea269 | ||
![]() |
8aa272b236 | ||
![]() |
928daba98a | ||
![]() |
cb148ad4ad | ||
![]() |
c32e0b2040 | ||
![]() |
f5783bec2a | ||
![]() |
fe3783432e | ||
![]() |
a01c7205de |
35 changed files with 3339 additions and 5780 deletions
450
.github/workflows/ci.yml
vendored
450
.github/workflows/ci.yml
vendored
|
@ -16,19 +16,17 @@ jobs:
|
|||
outputs:
|
||||
run-tests: ${{ steps.set-output.outputs.run-tests }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get specific changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v25
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
separator: ","
|
||||
files: |
|
||||
bootstrap-salt.*
|
||||
Gemfile
|
||||
kitchen*.yml
|
||||
tests/**
|
||||
.github/workflows/**
|
||||
files_ignore: |
|
||||
|
@ -47,10 +45,10 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
generate-actions-workflow:
|
||||
name: Generate The Actions Workflow
|
||||
|
@ -59,12 +57,12 @@ jobs:
|
|||
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.9
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install Pre-Commit
|
||||
run: |
|
||||
|
@ -84,19 +82,19 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
needs: collect-changed-files
|
||||
container: koalaman/shellcheck-alpine:v0.7.0
|
||||
container: koalaman/shellcheck-alpine:latest
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: ShellCheck
|
||||
run: |
|
||||
shellcheck -s sh -f tty bootstrap-salt.sh
|
||||
|
@ -109,104 +107,46 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
|
||||
|
||||
freebsd-131:
|
||||
name: FreeBSD 13.1
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-bsd.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: freebsd-131
|
||||
display-name: FreeBSD 13.1
|
||||
timeout: 20
|
||||
runs-on: macos-12
|
||||
instances: '["latest"]'
|
||||
|
||||
|
||||
freebsd-123:
|
||||
name: FreeBSD 12.3
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-bsd.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: freebsd-123
|
||||
display-name: FreeBSD 12.3
|
||||
timeout: 20
|
||||
runs-on: macos-12
|
||||
instances: '["latest"]'
|
||||
|
||||
|
||||
openbsd-7:
|
||||
name: OpenBSD 7
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-bsd.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: openbsd-7
|
||||
display-name: OpenBSD 7
|
||||
timeout: 20
|
||||
runs-on: macos-12
|
||||
instances: '["latest"]'
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
|
||||
|
||||
macos-11:
|
||||
name: macOS 11
|
||||
macos-13:
|
||||
name: macOS 13
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-macos.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: macos-11
|
||||
display-name: macOS 11
|
||||
distro-slug: macos-13
|
||||
display-name: macOS 13
|
||||
container-slug: macos-13
|
||||
timeout: 20
|
||||
runs-on: macos-11
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3006", "stable-3006-1", "latest"]'
|
||||
runs-on: macos-13
|
||||
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
|
||||
|
||||
|
||||
macos-12:
|
||||
name: macOS 12
|
||||
macos-14:
|
||||
name: macOS 14
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-macos.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: macos-12
|
||||
display-name: macOS 12
|
||||
distro-slug: macos-14
|
||||
display-name: macOS 14
|
||||
container-slug: macOS 14
|
||||
timeout: 20
|
||||
runs-on: macos-12
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3006", "stable-3006-1", "latest"]'
|
||||
runs-on: macos-14
|
||||
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
|
||||
|
||||
|
||||
|
||||
windows-2019:
|
||||
name: Windows 2019
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-windows.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: windows-2019
|
||||
display-name: Windows 2019
|
||||
timeout: 20
|
||||
runs-on: windows-2019
|
||||
instances: '["stable-3005", "stable-3005-1", "stable-3006", "stable-3006-1", "latest"]'
|
||||
|
||||
|
||||
windows-2022:
|
||||
name: Windows 2022
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
|
@ -217,122 +157,26 @@ jobs:
|
|||
with:
|
||||
distro-slug: windows-2022
|
||||
display-name: Windows 2022
|
||||
container-slug: windows-2022
|
||||
timeout: 20
|
||||
runs-on: windows-2022
|
||||
instances: '["stable-3005", "stable-3005-1", "stable-3006", "stable-3006-1", "latest"]'
|
||||
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
|
||||
|
||||
|
||||
|
||||
almalinux-8:
|
||||
name: AlmaLinux 8
|
||||
amazonlinux-2023:
|
||||
name: Amazon 2023
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: almalinux-8
|
||||
display-name: AlmaLinux 8
|
||||
distro-slug: amazonlinux-2023
|
||||
display-name: Amazon 2023
|
||||
container-slug: amazonlinux-2023
|
||||
timeout: 20
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
almalinux-9:
|
||||
name: AlmaLinux 9
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: almalinux-9
|
||||
display-name: AlmaLinux 9
|
||||
timeout: 20
|
||||
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
|
||||
|
||||
|
||||
amazon-2:
|
||||
name: Amazon 2
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: amazon-2
|
||||
display-name: Amazon 2
|
||||
timeout: 20
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
arch:
|
||||
name: Arch
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: arch
|
||||
display-name: Arch
|
||||
timeout: 20
|
||||
instances: '["git-master", "latest", "default"]'
|
||||
|
||||
|
||||
centos-7:
|
||||
name: CentOS 7
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: centos-7
|
||||
display-name: CentOS 7
|
||||
timeout: 20
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
centos-stream8:
|
||||
name: CentOS Stream 8
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: centos-stream8
|
||||
display-name: CentOS Stream 8
|
||||
timeout: 20
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
centos-stream9:
|
||||
name: CentOS Stream 9
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: centos-stream9
|
||||
display-name: CentOS Stream 9
|
||||
timeout: 20
|
||||
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
|
||||
|
||||
|
||||
debian-10:
|
||||
name: Debian 10
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: debian-10
|
||||
display-name: Debian 10
|
||||
timeout: 20
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
debian-11:
|
||||
|
@ -345,162 +189,39 @@ jobs:
|
|||
with:
|
||||
distro-slug: debian-11
|
||||
display-name: Debian 11
|
||||
container-slug: debian-11
|
||||
timeout: 20
|
||||
instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
fedora-36:
|
||||
name: Fedora 36
|
||||
debian-12:
|
||||
name: Debian 12
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: fedora-36
|
||||
display-name: Fedora 36
|
||||
distro-slug: debian-12
|
||||
display-name: Debian 12
|
||||
container-slug: debian-12
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
|
||||
instances: '["stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
|
||||
|
||||
|
||||
fedora-37:
|
||||
name: Fedora 37
|
||||
photon-5:
|
||||
name: Photon OS 5
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: fedora-37
|
||||
display-name: Fedora 37
|
||||
distro-slug: photon-5
|
||||
display-name: Photon OS 5
|
||||
container-slug: photon-5
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
fedora-38:
|
||||
name: Fedora 38
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: fedora-38
|
||||
display-name: Fedora 38
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
gentoo:
|
||||
name: Gentoo
|
||||
if: github.event_name == 'push'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: gentoo
|
||||
display-name: Gentoo
|
||||
timeout: 90
|
||||
instances: '["git-master"]'
|
||||
|
||||
|
||||
gentoo-systemd:
|
||||
name: Gentoo (systemd)
|
||||
if: github.event_name == 'push'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: gentoo-systemd
|
||||
display-name: Gentoo (systemd)
|
||||
timeout: 90
|
||||
instances: '["git-master"]'
|
||||
|
||||
|
||||
opensuse-15:
|
||||
name: Opensuse 15
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: opensuse-15
|
||||
display-name: Opensuse 15
|
||||
timeout: 20
|
||||
instances: '["latest", "default"]'
|
||||
|
||||
|
||||
opensuse-tumbleweed:
|
||||
name: Opensuse Tumbleweed
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: opensuse-tumbleweed
|
||||
display-name: Opensuse Tumbleweed
|
||||
timeout: 20
|
||||
instances: '["git-master", "latest", "default"]'
|
||||
|
||||
|
||||
oraclelinux-7:
|
||||
name: Oracle Linux 7
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: oraclelinux-7
|
||||
display-name: Oracle Linux 7
|
||||
timeout: 20
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
oraclelinux-8:
|
||||
name: Oracle Linux 8
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: oraclelinux-8
|
||||
display-name: Oracle Linux 8
|
||||
timeout: 20
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
photon-3:
|
||||
name: Photon OS 3
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: photon-3
|
||||
display-name: Photon OS 3
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
|
||||
|
||||
photon-4:
|
||||
name: Photon OS 4
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: photon-4
|
||||
display-name: Photon OS 4
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
rockylinux-8:
|
||||
|
@ -513,8 +234,9 @@ jobs:
|
|||
with:
|
||||
distro-slug: rockylinux-8
|
||||
display-name: Rocky Linux 8
|
||||
container-slug: rockylinux-8
|
||||
timeout: 20
|
||||
instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
rockylinux-9:
|
||||
|
@ -527,22 +249,9 @@ jobs:
|
|||
with:
|
||||
distro-slug: rockylinux-9
|
||||
display-name: Rocky Linux 9
|
||||
container-slug: rockylinux-9
|
||||
timeout: 20
|
||||
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
|
||||
|
||||
|
||||
ubuntu-2004:
|
||||
name: Ubuntu 20.04
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: ubuntu-2004
|
||||
display-name: Ubuntu 20.04
|
||||
timeout: 20
|
||||
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
ubuntu-2204:
|
||||
|
@ -555,8 +264,9 @@ jobs:
|
|||
with:
|
||||
distro-slug: ubuntu-2204
|
||||
display-name: Ubuntu 22.04
|
||||
container-slug: ubuntu-22.04
|
||||
timeout: 20
|
||||
instances: '["stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
|
||||
instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
|
||||
|
||||
|
||||
set-pipeline-exit-status:
|
||||
|
@ -567,52 +277,32 @@ jobs:
|
|||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-7
|
||||
- macos-11
|
||||
- macos-12
|
||||
- windows-2019
|
||||
- macos-13
|
||||
- macos-14
|
||||
- windows-2022
|
||||
- almalinux-8
|
||||
- almalinux-9
|
||||
- amazon-2
|
||||
- arch
|
||||
- centos-7
|
||||
- centos-stream8
|
||||
- centos-stream9
|
||||
- debian-10
|
||||
- amazonlinux-2023
|
||||
- debian-11
|
||||
- fedora-36
|
||||
- fedora-37
|
||||
- fedora-38
|
||||
- gentoo
|
||||
- gentoo-systemd
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- oraclelinux-7
|
||||
- oraclelinux-8
|
||||
- photon-3
|
||||
- photon-4
|
||||
- debian-12
|
||||
- photon-5
|
||||
- rockylinux-8
|
||||
- rockylinux-9
|
||||
- ubuntu-2004
|
||||
- ubuntu-2204
|
||||
if: always()
|
||||
steps:
|
||||
|
||||
- name: Download Exit Status Files
|
||||
if: always()
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
path: exitstatus/
|
||||
pattern: exitstatus-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Delete Exit Status Artifacts
|
||||
if: always()
|
||||
uses: geekyeggo/delete-artifact@v1
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: exitstatus
|
||||
pattern: exitstatus-*
|
||||
failOnError: false
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
|
|
58
.github/workflows/nightly.yml
vendored
58
.github/workflows/nightly.yml
vendored
|
@ -41,61 +41,3 @@ jobs:
|
|||
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
update-s3-bucket:
|
||||
name: Update S3 Bucket
|
||||
if: ${{ fromJSON(needs.workflow-requirements.outputs.requirements-met) }}
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-release
|
||||
needs:
|
||||
- workflow-requirements
|
||||
environment: release
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
id: get-secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Install Requirements
|
||||
run: |
|
||||
python3 -m pip install -r requirements/release.txt
|
||||
|
||||
- name: Upload Develop to S3
|
||||
run: |
|
||||
tools release s3-publish --key-id 64CBBC8173D76B3F develop
|
||||
|
|
289
.github/workflows/release.yml
vendored
289
.github/workflows/release.yml
vendored
|
@ -51,10 +51,7 @@ jobs:
|
|||
|
||||
update-develop:
|
||||
name: Update CHANGELOG.md and bootstrap-salt.sh
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # To be able to publish the release
|
||||
environment: release
|
||||
|
@ -63,7 +60,7 @@ jobs:
|
|||
outputs:
|
||||
release-version: ${{ steps.update-repo.outputs.release-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: develop
|
||||
repository: ${{ github.repository }}
|
||||
|
@ -74,44 +71,13 @@ jobs:
|
|||
python3 -m pip install -r requirements/release.txt
|
||||
pre-commit install --install-hooks
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
id: get-secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Configure Git
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global --add safe.directory "$(pwd)"
|
||||
git config --global user.name "Salt Project Packaging"
|
||||
git config --global user.email saltproject-packaging@vmware.com
|
||||
git config --global user.signingkey 64CBBC8173D76B3F
|
||||
git config --global commit.gpgsign true
|
||||
git config --global commit.gpgsign false
|
||||
|
||||
- name: Update Repository
|
||||
id: update-repo
|
||||
|
@ -139,73 +105,40 @@ jobs:
|
|||
repository: ${{ github.repository }}
|
||||
|
||||
- name: Upload Release Details
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-details
|
||||
path: |
|
||||
.cut_release_version
|
||||
.cut_release_changes
|
||||
include-hidden-files: true
|
||||
|
||||
merge-develop-into-stable:
|
||||
name: Merge develop into stable
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-release
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- update-develop
|
||||
environment: release
|
||||
permissions:
|
||||
contents: write # To be able to publish the release
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: stable
|
||||
repository: ${{ github.repository }}
|
||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
id: get-secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Configure Git
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global --add safe.directory "$(pwd)"
|
||||
git config --global user.name "Salt Project Packaging"
|
||||
git config --global user.email saltproject-packaging@vmware.com
|
||||
git config --global user.signingkey 64CBBC8173D76B3F
|
||||
git config --global commit.gpgsign true
|
||||
git config --global commit.gpgsign false
|
||||
|
||||
- name: Download Release Details
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release-details
|
||||
|
||||
|
@ -226,7 +159,7 @@ jobs:
|
|||
|
||||
- name: Tag The ${{ needs.update-develop.outputs.release-version }} Release
|
||||
run: |
|
||||
git tag -m "Release ${{ needs.update-develop.outputs.release-version }}" -as ${{ needs.update-develop.outputs.release-version }}
|
||||
git tag --no-sign -m "Release ${{ needs.update-develop.outputs.release-version }}" -a ${{ needs.update-develop.outputs.release-version }}
|
||||
|
||||
- name: Update bootstrap-salt.sh sha256sum's
|
||||
run: |
|
||||
|
@ -245,22 +178,21 @@ jobs:
|
|||
|
||||
publish-release:
|
||||
name: Create GitHub Release
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- merge-develop-into-stable
|
||||
environment: release
|
||||
permissions:
|
||||
contents: write # To be able to publish the release
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: stable
|
||||
repository: ${{ github.repository }}
|
||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||
|
||||
- name: Download Release Details
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release-details
|
||||
|
||||
|
@ -287,74 +219,14 @@ jobs:
|
|||
LICENSE
|
||||
|
||||
- name: Delete Release Details Artifact
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: release-details
|
||||
failOnError: false
|
||||
|
||||
update-s3-bucket:
|
||||
name: Update S3 Bucket
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-release
|
||||
needs:
|
||||
- publish-release
|
||||
environment: release
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
id: get-secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Install Requirements
|
||||
run: |
|
||||
python3 -m pip install -r requirements/release.txt
|
||||
|
||||
- name: Upload Stable Release to S3
|
||||
run: |
|
||||
tools release s3-publish --key-id 64CBBC8173D76B3F stable
|
||||
|
||||
update-develop-checksums:
|
||||
name: Update Release Checksums on Develop
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-release
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- publish-release
|
||||
environment: release
|
||||
|
@ -363,7 +235,7 @@ jobs:
|
|||
pull-requests: write # For action peter-evans/create-pull-request
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: stable
|
||||
repository: ${{ github.repository }}
|
||||
|
@ -374,50 +246,19 @@ jobs:
|
|||
echo "SH=$(sha256sum bootstrap-salt.sh | awk '{ print $1 }')" >> "$GITHUB_ENV"
|
||||
echo "BS_VERSION=$(sh bootstrap-salt.sh -v | awk '{ print $4 }')" >> "$GITHUB_ENV"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: develop
|
||||
repository: ${{ github.repository }}
|
||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
id: get-secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Configure Git
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global --add safe.directory "$(pwd)"
|
||||
git config --global user.name "Salt Project Packaging"
|
||||
git config --global user.email saltproject-packaging@vmware.com
|
||||
git config --global user.signingkey 64CBBC8173D76B3F
|
||||
git config --global commit.gpgsign true
|
||||
git config --global commit.gpgsign false
|
||||
|
||||
- name: Update Latest Release on README
|
||||
run: |
|
||||
|
@ -440,95 +281,3 @@ jobs:
|
|||
atomic: true
|
||||
branch: develop
|
||||
repository: ${{ github.repository }}
|
||||
|
||||
|
||||
salt:
|
||||
name: Update Release on Salt Repo
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- repo-release
|
||||
needs:
|
||||
- update-develop-checksums
|
||||
environment: release
|
||||
permissions:
|
||||
contents: write # For action peter-evans/create-pull-request
|
||||
pull-requests: write # For action peter-evans/create-pull-request
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: stable
|
||||
repository: ${{ github.repository }}
|
||||
|
||||
- name: Get bootstrap version
|
||||
run: |
|
||||
echo "BS_VERSION=$(sh bootstrap-salt.sh -v | awk '{ print $4 }')" >> "$GITHUB_ENV"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: saltstack/salt
|
||||
ref: master
|
||||
path: salt-checkout
|
||||
token: ${{ secrets.SALT_REPO_WRITE_TOKEN }}
|
||||
|
||||
- name: Setup GnuPG
|
||||
run: |
|
||||
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg
|
||||
GNUPGHOME="$(mktemp -d -p /run/gpg)"
|
||||
echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV"
|
||||
cat <<EOF > "${GNUPGHOME}/gpg.conf"
|
||||
batch
|
||||
no-tty
|
||||
pinentry-mode loopback
|
||||
EOF
|
||||
|
||||
- name: Get Secrets
|
||||
id: get-secrets
|
||||
env:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
run: |
|
||||
SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX)
|
||||
echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE"
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text | jq .default_key -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \
|
||||
| gpg --import -
|
||||
sync
|
||||
aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \
|
||||
--query SecretString --output text| jq .default_passphrase -r | base64 -d \
|
||||
| gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d -
|
||||
sync
|
||||
rm "$SECRETS_KEY_FILE"
|
||||
echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf"
|
||||
|
||||
- name: Configure Git
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global --add safe.directory "$(pwd)"
|
||||
git config --global user.name "Salt Project Packaging"
|
||||
git config --global user.email saltproject-packaging@vmware.com
|
||||
git config --global user.signingkey 64CBBC8173D76B3F
|
||||
git config --global commit.gpgsign true
|
||||
|
||||
- name: Update bootstrap script on Salt
|
||||
run: |
|
||||
cp bootstrap-salt.sh salt-checkout/salt/cloud/deploy/bootstrap-salt.sh
|
||||
|
||||
- name: Commit Changes
|
||||
working-directory: salt-checkout/
|
||||
run: |
|
||||
git commit -am "Update the bootstrap script to v${{ env.BS_VERSION }}"
|
||||
|
||||
- name: Create Pull Request Against Develop
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
title: "Update the bootstrap script to v${{ env.BS_VERSION }}"
|
||||
path: salt-checkout
|
||||
base: master
|
||||
token: ${{ secrets.SALT_REPO_WRITE_TOKEN }}
|
||||
author: "Salt Project Packaging <saltproject-packaging@vmware.com>"
|
||||
committer: "Salt Project Packaging <saltproject-packaging@vmware.com>"
|
||||
commit-message: Update the bootstrap script to v${{ env.BS_VERSION }}
|
||||
signoff: true
|
||||
delete-branch: true
|
||||
|
|
17
.github/workflows/scripts/cut-release.py
vendored
17
.github/workflows/scripts/cut-release.py
vendored
|
@ -188,6 +188,7 @@ def main():
|
|||
+ changelog_file.read_text()
|
||||
)
|
||||
|
||||
# Update Script Version for the bash script
|
||||
bootstrap_script_path = REPO_ROOT / "bootstrap-salt.sh"
|
||||
print(
|
||||
f"* Updating {bootstrap_script_path.relative_to(REPO_ROOT)} ...",
|
||||
|
@ -201,6 +202,22 @@ def main():
|
|||
bootstrap_script_path.read_text(),
|
||||
)
|
||||
)
|
||||
|
||||
# Update the Script Version for the powershell script
|
||||
bootstrap_script_path = REPO_ROOT / "bootstrap-salt.ps1"
|
||||
print(
|
||||
f"* Updating {bootstrap_script_path.relative_to(REPO_ROOT)} ...",
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
bootstrap_script_path.write_text(
|
||||
re.sub(
|
||||
r'\$__ScriptVersion = "(.*)"',
|
||||
f'$__ScriptVersion = "{options.release_tag.lstrip("v")}"',
|
||||
bootstrap_script_path.read_text(),
|
||||
)
|
||||
)
|
||||
|
||||
parser.exit(status=0, message="CHANGELOG.md and bootstrap-salt.sh updated\n")
|
||||
|
||||
|
||||
|
|
11
.github/workflows/templates/ci-tail.yml
vendored
11
.github/workflows/templates/ci-tail.yml
vendored
|
@ -11,16 +11,17 @@
|
|||
|
||||
- name: Download Exit Status Files
|
||||
if: always()
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
path: exitstatus/
|
||||
pattern: exitstatus-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Delete Exit Status Artifacts
|
||||
if: always()
|
||||
uses: geekyeggo/delete-artifact@v1
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: exitstatus
|
||||
pattern: exitstatus-*
|
||||
failOnError: false
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
|
|
36
.github/workflows/templates/ci.yml
vendored
36
.github/workflows/templates/ci.yml
vendored
|
@ -16,19 +16,17 @@ jobs:
|
|||
outputs:
|
||||
run-tests: ${{ steps.set-output.outputs.run-tests }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get specific changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v25
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
separator: ","
|
||||
files: |
|
||||
bootstrap-salt.*
|
||||
Gemfile
|
||||
kitchen*.yml
|
||||
tests/**
|
||||
.github/workflows/**
|
||||
files_ignore: |
|
||||
|
@ -47,10 +45,10 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
generate-actions-workflow:
|
||||
name: Generate The Actions Workflow
|
||||
|
@ -59,12 +57,12 @@ jobs:
|
|||
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.9
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install Pre-Commit
|
||||
run: |
|
||||
|
@ -84,19 +82,19 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
needs: collect-changed-files
|
||||
container: koalaman/shellcheck-alpine:v0.7.0
|
||||
container: koalaman/shellcheck-alpine:latest
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: ShellCheck
|
||||
run: |
|
||||
shellcheck -s sh -f tty bootstrap-salt.sh
|
||||
|
@ -109,7 +107,7 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
|
566
.github/workflows/templates/generate.py
vendored
566
.github/workflows/templates/generate.py
vendored
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
|
@ -6,351 +6,170 @@ import pathlib
|
|||
|
||||
os.chdir(os.path.abspath(os.path.dirname(__file__)))
|
||||
|
||||
# "amazonlinux-2",
|
||||
# "debian-13",
|
||||
# "fedora-40",
|
||||
# "photon-4",
|
||||
# "ubuntu-2004",
|
||||
# "ubuntu-2404",
|
||||
LINUX_DISTROS = [
|
||||
"almalinux-8",
|
||||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"debian-12",
|
||||
"photon-5",
|
||||
"rockylinux-8",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
WINDOWS = [
|
||||
"windows-2019",
|
||||
"windows-2022",
|
||||
]
|
||||
|
||||
OSX = [
|
||||
"macos-11",
|
||||
"macos-12",
|
||||
]
|
||||
BSD = [
|
||||
"freebsd-131",
|
||||
"freebsd-123",
|
||||
"openbsd-7",
|
||||
]
|
||||
|
||||
OLD_STABLE_DISTROS = [
|
||||
"almalinux-8",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"rockylinux-8",
|
||||
"ubuntu-2004",
|
||||
"macos-13",
|
||||
"macos-14",
|
||||
]
|
||||
|
||||
# "amazonlinux-2",
|
||||
# "debian-13",
|
||||
# "fedora-40",
|
||||
# "photon-4",
|
||||
# "ubuntu-2004",
|
||||
# "ubuntu-2404",
|
||||
STABLE_DISTROS = [
|
||||
"almalinux-8",
|
||||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"debian-12",
|
||||
"photon-5",
|
||||
"rockylinux-8",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
# "amazonlinux-2",
|
||||
# "debian-13",
|
||||
# "fedora-40",
|
||||
# "photon-4",
|
||||
# "ubuntu-2004",
|
||||
# "ubuntu-2404",
|
||||
ONEDIR_DISTROS = [
|
||||
"almalinux-8",
|
||||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"debian-12",
|
||||
"photon-5",
|
||||
"rockylinux-8",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
# "amazonlinux-2",
|
||||
# "amazonlinux-2023",
|
||||
# "photon-4",
|
||||
# "photon-5",
|
||||
# "rockylinux-8",
|
||||
# "ubuntu-2404",
|
||||
ONEDIR_RC_DISTROS = [
|
||||
"almalinux-8",
|
||||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"rockylinux-8",
|
||||
"debian-12",
|
||||
"photon-5",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_3003 = [
|
||||
"almalinux-9",
|
||||
"arch",
|
||||
"centos-stream9",
|
||||
"debian-11",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"rockylinux-8",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_GIT_3003 = [
|
||||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"rockylinux-8",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_3004 = [
|
||||
"almalinux-9",
|
||||
"arch",
|
||||
"centos-stream9",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"rockylinux-9",
|
||||
]
|
||||
|
||||
BLACKLIST_3005 = [
|
||||
"almalinux-9",
|
||||
"arch",
|
||||
"centos-stream9",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"rockylinux-9",
|
||||
]
|
||||
|
||||
BLACKLIST_GIT_3004 = [
|
||||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
"rockylinux-9",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
]
|
||||
|
||||
BLACKLIST_GIT_3005 = [
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"photon-3",
|
||||
"photon-4",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_3006 = [
|
||||
"arch",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"debian-12",
|
||||
"fedora-40",
|
||||
"ubuntu-2404",
|
||||
]
|
||||
|
||||
BLACKLIST_GIT_3006 = [
|
||||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"arch",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"fedora-36",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
"opensuse-tumbleweed",
|
||||
"photon-3",
|
||||
# "photon-5",
|
||||
BLACKLIST_3007 = [
|
||||
"photon-4",
|
||||
]
|
||||
|
||||
# "ubuntu-2204",
|
||||
BLACKLIST_GIT_3006 = [
|
||||
"amazonlinux-2",
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"debian-13",
|
||||
"fedora-40",
|
||||
"photon-4",
|
||||
"photon-5",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2110",
|
||||
"ubuntu-2204",
|
||||
"ubuntu-2404",
|
||||
]
|
||||
|
||||
# "debian-12",
|
||||
# "ubuntu-2204",
|
||||
BLACKLIST_GIT_3007 = [
|
||||
"amazonlinux-2",
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"debian-13",
|
||||
"fedora-40",
|
||||
"photon-4",
|
||||
"photon-5",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2004",
|
||||
"ubuntu-2404",
|
||||
]
|
||||
|
||||
# "debian-12",
|
||||
BLACKLIST_GIT_MASTER = [
|
||||
"amazon-2",
|
||||
"debian-10",
|
||||
"freebsd-131",
|
||||
"freebsd-123",
|
||||
"photon-3",
|
||||
"amazonlinux-2",
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"debian-13",
|
||||
"fedora-40",
|
||||
"photon-4",
|
||||
"photon-5",
|
||||
"rockylinux-9",
|
||||
]
|
||||
|
||||
SALT_VERSIONS = [
|
||||
"3003",
|
||||
"3004",
|
||||
"3005",
|
||||
"3005-1",
|
||||
"3006",
|
||||
"3006-1",
|
||||
"3006-8",
|
||||
"3007",
|
||||
"3007-1",
|
||||
"master",
|
||||
"latest",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
ONEDIR_SALT_VERSIONS = [
|
||||
"3005",
|
||||
"3006",
|
||||
"3007",
|
||||
"latest",
|
||||
]
|
||||
|
||||
ONEDIR_RC_SALT_VERSIONS = []
|
||||
|
||||
VERSION_DISPLAY_NAMES = {
|
||||
"3003": "v3003",
|
||||
"3004": "v3004",
|
||||
"3005": "v3005",
|
||||
"3005-1": "v3005.1",
|
||||
"3006": "v3006",
|
||||
"3006-1": "v3006.1",
|
||||
"3006-8": "v3006.8",
|
||||
"3007": "v3007",
|
||||
"3007-1": "v3007.1",
|
||||
"master": "Master",
|
||||
"latest": "Latest",
|
||||
"nightly": "Nightly",
|
||||
}
|
||||
|
||||
OLD_STABLE_VERSION_BLACKLIST = [
|
||||
"3005-1",
|
||||
"3006",
|
||||
"3006-1",
|
||||
"master",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
STABLE_VERSION_BLACKLIST = [
|
||||
"3003",
|
||||
"3004",
|
||||
"master",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
MAC_OLD_STABLE_VERSION_BLACKLIST = [
|
||||
"3005-1",
|
||||
"3006",
|
||||
"3006-1",
|
||||
"master",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
MAC_STABLE_VERSION_BLACKLIST = [
|
||||
"3003",
|
||||
"3004",
|
||||
"3005",
|
||||
"3005-1",
|
||||
"master",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
GIT_VERSION_BLACKLIST = [
|
||||
"3005-1",
|
||||
"3006-1",
|
||||
"3006-8",
|
||||
"3007-1",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
|
@ -364,66 +183,52 @@ GIT_VERSION_BLACKLIST = [
|
|||
# Use build and pip and other standards-based tools.
|
||||
#
|
||||
GIT_DISTRO_BLACKLIST = [
|
||||
"almalinux-8",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"fedora-37",
|
||||
"fedora-38",
|
||||
"opensuse-15",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"rockylinux-8",
|
||||
]
|
||||
|
||||
LATEST_PKG_BLACKLIST = [
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
]
|
||||
LATEST_PKG_BLACKLIST = []
|
||||
|
||||
DISTRO_DISPLAY_NAMES = {
|
||||
"almalinux-8": "AlmaLinux 8",
|
||||
"almalinux-9": "AlmaLinux 9",
|
||||
"amazon-2": "Amazon 2",
|
||||
"arch": "Arch",
|
||||
"centos-7": "CentOS 7",
|
||||
"centos-stream8": "CentOS Stream 8",
|
||||
"centos-stream9": "CentOS Stream 9",
|
||||
"debian-10": "Debian 10",
|
||||
"amazonlinux-2": "Amazon 2",
|
||||
"amazonlinux-2023": "Amazon 2023",
|
||||
"debian-11": "Debian 11",
|
||||
"fedora-36": "Fedora 36",
|
||||
"fedora-37": "Fedora 37",
|
||||
"fedora-38": "Fedora 38",
|
||||
"gentoo": "Gentoo",
|
||||
"gentoo-systemd": "Gentoo (systemd)",
|
||||
"opensuse-15": "Opensuse 15",
|
||||
"opensuse-tumbleweed": "Opensuse Tumbleweed",
|
||||
"oraclelinux-7": "Oracle Linux 7",
|
||||
"oraclelinux-8": "Oracle Linux 8",
|
||||
"photon-3": "Photon OS 3",
|
||||
"debian-12": "Debian 12",
|
||||
"debian-13": "Debian 13",
|
||||
"fedora-40": "Fedora 40",
|
||||
"photon-4": "Photon OS 4",
|
||||
"photon-5": "Photon OS 5",
|
||||
"rockylinux-8": "Rocky Linux 8",
|
||||
"rockylinux-9": "Rocky Linux 9",
|
||||
"ubuntu-2004": "Ubuntu 20.04",
|
||||
"ubuntu-2204": "Ubuntu 22.04",
|
||||
"macos-1015": "macOS 10.15",
|
||||
"macos-11": "macOS 11",
|
||||
"macos-12": "macOS 12",
|
||||
"freebsd-131": "FreeBSD 13.1",
|
||||
"freebsd-123": "FreeBSD 12.3",
|
||||
"openbsd-7": "OpenBSD 7",
|
||||
"windows-2019": "Windows 2019",
|
||||
"ubuntu-2404": "Ubuntu 24.04",
|
||||
"macos-13": "macOS 13",
|
||||
"macos-14": "macOS 14",
|
||||
"windows-2022": "Windows 2022",
|
||||
}
|
||||
|
||||
TIMEOUT_DEFAULT = 20
|
||||
TIMEOUT_OVERRIDES = {
|
||||
"gentoo": 90,
|
||||
"gentoo-systemd": 90,
|
||||
CONTAINER_SLUG_NAMES = {
|
||||
"amazonlinux-2": "amazonlinux-2",
|
||||
"amazonlinux-2023": "amazonlinux-2023",
|
||||
"debian-11": "debian-11",
|
||||
"debian-12": "debian-12",
|
||||
"debian-13": "debian-13",
|
||||
"fedora-40": "fedora-40",
|
||||
"photon-4": "photon-4",
|
||||
"photon-5": "photon-5",
|
||||
"rockylinux-8": "rockylinux-8",
|
||||
"rockylinux-9": "rockylinux-9",
|
||||
"ubuntu-2004": "ubuntu-20.04",
|
||||
"ubuntu-2204": "ubuntu-22.04",
|
||||
"ubuntu-2404": "ubuntu-24.04",
|
||||
"macos-13": "macos-13",
|
||||
"macos-14": "macOS 14",
|
||||
"windows-2022": "windows-2022",
|
||||
}
|
||||
VERSION_ONLY_OVERRIDES = [
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
]
|
||||
|
||||
TIMEOUT_DEFAULT = 20
|
||||
TIMEOUT_OVERRIDES = {}
|
||||
VERSION_ONLY_OVERRIDES = []
|
||||
|
||||
TEMPLATE = """
|
||||
{distro}:
|
||||
|
@ -435,6 +240,7 @@ TEMPLATE = """
|
|||
with:
|
||||
distro-slug: {distro}
|
||||
display-name: {display_name}
|
||||
container-slug: {container_name}
|
||||
timeout: {timeout_minutes}{runs_on}
|
||||
instances: '{instances}'
|
||||
"""
|
||||
|
@ -444,83 +250,10 @@ def generate_test_jobs():
|
|||
test_jobs = ""
|
||||
needs = ["lint", "generate-actions-workflow"]
|
||||
|
||||
for distro in BSD:
|
||||
test_jobs += "\n"
|
||||
runs_on = "macos-12"
|
||||
runs_on = f"\n runs-on: {runs_on}"
|
||||
ifcheck = "\n if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'"
|
||||
uses = "./.github/workflows/test-bsd.yml"
|
||||
instances = []
|
||||
timeout_minutes = (
|
||||
TIMEOUT_OVERRIDES[distro]
|
||||
if distro in TIMEOUT_OVERRIDES
|
||||
else TIMEOUT_DEFAULT
|
||||
)
|
||||
for salt_version in SALT_VERSIONS:
|
||||
|
||||
if salt_version == "latest":
|
||||
if distro in LATEST_PKG_BLACKLIST:
|
||||
continue
|
||||
|
||||
instances.append(salt_version)
|
||||
continue
|
||||
|
||||
if distro == "openbsd-7":
|
||||
# Only test latest on OpenBSD 6
|
||||
continue
|
||||
|
||||
if salt_version != "master":
|
||||
# Only test the master branch on BSD's
|
||||
continue
|
||||
|
||||
# BSD's don't have a stable release, only use git
|
||||
for bootstrap_type in ("git",):
|
||||
|
||||
BLACKLIST = {
|
||||
"3003": BLACKLIST_3003,
|
||||
"3004": BLACKLIST_3004,
|
||||
}
|
||||
if bootstrap_type == "git":
|
||||
BLACKLIST = {
|
||||
"3003": BLACKLIST_GIT_3003,
|
||||
"3004": BLACKLIST_GIT_3004,
|
||||
"master": BLACKLIST_GIT_MASTER,
|
||||
}
|
||||
|
||||
# .0 versions are a virtual version for pinning to the first
|
||||
# point release of a major release, such as 3003,
|
||||
# there is no git version.
|
||||
if salt_version.endswith("-0"):
|
||||
continue
|
||||
|
||||
if (
|
||||
salt_version in ("3003", "3004", "master")
|
||||
and distro in BLACKLIST[salt_version]
|
||||
):
|
||||
continue
|
||||
|
||||
kitchen_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(kitchen_target)
|
||||
|
||||
if instances:
|
||||
needs.append(distro)
|
||||
test_jobs += TEMPLATE.format(
|
||||
distro=distro,
|
||||
runs_on=runs_on,
|
||||
uses=uses,
|
||||
ifcheck=ifcheck,
|
||||
instances=json.dumps(instances),
|
||||
display_name=DISTRO_DISPLAY_NAMES[distro],
|
||||
timeout_minutes=timeout_minutes,
|
||||
)
|
||||
|
||||
test_jobs += "\n"
|
||||
for distro in OSX:
|
||||
test_jobs += "\n"
|
||||
if distro == "macos-1015":
|
||||
runs_on = "macos-10.15"
|
||||
else:
|
||||
runs_on = distro
|
||||
runs_on = distro
|
||||
runs_on = f"\n runs-on: {runs_on}"
|
||||
ifcheck = "\n if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'"
|
||||
uses = "./.github/workflows/test-macos.yml"
|
||||
|
@ -532,25 +265,19 @@ def generate_test_jobs():
|
|||
)
|
||||
|
||||
for salt_version in SALT_VERSIONS:
|
||||
|
||||
if salt_version == "latest":
|
||||
|
||||
instances.append(salt_version)
|
||||
continue
|
||||
|
||||
for bootstrap_type in ("stable", "old-stable"):
|
||||
for bootstrap_type in ["stable"]:
|
||||
if bootstrap_type == "stable":
|
||||
if salt_version in MAC_STABLE_VERSION_BLACKLIST:
|
||||
continue
|
||||
|
||||
if bootstrap_type == "old-stable":
|
||||
if salt_version in MAC_OLD_STABLE_VERSION_BLACKLIST:
|
||||
continue
|
||||
test_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(test_target)
|
||||
|
||||
kitchen_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(kitchen_target)
|
||||
|
||||
for bootstrap_type in ("default",):
|
||||
for bootstrap_type in ["default"]:
|
||||
if distro not in STABLE_DISTROS:
|
||||
continue
|
||||
instances.append(bootstrap_type)
|
||||
|
@ -564,6 +291,7 @@ def generate_test_jobs():
|
|||
ifcheck=ifcheck,
|
||||
instances=json.dumps(instances),
|
||||
display_name=DISTRO_DISPLAY_NAMES[distro],
|
||||
container_name=CONTAINER_SLUG_NAMES[distro],
|
||||
timeout_minutes=timeout_minutes,
|
||||
)
|
||||
|
||||
|
@ -587,15 +315,15 @@ def generate_test_jobs():
|
|||
instances.append(salt_version)
|
||||
continue
|
||||
|
||||
for bootstrap_type in ("stable",):
|
||||
for bootstrap_type in ["stable"]:
|
||||
if bootstrap_type == "stable":
|
||||
if salt_version in STABLE_VERSION_BLACKLIST:
|
||||
continue
|
||||
|
||||
kitchen_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(kitchen_target)
|
||||
test_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(test_target)
|
||||
|
||||
for bootstrap_type in ("default",):
|
||||
for bootstrap_type in ["default"]:
|
||||
if distro not in STABLE_DISTROS:
|
||||
continue
|
||||
instances.append(bootstrap_type)
|
||||
|
@ -609,6 +337,7 @@ def generate_test_jobs():
|
|||
ifcheck=ifcheck,
|
||||
instances=json.dumps(instances),
|
||||
display_name=DISTRO_DISPLAY_NAMES[distro],
|
||||
container_name=CONTAINER_SLUG_NAMES[distro],
|
||||
timeout_minutes=timeout_minutes,
|
||||
)
|
||||
|
||||
|
@ -637,7 +366,6 @@ def generate_test_jobs():
|
|||
continue
|
||||
|
||||
for bootstrap_type in (
|
||||
"old-stable",
|
||||
"stable",
|
||||
"git",
|
||||
"onedir",
|
||||
|
@ -655,12 +383,6 @@ def generate_test_jobs():
|
|||
if distro not in ONEDIR_RC_DISTROS:
|
||||
continue
|
||||
|
||||
if bootstrap_type == "old-stable":
|
||||
if salt_version in OLD_STABLE_VERSION_BLACKLIST:
|
||||
continue
|
||||
if distro not in OLD_STABLE_DISTROS:
|
||||
continue
|
||||
|
||||
if bootstrap_type == "stable":
|
||||
if salt_version in STABLE_VERSION_BLACKLIST:
|
||||
continue
|
||||
|
@ -674,19 +396,15 @@ def generate_test_jobs():
|
|||
continue
|
||||
|
||||
BLACKLIST = {
|
||||
"3003": BLACKLIST_3003,
|
||||
"3004": BLACKLIST_3004,
|
||||
"3005": BLACKLIST_3005,
|
||||
"3005-1": BLACKLIST_3005,
|
||||
"3006": BLACKLIST_3006,
|
||||
"3006-1": BLACKLIST_3006,
|
||||
"3006-8": BLACKLIST_3006,
|
||||
"3007": BLACKLIST_3007,
|
||||
"3007-1": BLACKLIST_3007,
|
||||
}
|
||||
if bootstrap_type == "git":
|
||||
BLACKLIST = {
|
||||
"3003": BLACKLIST_GIT_3003,
|
||||
"3004": BLACKLIST_GIT_3004,
|
||||
"3005": BLACKLIST_GIT_3005,
|
||||
"3006": BLACKLIST_GIT_3006,
|
||||
"3007": BLACKLIST_GIT_3007,
|
||||
"master": BLACKLIST_GIT_MASTER,
|
||||
}
|
||||
|
||||
|
@ -697,16 +415,15 @@ def generate_test_jobs():
|
|||
continue
|
||||
|
||||
if (
|
||||
salt_version
|
||||
in ("3003", "3004", "3005", "3005-1", "3006", "3006-1", "master")
|
||||
salt_version in ("3006", "3006-8", "3007", "3007-1", "master")
|
||||
and distro in BLACKLIST[salt_version]
|
||||
):
|
||||
continue
|
||||
|
||||
kitchen_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(kitchen_target)
|
||||
test_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(test_target)
|
||||
|
||||
for bootstrap_type in ("default",):
|
||||
for bootstrap_type in ["default"]:
|
||||
if distro not in STABLE_DISTROS:
|
||||
continue
|
||||
instances.append(bootstrap_type)
|
||||
|
@ -720,6 +437,7 @@ def generate_test_jobs():
|
|||
ifcheck=ifcheck,
|
||||
instances=json.dumps(instances),
|
||||
display_name=DISTRO_DISPLAY_NAMES[distro],
|
||||
container_name=CONTAINER_SLUG_NAMES[distro],
|
||||
timeout_minutes=timeout_minutes,
|
||||
)
|
||||
|
||||
|
|
102
.github/workflows/test-bsd.yml
vendored
102
.github/workflows/test-bsd.yml
vendored
|
@ -1,102 +0,0 @@
|
|||
name: Test FreeBSD & OpenBSD
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
distro-slug:
|
||||
type: string
|
||||
required: true
|
||||
description: The Distribution Slug
|
||||
|
||||
display-name:
|
||||
type: string
|
||||
required: true
|
||||
description: The Display Name For The Job
|
||||
|
||||
runs-on:
|
||||
type: string
|
||||
required: true
|
||||
description: The GitHub MacOS Worker To Run Workflow On
|
||||
|
||||
instances:
|
||||
type: string
|
||||
required: true
|
||||
description: The Instances To Test
|
||||
|
||||
timeout:
|
||||
type: number
|
||||
required: false
|
||||
default: 20
|
||||
description: The timeout(in minutes) for the workflow
|
||||
|
||||
env:
|
||||
VAGRANT_HOME: '${{ github.workspace }}/.vagrant.d'
|
||||
KITCHEN_LOCAL_YAML: 'kitchen.bsd.yml'
|
||||
|
||||
jobs:
|
||||
Test:
|
||||
name: ${{ matrix.instance }}
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
timeout-minutes: ${{ inputs.timeout }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
instance: ${{ fromJSON(inputs.instances) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.10
|
||||
bundler-cache: true
|
||||
|
||||
- name: Update Vagrant
|
||||
run: |
|
||||
brew update
|
||||
brew upgrade vagrant || brew install vagrant
|
||||
|
||||
- name: Setup Vagrant Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/.kitchen
|
||||
${{ github.workspace }}/.vagrant.d/
|
||||
key: "${{ runner.os }}|vagrant|${{ inputs.distro-slug }}|${{ hashFiles('Gemfile', '.github/workflows/test-bsd.yml', 'kitchen.bsd.yml') }}"
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Instance
|
||||
run: |
|
||||
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
|
||||
(sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
|
||||
|
||||
- name: Test Bootstrap
|
||||
run: |
|
||||
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Destroy Test Instance
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
74
.github/workflows/test-linux.yml
vendored
74
.github/workflows/test-linux.yml
vendored
|
@ -17,6 +17,11 @@ on:
|
|||
required: true
|
||||
description: The Instances To Test
|
||||
|
||||
container-slug:
|
||||
type: string
|
||||
required: true
|
||||
description: The Container Slug
|
||||
|
||||
timeout:
|
||||
type: number
|
||||
required: false
|
||||
|
@ -26,7 +31,7 @@ on:
|
|||
jobs:
|
||||
Test:
|
||||
name: ${{ matrix.instance }}
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: ${{ inputs.timeout }}
|
||||
strategy:
|
||||
max-parallel: 2
|
||||
|
@ -35,37 +40,50 @@ jobs:
|
|||
instance: ${{ fromJSON(inputs.instances) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.10
|
||||
bundler-cache: true
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install Python Dependencies
|
||||
- name: Get Version
|
||||
run: |
|
||||
python3 -m pip install -U pip
|
||||
python3 -m pip install -r tests/requirements.txt
|
||||
# We need to get the version here and make it an environment variable
|
||||
# It is used to install via bootstrap and in the test
|
||||
# The version is in the instance name
|
||||
# sed 1st - becomes space, 2nd - becomes dot
|
||||
vt_parm_ver=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
|
||||
echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
|
||||
|
||||
- name: Create Test Instance
|
||||
- name: "Pull container ${{ inputs.container-slug }}"
|
||||
run: |
|
||||
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
|
||||
(sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
|
||||
docker pull ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }}
|
||||
|
||||
- name: "Create container ${{ inputs.container-slug }}"
|
||||
run: |
|
||||
/usr/bin/docker create --name ${{ github.run_id }}_salt-test --workdir /_w/ --privileged -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -e $GITHUB_ENV -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/salt-bootstrap/salt-bootstrap":"/_w/btstrap" --entrypoint "/usr/lib/systemd/systemd" ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }} --systemd --unit rescue.target
|
||||
|
||||
- name: "Start container ${{ inputs.container-slug }}"
|
||||
run: |
|
||||
/usr/bin/docker start ${{ github.run_id }}_salt-test
|
||||
|
||||
- name: "Install Python Dependencies with pip breakage in container ${{ inputs.container-slug }}"
|
||||
if: ${{ ( inputs.distro-slug == 'debian-12' ) || ( inputs.distro-slug == 'debian-13' ) || ( inputs.distro-slug == 'ubuntu-2404' ) }}
|
||||
run: |
|
||||
docker exec ${{ github.run_id}}_salt-test python3 -m pip install --break-system-packages -r /_w/btstrap/tests/requirements.txt
|
||||
|
||||
- name: "Install Python Dependencies without pip breakage in container ${{ inputs.container-slug }}"
|
||||
if: ${{ ( inputs.distro-slug != 'debian-12' ) && ( inputs.distro-slug != 'debian-13' ) && ( inputs.distro-slug != 'ubuntu-2404' ) }}
|
||||
run: |
|
||||
docker exec ${{ github.run_id}}_salt-test python3 -m pip install -r /_w/btstrap/tests/requirements.txt
|
||||
|
||||
- name: Bootstrap Salt
|
||||
run: |
|
||||
# sed 1st - becomes space, 2nd - becomes dot
|
||||
bt_arg1=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $1}')
|
||||
bt_arg2=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
|
||||
echo "bt parms ,$bt_parms, bt_arg1 ,$bt_arg1, bt_arg2 ,$bt_arg2,"
|
||||
docker exec ${{ github.run_id}}_salt-test sh -x /_w/btstrap/bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
|
||||
|
||||
- name: Test Bootstrap
|
||||
run: |
|
||||
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Destroy Test Instance
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
docker exec ${{ github.run_id}}_salt-test pytest --cache-clear -v -s -ra --log-cli-level=debug /_w/btstrap/tests/integration/
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
|
@ -75,7 +93,7 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
name: exitstatus-${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
path: exitstatus/
|
||||
|
|
65
.github/workflows/test-macos.yml
vendored
65
.github/workflows/test-macos.yml
vendored
|
@ -22,19 +22,22 @@ on:
|
|||
required: true
|
||||
description: The Instances To Test
|
||||
|
||||
container-slug:
|
||||
type: string
|
||||
required: true
|
||||
description: The Container Slug
|
||||
|
||||
timeout:
|
||||
type: number
|
||||
required: false
|
||||
default: 20
|
||||
description: The timeout(in minutes) for the workflow
|
||||
|
||||
env:
|
||||
KITCHEN_LOCAL_YAML: 'kitchen.macos.yml'
|
||||
|
||||
jobs:
|
||||
Test:
|
||||
name: ${{ matrix.instance }}
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
## runs-on: macos-13
|
||||
timeout-minutes: ${{ inputs.timeout }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -42,37 +45,39 @@ jobs:
|
|||
instance: ${{ fromJSON(inputs.instances) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.10
|
||||
bundler-cache: true
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install Python Dependencies
|
||||
- name: Install Python Dependencies with pip breakage
|
||||
if: ${{ inputs.distro-slug != 'macos-13' }}
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
python3 -m pip install --break-system-packages -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Instance
|
||||
- name: Install Python Dependencies without pip breakage
|
||||
if: ${{ inputs.distro-slug == 'macos-13' }}
|
||||
run: |
|
||||
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
|
||||
(sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
|
||||
python3 -m pip install -r tests/requirements.txt
|
||||
|
||||
- name: Get Version
|
||||
run: |
|
||||
# We need to get the version here and make it an environment variable
|
||||
# It is used to install via bootstrap and in the test
|
||||
# The version is in the instance name
|
||||
# sed 1st - becomes space, 2nd - becomes dot
|
||||
vt_parms=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./')
|
||||
vt_parm_ver=$(echo "$vt_parms" | awk -F ' ' '{print $2}')
|
||||
echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
|
||||
|
||||
- name: Bootstrap Salt
|
||||
run: |
|
||||
# sed 1st - becomes space, 2nd - becomes dot
|
||||
bt_parms=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./')
|
||||
bt_arg1=$(echo "$bt_parms" | awk -F ' ' '{print $1}')
|
||||
bt_arg2=$(echo "$bt_parms" | awk -F ' ' '{print $2}')
|
||||
sudo sh ./bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
|
||||
|
||||
- name: Test Bootstrap
|
||||
run: |
|
||||
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Destroy Test Instance
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
|
@ -82,7 +87,7 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
name: exitstatus-${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
path: exitstatus/
|
||||
|
|
86
.github/workflows/test-windows.yml
vendored
86
.github/workflows/test-windows.yml
vendored
|
@ -22,22 +22,21 @@ on:
|
|||
required: true
|
||||
description: The Instances To Test
|
||||
|
||||
container-slug:
|
||||
type: string
|
||||
required: true
|
||||
description: The Container Slug
|
||||
|
||||
timeout:
|
||||
type: number
|
||||
required: false
|
||||
default: 20
|
||||
description: The timeout(in minutes) for the workflow
|
||||
|
||||
env:
|
||||
machine_user: kitchen
|
||||
machine_pass: Password1
|
||||
machine_port: 5985
|
||||
KITCHEN_LOCAL_YAML: 'kitchen.windows.yml'
|
||||
|
||||
jobs:
|
||||
Test:
|
||||
name: ${{ matrix.instance }}
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: ${{ inputs.timeout }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -45,63 +44,36 @@ jobs:
|
|||
instance: ${{ fromJSON(inputs.instances) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
ruby-version: 2.6.10
|
||||
bundler-cache: true
|
||||
|
||||
- name: Install Chef
|
||||
uses: actionshub/chef-install@1.1.0
|
||||
with:
|
||||
project: chef
|
||||
version: 16.10.8
|
||||
|
||||
- name: Add Chef bindir to PATH
|
||||
uses: myci-actions/export-env-var-powershell@1
|
||||
with:
|
||||
name: PATH
|
||||
value: "C:\\opscode\\chef\\bin;C:\\opscode\\chef\\embedded\\bin;$env:PATH"
|
||||
|
||||
- name: Setup test user
|
||||
run: |
|
||||
$password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force
|
||||
New-LocalUser $env:machine_user -Password $password
|
||||
Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user
|
||||
Get-LocalUser
|
||||
Get-LocalGroupMember -Group "Administrators"
|
||||
|
||||
- name: Set up WinRM
|
||||
run: |
|
||||
Set-WSManQuickConfig -Force
|
||||
winrm set winrm/config/service '@{AllowUnencrypted="True"}'
|
||||
env
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
python3 -m pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Instance
|
||||
- name: Get Version
|
||||
run: |
|
||||
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
# We need to get the version here and make it an environment variable
|
||||
# It is used to install via bootstrap and in the test
|
||||
# The version is in the instance name
|
||||
$instance = "${{ matrix.instance }}"
|
||||
$version = $instance -split "-",2
|
||||
if ( $version.Count -gt 1 ) {
|
||||
$version = $version[1].Replace("-", ".")
|
||||
}
|
||||
Write-Output "SaltVersion=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Bootstrap Salt
|
||||
run: |
|
||||
. .\bootstrap-salt.ps1 -RunService $false -Version $env:SaltVersion
|
||||
|
||||
- name: Test Bootstrap
|
||||
run: |
|
||||
env
|
||||
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Destroy Test Instance
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
|
@ -111,7 +83,7 @@ jobs:
|
|||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
name: exitstatus-${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
path: exitstatus/
|
||||
|
|
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -2,14 +2,9 @@
|
|||
*.sw?
|
||||
*.un~
|
||||
.vagrant
|
||||
*__pycache__
|
||||
tools
|
||||
venv
|
||||
|
||||
# Pycharm
|
||||
.idea
|
||||
|
||||
# test-kitchen
|
||||
.kitchen.local.yml
|
||||
kitchen.local.yml
|
||||
.kitchen/
|
||||
.bundle/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
minimum_pre_commit_version: 1.15.2
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: check-merge-conflict # Check for files that contain merge conflict strings.
|
||||
- id: trailing-whitespace # Trims trailing whitespace.
|
||||
|
@ -12,12 +12,12 @@ repos:
|
|||
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
|
||||
|
||||
- repo: https://github.com/executablebooks/mdformat
|
||||
rev: 0.7.14
|
||||
rev: 0.7.17
|
||||
hooks:
|
||||
- id: mdformat
|
||||
|
||||
- repo: https://github.com/s0undt3ch/python-tools-scripts
|
||||
rev: "0.12.0"
|
||||
rev: "0.18.6"
|
||||
hooks:
|
||||
- id: tools
|
||||
alias: actionlint
|
||||
|
@ -30,7 +30,7 @@ repos:
|
|||
- actionlint
|
||||
|
||||
- repo: https://github.com/jazzband/pip-tools
|
||||
rev: 6.13.0
|
||||
rev: 7.4.1
|
||||
hooks:
|
||||
- id: pip-compile
|
||||
files: ^requirements/release\.(in|txt)$
|
||||
|
@ -38,20 +38,22 @@ repos:
|
|||
- requirements/release.in
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.37.3
|
||||
rev: v3.15.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
name: Rewrite Code to be Py3.9+
|
||||
args: [--py39-plus]
|
||||
name: Rewrite Code to be Py3.6+
|
||||
args: [--py36-plus]
|
||||
## DGM name: Rewrite Code to be Py3.9+
|
||||
## DGM args: [--py39-plus]
|
||||
|
||||
- repo: https://github.com/asottile/reorder_python_imports
|
||||
rev: v3.8.2
|
||||
rev: v3.12.0
|
||||
hooks:
|
||||
- id: reorder-python-imports
|
||||
args: [--py39-plus]
|
||||
args: [--py310-plus]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.6.0
|
||||
rev: 24.10.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: []
|
||||
|
|
|
@ -54,6 +54,7 @@ Daniel Wallace gtmanfred danielwallace@gtmanfred.com
|
|||
Darko Cerdic darkocerdic
|
||||
Daryl Turner darylturner d.turner@arkadin.com
|
||||
David J. Felix DavidJFelix
|
||||
David Murphy daithi david-dm.murphy@broadcom.com
|
||||
denmat denmat
|
||||
Denys Havrysh vutny denys.gavrysh@gmail.com
|
||||
deployboy deployboy
|
||||
|
|
244
CHANGELOG.md
244
CHANGELOG.md
|
@ -1,3 +1,245 @@
|
|||
# v2025.02.24
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Update requirements to address security issues by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/2073
|
||||
- Use treeless clone to 'shallow' clone again. by @mrichar1 in https://github.com/saltstack/salt-bootstrap/pull/2022
|
||||
- Fix powershell instructions by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/2074
|
||||
- Remove support for macos-12, as deprecated by github by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2076
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.12.12...v2025.02.24
|
||||
|
||||
# v2024.12.12
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Restrict use of dnf to Fedora only, otherwise use yum when dealing with RedHat family by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2070
|
||||
- Updating container usage to that used in new Salt pipelines for CI/CD, fix Amazon Linux by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2071
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.12.09...v2024.12.12
|
||||
|
||||
# v2024.12.09
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Fix quickstart for Windows with new repo by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/2065
|
||||
- Utilize salt-project packages with SUSE by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2066
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.29...v2024.12.09
|
||||
|
||||
# v2024.11.29
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Updated date to overcome issue with existing tag for 2024.11.27 by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2058
|
||||
- Fix date tag by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2059
|
||||
- Revert forcing git tag, other issues with check sums calculated, easiest solution is wait a day to release by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2060
|
||||
- Updated date by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2061
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.27...v2024.11.29
|
||||
|
||||
# v2024.11.27
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.27...v2024.11.27
|
||||
|
||||
# v2024.11.27
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.27...v2024.11.27
|
||||
|
||||
# v2024.11.27
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Testing git install methods by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2057
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.26...v2024.11.27
|
||||
|
||||
# v2024.11.27
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Testing git install methods by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2057
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.26...v2024.11.27
|
||||
|
||||
# v2024.11.26
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Updated URLs in README, and fix deps download issue on RedHat family by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2052
|
||||
- Update README script help output and scriptversions by @ScriptAutomate in https://github.com/saltstack/salt-bootstrap/pull/2056
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.21...v2024.11.26
|
||||
|
||||
# v2024.11.21
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Make universal repo url by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/2045
|
||||
- Update bootstrap shell CI/CD to utilize containers and clean up by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2039
|
||||
- \[WIP\] hwclock check missing additional condition on major version by @ruslantum in https://github.com/saltstack/salt-bootstrap/pull/2048
|
||||
|
||||
## New Contributors
|
||||
|
||||
- @ruslantum made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/2048
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.07...v2024.11.21
|
||||
|
||||
# v2024.11.07
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Changed release runners and shell script date by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2035
|
||||
- Forcing git tag to not sign by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2036
|
||||
- Fixing git tag signing issue by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2037
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.06...v2024.11.07
|
||||
|
||||
# v2024.11.07
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Changed release runners and shell script date by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2035
|
||||
- Forcing git tag to not sign by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2036
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.06...v2024.11.07
|
||||
|
||||
# v2024.11.07
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Changed release runners and shell script date by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2035
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.06...v2024.11.07
|
||||
|
||||
# v2024.09.24
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Add KDE neon to list of Ubuntu derivates (again) by @digitalkram in https://github.com/saltstack/salt-bootstrap/pull/2016
|
||||
- Debugging build failures on Arch, Fedora and Tumbleweed by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2018
|
||||
- Reset \_PIP_INSTALL_ARGS to empty for Alpine, similar to Ubuntu and Debian by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2019
|
||||
- Updated deprecated versions for actions for upload, download, checkout for release by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2020
|
||||
- Further action updates by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2021
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.07.23...v2024.09.24
|
||||
|
||||
# v2024.09.23
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Add KDE neon to list of Ubuntu derivates (again) by @digitalkram in https://github.com/saltstack/salt-bootstrap/pull/2016
|
||||
- Debugging build failures on Arch, Fedora and Tumbleweed by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2018
|
||||
- Reset \_PIP_INSTALL_ARGS to empty for Alpine, similar to Ubuntu and Debian by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2019
|
||||
- Updated deprecated versions for actions for upload, download, checkout for release by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2020
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.07.23...v2024.09.23
|
||||
|
||||
# v2024.09.23
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Add KDE neon to list of Ubuntu derivates (again) by @digitalkram in https://github.com/saltstack/salt-bootstrap/pull/2016
|
||||
- Debugging build failures on Arch, Fedora and Tumbleweed by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2018
|
||||
- Reset \_PIP_INSTALL_ARGS to empty for Alpine, similar to Ubuntu and Debian by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2019
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.07.23...v2024.09.23
|
||||
|
||||
# v2024.07.23
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Updated link for Supported Operating Systems and Repository supported by Salt by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2010
|
||||
- Cleanup use of the term 'Post Neon' given only support 3006 and up by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2011
|
||||
- Added support with -W for installing salt-api by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2013
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.07.18...v2024.07.23
|
||||
|
||||
# v2024.07.18
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Updated README, and removed experimental to ability install different Python version which was limited to RHEL 7, which is EOL by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2009
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.07.16...v2024.07.18
|
||||
|
||||
# v2024.07.16
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Update bootstrap-salt.sh by @javatask in https://github.com/saltstack/salt-bootstrap/pull/2005
|
||||
- Updated GitHub actions to later v4 by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2004
|
||||
- Don't sort lists and dicts, as order of items matters by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2006
|
||||
|
||||
## New Contributors
|
||||
|
||||
- @javatask made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/2005
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.07.12...v2024.07.16
|
||||
|
||||
# v2024.07.12
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Add script version to powershell script by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/1996
|
||||
- Add support for mint-21 by @jhubbardnso in https://github.com/saltstack/salt-bootstrap/pull/1997
|
||||
- Added support for Amazon 2023, Debian 12, Ubuntu 24.04, removed EOL and BSD OSs and Python 2.7 support by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/1987
|
||||
|
||||
## New Contributors
|
||||
|
||||
- @jhubbardnso made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1997
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.04.03...v2024.07.12
|
||||
|
||||
# v2024.07.11
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Migrated to using GitHub Actions
|
||||
- Removed support of End-Of-Life OS's, for example: Debian 7, 8, 9 & 10, RHEL 7
|
||||
- Removed support for FreeBSD and OpenBSD
|
||||
- Removed support for Solaris and it's derivatives
|
||||
- Removed support for EOL Salt releases, pre-3006
|
||||
- Added support for new OS's, for example: Ubuntu 24.04, Debian 12, Amazon 2023
|
||||
- Updated to minimum Python 3.10 version from 3.9
|
||||
- Removed '-y' option which was experimental and only on RHEL 7 or less which are now EOL
|
||||
- Updated to current stable version of Ruby v3.3.4
|
||||
- Removed git-master support for Photon 4 & 5 due to gcc errors building salt.
|
||||
- Add support for Arm64 for MacOS
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.04.03...v2024.07.11
|
||||
|
||||
# v2024.04.03
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Remove automated PR against salt repo at release by @ScriptAutomate in https://github.com/saltstack/salt-bootstrap/pull/1984
|
||||
- Update actions by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/1985
|
||||
- Fix DEBIAN Keyring url by @Dudek-AMS in https://github.com/saltstack/salt-bootstrap/pull/1983
|
||||
- Fix script to support installing RC on Windows by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/1993
|
||||
|
||||
## New Contributors
|
||||
|
||||
- @Dudek-AMS made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1983
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.01.04...v2024.04.03
|
||||
|
||||
# v2024.01.04
|
||||
|
||||
## What's Changed
|
||||
|
||||
- Add arm support for Debian 10 by @twangboy in https://github.com/saltstack/salt-bootstrap/pull/1981
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2023.11.16...v2024.01.04
|
||||
|
||||
# v2023.11.16
|
||||
|
||||
## What's Changed
|
||||
|
||||
- checking out stable branch on update-s3-bucket job by @felippeb in https://github.com/saltstack/salt-bootstrap/pull/1977
|
||||
|
||||
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2023.11.07...v2023.11.16
|
||||
|
||||
# v2023.11.07
|
||||
|
||||
## What's Changed
|
||||
|
@ -549,7 +791,7 @@
|
|||
- add apt-transport-https for ubuntu. (epcim) #896
|
||||
- Fix expanding shell script position parameters with nounset enabled. (vutny) #895
|
||||
- RFC: Add tests for bootstrap-salt.ps1. (themalkolm) #893
|
||||
- Keep original name of salt executable executable. (themalkolm) #857
|
||||
- Keep original name of salt executable. (themalkolm) #857
|
||||
|
||||
# v2016.06.27:
|
||||
|
||||
|
|
173
CONTRIBUTING.md
173
CONTRIBUTING.md
|
@ -21,20 +21,20 @@ Please read the following guidelines before you
|
|||
1. **Use the GitHub issue search** -- check if the issue has
|
||||
already been reported. If it has been, please comment on the existing issue.
|
||||
|
||||
2. **Check if the issue has been fixed** -- If you found a possible problem, or bug,
|
||||
1. **Check if the issue has been fixed** -- If you found a possible problem, or bug,
|
||||
please try to bootstrap using the bootstrap scirpt from the develop branch. The
|
||||
issue you are having might have already been fixed and it's just not yet included
|
||||
in the stable release.
|
||||
|
||||
```
|
||||
curl -o bootstrap-salt.sh -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git master
|
||||
```
|
||||
```
|
||||
curl -o bootstrap-salt.sh -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git master
|
||||
```
|
||||
|
||||
3. **Isolate the demonstrable problem** -- make sure that the
|
||||
1. **Isolate the demonstrable problem** -- make sure that the
|
||||
code in the project's repository is *definitely* responsible for the issue.
|
||||
|
||||
4. **Include a reproducible example** -- Provide the steps which
|
||||
1. **Include a reproducible example** -- Provide the steps which
|
||||
led you to the problem.
|
||||
|
||||
Please try to be as detailed as possible in your report. What is your
|
||||
|
@ -163,8 +163,8 @@ The release process consists of the following steps:
|
|||
1. Merge in any outstanding PRs that are ready.
|
||||
1. Add new contributors to the [AUTHORS](https://github.com/saltstack/salt-bootstrap/blob/develop/AUTHORS.rst) file.
|
||||
1. Update the [ChangeLog](https://github.com/saltstack/salt-bootstrap/blob/develop/ChangeLog).
|
||||
1. Update the version number in the bootstrap script. The version number is date-based, `<year.month.day>`.
|
||||
For example, version `2018.08.15` was released on August 15, 2018.
|
||||
1. Update the version number in the bootstrap script. The version number is number-based major version with minor version, `<300X.Y>`.
|
||||
For example, version `3006.6` is major version `3006` and minior version `6`.
|
||||
1. Merge the `develop` branch into the `stable` branch.
|
||||
1. Update `bootstrap.saltproject.io` with the new stable release. The checksum on the
|
||||
[README page](https://github.com/saltstack/salt-bootstrap/blob/develop/README.rst)
|
||||
|
@ -177,83 +177,82 @@ The following operating systems are detected, but Salt and its dependency
|
|||
installation functions are not developed yet:
|
||||
|
||||
- BSD:
|
||||
- NetBSD
|
||||
- NetBSD
|
||||
- Linux:
|
||||
- Slackware
|
||||
- Slackware
|
||||
- SunOS:
|
||||
- OpenIndiana
|
||||
- Oracle Solaris
|
||||
- OmniOS (Illumos)
|
||||
|
||||
- OpenIndiana
|
||||
- Oracle Solaris
|
||||
- OmniOS (Illumos)
|
||||
|
||||
In order to install Salt for a distribution, you need to define the following:
|
||||
|
||||
1. To Install Dependencies, which is required, one of:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_deps
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_deps
|
||||
install_<distro>_<major_version>_deps
|
||||
install_<distro>_<major_version>_<minor_version>_deps
|
||||
install_<distro>_<install_type>_deps
|
||||
install_<distro>_deps
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_deps
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_deps
|
||||
install_<distro>_<major_version>_deps
|
||||
install_<distro>_<major_version>_<minor_version>_deps
|
||||
install_<distro>_<install_type>_deps
|
||||
install_<distro>_deps
|
||||
```
|
||||
|
||||
2. Optionally, define a minion configuration function, which will be called if the
|
||||
``-c`` option is passed. One of:
|
||||
1. Optionally, define a minion configuration function, which will be called if the
|
||||
`-c` option is passed. One of:
|
||||
|
||||
```
|
||||
config_<distro>_<major_version>_<install_type>_salt
|
||||
config_<distro>_<major_version>_<minor_version>_<install_type>_salt
|
||||
config_<distro>_<major_version>_salt
|
||||
config_<distro>_<major_version>_<minor_version>_salt
|
||||
config_<distro>_<install_type>_salt
|
||||
config_<distro>_salt
|
||||
config_salt (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
```
|
||||
config_<distro>_<major_version>_<install_type>_salt
|
||||
config_<distro>_<major_version>_<minor_version>_<install_type>_salt
|
||||
config_<distro>_<major_version>_salt
|
||||
config_<distro>_<major_version>_<minor_version>_salt
|
||||
config_<distro>_<install_type>_salt
|
||||
config_<distro>_salt
|
||||
config_salt (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
|
||||
3. Optionally, define a Salt master pre-seed function, which will be called if the
|
||||
``-k`` (pre-seed master keys) option is passed. One of:
|
||||
1. Optionally, define a Salt master pre-seed function, which will be called if the
|
||||
`-k` (pre-seed master keys) option is passed. One of:
|
||||
|
||||
```
|
||||
preseed_<distro>_<major_version>_<install_type>_master
|
||||
preseed_<distro>_<major_version>_<minor_version>_<install_type>_master
|
||||
preseed_<distro>_<major_version>_master
|
||||
preseed_<distro>_<major_version>_<minor_version>_master
|
||||
preseed_<distro>_<install_type>_master
|
||||
preseed_<distro>_master
|
||||
preseed_master (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
```
|
||||
preseed_<distro>_<major_version>_<install_type>_master
|
||||
preseed_<distro>_<major_version>_<minor_version>_<install_type>_master
|
||||
preseed_<distro>_<major_version>_master
|
||||
preseed_<distro>_<major_version>_<minor_version>_master
|
||||
preseed_<distro>_<install_type>_master
|
||||
preseed_<distro>_master
|
||||
preseed_master (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
|
||||
4. To install salt, which, of course, is required, one of:
|
||||
1. To install salt, which, of course, is required, one of:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>
|
||||
install_<distro>_<install_type>
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>
|
||||
install_<distro>_<install_type>
|
||||
```
|
||||
|
||||
5. Optionally, define a post install function, one of:
|
||||
1. Optionally, define a post install function, one of:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_post
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_post
|
||||
install_<distro>_<major_version>_post
|
||||
install_<distro>_<major_version>_<minor_version>_post
|
||||
install_<distro>_<install_type>_post
|
||||
install_<distro>_post
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_post
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_post
|
||||
install_<distro>_<major_version>_post
|
||||
install_<distro>_<major_version>_<minor_version>_post
|
||||
install_<distro>_<install_type>_post
|
||||
install_<distro>_post
|
||||
```
|
||||
|
||||
6. Optionally, define a start daemons function, one of:
|
||||
1. Optionally, define a start daemons function, one of:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_restart_daemons
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_restart_daemons
|
||||
install_<distro>_<major_version>_restart_daemons
|
||||
install_<distro>_<major_version>_<minor_version>_restart_daemons
|
||||
install_<distro>_<install_type>_restart_daemons
|
||||
install_<distro>_restart_daemons
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_restart_daemons
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_restart_daemons
|
||||
install_<distro>_<major_version>_restart_daemons
|
||||
install_<distro>_<major_version>_<minor_version>_restart_daemons
|
||||
install_<distro>_<install_type>_restart_daemons
|
||||
install_<distro>_restart_daemons
|
||||
```
|
||||
|
||||
**NOTE**
|
||||
|
||||
|
@ -262,26 +261,26 @@ start if they're not running.
|
|||
|
||||
7. Optionally, define a daemons running function, one of:
|
||||
|
||||
```
|
||||
daemons_running_<distro>_<major_version>_<install_type>
|
||||
daemons_running_<distro>_<major_version>_<minor_version>_<install_type>
|
||||
daemons_running_<distro>_<major_version>
|
||||
daemons_running_<distro>_<major_version>_<minor_version>
|
||||
daemons_running_<distro>_<install_type>
|
||||
daemons_running_<distro>
|
||||
daemons_running (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
```
|
||||
daemons_running_<distro>_<major_version>_<install_type>
|
||||
daemons_running_<distro>_<major_version>_<minor_version>_<install_type>
|
||||
daemons_running_<distro>_<major_version>
|
||||
daemons_running_<distro>_<major_version>_<minor_version>
|
||||
daemons_running_<distro>_<install_type>
|
||||
daemons_running_<distro>
|
||||
daemons_running (THIS ONE IS ALREADY DEFINED AS THE DEFAULT)
|
||||
```
|
||||
|
||||
8. Optionally, check enabled Services:
|
||||
1. Optionally, check enabled Services:
|
||||
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_check_services
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_check_services
|
||||
install_<distro>_<major_version>_check_services
|
||||
install_<distro>_<major_version>_<minor_version>_check_services
|
||||
install_<distro>_<install_type>_check_services
|
||||
install_<distro>_check_services
|
||||
```
|
||||
```
|
||||
install_<distro>_<major_version>_<install_type>_check_services
|
||||
install_<distro>_<major_version>_<minor_version>_<install_type>_check_services
|
||||
install_<distro>_<major_version>_check_services
|
||||
install_<distro>_<major_version>_<minor_version>_check_services
|
||||
install_<distro>_<install_type>_check_services
|
||||
install_<distro>_check_services
|
||||
```
|
||||
|
||||
**NOTE**
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
FROM ubuntu-upstart:14.04
|
||||
FROM ubuntu:20.04
|
||||
MAINTAINER "SaltStack Team"
|
||||
|
||||
# Bootstrap script options: install Salt Master by default
|
||||
ENV BOOTSTRAP_OPTS='-M'
|
||||
ENV BOOTSTRAP_OPTS='-M -x python3'
|
||||
# Version of salt to install: stable or git
|
||||
ENV SALT_VERSION=stable
|
||||
|
||||
|
|
11
Gemfile
11
Gemfile
|
@ -1,11 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem 'test-kitchen', '>= 3.2.2'
|
||||
gem 'kitchen-salt', '>= 0.7.2'
|
||||
gem 'kitchen-docker', :git => 'https://github.com/test-kitchen/kitchen-docker.git', :branch => 'main'
|
||||
|
||||
group :vagrant do
|
||||
gem 'kitchen-vagrant'
|
||||
end
|
346
README.rst
346
README.rst
|
@ -22,6 +22,11 @@ that, please read the generated help by passing ``-h`` to the script or even bet
|
|||
|
||||
Also, to secure your Salt installation, check out these instructions for `hardening salt`_.
|
||||
|
||||
Older versions of Salt prior to 3006 are no longer supported by this bootstrap script as they have
|
||||
reached their End-Of-Life. Only onedir-based architecture versions of Salt are supported by this
|
||||
bootstrap script.
|
||||
|
||||
|
||||
Bootstrap
|
||||
=========
|
||||
|
||||
|
@ -32,6 +37,23 @@ sum** of the downloaded ``bootstrap-salt.sh`` file.
|
|||
|
||||
The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:
|
||||
|
||||
- 2025.02.24: ``a0e3a58fc6358a7c6f708ee4910229e72fbdab7161819514b0696146a2edb62d``
|
||||
- 2024.12.12: ``7cc91adfa5a15ff57d203dc2b79608c773efc639d4e9bf03861198903e11becd``
|
||||
- 2024.12.09: ``44f9405a6d9622ad8fa7c93e83a52e01ca328f27e4e9dea4a52268c6a22dbe6d``
|
||||
- 2024.11.29: ``0ac87384dee051aceded69704485a5de0e4a308551a462b10c262111b57acff0``
|
||||
- 2024.11.27: ``e972bd1ef01d09cd1d9294374ef974c9e3dd9a2aee37cf3859144585fd8bf1d0``
|
||||
- 2024.11.26: ``832c7a20b96e1df171d715323df9afff8a11aef42d15598c007f240bc89d723c``
|
||||
- 2024.11.21: ``ddf624c3a94d721da3f7629402a6c7ecc9dd96d13c1ead2a626314e97cee982a``
|
||||
- 2024.11.07: ``70a9783649e129985563d1a86cf28b8984499643e62ae1dc47dc008bd204fcbb``
|
||||
- 2024.09.24: ``88e4e4cad4b115a7b721dd9c21d5ee5df390b5b73b63de48f99399146f43f371``
|
||||
- 2024.07.23: ``7212b6b497b5c3d2bf15bfe5301625ec7bc1bf3e2949cd47d8e2073614935bf8``
|
||||
- 2024.07.18: ``92a74e7ff8a9032a7713c2b3955991d66aaca08a4eb9494ce3dd66b5044f6bc3``
|
||||
- 2024.07.16: ``4f76d1549c71d696a605f97645d8633b6269c4d9ae54b1fbdfedca1dcf893e7a``
|
||||
- 2024.07.12: ``526f4a5383db308081a120e26988679238ca6add4bf7a82120cbe71d57ab826e``
|
||||
- 2024.04.03: ``450ba5cde4af8d6cb5c56c66791f87b918bcda70ccdfb10abf3cc294143c8073``
|
||||
- 2024.01.04: ``cebcbc67895e238d1cf0024922a7fe5c772b9aaba346490c8fa6193bb0d993d4``
|
||||
- 2023.11.16: ``3757ed82161113fed4c711fd7332e922265eeeb54e6e4f657a08ea82d57cc3a2``
|
||||
- 2023.11.07: ``91f8a3bfb8b14476f7793c7f20cec7bfc638c10c073786f9a8904a858a929784``
|
||||
- 2023.08.03: ``963e559bdb85adecfbbec2c3b81190392bc59b24992e4491e919cd748eeafcb8``
|
||||
- 2023.07.25: ``eaaaadaed40fe2e791d59a9e48f24449428a35ca61782d9139f1272c05524323``
|
||||
- 2023.06.28: ``f45f5da8abee27ef385131f5cfa9382d3a15863d0a05688a0404d2f057b27776``
|
||||
|
@ -43,8 +65,9 @@ If you're looking for a *one-liner* to install Salt, please scroll to the bottom
|
|||
instructions for `Installing via an Insecure One-Liner`_.
|
||||
|
||||
There are also .sha256 files for verifying against in the repo for the stable branch. You can also
|
||||
get the correct sha256 sum for the stable release from https://bootstrap.saltproject.io/sha256 and
|
||||
https://winbootstrap.saltproject.io/sha256
|
||||
get the correct sha256 sum for the stable release from
|
||||
https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh.sha256 and
|
||||
https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.ps1.sha256
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
@ -67,119 +90,123 @@ To view the latest options and descriptions for ``salt-bootstrap``, use ``-h`` a
|
|||
Usage : bootstrap-salt.sh [options] <install-type> [install-type-args]
|
||||
|
||||
Installation types:
|
||||
- stable Install latest stable release. This is the default
|
||||
install type
|
||||
- stable [branch] Install latest version on a branch. Only supported
|
||||
for packages available at repo.saltproject.io
|
||||
- stable [version] Install a specific version. Only supported for
|
||||
packages available at repo.saltproject.io
|
||||
To pin a 3xxx minor version, specify it as 3xxx.0
|
||||
- testing RHEL-family specific: configure EPEL testing repo
|
||||
- git Install from the head of the master branch
|
||||
- git [ref] Install from any git ref (such as a branch, tag, or
|
||||
commit)
|
||||
- stable Install latest stable release. This is the default
|
||||
install type
|
||||
- stable [branch] Install latest version on a branch. Only supported
|
||||
for packages available at packages.broadcom.com
|
||||
- stable [version] Install a specific version. Only supported for
|
||||
packages available at packages.broadcom.com
|
||||
To pin a 3xxx minor version, specify it as 3xxx.0
|
||||
- testing RHEL-family specific: configure EPEL testing repo
|
||||
- git Install from the head of the master branch
|
||||
- git [ref] Install from any git ref (such as a branch, tag, or
|
||||
commit)
|
||||
- onedir Install latest onedir release.
|
||||
- onedir [version] Install a specific version. Only supported for
|
||||
onedir packages available at packages.broadcom.com
|
||||
|
||||
- onedir_rc Install latest onedir RC release.
|
||||
- onedir_rc [version] Install a specific version. Only supported for
|
||||
onedir RC packages available at packages.broadcom.com
|
||||
|
||||
Examples:
|
||||
- bootstrap-salt.sh
|
||||
- bootstrap-salt.sh stable
|
||||
- bootstrap-salt.sh stable 3004.1
|
||||
- bootstrap-salt.sh stable v3003.4
|
||||
- bootstrap-salt.sh stable 3006
|
||||
- bootstrap-salt.sh stable 3006.1
|
||||
- bootstrap-salt.sh testing
|
||||
- bootstrap-salt.sh git
|
||||
- bootstrap-salt.sh git 3004.1
|
||||
- bootstrap-salt.sh git v3003.4
|
||||
- bootstrap-salt.sh git 3006.7
|
||||
- bootstrap-salt.sh git v3006.8
|
||||
- bootstrap-salt.sh git 3007.1
|
||||
- bootstrap-salt.sh git v3007.1
|
||||
- bootstrap-salt.sh git 06f249901a2e2f1ed310d58ea3921a129f214358
|
||||
- bootstrap-salt.sh onedir
|
||||
- bootstrap-salt.sh onedir 3006
|
||||
- bootstrap-salt.sh onedir_rc
|
||||
- bootstrap-salt.sh onedir_rc 3008
|
||||
|
||||
|
||||
Options:
|
||||
-h Display this message
|
||||
-v Display script version
|
||||
-n No colours
|
||||
-D Show debug output
|
||||
-a Pip install all Python pkg dependencies for Salt. Requires -V to install
|
||||
all pip pkgs into the virtualenv.
|
||||
(Only available for Ubuntu based distributions)
|
||||
-A Pass the salt-master DNS name or IP. This will be stored under
|
||||
\${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf
|
||||
-b Assume that dependencies are already installed and software sources are
|
||||
set up. If git is selected, git tree is still checked out as dependency
|
||||
step.
|
||||
-c Temporary configuration directory
|
||||
-g Salt Git repository URL. Default: https://github.com/saltstack/salt.git
|
||||
-w Install packages from downstream package repository rather than
|
||||
upstream, saltstack package repository. This is currently only
|
||||
implemented for SUSE.
|
||||
-k Temporary directory holding the minion keys which will pre-seed
|
||||
the master.
|
||||
-s Sleep time used when waiting for daemons to start, restart and when
|
||||
checking for the services running. Default: 3
|
||||
-L Also install salt-cloud and required python-libcloud package
|
||||
-M Also install salt-master
|
||||
-S Also install salt-syndic
|
||||
-N Do not install salt-minion
|
||||
-X Do not start daemons after installation
|
||||
-C Only run the configuration function. Implies -F (forced overwrite).
|
||||
To overwrite Master, Syndic or Api configs, -M,-S or -W, respectively, must
|
||||
also be specified. Salt installation will be ommitted, but some of the
|
||||
dependencies could be installed to write configuration with -j or -J.
|
||||
-d Disables checking if Salt services are enabled to start on system boot.
|
||||
You can also do this by touching /tmp/disable_salt_checks on the target
|
||||
host. Default: ${BS_FALSE}
|
||||
-P Allow pip based installations. On some distributions the required salt
|
||||
packages or its dependencies are not available as a package for that
|
||||
distribution. Using this flag allows the script to use pip as a last
|
||||
resort method. NOTE: This only works for functions which actually
|
||||
implement pip based installations.
|
||||
-U If set, fully upgrade the system prior to bootstrapping Salt
|
||||
host. Default: \${BS_FALSE}
|
||||
-D Show debug output
|
||||
-f Force shallow cloning for git installations.
|
||||
This may result in an "n/a" in the version number.
|
||||
-F Allow copied files to overwrite existing (config, init.d, etc)
|
||||
-g Salt Git repository URL. Default: https://github.com/saltstack/salt.git
|
||||
-h Display this message
|
||||
-H Use the specified HTTP proxy for all download URLs (including https://).
|
||||
For example: http://myproxy.example.com:3128
|
||||
-i Pass the salt-minion id. This will be stored under
|
||||
\${BS_SALT_ETC_DIR}/minion_id
|
||||
-I If set, allow insecure connections while downloading any files. For
|
||||
example, pass '--no-check-certificate' to 'wget' or '--insecure' to
|
||||
'curl'. On Debian and Ubuntu, using this option with -U allows obtaining
|
||||
GnuPG archive keys insecurely if distro has changed release signatures.
|
||||
-F Allow copied files to overwrite existing (config, init.d, etc)
|
||||
-K If set, keep the temporary files in the temporary directories specified
|
||||
with -c and -k
|
||||
-C Only run the configuration function. Implies -F (forced overwrite).
|
||||
To overwrite Master or Syndic configs, -M or -S, respectively, must
|
||||
also be specified. Salt installation will be ommitted, but some of the
|
||||
dependencies could be installed to write configuration with -j or -J.
|
||||
-A Pass the salt-master DNS name or IP. This will be stored under
|
||||
${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf
|
||||
-i Pass the salt-minion id. This will be stored under
|
||||
${BS_SALT_ETC_DIR}/minion_id
|
||||
-p Extra-package to install while installing Salt dependencies. One package
|
||||
per -p flag. You are responsible for providing the proper package name.
|
||||
-H Use the specified HTTP proxy for all download URLs (including https://).
|
||||
For example: http://myproxy.example.com:3128
|
||||
-b Assume that dependencies are already installed and software sources are
|
||||
set up. If git is selected, git tree is still checked out as dependency
|
||||
step.
|
||||
-f Force shallow cloning for git installations.
|
||||
This may result in an "n/a" in the version number.
|
||||
-l Disable ssl checks. When passed, switches "https" calls to "http" where
|
||||
possible.
|
||||
-V Install Salt into virtualenv
|
||||
(only available for Ubuntu based distributions)
|
||||
-a Pip install all Python pkg dependencies for Salt. Requires -V to install
|
||||
all pip pkgs into the virtualenv.
|
||||
(Only available for Ubuntu based distributions)
|
||||
-r Disable all repository configuration performed by this script. This
|
||||
option assumes all necessary repository configuration is already present
|
||||
on the system.
|
||||
-R Specify a custom repository URL. Assumes the custom repository URL
|
||||
points to a repository that mirrors Salt packages located at
|
||||
repo.saltproject.io. The option passed with -R replaces the
|
||||
"repo.saltproject.io". If -R is passed, -r is also set. Currently only
|
||||
works on CentOS/RHEL and Debian based distributions.
|
||||
-J Replace the Master config file with data passed in as a JSON string. If
|
||||
a Master config file is found, a reasonable effort will be made to save
|
||||
the file with a ".bak" extension. If used in conjunction with -C or -F,
|
||||
no ".bak" file will be created as either of those options will force
|
||||
a complete overwrite of the file.
|
||||
-j Replace the Minion config file with data passed in as a JSON string. If
|
||||
a Minion config file is found, a reasonable effort will be made to save
|
||||
the file with a ".bak" extension. If used in conjunction with -C or -F,
|
||||
no ".bak" file will be created as either of those options will force
|
||||
a complete overwrite of the file.
|
||||
-J Replace the Master config file with data passed in as a JSON string. If
|
||||
a Master config file is found, a reasonable effort will be made to save
|
||||
the file with a ".bak" extension. If used in conjunction with -C or -F,
|
||||
no ".bak" file will be created as either of those options will force
|
||||
a complete overwrite of the file.
|
||||
-k Temporary directory holding the minion keys which will pre-seed
|
||||
the master.
|
||||
-K If set, keep the temporary files in the temporary directories specified
|
||||
with -c and -k
|
||||
-l Disable ssl checks. When passed, switches "https" calls to "http" where
|
||||
possible.
|
||||
-L Also install salt-cloud and required python-libcloud package
|
||||
-M Also install salt-master
|
||||
-n No colours
|
||||
-N Do not install salt-minion
|
||||
-p Extra-package to install while installing Salt dependencies. One package
|
||||
per -p flag. You are responsible for providing the proper package name.
|
||||
-P Allow pip based installations. On some distributions the required salt
|
||||
packages or its dependencies are not available as a package for that
|
||||
distribution. Using this flag allows the script to use pip as a last
|
||||
resort method. NOTE: This only works for functions which actually
|
||||
implement pip based installations.
|
||||
-q Quiet salt installation from git (setup.py install -q)
|
||||
-x Changes the Python version used to install Salt.
|
||||
For CentOS 6 git installations python2.7 is supported.
|
||||
Fedora git installation, CentOS 7, Ubuntu 18.04 support python3.
|
||||
-y Installs a different python version on host. Currently this has only been
|
||||
tested with CentOS 6 and is considered experimental. This will install the
|
||||
ius repo on the box if disable repo is false. This must be used in conjunction
|
||||
with -x <pythonversion>. For example:
|
||||
sh bootstrap.sh -P -y -x python2.7 git v2017.7.2
|
||||
The above will install python27 and install the git version of salt using the
|
||||
python2.7 executable. This only works for git and pip installations.
|
||||
-Q Quickstart, install the Salt master and the Salt minion.
|
||||
And automatically accept the minion key.
|
||||
-R Specify a custom repository URL. Assumes the custom repository URL
|
||||
points to a repository that mirrors Salt packages located at
|
||||
packages.broadcom.com. The option passed with -R replaces the
|
||||
"packages.broadcom.com". If -R is passed, -r is also set. Currently only
|
||||
works on CentOS/RHEL and Debian based distributions and macOS.
|
||||
-s Sleep time used when waiting for daemons to start, restart and when
|
||||
checking for the services running. Default: 3
|
||||
-S Also install salt-syndic
|
||||
-r Disable all repository configuration performed by this script. This
|
||||
option assumes all necessary repository configuration is already present
|
||||
on the system.
|
||||
-U If set, fully upgrade the system prior to bootstrapping Salt
|
||||
-v Display script version
|
||||
-V Install Salt into virtualenv
|
||||
(only available for Ubuntu based distributions)
|
||||
-W Also install salt-api
|
||||
-x Changes the Python version used to install Salt (default: Python 3).
|
||||
Python 2.7 is no longer supported.
|
||||
-X Do not start daemons after installation
|
||||
|
||||
The Salt Bootstrap script has a wide variety of options that can be passed as
|
||||
well as several ways of obtaining the bootstrap script itself. Note that the use of ``sudo``
|
||||
|
@ -199,35 +226,35 @@ If you want to install a package of a specific release version, from the Salt Pr
|
|||
|
||||
.. code:: console
|
||||
|
||||
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
|
||||
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh -P stable 3006.1
|
||||
|
||||
If you want to install a specific release version, based on the Git tags:
|
||||
|
||||
.. code:: console
|
||||
|
||||
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
|
||||
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git v3006.1
|
||||
|
||||
Using ``curl`` to install latest development version from GitHub:
|
||||
|
||||
.. code:: console
|
||||
|
||||
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
|
||||
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git master
|
||||
|
||||
To install a specific branch from a Git fork:
|
||||
|
||||
.. code:: console
|
||||
|
||||
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
|
||||
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh -g https://github.com/myuser/salt.git git mybranch
|
||||
|
||||
If all you want is to install a ``salt-master`` using latest Git:
|
||||
|
||||
.. code:: console
|
||||
|
||||
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
|
||||
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh -M -N git master
|
||||
|
||||
If your host has Internet access only via HTTP proxy, from the Salt Project repo:
|
||||
|
@ -235,7 +262,7 @@ If your host has Internet access only via HTTP proxy, from the Salt Project repo
|
|||
.. code:: console
|
||||
|
||||
PROXY='http://user:password@myproxy.example.com:3128'
|
||||
curl -o bootstrap-salt.sh -L -x "$PROXY" https://bootstrap.saltproject.io
|
||||
curl -o bootstrap-salt.sh -L -x "$PROXY" https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh -P -H "$PROXY" stable
|
||||
|
||||
If your host has Internet access only via HTTP proxy, installing via Git:
|
||||
|
@ -243,7 +270,7 @@ If your host has Internet access only via HTTP proxy, installing via Git:
|
|||
.. code:: console
|
||||
|
||||
PROXY='http://user:password@myproxy.example.com:3128'
|
||||
curl -o bootstrap-salt.sh -L -x "$PROXY" https://bootstrap.saltproject.io
|
||||
curl -o bootstrap-salt.sh -L -x "$PROXY" https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh -H "$PROXY" git
|
||||
|
||||
|
||||
|
@ -254,22 +281,22 @@ Using ``wget`` to install your distribution's stable packages:
|
|||
|
||||
.. code:: console
|
||||
|
||||
wget -O bootstrap-salt.sh https://bootstrap.saltproject.io
|
||||
wget -O bootstrap-salt.sh https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh
|
||||
|
||||
Installing a specific version from git using ``wget``:
|
||||
|
||||
.. code:: console
|
||||
|
||||
wget -O bootstrap-salt.sh https://bootstrap.saltproject.io
|
||||
sudo sh bootstrap-salt.sh git v3004.1
|
||||
wget -O bootstrap-salt.sh https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git v3006.8
|
||||
|
||||
Installing a specific version package from the Salt Project repo using ``wget``:
|
||||
|
||||
.. code:: console
|
||||
|
||||
wget -O bootstrap-salt.sh https://bootstrap.saltproject.io
|
||||
sudo sh bootstrap-salt.sh -P stable 3006.1
|
||||
wget -O bootstrap-salt.sh https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh -P stable 3006.8
|
||||
|
||||
**NOTE**
|
||||
|
||||
|
@ -280,55 +307,21 @@ However, the ``-P`` flag is not necessary for Git-based bootstraps.
|
|||
Install using Python
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you already have Python installed, ``python 2.7``, then it's as easy as:
|
||||
If you already have Python installed, ``python 3.10``, then it's as easy as:
|
||||
|
||||
.. code:: console
|
||||
|
||||
python -m urllib "https://bootstrap.saltproject.io" > bootstrap-salt.sh
|
||||
python -m urllib "https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh" > bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh -P stable 3006.1
|
||||
|
||||
With python version 2, the following in-line code should always work:
|
||||
|
||||
.. code:: console
|
||||
|
||||
python -c 'import urllib; print urllib.urlopen("https://bootstrap.saltproject.io").read()' > bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git master
|
||||
|
||||
With python version 3:
|
||||
|
||||
.. code:: console
|
||||
|
||||
python3 -c 'import urllib.request; print(urllib.request.urlopen("https://bootstrap.saltproject.io").read().decode("ascii"))' > bootstrap-salt.sh
|
||||
python3 -c 'import urllib.request; print(urllib.request.urlopen("https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh").read().decode("ascii"))' > bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git v3006.1
|
||||
|
||||
Install using fetch
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
On a FreeBSD-based system you usually don't have either of the above binaries available. You **do**
|
||||
have ``fetch`` available though:
|
||||
|
||||
.. code:: console
|
||||
|
||||
fetch -o bootstrap-salt.sh https://bootstrap.saltproject.io
|
||||
sudo sh bootstrap-salt.sh
|
||||
|
||||
If you have any SSL issues install ``ca_root_nss``:
|
||||
|
||||
.. code:: console
|
||||
|
||||
pkg install ca_root_nss
|
||||
|
||||
And either copy the certificates to the place where fetch can find them:
|
||||
|
||||
.. code:: console
|
||||
|
||||
cp /usr/local/share/certs/ca-root-nss.crt /etc/ssl/cert.pem
|
||||
|
||||
Or link them to the right place:
|
||||
|
||||
.. code:: console
|
||||
|
||||
ln -s /usr/local/share/certs/ca-root-nss.crt /etc/ssl/cert.pem
|
||||
Note: Python 2.x is no longer supported given it reached it's End-Of-Life Jan. 1st, 2020
|
||||
|
||||
|
||||
Installing via an Insecure One-Liner
|
||||
|
@ -348,25 +341,29 @@ Installing the latest stable release of Salt (default):
|
|||
|
||||
.. code:: console
|
||||
|
||||
curl -L https://bootstrap.saltproject.io | sudo sh
|
||||
curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh
|
||||
|
||||
Using ``wget`` to install your distribution's stable packages:
|
||||
|
||||
.. code:: console
|
||||
|
||||
wget -O - https://bootstrap.saltproject.io | sudo sh
|
||||
wget -O - https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh
|
||||
|
||||
Installing a target version package of Salt from the Salt Project repo:
|
||||
|
||||
.. code:: console
|
||||
|
||||
curl -L https://bootstrap.saltproject.io | sudo sh -s -- stable 3006.1
|
||||
curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh -s -- stable 3006.8
|
||||
|
||||
Installing the latest master branch of Salt from git:
|
||||
|
||||
.. code:: console
|
||||
|
||||
curl -L https://bootstrap.saltproject.io | sudo sh -s -- git master
|
||||
curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh -s -- git master
|
||||
|
||||
Note: use of git is recommended for development environments, for example: testing new features of
|
||||
Salt which have not yet been released.
|
||||
It is recommended that production environments should use ``stable``.
|
||||
|
||||
|
||||
Install on Windows
|
||||
|
@ -377,9 +374,8 @@ Using ``PowerShell`` to install latest stable version:
|
|||
.. code:: powershell
|
||||
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
|
||||
Invoke-WebRequest -Uri https://winbootstrap.saltproject.io -OutFile "$env:TEMP\bootstrap-salt.ps1"
|
||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
& "$env:TEMP\bootstrap-salt.ps1"
|
||||
Invoke-WebRequest -Uri https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.ps1 -OutFile "$env:TEMP\bootstrap-salt.ps1"
|
||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force; & "$env:TEMP\bootstrap-salt.ps1"
|
||||
|
||||
Display information about the install script parameters:
|
||||
|
||||
|
@ -391,7 +387,7 @@ Using ``cygwin`` to install latest stable version:
|
|||
|
||||
.. code:: console
|
||||
|
||||
curl -o bootstrap-salt.ps1 -L https://winbootstrap.saltproject.io
|
||||
curl -o bootstrap-salt.ps1 -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.ps1
|
||||
"/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ./bootstrap-salt.ps1"
|
||||
|
||||
|
||||
|
@ -399,18 +395,21 @@ Supported Operating Systems
|
|||
---------------------------
|
||||
|
||||
The salt-bootstrap script officially supports the distributions outlined in
|
||||
`Salt's Supported Operating Systems`_ document, except for Solaris and AIX. The operating systems
|
||||
listed below should reflect this document but may become out of date. If an operating system is
|
||||
listed below, but is not listed on the official supported operating systems document, the level of
|
||||
support is "best-effort".
|
||||
`Salt's Supported Operating Systems
|
||||
<https://docs.saltproject.io/salt/install-guide/en/latest/topics/salt-supported-operating-systems.html>`_
|
||||
document, (BSD-based OSs, Solaris and AIX are no longer supported).
|
||||
The operating systems listed below should reflect this document but may become out of date.
|
||||
If an operating system is listed below, but is not listed on the official supported operating
|
||||
systems document, the level of support is "best-effort".
|
||||
|
||||
Since Salt is written in Python, the packages available from the `Salt Project's repository`_ are
|
||||
Since Salt is written in Python, the packages available from the `Salt Project's repository
|
||||
<packages.broadcom.com>`_ are
|
||||
CPU architecture independent and could be installed on any hardware supported by Linux kernel.
|
||||
However, the Salt Project does package Salt's binary dependencies only for ``x86_64`` (``amd64``)
|
||||
and ``AArch64`` (``arm64``).
|
||||
|
||||
It is recommended to use ``git`` bootstrap mode as described above to install Salt on other
|
||||
architectures, such as ``x86`` (``i386``), ``AArch64`` (``arm64``) or ``ARM EABI`` (``armel``).
|
||||
architectures, such as ``x86`` (``i386``) or ``ARM EABI`` (``armel``).
|
||||
You also may need to disable repository configuration and allow ``pip`` installations by providing
|
||||
``-r`` and ``-P`` options to the bootstrap script, i.e.:
|
||||
|
||||
|
@ -429,24 +428,23 @@ Debian and derivatives
|
|||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Cumulus Linux 2/3
|
||||
- Debian GNU/Linux 9/10/11
|
||||
- Devuan GNU/Linux 1/2
|
||||
- Debian GNU/Linux 9/10/11/12
|
||||
- Devuan GNU/Linux 1/2/3/4/5
|
||||
- Kali Linux 1.0 (based on Debian 7)
|
||||
- Linux Mint Debian Edition 1 (based on Debian 8)
|
||||
- Raspbian 8 (``armhf`` packages) and 9 (using ``git`` installation mode only)
|
||||
|
||||
|
||||
Red Hat family
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
- Amazon Linux 2012.3 and later
|
||||
- Amazon Linux 2
|
||||
- CentOS 7/8/9
|
||||
- Amazon Linux 2023
|
||||
- CentOS 8/9
|
||||
- Cloud Linux 6/7
|
||||
- Fedora 36/37/38 (install latest stable from standard repositories)
|
||||
- Oracle Linux 7/8
|
||||
- Red Hat Enterprise Linux 7/8/9
|
||||
- Scientific Linux 7/8/9
|
||||
- Fedora 40 (install latest stable from standard repositories)
|
||||
- Oracle Linux 8/9
|
||||
- Red Hat Enterprise Linux 8/9
|
||||
- Scientific Linux 8/9
|
||||
|
||||
|
||||
SUSE family
|
||||
|
@ -458,8 +456,7 @@ SUSE family
|
|||
- SUSE Linux Enterprise Server 11 SP4, 12 SP2
|
||||
|
||||
**NOTE:** Leap 15 installs Python 3 Salt packages by default. Salt is packaged by SUSE, and
|
||||
Leap 15 ships with Python 3. Salt with Python 2 can be installed using the the ``-x`` option
|
||||
in combination with the ``git`` installation method.
|
||||
Leap 15 ships with Python 3.
|
||||
|
||||
.. code:: console
|
||||
|
||||
|
@ -469,7 +466,7 @@ in combination with the ``git`` installation method.
|
|||
Ubuntu and derivatives
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- KDE neon (based on Ubuntu 18.04/20.04/22.04)
|
||||
- KDE neon (based on Ubuntu 20.04/22.04/24.04)
|
||||
- Linux Mint 17/18
|
||||
|
||||
Ubuntu Best Effort Support: Non-LTS Releases
|
||||
|
@ -480,8 +477,8 @@ repositories are not provided on the `Salt Project's Ubuntu repository`_ for the
|
|||
the bootstrap script will attempt to install the packages for the most closely related LTS Ubuntu
|
||||
release instead.
|
||||
|
||||
For example, when installing Salt on Ubuntu 21.10, the bootstrap script will setup the repository
|
||||
for Ubuntu 20.04 from the `Salt Project's Ubuntu repository`_ and install the 20.04 packages.
|
||||
For example, when installing Salt on Ubuntu 24.10, the bootstrap script will setup the repository
|
||||
for Ubuntu 24.04 from the `Salt Project's Ubuntu repository`_ and install the 24.04 packages.
|
||||
|
||||
Non-LTS Ubuntu releases are not supported once the release reaches End-of-Life as defined by
|
||||
`Ubuntu's release schedule`_.
|
||||
|
@ -500,12 +497,11 @@ UNIX systems
|
|||
|
||||
**BSD**:
|
||||
|
||||
- OpenBSD (``pip`` installation)
|
||||
- FreeBSD 11/12/13/14-CURRENT
|
||||
- No longer supported
|
||||
|
||||
**SunOS**:
|
||||
|
||||
- SmartOS (2015Q4 and later)
|
||||
- No longer supported
|
||||
|
||||
|
||||
Using a custom salt bootstrap
|
||||
|
@ -583,8 +579,8 @@ Salt is ready and working in the Docker container with the Minion authenticated
|
|||
|
||||
**NOTE**
|
||||
|
||||
The ``Dockerfile`` here inherits the Ubuntu 14.04 public image with Upstart configured as the init
|
||||
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.
|
||||
The ``Dockerfile`` here inherits the Ubuntu 20.04 public image. 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.
|
||||
|
||||
.. vim: fenc=utf-8 spell spl=en cc=100 tw=99 fo=want sts=2 sw=2 et
|
||||
|
|
11
RELEASE.md
11
RELEASE.md
|
@ -3,13 +3,10 @@
|
|||
- See if there are any PRs worth squeezing into release.
|
||||
- Go through the changes since last release, add them to changelog.
|
||||
- Add any new authors to the AUTHORS file.
|
||||
- If there's a new Salt release(major), update the script to add support for it.
|
||||
- If there's a new Salt release (major), update the script to add support for it.
|
||||
- Bump version for release.
|
||||
- Open PR against develop with these changes.
|
||||
- Once the above PR is merged, open a PR against stable with the changes from develop.
|
||||
- Once the above PR is merged, wait until an automatic PR is opened against stable which updates the checksums.
|
||||
- Once the above PR is merged, tag the release `v{version-here}` and push the tag.
|
||||
- Wait until an automatic PR is opened against the develop branch updating the checksums in `README.rst`. Merge it.
|
||||
- Check that an automated PR was opened against the salt repo updating the bootstrap script, located in `salt/cloud/deploy/bootstrap-salt.sh`
|
||||
|
||||
- Once the above PR is merged, go to [Cut Release](https://github.com/saltstack/salt-bootstrap/actions/workflows/release.yml) and `Run workflow` against `develop` branch
|
||||
- Open a new PR against the branch of the oldest supported version of [the salt repo](https://github.com/saltstack/salt) (ex. `3006.x`), and replace `salt/cloud/deploy/bootstrap-salt.sh` with the latest `bootstrap-salt.sh` file
|
||||
- When that PR is merged into [the salt repo](https://github.com/saltstack/salt), merge-forwards into the latest branches and `master` will ensure that the latest bootstrap script is available
|
||||
- Victory!
|
||||
|
|
119
Vagrantfile
vendored
119
Vagrantfile
vendored
|
@ -1,119 +0,0 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
# All Vagrant configuration is done here. The most common configuration
|
||||
# options are documented and commented below. For a complete reference,
|
||||
# please see the online documentation at vagrantup.com.
|
||||
|
||||
# Every Vagrant virtual environment requires a box to build off of.
|
||||
config.vm.box = "ubuntu/xenial64"
|
||||
|
||||
# The url from where the 'config.vm.box' box will be fetched if it
|
||||
# doesn't already exist on the user's system.
|
||||
# config.vm.box_url = "http://domain.com/path/to/above.box"
|
||||
|
||||
# Create a forwarded port mapping which allows access to a specific port
|
||||
# within the machine from a port on the host machine. In the example below,
|
||||
# accessing "localhost:8080" will access port 80 on the guest machine.
|
||||
# config.vm.network :forwarded_port, guest: 80, host: 8080
|
||||
|
||||
# Create a private network, which allows host-only access to the machine
|
||||
# using a specific IP.
|
||||
# config.vm.network :private_network, ip: "192.168.33.10"
|
||||
|
||||
# Create a public network, which generally matched to bridged network.
|
||||
# Bridged networks make the machine appear as another physical device on
|
||||
# your network.
|
||||
# config.vm.network :public_network
|
||||
|
||||
# If true, then any SSH connections made will enable agent forwarding.
|
||||
# Default value: false
|
||||
# config.ssh.forward_agent = true
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
config.vm.synced_folder ".", "/salt_bootstrap"
|
||||
|
||||
config.vm.provision "shell", path: "bootstrap-salt.sh"
|
||||
# Provider-specific configuration so you can fine-tune various
|
||||
# backing providers for Vagrant. These expose provider-specific options.
|
||||
# Example for VirtualBox:
|
||||
#
|
||||
# config.vm.provider :virtualbox do |vb|
|
||||
# # Don't boot with headless mode
|
||||
# vb.gui = true
|
||||
#
|
||||
# # Use VBoxManage to customize the VM. For example to change memory:
|
||||
# vb.customize ["modifyvm", :id, "--memory", "1024"]
|
||||
# end
|
||||
#
|
||||
# View the documentation for the provider you're using for more
|
||||
# information on available options.
|
||||
|
||||
# Enable provisioning with Puppet stand alone. Puppet manifests
|
||||
# are contained in a directory path relative to this Vagrantfile.
|
||||
# You will need to create the manifests directory and a manifest in
|
||||
# the file precise64.pp in the manifests_path directory.
|
||||
#
|
||||
# An example Puppet manifest to provision the message of the day:
|
||||
#
|
||||
# # group { "puppet":
|
||||
# # ensure => "present",
|
||||
# # }
|
||||
# #
|
||||
# # File { owner => 0, group => 0, mode => 0644 }
|
||||
# #
|
||||
# # file { '/etc/motd':
|
||||
# # content => "Welcome to your Vagrant-built virtual machine!
|
||||
# # Managed by Puppet.\n"
|
||||
# # }
|
||||
#
|
||||
# config.vm.provision :puppet do |puppet|
|
||||
# puppet.manifests_path = "manifests"
|
||||
# puppet.manifest_file = "site.pp"
|
||||
# end
|
||||
|
||||
# Enable provisioning with chef solo, specifying a cookbooks path, roles
|
||||
# path, and data_bags path (all relative to this Vagrantfile), and adding
|
||||
# some recipes and/or roles.
|
||||
#
|
||||
# config.vm.provision :chef_solo do |chef|
|
||||
# chef.cookbooks_path = "../my-recipes/cookbooks"
|
||||
# chef.roles_path = "../my-recipes/roles"
|
||||
# chef.data_bags_path = "../my-recipes/data_bags"
|
||||
# chef.add_recipe "mysql"
|
||||
# chef.add_role "web"
|
||||
#
|
||||
# # You may also specify custom JSON attributes:
|
||||
# chef.json = { :mysql_password => "foo" }
|
||||
# end
|
||||
|
||||
# Enable provisioning with chef server, specifying the chef server URL,
|
||||
# and the path to the validation key (relative to this Vagrantfile).
|
||||
#
|
||||
# The Opscode Platform uses HTTPS. Substitute your organization for
|
||||
# ORGNAME in the URL and validation key.
|
||||
#
|
||||
# If you have your own Chef Server, use the appropriate URL, which may be
|
||||
# HTTP instead of HTTPS depending on your configuration. Also change the
|
||||
# validation key to validation.pem.
|
||||
#
|
||||
# config.vm.provision :chef_client do |chef|
|
||||
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
|
||||
# chef.validation_key_path = "ORGNAME-validator.pem"
|
||||
# end
|
||||
#
|
||||
# If you're using the Opscode platform, your validator client is
|
||||
# ORGNAME-validator, replacing ORGNAME with your organization name.
|
||||
#
|
||||
# If you have your own Chef Server, the default validation client name is
|
||||
# chef-validator, unless you changed the configuration.
|
||||
#
|
||||
# chef.validation_client_name = "ORGNAME-validator"
|
||||
end
|
|
@ -5,61 +5,32 @@
|
|||
.DESCRIPTION
|
||||
The script will download the official Salt package from SaltProject. It will
|
||||
install a specific package version and accept parameters for the master and
|
||||
minion ids. Finally, it can stop and set the Windows service to "manual" for
|
||||
minion IDs. Finally, it can stop and set the Windows service to "manual" for
|
||||
local testing.
|
||||
|
||||
.EXAMPLE
|
||||
./bootstrap-salt.ps1
|
||||
Runs without any parameters. Uses all the default values/settings.
|
||||
Runs without any parameters. Uses all the default values/settings. Will
|
||||
install the latest version of Salt
|
||||
|
||||
.EXAMPLE
|
||||
./bootstrap-salt.ps1 -version 2017.7.0
|
||||
./bootstrap-salt.ps1 -Version 3006.7
|
||||
Specifies a particular version of the installer.
|
||||
|
||||
.EXAMPLE
|
||||
./bootstrap-salt.ps1 -pythonVersion 3
|
||||
Specifies the Python version of the installer. Can be "2" or "3". Defaults
|
||||
to "2". Python 3 installers are only available for Salt 2017.7.0 and newer.
|
||||
Starting with Python 3002 only Python 3 installers are available.
|
||||
|
||||
.EXAMPLE
|
||||
./bootstrap-salt.ps1 -runservice false
|
||||
./bootstrap-salt.ps1 -RunService $false
|
||||
Specifies the salt-minion service to stop and be set to manual. Useful for
|
||||
testing locally from the command line with the --local switch
|
||||
|
||||
.EXAMPLE
|
||||
./bootstrap-salt.ps1 -minion minion-box -master master-box
|
||||
./bootstrap-salt.ps1 -Minion minion-box -Master master-box
|
||||
Specifies the minion and master ids in the minion config. Defaults to the
|
||||
installer values of host name for the minion id and "salt" for the master.
|
||||
|
||||
.EXAMPLE
|
||||
./bootstrap-salt.ps1 -minion minion-box -master master-box -version 2017.7.0 -runservice false
|
||||
./bootstrap-salt.ps1 -Minion minion-box -Master master-box -Version 3006.7 -RunService $false
|
||||
Specifies all the optional parameters in no particular order.
|
||||
|
||||
.PARAMETER version
|
||||
The version of the Salt minion to install. Default is "latest" which will
|
||||
install the latest version of Salt minion available.
|
||||
|
||||
.PARAMETER pythonVersion
|
||||
The version of Python the installer should use. Specify either "2" or "3".
|
||||
Beginning with Salt 2017.7.0, Salt will run on either Python 2 or Python 3.
|
||||
The default is Python 2 if not specified. This parameter only works for Salt
|
||||
|
||||
.PARAMETER runservice
|
||||
Boolean flag to start or stop the minion service. True will start the minion
|
||||
service. False will stop the minion service and set it to "manual". The
|
||||
installer starts it by default.
|
||||
|
||||
.PARAMETER minion
|
||||
Name of the minion being installed on this host. Installer defaults to the
|
||||
host name.
|
||||
|
||||
.PARAMETER master
|
||||
Name or IP of the master server. Installer defaults to "salt".
|
||||
|
||||
.PARAMETER repourl
|
||||
URL to the windows packages. Default is "https://repo.saltproject.io/windows"
|
||||
|
||||
.NOTES
|
||||
All of the parameters are optional. The default should be the latest
|
||||
version. The architecture is dynamically determined by the script.
|
||||
|
@ -68,7 +39,8 @@
|
|||
Salt Bootstrap GitHub Project (script home) - https://github.com/saltstack/salt-bootstrap
|
||||
Original Vagrant Provisioner Project - https://github.com/saltstack/salty-vagrant
|
||||
Vagrant Project (utilizes this script) - https://github.com/mitchellh/vagrant
|
||||
Salt Download Location - https://repo.saltproject.io/windows/
|
||||
Salt Download Location - https://packages.broadcom.com/artifactory/saltproject-generic/windows/
|
||||
Salt Manual Install Directions (Windows) - https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/windows.html
|
||||
#>
|
||||
|
||||
#===============================================================================
|
||||
|
@ -77,43 +49,73 @@
|
|||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
# Doesn't support versions prior to "YYYY.M.R-B"
|
||||
# Supports new version and latest
|
||||
# Option 1 means case insensitive
|
||||
[ValidatePattern('^(\d{4}(\.\d{1,2}){0,2}(\-\d{1})?)|(latest)$', Options=1)]
|
||||
[Alias("v")]
|
||||
# The version of the Salt minion to install. Default is "latest" which will
|
||||
# install the latest version of Salt minion available. Doesn't support
|
||||
# versions prior to "YYYY.M.R-B"
|
||||
[String]$Version = "latest",
|
||||
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
# Python 3 support was added in 2017. Python 2 support was dropped in
|
||||
# version 3001. This parameter is ignored for all versions before 2017 and
|
||||
# after 3000.
|
||||
[ValidateSet("2","3")]
|
||||
[Alias("p")]
|
||||
[String]$PythonVersion = "3",
|
||||
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[ValidateSet("true","false")]
|
||||
[Alias("s")]
|
||||
[String]$RunService = "true",
|
||||
# Boolean flag to start or stop the minion service. $true will start the
|
||||
# minion service. $false will stop the minion service and set it to "manual".
|
||||
# The installer starts it by default.
|
||||
[Bool]$RunService = $true,
|
||||
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[Alias("m")]
|
||||
# Name of the minion being installed on this host. Installer defaults to the
|
||||
# host name.
|
||||
[String]$Minion = "not-specified",
|
||||
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[Alias("a")]
|
||||
#Name or IP of the master server. Installer defaults to "salt".
|
||||
[String]$Master = "not-specified",
|
||||
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[Alias("r")]
|
||||
[String]$RepoUrl = "https://repo.saltproject.io/salt/py3/windows",
|
||||
# URL to the windows packages. Will look for the installer at the root of
|
||||
# the URL/Version. Place a folder for each version of Salt in this directory
|
||||
# and place the installer binary for each version in its folder.
|
||||
# Default is "https://packages.broadcom.com/artifactory/saltproject-generic/windows/"
|
||||
[String]$RepoUrl = "https://packages.broadcom.com/artifactory/saltproject-generic/windows/",
|
||||
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[Alias("c")]
|
||||
[Switch]$ConfigureOnly
|
||||
# Vagrant only
|
||||
# Vagrant files are placed in "C:\tmp". Copies Salt config files from
|
||||
# Vagrant (C:\tmp) to Salt config locations and exits. Does not run the
|
||||
# installer
|
||||
[Switch]$ConfigureOnly,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[Alias("h")]
|
||||
# Displays help for this script.
|
||||
[Switch] $Help,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[Alias("e")]
|
||||
# Displays the Version for this script.
|
||||
[Switch] $ScriptVersion
|
||||
)
|
||||
|
||||
# We'll check for help first because it really has no requirements
|
||||
if ($help) {
|
||||
# Get the full script name
|
||||
$this_script = & {$myInvocation.ScriptName}
|
||||
Get-Help $this_script -Detailed
|
||||
exit 0
|
||||
}
|
||||
|
||||
$__ScriptVersion = "2025.02.24"
|
||||
$ScriptName = $myInvocation.MyCommand.Name
|
||||
|
||||
# We'll check for the Version next, because it also has no requirements
|
||||
if ($ScriptVersion) {
|
||||
Write-Host $__ScriptVersion
|
||||
exit 0
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Script Preferences
|
||||
|
@ -151,34 +153,116 @@ function Get-MajorVersion {
|
|||
return ( $Version -split "\." )[0]
|
||||
}
|
||||
|
||||
function Convert-PSObjectToHashtable {
|
||||
param (
|
||||
[Parameter(ValueFromPipeline)]
|
||||
$InputObject
|
||||
)
|
||||
if ($null -eq $InputObject) { return $null }
|
||||
function Get-AvailableVersions {
|
||||
# Get available versions from a remote location specified in the Source
|
||||
# Parameter
|
||||
Write-Verbose "Getting version information from the repo"
|
||||
Write-Verbose "base_url: $base_url"
|
||||
|
||||
$is_enum = $InputObject -is [System.Collections.IEnumerable]
|
||||
$not_string = $InputObject -isnot [string]
|
||||
if ($is_enum -and $not_string) {
|
||||
$collection = @(
|
||||
foreach ($object in $InputObject) {
|
||||
Convert-PSObjectToHashtable $object
|
||||
}
|
||||
)
|
||||
$available_versions = [System.Collections.ArrayList]@()
|
||||
|
||||
Write-Host -NoEnumerate $collection
|
||||
} elseif ($InputObject -is [PSObject]) {
|
||||
$hash = @{}
|
||||
|
||||
foreach ($property in $InputObject.PSObject.Properties) {
|
||||
$hash[$property.Name] = Convert-PSObjectToHashtable $property.Value
|
||||
if ( $base_url.StartsWith("http") -or $base_url.StartsWith("ftp") ) {
|
||||
# We're dealing with HTTP, HTTPS, or FTP
|
||||
$response = Invoke-WebRequest "$base_url" -UseBasicParsing
|
||||
try {
|
||||
$response = Invoke-WebRequest "$base_url" -UseBasicParsing
|
||||
} catch {
|
||||
Write-Host "Failed to get version information" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
$hash
|
||||
if ( $response.StatusCode -ne 200 ) {
|
||||
Write-Host "There was an error getting version information" -ForegroundColor Red
|
||||
Write-Host "Error: $($response.StatusCode)" -ForegroundColor red
|
||||
exit 1
|
||||
}
|
||||
|
||||
$response.links | ForEach-Object {
|
||||
if ( $_.href.Length -gt 8) {
|
||||
Write-Host "The content at this location is unexpected" -ForegroundColor Red
|
||||
Write-Host "Should be a list of directories where the name is a version of Salt" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Getting available versions from response
|
||||
Write-Verbose "Getting available versions from response"
|
||||
$filtered = $response.Links | Where-Object -Property href -NE "../"
|
||||
$filtered | Select-Object -Property href | ForEach-Object {
|
||||
$available_versions.Add($_.href.Trim("/")) | Out-Null
|
||||
}
|
||||
} elseif ( $base_url.StartsWith("\\") -or $base_url -match "^[A-Za-z]:\\" ) {
|
||||
# We're dealing with a local directory or SMB source
|
||||
Get-ChildItem -Path $base_url -Directory | ForEach-Object {
|
||||
$available_versions.Add($_.Name) | Out-Null
|
||||
}
|
||||
} else {
|
||||
$InputObject
|
||||
Write-Host "Unknown Source Type" -ForegroundColor Red
|
||||
Write-Host "Must be one of HTTP, HTTPS, FTP, SMB Share, Local Directory" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Verbose "Available versions:"
|
||||
$available_versions | ForEach-Object {
|
||||
Write-Verbose "- $_"
|
||||
}
|
||||
|
||||
# Get the latest version, should be the last in the list
|
||||
Write-Verbose "Getting latest available version"
|
||||
$latest = $available_versions | Select-Object -Last 1
|
||||
Write-Verbose "Latest available version: $latest"
|
||||
|
||||
# Create a versions table
|
||||
# This will have the latest version available, the latest version available
|
||||
# for each major version, and every version available. This makes the
|
||||
# version lookup logic easier. The contents of the versions table can be
|
||||
# found by running -Verbose
|
||||
Write-Verbose "Populating the versions table"
|
||||
$versions_table = [ordered]@{"latest"=$latest}
|
||||
$available_versions | ForEach-Object {
|
||||
$versions_table[$(Get-MajorVersion $_)] = $_
|
||||
$versions_table[$_.ToLower()] = $_.ToLower()
|
||||
}
|
||||
|
||||
Write-Verbose "Versions Table:"
|
||||
$versions_table | Sort-Object Name | Out-String | ForEach-Object {
|
||||
Write-Verbose "$_"
|
||||
}
|
||||
|
||||
return $versions_table
|
||||
}
|
||||
|
||||
function Get-HashFromArtifactory {
|
||||
# This function uses the artifactory API to get the SHA265 Hash for the file
|
||||
# If Source is NOT artifactory, the sha will not be checked
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String] $SaltVersion,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String] $SaltFileName
|
||||
)
|
||||
if ( $api_url ) {
|
||||
$full_url = "$api_url/$SaltVersion/$SaltFileName"
|
||||
Write-Verbose "Querying Artifactory API for hash:"
|
||||
Write-Verbose $full_url
|
||||
try {
|
||||
$response = Invoke-RestMethod $full_url -UseBasicParsing
|
||||
return $response.checksums.sha256
|
||||
} catch {
|
||||
Write-Verbose "Artifactory API Not available or file not"
|
||||
Write-Verbose "available at specified location"
|
||||
Write-Verbose "Hash will not be checked"
|
||||
return ""
|
||||
}
|
||||
Write-Verbose "No hash found for this file: $SaltFileName"
|
||||
Write-Verbose "Hash will not be checked"
|
||||
return ""
|
||||
}
|
||||
Write-Verbose "No artifactory API defined"
|
||||
Write-Verbose "Hash will not be checked"
|
||||
return ""
|
||||
}
|
||||
|
||||
function Get-FileHash {
|
||||
|
@ -253,6 +337,7 @@ function Get-FileHash {
|
|||
}
|
||||
} catch {
|
||||
Write-Verbose "Error hashing: $Path"
|
||||
Write-Verbose "ERROR: $_"
|
||||
return @{}
|
||||
} finally {
|
||||
if ($null -ne $data) {
|
||||
|
@ -296,70 +381,22 @@ if (!(Get-IsAdministrator)) {
|
|||
}
|
||||
|
||||
#===============================================================================
|
||||
# Change RepoUrl for older versions
|
||||
# Check for older versions
|
||||
#===============================================================================
|
||||
$defaultUrl = "https://repo.saltproject.io/salt/py3/windows"
|
||||
$oldRepoUrl = "https://repo.saltproject.io/windows"
|
||||
$majorVersion = Get-MajorVersion -Version $Version
|
||||
$customUrl = $true
|
||||
if ( $Version.ToLower() -ne "latest" ) {
|
||||
# A specific version has been passed
|
||||
# We only want to modify the URL if a custom URL was not passed
|
||||
$uri = [Uri]($RepoUrl)
|
||||
if ( $uri.AbsoluteUri -eq $defaultUrl ) {
|
||||
# No customURL passed, let's check for a pre 3006 version
|
||||
$customUrl = $false
|
||||
if ( $majorVersion -lt "3006" ) {
|
||||
# This is an older version, use the old URL
|
||||
$RepoUrl = $oldRepoUrl
|
||||
} else {
|
||||
# This is a new URL, and a version was passed, let's look in minor
|
||||
if ( $Version.ToLower() -ne $majorVersion.ToLower() ) {
|
||||
$RepoUrl = "$RepoUrl/minor"
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( $RepoUrl -eq $defaultUrl ) {
|
||||
$customUrl = $false
|
||||
}
|
||||
if ($majorVersion -lt "3006") {
|
||||
# This is an older version, use the old URL
|
||||
Write-Host "Versions older than 3006 are not available" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Verify Parameters
|
||||
# Declare variables
|
||||
#===============================================================================
|
||||
Write-Verbose "Parameters passed in:"
|
||||
Write-Verbose "version: $Version"
|
||||
Write-Verbose "runservice: $RunService"
|
||||
Write-Verbose "master: $Master"
|
||||
Write-Verbose "minion: $Minion"
|
||||
Write-Verbose "repourl: $RepoUrl"
|
||||
|
||||
if ($RunService.ToLower() -eq "true") {
|
||||
Write-Verbose "Windows service will be set to run"
|
||||
[bool]$RunService = $True
|
||||
} elseif ($RunService.ToLower() -eq "false") {
|
||||
Write-Verbose "Windows service will be stopped and set to manual"
|
||||
[bool]$RunService = $False
|
||||
} else {
|
||||
# Param passed in wasn't clear so defaulting to true.
|
||||
Write-Verbose "Windows service defaulting to run automatically"
|
||||
[bool]$RunService = $True
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Ensure Directories are present, copy Vagrant Configs if found
|
||||
#===============================================================================
|
||||
|
||||
$ConfiguredAnything = $False
|
||||
|
||||
# Detect older version of Salt to determing default RootDir
|
||||
if ($majorVersion -lt 3004) {
|
||||
$RootDir = "$env:SystemDrive`:\salt"
|
||||
} else {
|
||||
$RootDir = "$env:ProgramData\Salt Project\Salt"
|
||||
}
|
||||
$ConfDir = "$RootDir\conf"
|
||||
$PkiDir = "$ConfDir\pki\minion"
|
||||
|
||||
$RootDir = "$env:ProgramData\Salt Project\Salt"
|
||||
# Check for existing installation where RootDir is stored in the registry
|
||||
$SaltRegKey = "HKLM:\SOFTWARE\Salt Project\Salt"
|
||||
if (Test-Path -Path $SaltRegKey) {
|
||||
|
@ -368,17 +405,47 @@ if (Test-Path -Path $SaltRegKey) {
|
|||
}
|
||||
}
|
||||
|
||||
$ConfDir = "$RootDir\conf"
|
||||
$PkiDir = "$ConfDir\pki\minion"
|
||||
Write-Verbose "ConfDir: $ConfDir"
|
||||
# Get repo and api URLs. An artifactory URL will have "artifactory" in it
|
||||
$domain, $target = $RepoUrl -split "/artifactory/"
|
||||
if ( $target ) {
|
||||
# Create $base_url and $api_url
|
||||
$base_url = "$domain/artifactory/$target"
|
||||
$api_url = "$domain/artifactory/api/storage/$target"
|
||||
} else {
|
||||
# This is a non-artifactory url, there is no api
|
||||
$base_url = $domain
|
||||
$api_url = ""
|
||||
}
|
||||
|
||||
# Create C:\tmp\
|
||||
New-Item C:\tmp\ -ItemType directory -Force | Out-Null
|
||||
#===============================================================================
|
||||
# Verify Parameters
|
||||
#===============================================================================
|
||||
Write-Verbose "Running Script: $ScriptName"
|
||||
Write-Verbose "Script Version: $__ScriptVersion"
|
||||
Write-Verbose "Parameters passed in:"
|
||||
Write-Verbose "version: $Version"
|
||||
Write-Verbose "runservice: $RunService"
|
||||
Write-Verbose "master: $Master"
|
||||
Write-Verbose "minion: $Minion"
|
||||
Write-Verbose "repourl: $base_url"
|
||||
Write-Verbose "apiurl: $api_url"
|
||||
Write-Verbose "ConfDir: $ConfDir"
|
||||
Write-Verbose "RootDir: $RootDir"
|
||||
|
||||
if ($RunService) {
|
||||
Write-Verbose "Windows service will be set to run"
|
||||
[bool]$RunService = $True
|
||||
} else {
|
||||
Write-Verbose "Windows service will be stopped and set to manual"
|
||||
[bool]$RunService = $False
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Copy Vagrant Files to their proper location.
|
||||
#===============================================================================
|
||||
|
||||
$ConfiguredAnything = $False
|
||||
|
||||
# Vagrant files will be placed in C:\tmp
|
||||
# Check if minion keys have been uploaded, copy to correct location
|
||||
if (Test-Path C:\tmp\minion.pem) {
|
||||
|
@ -418,60 +485,33 @@ if ( $ConfigureOnly ) {
|
|||
#===============================================================================
|
||||
# Detect architecture
|
||||
#===============================================================================
|
||||
if ([IntPtr]::Size -eq 4) {
|
||||
$arch = "x86"
|
||||
if ([IntPtr]::Size -eq 4) { $arch = "x86" } else { $arch = "AMD64" }
|
||||
|
||||
#===============================================================================
|
||||
# Getting version information from the repo
|
||||
#===============================================================================
|
||||
$versions = Get-AvailableVersions
|
||||
|
||||
#===============================================================================
|
||||
# Validate passed version
|
||||
#===============================================================================
|
||||
Write-Verbose "Looking up version: $Version"
|
||||
if ( $versions.Contains($Version.ToLower()) ) {
|
||||
$Version = $versions[$Version.ToLower()]
|
||||
Write-Verbose "Found version: $Version"
|
||||
} else {
|
||||
$arch = "AMD64"
|
||||
Write-Host "Version $Version is not available" -ForegroundColor Red
|
||||
Write-Host "Available versions are:" -ForegroundColor Yellow
|
||||
$versions
|
||||
exit 1
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Get file name to download
|
||||
# Get file url and sha256
|
||||
#===============================================================================
|
||||
$saltFileName = ""
|
||||
$saltVersion = ""
|
||||
$saltSha512= ""
|
||||
$saltFileUrl = ""
|
||||
if ( ($customUrl) -or ($majorVersion -lt 3006) ) {
|
||||
$saltFileName = "Salt-Minion-$Version-Py3-$arch-Setup.exe"
|
||||
$saltVersion = $Version
|
||||
$saltFileUrl = "$RepoUrl/$saltFileName"
|
||||
} else {
|
||||
if ( $majorVersion -ge 3006 ) {
|
||||
$enc = [System.Text.Encoding]::UTF8
|
||||
try {
|
||||
$response = Invoke-WebRequest -Uri "$RepoUrl/repo.json" -UseBasicParsing
|
||||
if ($response.Content.GetType().Name -eq "Byte[]") {
|
||||
$psobj = $enc.GetString($response.Content) | ConvertFrom-Json
|
||||
} else {
|
||||
$psobj = $response.Content | ConvertFrom-Json
|
||||
}
|
||||
$hash = Convert-PSObjectToHashtable $psobj
|
||||
} catch {
|
||||
Write-Verbose "repo.json not found at: $RepoUrl"
|
||||
$hash = @{}
|
||||
}
|
||||
|
||||
$searchVersion = $Version.ToLower()
|
||||
if ( $hash.Contains($searchVersion)) {
|
||||
foreach ($item in $hash.($searchVersion).Keys) {
|
||||
if ( $item.EndsWith(".exe") ) {
|
||||
if ( $item.Contains($arch) ) {
|
||||
$saltFileName = $hash.($searchVersion).($item).name
|
||||
$saltVersion = $hash.($searchVersion).($item).version
|
||||
$saltSha512 = $hash.($searchVersion).($item).SHA512
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $saltFileName -and $saltVersion -and $saltSha512 ) {
|
||||
if ( $RepoUrl.Contains("minor") ) {
|
||||
$saltFileUrl = @($RepoUrl, $saltVersion, $saltFileName) -join "/"
|
||||
} else {
|
||||
$saltFileUrl = @($RepoUrl, "minor", $saltVersion, $saltFileName) -join "/"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$saltFileName = "Salt-Minion-$Version-Py3-$arch-Setup.exe"
|
||||
$saltFileUrl = "$base_url/$Version/$saltFileName"
|
||||
$saltSha256 = Get-HashFromArtifactory -SaltVersion $Version -SaltFileName $saltFileName
|
||||
|
||||
#===============================================================================
|
||||
# Download minion setup file
|
||||
|
@ -480,23 +520,40 @@ Write-Host "====================================================================
|
|||
Write-Host " Bootstrapping Salt Minion" -ForegroundColor Green
|
||||
Write-Host " - version: $Version"
|
||||
Write-Host " - file name: $saltFileName"
|
||||
Write-Host " - file url: $saltFileUrl"
|
||||
Write-Host " - file url : $saltFileUrl"
|
||||
Write-Host " - file hash: $saltSha256"
|
||||
Write-Host " - master: $Master"
|
||||
Write-Host " - minion id: $Minion"
|
||||
Write-Host " - start service: $RunService"
|
||||
Write-Host "-------------------------------------------------------------------------------" -ForegroundColor Yellow
|
||||
Write-Host "Downloading Installer: " -NoNewline
|
||||
$webclient = New-Object System.Net.WebClient
|
||||
$localFile = "C:\Windows\Temp\$saltFileName"
|
||||
$webclient.DownloadFile($saltFileUrl, $localFile)
|
||||
|
||||
$localFile = "$env:TEMP\$saltFileName"
|
||||
|
||||
Write-Host "Downloading Installer: " -NoNewline
|
||||
Write-Verbose ""
|
||||
Write-Verbose "Salt File URL: $saltFileUrl"
|
||||
Write-Verbose "Local File: $localFile"
|
||||
|
||||
# Remove existing local file
|
||||
if ( Test-Path -Path $localFile ) { Remove-Item -Path $localFile -Force }
|
||||
|
||||
# Download the file
|
||||
Invoke-WebRequest -Uri $saltFileUrl -OutFile $localFile
|
||||
if ( Test-Path -Path $localFile ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
if ( $saltSha512 ) {
|
||||
$localSha512 = (Get-FileHash -Path $localFile -Algorithm SHA512).Hash
|
||||
# Compare the hash if there is a hash to compare
|
||||
if ( $saltSha256 ) {
|
||||
$localSha256 = (Get-FileHash -Path $localFile -Algorithm SHA256).Hash
|
||||
Write-Host "Comparing Hash: " -NoNewline
|
||||
if ( $localSha512 -eq $saltSha512 ) {
|
||||
Write-Verbose ""
|
||||
Write-Verbose "Local Hash: $localSha256"
|
||||
Write-Verbose "Remote Hash: $saltSha256"
|
||||
if ( $localSha256 -eq $saltSha256 ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
|
@ -514,72 +571,126 @@ if ( $saltSha512 ) {
|
|||
$parameters = ""
|
||||
if($Minion -ne "not-specified") {$parameters = "/minion-name=$Minion"}
|
||||
if($Master -ne "not-specified") {$parameters = "$parameters /master=$Master"}
|
||||
if($RunService -eq $false) {$parameters = "$parameters /start-service=0"}
|
||||
|
||||
#===============================================================================
|
||||
# Install minion silently
|
||||
#===============================================================================
|
||||
#Wait for process to exit before continuing.
|
||||
Write-Host "Installing Salt Minion: " -NoNewline
|
||||
Start-Process $localFile -ArgumentList "/S $parameters" -Wait -NoNewWindow -PassThru | Out-Null
|
||||
Write-Host "Installing Salt Minion (5 min timeout): " -NoNewline
|
||||
Write-Verbose ""
|
||||
Write-Verbose "Local File: $localFile"
|
||||
Write-Verbose "Parameters: $parameters"
|
||||
$process = Start-Process $localFile `
|
||||
-WorkingDirectory $(Split-Path $localFile -Parent) `
|
||||
-ArgumentList "/S /start-service=0 $parameters" `
|
||||
-NoNewWindow -PassThru
|
||||
|
||||
# Sometimes the installer hangs... we'll wait 5 minutes and then kill it
|
||||
Write-Verbose "Waiting for installer to finish"
|
||||
$process | Wait-Process -Timeout 300 -ErrorAction SilentlyContinue
|
||||
$process.Refresh()
|
||||
|
||||
if ( !$process.HasExited ) {
|
||||
Write-Verbose "Installer Timeout"
|
||||
Write-Host ""
|
||||
Write-Host "Killing hung installer: " -NoNewline
|
||||
$process | Stop-Process
|
||||
$process.Refresh()
|
||||
if ( $process.HasExited ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Wait for salt-minion service to be registered to verify successful
|
||||
# installation
|
||||
$service = Get-Service salt-minion -ErrorAction SilentlyContinue
|
||||
$tries = 0
|
||||
$max_tries = 15 # We'll try for 30 seconds
|
||||
Write-Verbose "Checking that the service is installed"
|
||||
while ( ! $service ) {
|
||||
# We'll keep trying to get a service object until we're successful, or we
|
||||
# reach max_tries
|
||||
if ( $tries -le $max_tries ) {
|
||||
$service = Get-Service salt-minion -ErrorAction SilentlyContinue
|
||||
Start-Sleep -Seconds 2
|
||||
$tries += 1
|
||||
} else {
|
||||
# If the salt-minion service is still not running, something
|
||||
# probably went wrong and user intervention is required - report
|
||||
# failure.
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
Write-Host "Timeout waiting for the salt-minion service to be installed"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
# If we get this far, the service was installed, we have a service object
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
|
||||
#===============================================================================
|
||||
# Configure the minion service
|
||||
#===============================================================================
|
||||
# Wait for salt-minion service to be registered before trying to start it
|
||||
$service = Get-Service salt-minion -ErrorAction SilentlyContinue
|
||||
while (!$service) {
|
||||
Start-Sleep -s 2
|
||||
$service = Get-Service salt-minion -ErrorAction SilentlyContinue
|
||||
}
|
||||
if ( $service ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
if($RunService) {
|
||||
# Start service
|
||||
if( $RunService ) {
|
||||
# Start the service
|
||||
Write-Host "Starting Service: " -NoNewline
|
||||
Start-Service -Name "salt-minion" -ErrorAction SilentlyContinue
|
||||
|
||||
# Check if service is started, otherwise retry starting the
|
||||
# service 4 times.
|
||||
$try = 0
|
||||
while (($service.Status -ne "Running") -and ($try -ne 4)) {
|
||||
Start-Service -Name "salt-minion" -ErrorAction SilentlyContinue
|
||||
$service = Get-Service salt-minion -ErrorAction SilentlyContinue
|
||||
Start-Sleep -s 2
|
||||
$try += 1
|
||||
}
|
||||
|
||||
# If the salt-minion service is still not running, something probably
|
||||
# went wrong and user intervention is required - report failure.
|
||||
if ($service.Status -eq "Running") {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
Write-Verbose ""
|
||||
$tries = 0
|
||||
# We'll try for 2 minutes, sometimes the minion takes that long to start as
|
||||
# it compiles python code for the first time
|
||||
$max_tries = 60
|
||||
if ( $service.Status -ne "Running" ) {
|
||||
while ( $service.Status -ne "Running" ) {
|
||||
if ( $service.Status -eq "Stopped" ) {
|
||||
Start-Service -Name "salt-minion" -ErrorAction SilentlyContinue
|
||||
}
|
||||
Start-Sleep -Seconds 2
|
||||
Write-Verbose "Checking the service status"
|
||||
$service.Refresh()
|
||||
if ( $service.Status -eq "Running" ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
if ( $tries -le $max_tries ) {
|
||||
$tries += 1
|
||||
} else {
|
||||
# If the salt-minion service is still not running, something
|
||||
# probably went wrong and user intervention is required - report
|
||||
# failure.
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
Write-Host "Timed out waiting for the salt-minion service to start"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
}
|
||||
|
||||
} else {
|
||||
Write-Host "Setting Service to 'Manual': " -NoNewline
|
||||
Set-Service "salt-minion" -StartupType "Manual"
|
||||
if ( (Get-Service "salt-minion").StartType -eq "Manual" ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
# Set the service to manual start
|
||||
$service.Refresh()
|
||||
if ( $service.StartType -ne "Manual" ) {
|
||||
Write-Host "Setting Service Start Type to 'Manual': " -NoNewline
|
||||
Set-Service "salt-minion" -StartupType "Manual"
|
||||
$service.Refresh()
|
||||
if ( $service.StartType -eq "Manual" ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Stopping Service: " -NoNewline
|
||||
Stop-Service "salt-minion"
|
||||
if ( (Get-Service "salt-minion").Status -eq "Stopped" ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
# The installer should have installed the service stopped, but we'll make
|
||||
# sure it is stopped here
|
||||
if ( $service.Status -ne "Stopped" ) {
|
||||
Write-Host "Stopping Service: " -NoNewline
|
||||
Stop-Service "salt-minion"
|
||||
$service.Refresh()
|
||||
if ( $service.Status -eq "Stopped" ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4728
bootstrap-salt.sh
4728
bootstrap-salt.sh
File diff suppressed because it is too large
Load diff
|
@ -1,55 +0,0 @@
|
|||
---
|
||||
driver:
|
||||
name: vagrant
|
||||
vm_hostname: salt
|
||||
username: vagrant
|
||||
cache_directory: false
|
||||
customize:
|
||||
usbxhci: 'off'
|
||||
gui: false
|
||||
ssh:
|
||||
shell: /bin/sh
|
||||
linked_clone: true
|
||||
<% unless ENV['CI'] %>
|
||||
synced_folders:
|
||||
- - '.kitchen/kitchen-vagrant/%{instance_name}/vagrant'
|
||||
- '/vagrant'
|
||||
- 'create: true, disabled: false'
|
||||
<% end %>
|
||||
|
||||
provisioner:
|
||||
init_environment: |
|
||||
echo 'auto_accept: true' > /tmp/auto-accept-keys.conf
|
||||
sudo mkdir -p /usr/local/etc/salt/master.d
|
||||
sudo mv /tmp/auto-accept-keys.conf /usr/local/etc/salt/master.d/auto-accept-keys.conf
|
||||
sudo pkg install -y shuf
|
||||
sh -c 't=$(shuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t'
|
||||
sudo: true
|
||||
|
||||
platforms:
|
||||
- name: freebsd-131
|
||||
driver:
|
||||
box: bento/freebsd-13.1
|
||||
- name: freebsd-123
|
||||
driver:
|
||||
box: bento/freebsd-12.3
|
||||
- name: openbsd-7
|
||||
driver:
|
||||
box: generic/openbsd7
|
||||
ssh:
|
||||
shell: /bin/ksh
|
||||
synced_folders: []
|
||||
transport:
|
||||
name: ssh
|
||||
username: vagrant
|
||||
password: vagrant
|
||||
provisioner:
|
||||
init_environment: |
|
||||
echo 'auto_accept: true' > /tmp/auto-accept-keys.conf
|
||||
sudo mkdir -p /etc/salt/master.d
|
||||
sudo mv /tmp/auto-accept-keys.conf /etc/salt/master.d/auto-accept-keys.conf
|
||||
sudo pkg_add coreutils
|
||||
sh -c 't=$(gshuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t'
|
||||
|
||||
verifier:
|
||||
command: pytest --cache-clear -v -s -ra --log-cli-level=debug -k "not test_ping" tests/integration/
|
|
@ -1,50 +0,0 @@
|
|||
---
|
||||
driver:
|
||||
name: exec
|
||||
|
||||
provisioner:
|
||||
sudo: true
|
||||
salt_bootstrap_options: -MP stable %s
|
||||
init_environment: |
|
||||
echo 'auto_accept: true' > /tmp/auto-accept-keys.conf
|
||||
sudo mkdir -p /etc/salt/master.d
|
||||
sudo mv /tmp/auto-accept-keys.conf /etc/salt/master.d/auto-accept-keys.conf
|
||||
brew install coreutils
|
||||
sh -c 't=$(gshuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t'
|
||||
|
||||
platforms:
|
||||
- name: macos-12
|
||||
- name: macos-11
|
||||
- name: macos-1015
|
||||
|
||||
suites:
|
||||
- name: old-stable-3003
|
||||
provisioner:
|
||||
salt_bootstrap_options: -MP old-stable %s
|
||||
salt_version: 3003.4
|
||||
salt_call_command: /opt/salt/bin/salt-call
|
||||
- name: old-stable-3004
|
||||
provisioner:
|
||||
salt_bootstrap_options: -MP old-stable %s
|
||||
salt_version: 3004.1
|
||||
salt_call_command: /opt/salt/bin/salt-call
|
||||
- name: old-stable-3005
|
||||
provisioner:
|
||||
salt_bootstrap_options: -MP old-stable %s
|
||||
salt_version: 3005.1
|
||||
salt_call_command: /opt/salt/bin/salt-call
|
||||
- name: stable-3006
|
||||
provisioner:
|
||||
salt_version: 3006
|
||||
salt_call_command: /opt/salt/salt-call
|
||||
- name: stable-3006-1
|
||||
provisioner:
|
||||
salt_version: 3006.1
|
||||
salt_call_command: /opt/salt/salt-call
|
||||
- name: latest
|
||||
provisioner:
|
||||
salt_version: latest
|
||||
salt_call_command: /opt/salt/salt-call
|
||||
|
||||
verifier:
|
||||
command: pytest --cache-clear -v -s -ra --log-cli-level=debug -k "not test_ping" tests/integration/
|
|
@ -1,48 +0,0 @@
|
|||
---
|
||||
driver:
|
||||
name: proxy
|
||||
host: localhost
|
||||
reset_command: "exit 0"
|
||||
port: 5985
|
||||
username: kitchen
|
||||
password: Password1
|
||||
|
||||
provisioner:
|
||||
salt_bootstrap_url: D:/a/salt-bootstrap/salt-bootstrap/bootstrap-salt.ps1
|
||||
salt_bootstrap_options: -pythonVersion 3 -version %s
|
||||
init_environment: ''
|
||||
|
||||
platforms:
|
||||
- name: windows-2022
|
||||
- name: windows-2019
|
||||
|
||||
suites:
|
||||
- name: stable-3003
|
||||
provisioner:
|
||||
salt_version: 3003.4-1
|
||||
salt_call_command: c:\salt\salt-call.bat
|
||||
- name: stable-3004
|
||||
provisioner:
|
||||
salt_version: 3004.1-1
|
||||
salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.bat
|
||||
- name: stable-3005
|
||||
provisioner:
|
||||
salt_version: 3005.1-1
|
||||
- name: stable-3005-1
|
||||
provisioner:
|
||||
salt_version: 3005.1-1
|
||||
- name: stable-3006
|
||||
provisioner:
|
||||
salt_version: 3006.0
|
||||
salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe
|
||||
- name: stable-3006-1
|
||||
provisioner:
|
||||
salt_version: 3006.1
|
||||
salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe
|
||||
- name: latest
|
||||
provisioner:
|
||||
salt_version: latest
|
||||
salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe
|
||||
|
||||
verifier:
|
||||
command: pytest --cache-clear -v -s -ra --log-cli-level=debug -k "not test_ping" tests/integration/
|
407
kitchen.yml
407
kitchen.yml
|
@ -1,407 +0,0 @@
|
|||
---
|
||||
driver:
|
||||
name: docker
|
||||
use_sudo: false
|
||||
hostname: salt
|
||||
privileged: true
|
||||
username: root
|
||||
cap_add:
|
||||
- sys_admin
|
||||
disable_upstart: false
|
||||
use_internal_docker_network: false
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
|
||||
provisioner:
|
||||
name: salt_solo
|
||||
salt_install: bootstrap
|
||||
salt_bootstrap_url: bootstrap-salt.sh
|
||||
salt_bootstrap_options: -MPfq git %s
|
||||
install_after_init_environment: true
|
||||
log_level: info
|
||||
sudo: false
|
||||
require_chef: false
|
||||
formula: tests
|
||||
run_salt_call: false
|
||||
init_environment: |
|
||||
echo 'auto_accept: true' > /tmp/auto-accept-keys.conf
|
||||
mkdir -p /etc/salt/master.d
|
||||
mv /tmp/auto-accept-keys.conf /etc/salt/master.d/auto-accept-keys.conf
|
||||
sh -c 't=$(shuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t'
|
||||
|
||||
platforms:
|
||||
- name: almalinux-9
|
||||
driver:
|
||||
provision_command:
|
||||
- dnf -y install crypto-policies-scripts procps-ng
|
||||
- update-crypto-policies --set DEFAULT:SHA1
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: almalinux-8
|
||||
- name: amazon-2
|
||||
driver:
|
||||
image: amazonlinux:2
|
||||
platform: rhel
|
||||
provision_command:
|
||||
- yum -y install procps-ng
|
||||
- name: amazon-2023
|
||||
driver:
|
||||
image: amazonlinux:2023
|
||||
platform: fedora
|
||||
provision_command:
|
||||
- yum -y install procps-ng
|
||||
- name: arch
|
||||
driver:
|
||||
image: archlinux/archlinux
|
||||
provision_command:
|
||||
- pacman -Syu --noconfirm --needed systemd grep awk procps which
|
||||
- systemctl enable sshd
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: centos-stream9
|
||||
driver:
|
||||
platform: centosstream
|
||||
image: quay.io/centos/centos:stream9
|
||||
provision_command:
|
||||
- dnf -y install crypto-policies-scripts procps-ng
|
||||
- update-crypto-policies --set DEFAULT:SHA1
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: centos-stream8
|
||||
driver:
|
||||
image: quay.io/centos/centos:stream8
|
||||
- name: centos-7
|
||||
- name: debian-9
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: debian-10
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: debian-11
|
||||
driver:
|
||||
image: debian:bullseye
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: fedora-35
|
||||
driver:
|
||||
provision_command: &fedora_provision_command
|
||||
- dnf -y install procps-ng crypto-policies-scripts
|
||||
- update-crypto-policies --set LEGACY
|
||||
- name: fedora-36
|
||||
driver:
|
||||
provision_command: *fedora_provision_command
|
||||
- name: fedora-37
|
||||
driver:
|
||||
provision_command: *fedora_provision_command
|
||||
- name: fedora-38
|
||||
driver:
|
||||
provision_command: *fedora_provision_command
|
||||
- name: gentoo
|
||||
driver:
|
||||
image: gentoo/stage3:latest
|
||||
run_command: /sbin/init
|
||||
provision_command:
|
||||
- rc-update add sshd default
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: gentoo-systemd
|
||||
driver:
|
||||
image: gentoo/stage3:systemd
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- systemctl enable sshd.service
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: opensuse-15
|
||||
driver:
|
||||
image: opensuse/leap:15.4
|
||||
provision_command:
|
||||
- &opensuse_provision_command_01 zypper --non-interactive install --auto-agree-with-licenses dbus-1
|
||||
- &opensuse_provision_command_02 zypper --non-interactive install --auto-agree-with-licenses sudo openssh which curl systemd
|
||||
- &opensuse_provision_command_03 systemctl enable sshd.service
|
||||
- name: opensuse-tumbleweed
|
||||
driver:
|
||||
image: opensuse/tumbleweed:latest
|
||||
provision_command:
|
||||
- *opensuse_provision_command_01
|
||||
- *opensuse_provision_command_02
|
||||
- *opensuse_provision_command_03
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: rockylinux-9
|
||||
driver:
|
||||
platform: centosstream
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- dnf -y install crypto-policies-scripts procps-ng
|
||||
- update-crypto-policies --set DEFAULT:SHA1
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: rockylinux-8
|
||||
- name: oraclelinux-8
|
||||
- name: oraclelinux-7
|
||||
- name: rockylinux-8
|
||||
- name: ubuntu-22.04
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- name: ubuntu-21.10
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: ubuntu-20.04
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: ubuntu-18.04
|
||||
driver:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: photon-3
|
||||
driver:
|
||||
image: photon:3.0
|
||||
provision_command:
|
||||
- tdnf -y install rpm procps-ng coreutils gawk
|
||||
- echo "PubkeyAcceptedKeyTypes +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- sed -ie 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
- systemctl enable sshd.service
|
||||
- name: photon-4
|
||||
driver:
|
||||
image: photon:4.0
|
||||
provision_command:
|
||||
- tdnf -y install rpm procps-ng coreutils gawk
|
||||
- echo "PubkeyAcceptedKeyTypes +ssh-rsa" | tee -a /etc/ssh/sshd_config
|
||||
- sed -ie 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
- systemctl enable sshd.service
|
||||
|
||||
suites:
|
||||
- name: git-3003
|
||||
provisioner:
|
||||
salt_version: v3003
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
- name: git-3004
|
||||
provisioner:
|
||||
salt_version: v3004
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- debian-11
|
||||
- arch
|
||||
- gentoo
|
||||
- gentoo-systemd
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: git-3005
|
||||
provisioner:
|
||||
salt_version: v3005
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- debian-11
|
||||
- arch
|
||||
- gentoo
|
||||
- gentoo-systemd
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: git-3006
|
||||
provisioner:
|
||||
salt_version: v3006
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- debian-11
|
||||
- arch
|
||||
- gentoo
|
||||
- gentoo-systemd
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: git-3006x
|
||||
provisioner:
|
||||
salt_version: 3006.x
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- debian-11
|
||||
- arch
|
||||
- gentoo
|
||||
- gentoo-systemd
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: old-stable-3003-0
|
||||
provisioner:
|
||||
salt_version: 3003
|
||||
salt_bootstrap_options: -x python3 -MP old-stable 3003.0
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- gentoo
|
||||
- gentoo-systemd
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: old-stable-3003
|
||||
provisioner:
|
||||
salt_version: 3003
|
||||
salt_bootstrap_options: -x python3 -MP old-stable %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: old-stable-3004-0
|
||||
provisioner:
|
||||
salt_version: 3004
|
||||
salt_bootstrap_options: -x python3 -MP old-stable 3004.0
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- gentoo
|
||||
- gentoo-systemd
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: old-stable-3004
|
||||
provisioner:
|
||||
salt_version: 3004
|
||||
salt_bootstrap_options: -x python3 -MP old-stable %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: old-stable-3005
|
||||
provisioner:
|
||||
salt_version: 3005
|
||||
salt_bootstrap_options: -x python3 -MP old-stable %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: stable-3005
|
||||
provisioner:
|
||||
salt_version: 3005
|
||||
salt_bootstrap_options: -x python3 -MP stable %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: stable-3005-1
|
||||
provisioner:
|
||||
salt_version: 3005.1
|
||||
salt_bootstrap_options: -x python3 -MP stable %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: stable-3006
|
||||
provisioner:
|
||||
salt_version: 3006
|
||||
salt_bootstrap_options: -x python3 -MP stable %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: stable-3006-1
|
||||
provisioner:
|
||||
salt_version: 3006.1
|
||||
salt_bootstrap_options: -x python3 -MP stable %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-6
|
||||
- name: git-master
|
||||
provisioner:
|
||||
salt_version: master
|
||||
salt_bootstrap_options: -x python3 -MPfq -D git %s
|
||||
|
||||
- name: latest
|
||||
provisioner:
|
||||
salt_version: latest
|
||||
salt_bootstrap_options: -MP stable %s
|
||||
|
||||
- name: default
|
||||
provisioner:
|
||||
salt_version: latest
|
||||
salt_bootstrap_options: -MP
|
||||
|
||||
- name: onedir-nightly
|
||||
provisioner:
|
||||
salt_version: nightly
|
||||
salt_bootstrap_options: -MP onedir %s
|
||||
|
||||
- name: onedir-latest
|
||||
provisioner:
|
||||
salt_version: latest
|
||||
salt_bootstrap_options: -MP onedir %s
|
||||
|
||||
- name: onedir-3005
|
||||
provisioner:
|
||||
salt_version: 3005
|
||||
salt_bootstrap_options: -MP onedir %s
|
||||
|
||||
- name: onedir-3006
|
||||
provisioner:
|
||||
salt_version: 3006
|
||||
salt_bootstrap_options: -MP onedir %s
|
||||
|
||||
- name: onedir-rc-3006-0rc2
|
||||
provisioner:
|
||||
salt_version: 3006.0rc2
|
||||
salt_bootstrap_options: -R staging.repo.saltproject.io -MP onedir_rc %s
|
||||
excludes:
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- gentoo
|
||||
- openbsd-6
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- ubuntu-1804
|
||||
|
||||
- name: onedir-rc-3006-0rc1
|
||||
provisioner:
|
||||
salt_version: 3006.0rc1
|
||||
salt_bootstrap_options: -R staging.repo.saltproject.io -MP onedir_rc %s
|
||||
excludes:
|
||||
- arch
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- gentoo
|
||||
- openbsd-6
|
||||
- opensuse-15
|
||||
- opensuse-tumbleweed
|
||||
- ubuntu-1804
|
||||
|
||||
- name: quickstart
|
||||
provisioner:
|
||||
salt_bootstrap_options: -Q
|
||||
|
||||
verifier:
|
||||
name: shell
|
||||
remote_exec: false
|
||||
command: pytest --cache-clear -v -s -ra --log-cli-level=info tests/integration/
|
|
@ -1,3 +1,3 @@
|
|||
pre-commit
|
||||
python-tools-scripts >= 0.12.0
|
||||
python-tools-scripts >= 0.18.6
|
||||
boto3
|
||||
|
|
|
@ -2,29 +2,33 @@
|
|||
# This file is autogenerated by pip-compile with Python 3.10
|
||||
# by the following command:
|
||||
#
|
||||
# pip-compile '.\requirements\release.in'
|
||||
# pip-compile requirements/release.in
|
||||
#
|
||||
attrs==23.1.0
|
||||
annotated-types==0.7.0
|
||||
# via pydantic
|
||||
attrs==24.3.0
|
||||
# via python-tools-scripts
|
||||
boto3==1.28.79
|
||||
# via -r .\requirements\release.in
|
||||
botocore==1.31.79
|
||||
boto3==1.35.98
|
||||
# via -r requirements/release.in
|
||||
botocore==1.35.98
|
||||
# via
|
||||
# boto3
|
||||
# s3transfer
|
||||
certifi==2023.7.22
|
||||
certifi==2024.12.14
|
||||
# via requests
|
||||
cfgv==3.4.0
|
||||
# via pre-commit
|
||||
charset-normalizer==3.3.2
|
||||
charset-normalizer==3.4.1
|
||||
# via requests
|
||||
distlib==0.3.7
|
||||
distlib==0.3.9
|
||||
# via virtualenv
|
||||
filelock==3.13.1
|
||||
# via virtualenv
|
||||
identify==2.5.31
|
||||
filelock==3.16.1
|
||||
# via
|
||||
# python-tools-scripts
|
||||
# virtualenv
|
||||
identify==2.6.5
|
||||
# via pre-commit
|
||||
idna==3.4
|
||||
idna==3.10
|
||||
# via requests
|
||||
jmespath==1.0.1
|
||||
# via
|
||||
|
@ -34,36 +38,41 @@ markdown-it-py==3.0.0
|
|||
# via rich
|
||||
mdurl==0.1.2
|
||||
# via markdown-it-py
|
||||
nodeenv==1.8.0
|
||||
nodeenv==1.9.1
|
||||
# via pre-commit
|
||||
platformdirs==3.11.0
|
||||
platformdirs==4.3.6
|
||||
# via virtualenv
|
||||
pre-commit==3.5.0
|
||||
# via -r .\requirements\release.in
|
||||
pygments==2.16.1
|
||||
pre-commit==4.0.1
|
||||
# via -r requirements/release.in
|
||||
pydantic==2.10.5
|
||||
# via python-tools-scripts
|
||||
pydantic-core==2.27.2
|
||||
# via pydantic
|
||||
pygments==2.19.1
|
||||
# via rich
|
||||
python-dateutil==2.8.2
|
||||
python-dateutil==2.9.0.post0
|
||||
# via botocore
|
||||
python-tools-scripts==0.18.1
|
||||
# via -r .\requirements\release.in
|
||||
pyyaml==6.0.1
|
||||
python-tools-scripts==0.20.5
|
||||
# via -r requirements/release.in
|
||||
pyyaml==6.0.2
|
||||
# via pre-commit
|
||||
requests==2.31.0
|
||||
requests==2.32.3
|
||||
# via python-tools-scripts
|
||||
rich==13.6.0
|
||||
rich==13.9.4
|
||||
# via python-tools-scripts
|
||||
s3transfer==0.7.0
|
||||
s3transfer==0.10.4
|
||||
# via boto3
|
||||
six==1.16.0
|
||||
six==1.17.0
|
||||
# via python-dateutil
|
||||
typing-extensions==4.8.0
|
||||
# via python-tools-scripts
|
||||
urllib3==2.0.7
|
||||
typing-extensions==4.12.2
|
||||
# via
|
||||
# pydantic
|
||||
# pydantic-core
|
||||
# python-tools-scripts
|
||||
# rich
|
||||
urllib3==2.3.0
|
||||
# via
|
||||
# botocore
|
||||
# requests
|
||||
virtualenv==20.24.6
|
||||
virtualenv==20.28.1
|
||||
# via pre-commit
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
||||
|
|
|
@ -1,39 +1,31 @@
|
|||
function Convert-PSObjectToHashtable {
|
||||
param (
|
||||
[Parameter(ValueFromPipeline)]
|
||||
$InputObject
|
||||
)
|
||||
if ($null -eq $InputObject) { return $null }
|
||||
<#
|
||||
.SYNOPSIS
|
||||
A simple Powershell script to quickly start using Salt.
|
||||
|
||||
$is_enum = $InputObject -is [System.Collections.IEnumerable]
|
||||
$not_string = $InputObject -isnot [string]
|
||||
if ($is_enum -and $not_string) {
|
||||
$collection = @(
|
||||
foreach ($object in $InputObject) {
|
||||
Convert-PSObjectToHashtable $object
|
||||
}
|
||||
)
|
||||
.DESCRIPTION
|
||||
This script will download the latest onedir version of Salt and extract it
|
||||
into the same directory where the script is run. The script sets up an
|
||||
environment that will allow you to run salt-call commands. To remove, just
|
||||
delete the `salt` directory. The environment variables will only be set for
|
||||
the current powershell session.
|
||||
|
||||
Write-Host -NoEnumerate $collection
|
||||
} elseif ($InputObject -is [PSObject]) {
|
||||
$hash = @{}
|
||||
.EXAMPLE
|
||||
./salt-quick-start.ps1
|
||||
|
||||
foreach ($property in $InputObject.PSObject.Properties) {
|
||||
$hash[$property.Name] = Convert-PSObjectToHashtable $property.Value
|
||||
}
|
||||
.LINK
|
||||
Salt Bootstrap GitHub Project (script home) - https://github.com/saltstack/salt-bootstrap
|
||||
Original Vagrant Provisioner Project - https://github.com/saltstack/salty-vagrant
|
||||
Vagrant Project (utilizes this script) - https://github.com/mitchellh/vagrant
|
||||
Salt Download Location - https://packages.broadcom.com/artifactory/saltproject-generic/windows/
|
||||
Salt Manual Install Directions (Windows) - https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/windows.html
|
||||
#>
|
||||
|
||||
$hash
|
||||
} else {
|
||||
$InputObject
|
||||
}
|
||||
}
|
||||
# This is so the -Verbose parameter will work
|
||||
[CmdletBinding()] param()
|
||||
|
||||
function Expand-ZipFile {
|
||||
# Extract a zip file
|
||||
#
|
||||
# Used by:
|
||||
# - Install-SaltMinion
|
||||
#
|
||||
# Args:
|
||||
# ZipFile (string): The file to extract
|
||||
# Destination (string): The location to extract to
|
||||
|
@ -81,60 +73,151 @@ function Expand-ZipFile {
|
|||
Write-Debug "Finished unzipping '$ZipFile' to '$Destination'"
|
||||
}
|
||||
|
||||
function Get-FileHash {
|
||||
# Get-FileHash is a built-in cmdlet in powershell 5+ but we need to support
|
||||
# powershell 3. This will overwrite the powershell 5 commandlet only for
|
||||
# this script. But it will provide the missing cmdlet for powershell 3
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String] $Path,
|
||||
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
|
||||
[Parameter(Mandatory=$false)]
|
||||
[ValidateSet(
|
||||
"SHA1",
|
||||
"SHA256",
|
||||
"SHA384",
|
||||
"SHA512",
|
||||
# https://serverfault.com/questions/820300/
|
||||
# why-isnt-mactripledes-algorithm-output-in-powershell-stable
|
||||
"MACTripleDES", # don't use
|
||||
"MD5",
|
||||
"RIPEMD160",
|
||||
IgnoreCase=$true)]
|
||||
[String] $Algorithm = "SHA256"
|
||||
)
|
||||
|
||||
$global:ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
$RepoUrl = "https://repo.saltproject.io/salt/py3/onedir"
|
||||
|
||||
if ([IntPtr]::Size -eq 4) {
|
||||
$arch = "x86"
|
||||
} else {
|
||||
$arch = "amd64"
|
||||
}
|
||||
$enc = [System.Text.Encoding]::UTF8
|
||||
try {
|
||||
$response = Invoke-WebRequest -Uri "$RepoUrl/repo.json" -UseBasicParsing
|
||||
if ($response.Content.GetType().Name -eq "Byte[]") {
|
||||
$psobj = $enc.GetString($response.Content) | ConvertFrom-Json
|
||||
|
||||
} else {
|
||||
$psobj = $response.Content | ConvertFrom-Json
|
||||
if ( !(Test-Path $Path) ) {
|
||||
Write-Verbose "Invalid path for hashing: $Path"
|
||||
return @{}
|
||||
}
|
||||
$hash = Convert-PSObjectToHashtable $psobj
|
||||
} catch {
|
||||
Write-Host "repo.json not found at: $RepoUrl"
|
||||
$hash = @{}
|
||||
}
|
||||
$searchVersion = "latest"
|
||||
if ( $hash.Contains($searchVersion)) {
|
||||
foreach ($item in $hash.($searchVersion).Keys) {
|
||||
if ( $item.EndsWith(".zip") ) {
|
||||
if ( $item.Contains($arch) ) {
|
||||
$saltFileName = $hash.($searchVersion).($item).name
|
||||
$saltVersion = $hash.($searchVersion).($item).version
|
||||
$saltSha512 = $hash.($searchVersion).($item).SHA512
|
||||
}
|
||||
|
||||
if ( (Get-Item -Path $Path) -isnot [System.IO.FileInfo]) {
|
||||
Write-Verbose "Not a file for hashing: $Path"
|
||||
return @{}
|
||||
}
|
||||
|
||||
$Path = Resolve-Path -Path $Path
|
||||
|
||||
Switch ($Algorithm) {
|
||||
SHA1 {
|
||||
$hasher = [System.Security.Cryptography.SHA1CryptoServiceProvider]::Create()
|
||||
}
|
||||
SHA256 {
|
||||
$hasher = [System.Security.Cryptography.SHA256]::Create()
|
||||
}
|
||||
SHA384 {
|
||||
$hasher = [System.Security.Cryptography.SHA384]::Create()
|
||||
}
|
||||
SHA512 {
|
||||
$hasher = [System.Security.Cryptography.SHA512]::Create()
|
||||
}
|
||||
MACTripleDES {
|
||||
$hasher = [System.Security.Cryptography.MACTripleDES]::Create()
|
||||
}
|
||||
MD5 {
|
||||
$hasher = [System.Security.Cryptography.MD5]::Create()
|
||||
}
|
||||
RIPEMD160 {
|
||||
$hasher = [System.Security.Cryptography.RIPEMD160]::Create()
|
||||
}
|
||||
}
|
||||
|
||||
Write-Verbose "Hashing using $Algorithm algorithm"
|
||||
try {
|
||||
$data = [System.IO.File]::OpenRead($Path)
|
||||
$hash = $hasher.ComputeHash($data)
|
||||
$hash = [System.BitConverter]::ToString($hash) -replace "-",""
|
||||
return @{
|
||||
Path = $Path;
|
||||
Algorithm = $Algorithm.ToUpper();
|
||||
Hash = $hash
|
||||
}
|
||||
} catch {
|
||||
Write-Verbose "Error hashing: $Path"
|
||||
Write-Verbose "ERROR: $_"
|
||||
return @{}
|
||||
} finally {
|
||||
if ($null -ne $data) {
|
||||
$data.Close()
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $saltFileName -and $saltVersion -and $saltSha512 ) {
|
||||
if ( $RepoUrl.Contains("minor") ) {
|
||||
$saltFileUrl = @($RepoUrl, $saltVersion, $saltFileName) -join "/"
|
||||
} else {
|
||||
$saltFileUrl = @($RepoUrl, "minor", $saltVersion, $saltFileName) -join "/"
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Script settings
|
||||
#===============================================================================
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
|
||||
$global:ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
#===============================================================================
|
||||
# Declare Variables
|
||||
#===============================================================================
|
||||
$ApiUrl = "https://packages.broadcom.com/artifactory/api/storage/saltproject-generic/onedir"
|
||||
# Detect architecture ($arch)
|
||||
if ([IntPtr]::Size -eq 4) { $arch = "x86" } else { $arch = "amd64" }
|
||||
|
||||
#===============================================================================
|
||||
# Setting up quickstart environment
|
||||
#===============================================================================
|
||||
Write-Host ""
|
||||
Write-Host "Setting up quickstart environment for Salt" -ForegroundColor Cyan
|
||||
|
||||
Write-Verbose "Getting version information from Artifactory"
|
||||
$response = Invoke-WebRequest $ApiUrl -UseBasicParsing
|
||||
# Convert the output to a powershell object
|
||||
$psobj = $response.ToString() | ConvertFrom-Json
|
||||
$Version = $psobj.children[-1].uri.Trim("/")
|
||||
|
||||
Write-Verbose "Getting sha256 hash and download url from Artifactory"
|
||||
$saltFileName = "salt-$Version-onedir-windows-$arch.zip"
|
||||
$response = Invoke-WebRequest "$ApiUrl/$Version/$saltFileName" -UseBasicParsing
|
||||
$psobj = $response.ToString() | ConvertFrom-Json
|
||||
$saltFileUrl = $psobj.downloadUri
|
||||
$saltSha256 = $psobj.checksums.sha256
|
||||
|
||||
Write-Verbose "URL: $saltFileUrl"
|
||||
Write-Host "* INFO: Downloading Salt: " -NoNewline
|
||||
Invoke-WebRequest -Uri $saltFileUrl -OutFile .\salt.zip
|
||||
if ( Test-Path -Path .\salt.zip ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
$localSha256 = (Get-FileHash -Path .\salt.zip -Algorithm SHA256).Hash
|
||||
Write-Verbose "Local Hash: $localSha256"
|
||||
Write-Verbose "Remote Hash: $saltSha256"
|
||||
|
||||
Write-Host "* INFO: Comparing Hash: " -NoNewline
|
||||
if ( $localSha256 -eq $saltSha256 ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "* INFO: Downloading Salt"
|
||||
Invoke-WebRequest -Uri $saltFileUrl -OutFile .\salt.zip
|
||||
|
||||
Write-Host "* INFO: Extracting Salt"
|
||||
Write-Host "* INFO: Extracting Salt: " -NoNewline
|
||||
Expand-ZipFile -ZipFile .\salt.zip -Destination .
|
||||
if ( Test-Path -Path .\salt\Scripts\python.exe ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "* INFO: Creating Saltfile: " -NoNewline
|
||||
$PATH = $(Get-Location).Path
|
||||
|
||||
$saltfile_contents = @"
|
||||
salt-call:
|
||||
local: True
|
||||
|
@ -143,20 +226,42 @@ salt-call:
|
|||
cachedir: $PATH\salt\var\cache\salt
|
||||
file_root: $PATH\salt\srv\salt
|
||||
"@
|
||||
|
||||
Set-Content -Path .\salt\Saltfile -Value $saltfile_contents
|
||||
if ( Test-Path -Path .\salt\Saltfile ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
New-Item -Path "$PATH\salt\var\log\salt" -Type Directory -Force | Out-Null
|
||||
New-Item -Path "$PATH\salt\conf" -Type Directory -Force | Out-Null
|
||||
New-Item -Path "$PATH\salt\var\cache\salt" -Type Directory -Force | Out-Null
|
||||
New-Item -Path "$PATH\salt\srv\salt" -Type Directory -Force | Out-Null
|
||||
|
||||
Write-Host "* INFO: Adding Salt to current path"
|
||||
Write-Host "* INFO: $PATH\salt"
|
||||
Write-Host "* INFO: Adding Salt to current path: " -NoNewline
|
||||
$env:Path = "$PATH\salt;$env:PATH"
|
||||
Write-Verbose $env:Path
|
||||
if ( $env:PATH -Like "*$PATH\salt*" ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Write-Host "* INFO: $PATH\salt"
|
||||
|
||||
Write-Host "* INFO: Setting the SALT_SALTFILE environment variable"
|
||||
Write-Host "* INFO: $PATH\salt\Saltfile"
|
||||
Write-Host "* INFO: Setting the SALT_SALTFILE environment variable: "-NoNewline
|
||||
$env:SALT_SALTFILE="$PATH\salt\Saltfile"
|
||||
if ( Test-Path -Path $env:SALT_SALTFILE ) {
|
||||
Write-Host "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Write-Host "* INFO: $PATH\salt\Saltfile"
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "You can now run simple salt-call commands" -ForegroundColor Cyan
|
||||
Write-Host "* INFO: Create Salt states in $PATH\salt\srv\salt"
|
||||
Write-Host "* INFO: Try running salt-call test.ping"
|
||||
Write-Host ""
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
__ScriptName="salt-quick-start.sh"
|
||||
SALT_REPO_URL="https://repo.saltproject.io/salt/py3/onedir"
|
||||
SALT_REPO_URL="https://packages.broadcom.com/artifactory/salt-project-generic/onedir"
|
||||
_COLORS=${QS_COLORS:-$(tput colors 2>/dev/null || echo 0)}
|
||||
|
||||
_LOCAL=0
|
||||
|
@ -89,8 +89,20 @@ if [[ "$_LOCAL" == "1" && "$_FULL" == "1" ]]; then
|
|||
fi
|
||||
|
||||
__parse_repo_json_jq() {
|
||||
_JSON_FILE="${SALT_REPO_URL}/repo.json"
|
||||
_JSON_VERSION=$(curl -s ${_JSON_FILE} | jq -sr ".[].latest[] | select(.os == \"$1\") | select(.arch == \"$2\").version")
|
||||
|
||||
# $1 is OS_NAME
|
||||
# $2 is ARCH
|
||||
|
||||
# get dir listing from url, sort and pick highest
|
||||
onedir_versions_tmpf=$(mktemp)
|
||||
curr_pwd=$(pwd)
|
||||
cd ${onedir_versions_tmpf} || return 1
|
||||
wget -r -np -nH --exclude-directories=onedir,relenv,windows -x -l 1 "$SALT_REPO_URL/"
|
||||
# shellcheck disable=SC2010
|
||||
LATEST_VERSION=$(ls artifactory/saltproject-generic/onedir/ | grep -v 'index.html' | sort -V -u | tail -n 1)
|
||||
cd ${curr_pwd} || return "${LATEST_VERSION}"
|
||||
rm -fR ${onedir_versions_tmpf}
|
||||
_JSON_VERSION="${LATEST_VERSION}"
|
||||
}
|
||||
|
||||
__fetch_url() {
|
||||
|
@ -146,7 +158,7 @@ fi
|
|||
__parse_repo_json_jq ${OS_NAME} ${CPU_ARCH_L}
|
||||
|
||||
FILE="salt-${_JSON_VERSION}-onedir-${OS_NAME_L}-${CPU_ARCH_L}.tar.xz"
|
||||
URL="${SALT_REPO_URL}/latest/${FILE}"
|
||||
URL="${SALT_REPO_URL}/${_JSON_VERSION}/${FILE}"
|
||||
|
||||
if [[ ! -f ${FILE} ]]; then
|
||||
echoinfo "Downloading Salt"
|
||||
|
|
|
@ -1,43 +1,12 @@
|
|||
import logging
|
||||
import json
|
||||
import os
|
||||
import pprint
|
||||
|
||||
import pytest
|
||||
import testinfra
|
||||
import requests
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def host():
|
||||
if (
|
||||
os.environ.get("RUNNER_OS", "") == "macOS"
|
||||
and os.environ.get("KITCHEN_LOCAL_YAML", "") == "kitchen.macos.yml"
|
||||
):
|
||||
# Adjust the `PATH` so that the `salt-call` executable can be found
|
||||
os.environ["PATH"] = "/opt/salt/bin{}{}".format(os.pathsep, os.environ["PATH"])
|
||||
return testinfra.get_host("local://", sudo=True)
|
||||
|
||||
if os.environ.get("KITCHEN_USERNAME") == "vagrant" or "windows" in os.environ.get(
|
||||
"KITCHEN_INSTANCE"
|
||||
):
|
||||
if "windows" in os.environ.get("KITCHEN_INSTANCE"):
|
||||
_url = "winrm://{KITCHEN_USERNAME}:{KITCHEN_PASSWORD}@{KITCHEN_HOSTNAME}:{KITCHEN_PORT}".format(
|
||||
**os.environ
|
||||
)
|
||||
return testinfra.get_host(
|
||||
_url,
|
||||
no_ssl=True,
|
||||
)
|
||||
return testinfra.get_host(
|
||||
"paramiko://{KITCHEN_USERNAME}@{KITCHEN_HOSTNAME}:{KITCHEN_PORT}".format(
|
||||
**os.environ
|
||||
),
|
||||
ssh_identity_file=os.environ.get("KITCHEN_SSH_KEY"),
|
||||
)
|
||||
return testinfra.get_host(
|
||||
"docker://{KITCHEN_USERNAME}@{KITCHEN_CONTAINER_ID}".format(**os.environ)
|
||||
)
|
||||
API_URL = (
|
||||
"https://packages.broadcom.com/artifactory/api/storage/saltproject-generic/windows"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
@ -47,21 +16,33 @@ def target_python_version():
|
|||
|
||||
@pytest.fixture(scope="session")
|
||||
def target_salt_version():
|
||||
bootstrap_types = ("git", "stable", "old", "stable", "onedir", "onedir_rc")
|
||||
|
||||
# filter out any bootstrap types and then join
|
||||
target_salt = ".".join(
|
||||
[
|
||||
item
|
||||
for item in os.environ["KITCHEN_SUITE"].split("-")
|
||||
if item not in bootstrap_types
|
||||
]
|
||||
)
|
||||
|
||||
# target_salt = os.environ["KITCHEN_SUITE"].split("-", 1)[-1].replace("-", ".")
|
||||
target_salt = os.environ.get("SaltVersion", "")
|
||||
html_response = requests.get(API_URL)
|
||||
content = json.loads(html_response.text)
|
||||
folders = content["children"]
|
||||
versions = {}
|
||||
for folder in folders:
|
||||
if folder["folder"]:
|
||||
version = folder["uri"].strip("/")
|
||||
versions[version] = version
|
||||
# We're trying to get the latest major version and latest overall
|
||||
maj_version = version.split(".")[0]
|
||||
versions[maj_version] = version
|
||||
versions["latest"] = version
|
||||
|
||||
if target_salt.startswith("v"):
|
||||
target_salt = target_salt[1:]
|
||||
if target_salt in ("default", "latest", "master", "nightly"):
|
||||
if target_salt not in versions:
|
||||
pytest.skip(f"Invalid testing version: {target_salt}")
|
||||
if target_salt in (
|
||||
"default",
|
||||
"latest",
|
||||
"master",
|
||||
"nightly",
|
||||
"stable",
|
||||
"onedir",
|
||||
"git",
|
||||
):
|
||||
pytest.skip("Don't have a specific salt version to test against")
|
||||
return target_salt
|
||||
return versions[target_salt]
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
|
@ -1,31 +1,82 @@
|
|||
import json
|
||||
import logging
|
||||
import os
|
||||
from contextlib import nullcontext
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
import pytest
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def selected_context_manager(host):
|
||||
if "windows" in os.environ.get("KITCHEN_INSTANCE"):
|
||||
return nullcontext()
|
||||
return host.sudo()
|
||||
@pytest.fixture
|
||||
def path():
|
||||
if platform.system() == "Windows":
|
||||
salt_path = "C:\\Program Files\\Salt Project\\Salt"
|
||||
if salt_path not in os.environ["path"]:
|
||||
os.environ["path"] = f'{os.environ["path"]};{salt_path}'
|
||||
yield os.environ["path"]
|
||||
else:
|
||||
yield ""
|
||||
|
||||
|
||||
def test_ping(host):
|
||||
with selected_context_manager(host):
|
||||
assert host.salt("test.ping", "--timeout=120")
|
||||
|
||||
|
||||
def test_target_python_version(host, target_python_version):
|
||||
with selected_context_manager(host):
|
||||
ret = host.salt("grains.item", "pythonversion", "--timeout=120")
|
||||
assert ret["pythonversion"][0] == target_python_version
|
||||
|
||||
|
||||
def test_target_salt_version(host, target_salt_version):
|
||||
with selected_context_manager(host):
|
||||
ret = host.salt("grains.item", "saltversion", "--timeout=120")
|
||||
if target_salt_version.endswith(".0") or target_salt_version.endswith(".x"):
|
||||
assert ret["saltversion"] == ".".join(target_salt_version.split(".")[:-1])
|
||||
def run_salt_call(cmd):
|
||||
"""
|
||||
Runs salt call command and returns a dictionary
|
||||
Accepts cmd as a list
|
||||
"""
|
||||
json_data = {"local": {}}
|
||||
if platform.system() == "Windows":
|
||||
cmd.append("--out=json")
|
||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||
if 0 == result.returncode:
|
||||
json_data = json.loads(result.stdout)
|
||||
else:
|
||||
assert ret["saltversion"].startswith(target_salt_version)
|
||||
log.error(f"failed to produce output result, '{result}'")
|
||||
|
||||
else:
|
||||
if platform.system() == "Darwin":
|
||||
cmdl = ["sudo"]
|
||||
else:
|
||||
cmdl = []
|
||||
cmdl.extend(cmd)
|
||||
cmdl.append("--out=json")
|
||||
try:
|
||||
result = subprocess.run(cmdl, capture_output=True, text=True)
|
||||
except TypeError:
|
||||
result = subprocess.run(
|
||||
cmdl,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
universal_newlines=True,
|
||||
)
|
||||
if 0 == result.returncode:
|
||||
json_data = json.loads(result.stdout)
|
||||
else:
|
||||
log.error(f"failed to produce output result, '{result}'")
|
||||
|
||||
return json_data["local"]
|
||||
|
||||
|
||||
def test_ping(path):
|
||||
cmd = ["salt-call", "--local", "test.ping"]
|
||||
result = run_salt_call(cmd)
|
||||
assert result == True
|
||||
|
||||
|
||||
def test_target_python_version(path, target_python_version):
|
||||
cmd = ["salt-call", "--local", "grains.item", "pythonversion", "--timeout=120"]
|
||||
result = run_salt_call(cmd)
|
||||
# Returns: {'pythonversion': [3, 10, 11, 'final', 0]}
|
||||
py_maj_ver = result["pythonversion"][0]
|
||||
assert py_maj_ver == target_python_version
|
||||
|
||||
|
||||
def test_target_salt_version(path, target_salt_version):
|
||||
if not target_salt_version:
|
||||
pytest.skip(f"No target version specified")
|
||||
cmd = ["salt-call", "--local", "grains.item", "saltversion", "--timeout=120"]
|
||||
result = run_salt_call(cmd)
|
||||
# Returns: {'saltversion': '3006.9+217.g53cfa53040'}
|
||||
adj_saltversion = result["saltversion"].split("+")[0]
|
||||
assert adj_saltversion == target_salt_version
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
pytest-testinfra
|
||||
paramiko
|
||||
requests-ntlm==1.1.0; sys.platform == 'win32'
|
||||
pywinrm; sys.platform == 'win32'
|
||||
six>=1.10.0
|
||||
pytest
|
||||
requests
|
||||
|
|
Loading…
Add table
Reference in a new issue