mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 10:10:25 +00:00
Compare commits
1006 commits
v2020.02.2
...
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 | ||
![]() |
2b3080c737 | ||
![]() |
1ba50d57d4 | ||
![]() |
6a8c47141e | ||
![]() |
3dd0ad3065 | ||
![]() |
0d5ecbac05 | ||
![]() |
45f0b37d23 | ||
![]() |
9ec52ead47 | ||
![]() |
910265ce6a | ||
![]() |
65201d47ed | ||
![]() |
33dc0c4753 | ||
![]() |
a8f7674e7b | ||
![]() |
82279abbe9 | ||
![]() |
61709aac2b | ||
![]() |
9a512e5c4b | ||
![]() |
244a052a5e | ||
![]() |
8293f79f6f | ||
![]() |
ed16e585df | ||
![]() |
479eb74d7e | ||
![]() |
4c3111898f | ||
![]() |
ad787193e2 | ||
![]() |
6c3e5d4548 | ||
![]() |
aca7a469fe | ||
![]() |
a9daa35db7 | ||
![]() |
3bae220e0c | ||
![]() |
4d33f86007 | ||
![]() |
fdbe7db9ee | ||
![]() |
ad48035b7e | ||
![]() |
fc63231b3c | ||
![]() |
ab7bf7901c | ||
![]() |
0f636544eb | ||
![]() |
01b3886fd7 | ||
![]() |
77ea398385 | ||
![]() |
850563bef2 | ||
![]() |
24161893b6 | ||
![]() |
4fefc1cbed | ||
![]() |
7867723e2f | ||
![]() |
e44fc45b5d | ||
![]() |
6de279db39 | ||
![]() |
9cd478022d | ||
![]() |
f457cc3dcc | ||
![]() |
28b82ea761 | ||
![]() |
ca1142dfc1 | ||
![]() |
2d40944962 | ||
![]() |
5c92383199 | ||
![]() |
6e86441e9b | ||
![]() |
0c1f20b03c | ||
![]() |
399d27b623 | ||
![]() |
442cb1b180 | ||
![]() |
6a5002fb51 | ||
![]() |
bd661179c1 | ||
![]() |
b4b058c4d5 | ||
![]() |
49bfcffa30 | ||
![]() |
40a072f231 | ||
![]() |
5f8d1b4c00 | ||
![]() |
7dd787baf2 | ||
![]() |
39c6cbe2ea | ||
![]() |
8d0c7e4d5f | ||
![]() |
4183713e82 | ||
![]() |
14ae685f96 | ||
![]() |
3d29c384a7 | ||
![]() |
beea555254 | ||
![]() |
3c8b08c2d1 | ||
![]() |
7825da5e89 | ||
![]() |
5e6bcb5815 | ||
![]() |
8d02826be7 | ||
![]() |
fe0c975555 | ||
![]() |
d9a8f4a6d8 | ||
![]() |
c2c6bd1e70 | ||
![]() |
15dfb8efdd | ||
![]() |
e7c8f7698b | ||
![]() |
719422adfe | ||
![]() |
a8b32ab040 | ||
![]() |
a3fed785f8 | ||
![]() |
f823932131 | ||
![]() |
142eb80305 | ||
![]() |
6dbae5e916 | ||
![]() |
d8a7e90953 | ||
![]() |
e1fd4987bf | ||
![]() |
1367b096ca | ||
![]() |
717db99ef4 | ||
![]() |
ef70886fd0 | ||
![]() |
27eef7d396 | ||
![]() |
90cc157b9d | ||
![]() |
9fa32bd95c | ||
![]() |
2af0e6c0b6 | ||
![]() |
be030c1958 | ||
![]() |
1aa72d9c2d | ||
![]() |
b57d37475e | ||
![]() |
4a74744f06 | ||
![]() |
0f39aca8c1 | ||
![]() |
efbd416607 | ||
![]() |
d0032c7495 | ||
![]() |
b03a99ee53 | ||
![]() |
f976efc570 | ||
![]() |
779cfbf55d | ||
![]() |
84b4e2a1a4 | ||
![]() |
ce4a071943 | ||
![]() |
6c6291bdd5 | ||
![]() |
3d3c7c7a9f | ||
![]() |
2a4f2ad3f6 | ||
![]() |
0184635370 | ||
![]() |
c07acc326e | ||
![]() |
453812a6ea | ||
![]() |
af258021fa | ||
![]() |
c981eae0cb | ||
![]() |
b51840eda4 | ||
![]() |
359a8e80f7 | ||
![]() |
6eacf22f8a | ||
![]() |
08708a0310 | ||
![]() |
67a0df2dd1 | ||
![]() |
07ab70922c | ||
![]() |
499f895bae | ||
![]() |
4eaf22fc59 | ||
![]() |
edd4b6fbe6 | ||
![]() |
40eb43e2ef | ||
![]() |
88319abee8 | ||
![]() |
829094e3fc | ||
![]() |
1a7a7087f2 | ||
![]() |
baebf62941 | ||
![]() |
b9988d1d63 | ||
![]() |
c009da691f | ||
![]() |
ec4df56749 | ||
![]() |
b3c3753f42 | ||
![]() |
52e4f97fa9 | ||
![]() |
605902d931 | ||
![]() |
9ae48da3fd | ||
![]() |
8ece9b9cba | ||
![]() |
d40c7f12e7 | ||
![]() |
1d4776cdba | ||
![]() |
44198af5eb | ||
![]() |
e1fb1c512c | ||
![]() |
537d2eecd0 | ||
![]() |
01f5db67bd | ||
![]() |
8605f7040b | ||
![]() |
c1a928e2f3 | ||
![]() |
b0dad4a52d | ||
![]() |
68e1fdc39e | ||
![]() |
03bcfbc76b | ||
![]() |
98f30a8a56 | ||
![]() |
be5c6cb39e | ||
![]() |
4ab6fe4170 | ||
![]() |
45f3a44247 | ||
![]() |
e46863a49d | ||
![]() |
35e360189a | ||
![]() |
e5981993ca | ||
![]() |
eeeaddd21d | ||
![]() |
3b9439856d | ||
![]() |
349cd7928a | ||
![]() |
b1f5203f50 | ||
![]() |
247fa77229 | ||
![]() |
a740729d8c | ||
![]() |
ccd67c4f66 | ||
![]() |
123bae77b1 | ||
![]() |
e301b91ad4 | ||
![]() |
1fc0b89e3e | ||
![]() |
4d74e818e4 | ||
![]() |
af44e88261 | ||
![]() |
78b9d765e9 | ||
![]() |
4358274986 | ||
![]() |
db46fb94e4 | ||
![]() |
465ec9a8e9 | ||
![]() |
59da03a73c | ||
![]() |
84604ae7f9 | ||
![]() |
aea71469ec | ||
![]() |
4eabf0aeb6 | ||
![]() |
0280cde59a | ||
![]() |
bfa9bcf5b0 | ||
![]() |
cc0e70ab80 | ||
![]() |
ca683c6ac3 | ||
![]() |
4779cc92ff | ||
![]() |
7e53753536 | ||
![]() |
b6328e2b4b | ||
![]() |
aeb74bc865 | ||
![]() |
2c4d317b51 | ||
![]() |
7cfca56c17 | ||
![]() |
ffef0b1746 | ||
![]() |
b9bc07ac06 | ||
![]() |
156120e4da | ||
![]() |
d299431326 | ||
![]() |
59ffb10a71 | ||
![]() |
80f6059d12 | ||
![]() |
97b656bdd6 | ||
![]() |
7fc91aeea8 | ||
![]() |
294096c248 | ||
![]() |
02034112ea | ||
![]() |
9133a6e776 | ||
![]() |
705dc7b801 | ||
![]() |
4f8fa0bf45 | ||
![]() |
e8b4966e1d | ||
![]() |
9cd72ffb3b | ||
![]() |
efb45ff7bf | ||
![]() |
c327961f2a | ||
![]() |
7a4f2ca0e2 | ||
![]() |
3c3dba8a6d | ||
![]() |
ad8d9667b2 | ||
![]() |
9b5017dd03 | ||
![]() |
83f9c1e190 | ||
![]() |
100d972703 | ||
![]() |
599ec89559 | ||
![]() |
4d55d1b26d | ||
![]() |
f9c561adb0 | ||
![]() |
be6b928ac8 | ||
![]() |
36fc77d9b3 | ||
![]() |
564ea55c6e | ||
![]() |
fa45a784b8 | ||
![]() |
861dfd082b | ||
![]() |
043068bba3 | ||
![]() |
b5ec569df2 | ||
![]() |
e4e12f1f84 | ||
![]() |
e458a9c475 | ||
![]() |
db9d0e5f05 | ||
![]() |
6781b25504 | ||
![]() |
f7aa417271 | ||
![]() |
07712b7855 | ||
![]() |
14976f90c8 | ||
![]() |
b67b707b6f | ||
![]() |
97d6ae9bb9 | ||
![]() |
8d902281ab | ||
![]() |
8185dbda1e | ||
![]() |
e07a30ec9f | ||
![]() |
3199872ab1 | ||
![]() |
dda81fa242 | ||
![]() |
f209b55ff0 | ||
![]() |
38b5f3d042 | ||
![]() |
6a613d0dea | ||
![]() |
081b81d2e3 | ||
![]() |
4686d55c5a | ||
![]() |
d5c5646b49 | ||
![]() |
dd2a95a17c | ||
![]() |
949029ff5a | ||
![]() |
c24f492f8c | ||
![]() |
d34ebbc94b | ||
![]() |
5be3b6a62e | ||
![]() |
2562523fd2 | ||
![]() |
ae19813dc1 | ||
![]() |
2d6a1decc8 | ||
![]() |
e5fca86998 | ||
![]() |
b1e153cdd0 | ||
![]() |
835289ce17 | ||
![]() |
827abf199a | ||
![]() |
ad4cb2d040 | ||
![]() |
614fac2709 | ||
![]() |
757ec21572 | ||
![]() |
b7bd0f47f3 | ||
![]() |
f741160d13 | ||
![]() |
8e5464bbc4 | ||
![]() |
b8be8149bc | ||
![]() |
6e1d3a8ab4 | ||
![]() |
f95303449c | ||
![]() |
0ece40cd0f | ||
![]() |
ceb0dd702a | ||
![]() |
2ff7097fac | ||
![]() |
c7dab6ef5a | ||
![]() |
c24a2ba190 | ||
![]() |
9629b26152 | ||
![]() |
b2b4cb05a9 | ||
![]() |
3b833c217a | ||
![]() |
04257ca5b3 | ||
![]() |
f9b6cf3628 | ||
![]() |
3d9c0497f4 | ||
![]() |
7fc46cdfda | ||
![]() |
88a915b754 | ||
![]() |
bf66c84173 | ||
![]() |
84d72088d4 | ||
![]() |
cf176b3da2 | ||
![]() |
19a07a4dc4 | ||
![]() |
c56840296c | ||
![]() |
541c4bd41f | ||
![]() |
449c65179b | ||
![]() |
ec905ffc2a | ||
![]() |
273bc1f106 | ||
![]() |
f414341b67 | ||
![]() |
d19191838f | ||
![]() |
8c16792077 | ||
![]() |
5228a12b1f | ||
![]() |
9d2181138d | ||
![]() |
184d1bd219 | ||
![]() |
0e9fb4f5c1 | ||
![]() |
2fcde04ddd | ||
![]() |
a2c2306402 | ||
![]() |
b35fe054d7 | ||
![]() |
60e28fe66d | ||
![]() |
fe7283a5ff | ||
![]() |
ef6f91ddaa | ||
![]() |
494fe6f933 | ||
![]() |
7ae790f5e4 | ||
![]() |
0c94af18d7 | ||
![]() |
1c1cd7e95c | ||
![]() |
f23cf0d480 | ||
![]() |
808a1bc277 | ||
![]() |
50dd136e9a | ||
![]() |
c9e42e1504 | ||
![]() |
63f427c61d | ||
![]() |
3202f803e5 | ||
![]() |
9dc16eef93 | ||
![]() |
9d46534b11 | ||
![]() |
e82d4c452c | ||
![]() |
f708e36b94 | ||
![]() |
244e6cb858 | ||
![]() |
46d62d7c58 | ||
![]() |
9d1c07d364 | ||
![]() |
eb48702812 | ||
![]() |
af68de6761 | ||
![]() |
71d4113327 | ||
![]() |
7c8f386b35 | ||
![]() |
6ab871c1da | ||
![]() |
b874d3466b | ||
![]() |
eb71c10af7 | ||
![]() |
ba0d83ff3f | ||
![]() |
d8c6f04a46 | ||
![]() |
408f5beefb | ||
![]() |
f097386319 | ||
![]() |
ed00a6c9b0 | ||
![]() |
7e66984205 | ||
![]() |
559b8db54f | ||
![]() |
316c74ab37 | ||
![]() |
b69353db3a | ||
![]() |
b6f7490e5a | ||
![]() |
acc91bdab9 | ||
![]() |
2cb95abd29 | ||
![]() |
cbc4a45e91 | ||
![]() |
86dc5bf7be | ||
![]() |
22ac01de18 | ||
![]() |
efd1df20c9 | ||
![]() |
8b33e968e1 | ||
![]() |
0a9badd439 | ||
![]() |
b903662ad0 | ||
![]() |
ba1ee56907 | ||
![]() |
04abf9711a | ||
![]() |
197a9c2bac | ||
![]() |
9818c45d88 | ||
![]() |
1b0f65538d | ||
![]() |
9adf295207 | ||
![]() |
3265e88e29 | ||
![]() |
72de037c85 | ||
![]() |
3c18cf8325 | ||
![]() |
e7d894458b | ||
![]() |
c7f91bc58d | ||
![]() |
8636d94130 | ||
![]() |
6a07978663 | ||
![]() |
e320671e73 | ||
![]() |
f7812b97d1 | ||
![]() |
84cf3168e5 | ||
![]() |
8fdce31eee | ||
![]() |
cb75c21401 | ||
![]() |
8619cb16b6 | ||
![]() |
2c7c36a24b | ||
![]() |
bb97434738 | ||
![]() |
81d4ca6425 | ||
![]() |
cfb8149d53 | ||
![]() |
4f22adbb84 | ||
![]() |
9bbd45ed66 | ||
![]() |
a501f491ec | ||
![]() |
bcf58059d5 | ||
![]() |
96603a7bbc | ||
![]() |
70c0d737e2 | ||
![]() |
396a33632e | ||
![]() |
3d716dce3a | ||
![]() |
bdf91e7c1b | ||
![]() |
ad5b234901 | ||
![]() |
8ce6aaa1e7 | ||
![]() |
cb7620799d | ||
![]() |
4cd19d42ea | ||
![]() |
62112b6abe | ||
![]() |
ba346cdfd8 | ||
![]() |
550f742fe9 | ||
![]() |
f7fcdd2d48 | ||
![]() |
10c0b114bb | ||
![]() |
b7e6ea2539 | ||
![]() |
f60d4c5a49 | ||
![]() |
e174a3a546 | ||
![]() |
5d584e0a94 | ||
![]() |
2bc7238123 | ||
![]() |
393f4f33e4 | ||
![]() |
0d203ed962 | ||
![]() |
c845caeba4 | ||
![]() |
ead451a9e2 | ||
![]() |
f11c585651 | ||
![]() |
2f0fe6bcd5 | ||
![]() |
13a60f400b | ||
![]() |
561b14618a | ||
![]() |
e4855afb3c | ||
![]() |
3ebc4c72f0 | ||
![]() |
37300ad58a | ||
![]() |
46fb1f492f | ||
![]() |
74669c6499 | ||
![]() |
a3ddd94f93 | ||
![]() |
99fa2e58fc | ||
![]() |
12f4afd9d1 | ||
![]() |
1902d92244 | ||
![]() |
126d3c3cde | ||
![]() |
5f1a2507a0 | ||
![]() |
cd21819080 | ||
![]() |
4bc1a5ab4a | ||
![]() |
9fa7ae4564 | ||
![]() |
8c31ed62e8 | ||
![]() |
992123752a | ||
![]() |
4125b68629 | ||
![]() |
d2d6f380bc | ||
![]() |
5b051af5c4 | ||
![]() |
9225bfdc13 | ||
![]() |
1e131f28cf | ||
![]() |
21449bd05f | ||
![]() |
b090555ce9 | ||
![]() |
870c6ba8ca | ||
![]() |
8be8dbe7e6 | ||
![]() |
7ed981c163 | ||
![]() |
dc4cf12614 | ||
![]() |
d491741bb4 | ||
![]() |
ddf7cb5b23 | ||
![]() |
ca78fde48d | ||
![]() |
71406d70e8 | ||
![]() |
6be1f869af | ||
![]() |
fe3d3bf755 | ||
![]() |
c16735656a | ||
![]() |
6069f7f78b | ||
![]() |
4697887bf9 | ||
![]() |
1f6447ce6c | ||
![]() |
03c6900b32 | ||
![]() |
30a680d183 | ||
![]() |
20cae336f3 | ||
![]() |
360494b18e | ||
![]() |
63bb72e929 | ||
![]() |
43e325a930 | ||
![]() |
7afcd29bf8 | ||
![]() |
02dc9999f0 | ||
![]() |
98c9518c8a | ||
![]() |
aadb93b4c1 | ||
![]() |
51315c2954 | ||
![]() |
ca52074f0b | ||
![]() |
c5a55a3fbb | ||
![]() |
3f4189395a | ||
![]() |
d663b20b6e | ||
![]() |
edefb45d1d | ||
![]() |
50ac60bc28 | ||
![]() |
7fc4f7829d | ||
![]() |
1f9909474e | ||
![]() |
5cfa6b994d | ||
![]() |
409f998254 | ||
![]() |
5172f227ce | ||
![]() |
494b2bed99 | ||
![]() |
3288b86355 | ||
![]() |
139286cd9a | ||
![]() |
3a02ef9279 | ||
![]() |
79999938c9 | ||
![]() |
0e636f520d | ||
![]() |
97a1e11141 | ||
![]() |
93ba835aaf | ||
![]() |
8318f8071a | ||
![]() |
6c8f608e07 | ||
![]() |
3690eeec50 | ||
![]() |
7c56c504bf | ||
![]() |
e5e5098745 | ||
![]() |
075e061262 | ||
![]() |
d37806dce9 | ||
![]() |
f80e311747 | ||
![]() |
3158d15d25 | ||
![]() |
095a7abf07 | ||
![]() |
c61820d410 | ||
![]() |
fbb55eda4b | ||
![]() |
1e0109927e | ||
![]() |
42a8ac8f14 | ||
![]() |
f2e4cca09a | ||
![]() |
e40c093c56 | ||
![]() |
4777897146 | ||
![]() |
0612b49bd6 | ||
![]() |
c26d540c9b | ||
![]() |
53f7b20a37 | ||
![]() |
546e7c9ad3 | ||
![]() |
c69845e22c | ||
![]() |
df29ae3a00 | ||
![]() |
1c6a78b746 | ||
![]() |
ca56699343 | ||
![]() |
0b1c203986 | ||
![]() |
600d789cfb | ||
![]() |
68417f7fda | ||
![]() |
e610e6dba0 | ||
![]() |
a12ffd379c | ||
![]() |
db924b4e81 | ||
![]() |
ca0669c78d | ||
![]() |
388ef93cf2 | ||
![]() |
055e51e5b4 | ||
![]() |
34285b854a | ||
![]() |
c4876217aa | ||
![]() |
7dcce90c90 | ||
![]() |
855a99a4a5 | ||
![]() |
bf1d69181b | ||
![]() |
c889fbd6b0 | ||
![]() |
76a8cf40d6 | ||
![]() |
c86c25519b | ||
![]() |
70eb5a9d1a | ||
![]() |
a2a83237f3 | ||
![]() |
757f4b6169 | ||
![]() |
e6d4ccc8ed | ||
![]() |
7f07c643cc | ||
![]() |
2ca3db972b | ||
![]() |
50e478de8b | ||
![]() |
617ab7d21e | ||
![]() |
bfd160cf4a | ||
![]() |
0a2d8f5851 | ||
![]() |
ce070e8ed3 | ||
![]() |
f311d100ad | ||
![]() |
4310738bc4 | ||
![]() |
0b01e02d7a | ||
![]() |
038c2bbdd0 | ||
![]() |
ff183ea8bc | ||
![]() |
8556d005d6 | ||
![]() |
9c1b61e272 | ||
![]() |
236884c19f | ||
![]() |
5dbf2973bf | ||
![]() |
a78cc3c244 | ||
![]() |
18e9063349 | ||
![]() |
1e57d84a0b | ||
![]() |
581f9c5512 | ||
![]() |
da0f0733ed | ||
![]() |
2fd501de8c | ||
![]() |
75cda1ef4d | ||
![]() |
9e0d1168c2 | ||
![]() |
f310b9f094 | ||
![]() |
57932fdb31 | ||
![]() |
07470e147e | ||
![]() |
efe405a30a | ||
![]() |
52a48123a8 | ||
![]() |
e83c3cf226 | ||
![]() |
b0a8c4ae72 | ||
![]() |
0cdf14ba29 | ||
![]() |
aabe9ba5df | ||
![]() |
9f9d624bc8 | ||
![]() |
dbd7a335af | ||
![]() |
26c71fe3f2 | ||
![]() |
eb53b6e2b6 | ||
![]() |
e208275fea | ||
![]() |
abdcbb9844 | ||
![]() |
7ab46575d1 | ||
![]() |
9d8e3d2273 | ||
![]() |
51c65ef6a8 | ||
![]() |
4c7f3a00bb | ||
![]() |
11aa72c8ab | ||
![]() |
c5681cd7b7 | ||
![]() |
c7ddfb41ec | ||
![]() |
b6d356c1dd | ||
![]() |
7b23cf4099 | ||
![]() |
add2db7f4f | ||
![]() |
66ab0b8f79 | ||
![]() |
da6d575ffe | ||
![]() |
22e0411822 | ||
![]() |
fd57a0a753 | ||
![]() |
7fa4efbf20 | ||
![]() |
771b813928 | ||
![]() |
898f3948aa | ||
![]() |
821cc2a792 | ||
![]() |
a14e893395 | ||
![]() |
ea7fa19c77 | ||
![]() |
c59da8565e | ||
![]() |
c088536156 | ||
![]() |
7ae1dfc025 | ||
![]() |
e6bf4cc65f | ||
![]() |
4179e8f204 | ||
![]() |
69bfde2d63 | ||
![]() |
49669edf4f | ||
![]() |
1e5a9abd69 | ||
![]() |
ec112a6f45 | ||
![]() |
57187a01f7 | ||
![]() |
8bfe437a2d | ||
![]() |
bf1b129725 | ||
![]() |
b466af42f0 | ||
![]() |
c88f22a2af | ||
![]() |
5bf3bad0c8 | ||
![]() |
afbad5d3c9 | ||
![]() |
26010c82c0 | ||
![]() |
43f67d86a0 | ||
![]() |
4f584b912f | ||
![]() |
6bd3783a72 | ||
![]() |
f243589116 | ||
![]() |
24b11bb6a4 | ||
![]() |
ef9afdc834 | ||
![]() |
82422cd5f8 | ||
![]() |
4a696183ac | ||
![]() |
6d82a0309e | ||
![]() |
aa4c9ca1cf | ||
![]() |
dd06230f43 | ||
![]() |
1081d963f8 | ||
![]() |
1e86c22c96 | ||
![]() |
6562e75694 | ||
![]() |
55e589e0a4 | ||
![]() |
0bee2e37d2 | ||
![]() |
b860ea6738 | ||
![]() |
5bbd2bcf47 | ||
![]() |
2e54cc28e7 | ||
![]() |
e419a6042e | ||
![]() |
46b34f628b | ||
![]() |
3069335a5f | ||
![]() |
074d8a9ec2 | ||
![]() |
0f5ba2c7f5 | ||
![]() |
0c152975cf | ||
![]() |
c539ffa2b7 | ||
![]() |
9ff35a97ba | ||
![]() |
5a2eb9688d | ||
![]() |
79812ca0b0 | ||
![]() |
2de93d0f60 | ||
![]() |
74153d3ec8 | ||
![]() |
006e99cf96 | ||
![]() |
11d59fda89 | ||
![]() |
5edbeeb199 | ||
![]() |
a0dfd4fc44 | ||
![]() |
1c6b8dda1e | ||
![]() |
3a3d26752b | ||
![]() |
15ee335687 | ||
![]() |
1c21021425 | ||
![]() |
03c591d06c | ||
![]() |
445b301b64 | ||
![]() |
3eaa27f031 | ||
![]() |
1285f86513 | ||
![]() |
9dd552cbb3 | ||
![]() |
0f80c90dbb | ||
![]() |
b36d41319b | ||
![]() |
e99e5ceeb9 | ||
![]() |
7e252afd69 | ||
![]() |
2aba18a94a | ||
![]() |
a9b8b4aa30 | ||
![]() |
fddc221512 | ||
![]() |
5e9e43109d | ||
![]() |
f3bca5127a | ||
![]() |
e974f6c88c | ||
![]() |
9f2f1b56fb | ||
![]() |
c0a5f8b100 | ||
![]() |
a1754be2e9 | ||
![]() |
c55b358874 | ||
![]() |
fbe3759e4f | ||
![]() |
e93f5db489 | ||
![]() |
e124d34418 |
49 changed files with 8379 additions and 12239 deletions
208
.drone.jsonnet
208
.drone.jsonnet
|
@ -1,208 +0,0 @@
|
|||
local git_suites = [
|
||||
{ name: 'Py2 2018.3(Git)', slug: 'py2-git-2018-3', depends: [] },
|
||||
{ name: 'Py2 2019.2(Git)', slug: 'py2-git-2019-2', depends: ['Py2 2018.3(Git)'] },
|
||||
{ name: 'Py2 3000(Git)', slug: 'py2-git-3000', depends: ['Py2 2019.2(Git)'] },
|
||||
// {name: 'Py2 develop(Stable)', slug: 'py2-git-develop'}, // Don't test against Salt's develop branch. Stability is not assured.
|
||||
];
|
||||
|
||||
local git_py3_suites = [
|
||||
{ name: 'Py3 2018.3(Git)', slug: 'py3-git-2018-3', depends: [] },
|
||||
{ name: 'Py3 2019.2(Git)', slug: 'py3-git-2019-2', depends: ['Py3 2018.3(Git)'] },
|
||||
{ name: 'Py3 3000(Git)', slug: 'py3-git-3000', depends: ['Py3 2019.2(Git)'] },
|
||||
];
|
||||
|
||||
local stable_suites = [
|
||||
{ name: 'Py2 2018.3(Stable)', slug: 'py2-stable-2018-3', depends: ['Py2 2018.3(Git)'] },
|
||||
{ name: 'Py2 2019.2(Stable)', slug: 'py2-stable-2019-2', depends: ['Py2 2019.2(Git)'] },
|
||||
{ name: 'Py2 3000(Stable)', slug: 'py2-stable-3000', depends: ['Py2 3000(Git)'] },
|
||||
];
|
||||
|
||||
local stable_py3_suites = [
|
||||
{ name: 'Py3 2018.3(Stable)', slug: 'py3-stable-2018-3', depends: ['Py3 2018.3(Git)'] },
|
||||
{ name: 'Py3 2019.2(Stable)', slug: 'py3-stable-2019-2', depends: ['Py3 2019.2(Git)'] },
|
||||
{ name: 'Py3 3000(Stable)', slug: 'py3-stable-3000', depends: ['Py3 3000(Git)'] },
|
||||
];
|
||||
|
||||
local distros = [
|
||||
{ name: 'Arch', slug: 'arch', multiplier: 0, depends: [] },
|
||||
// { name: 'Amazon 1', slug: 'amazon-1', multiplier: 1, depends: [] },
|
||||
{ name: 'Amazon 2', slug: 'amazon-2', multiplier: 2, depends: [] },
|
||||
{ name: 'CentOS 6', slug: 'centos-6', multiplier: 3, depends: [] },
|
||||
{ name: 'CentOS 7', slug: 'centos-7', multiplier: 4, depends: [] },
|
||||
{ name: 'CentOS 8', slug: 'centos-8', multiplier: 5, depends: [] },
|
||||
{ name: 'Debian 8', slug: 'debian-8', multiplier: 6, depends: [] },
|
||||
{ name: 'Debian 9', slug: 'debian-9', multiplier: 7, depends: [] },
|
||||
{ name: 'Debian 10', slug: 'debian-10', multiplier: 5, depends: [] },
|
||||
{ name: 'Fedora 30', slug: 'fedora-30', multiplier: 4, depends: [] },
|
||||
{ name: 'Fedora 31', slug: 'fedora-31', multiplier: 3, depends: [] },
|
||||
{ name: 'Opensuse 15.1', slug: 'opensuse-15', multiplier: 2, depends: [] },
|
||||
{ name: 'Ubuntu 16.04', slug: 'ubuntu-1604', multiplier: 1, depends: [] },
|
||||
{ name: 'Ubuntu 18.04', slug: 'ubuntu-1804', multiplier: 0, depends: [] },
|
||||
];
|
||||
|
||||
local stable_distros = [
|
||||
'amazon-1',
|
||||
'amazon-2',
|
||||
'centos-6',
|
||||
'centos-7',
|
||||
'centos-8',
|
||||
'debian-8',
|
||||
'debian-9',
|
||||
'debian-10',
|
||||
'fedora-30',
|
||||
'ubuntu-1604',
|
||||
'ubuntu-1804',
|
||||
];
|
||||
|
||||
local py3_distros = [
|
||||
'amazon-2',
|
||||
// 'arch',
|
||||
'centos-7',
|
||||
'centos-8',
|
||||
'debian-9',
|
||||
'debian-10',
|
||||
'ubuntu-1604',
|
||||
'ubuntu-1804',
|
||||
'fedora-30',
|
||||
'fedora-31',
|
||||
];
|
||||
|
||||
local py2_blacklist = [
|
||||
'centos-8',
|
||||
'debian-10',
|
||||
'fedora-30',
|
||||
'fedora-31',
|
||||
];
|
||||
|
||||
local blacklist_2018 = [
|
||||
'centos-8',
|
||||
'debian-10',
|
||||
'amazon-2',
|
||||
];
|
||||
|
||||
local Shellcheck() = {
|
||||
kind: 'pipeline',
|
||||
name: 'Lint',
|
||||
|
||||
steps: [
|
||||
{
|
||||
name: 'shellcheck',
|
||||
image: 'koalaman/shellcheck-alpine:v0.6.0',
|
||||
commands: [
|
||||
'shellcheck -s sh -f checkstyle bootstrap-salt.sh',
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
local Build(distro) = {
|
||||
kind: 'pipeline',
|
||||
name: distro.name,
|
||||
node: {
|
||||
project: 'open',
|
||||
},
|
||||
|
||||
local temp_git_suites = if std.count(py2_blacklist, distro.slug) > 0 then
|
||||
[]
|
||||
else
|
||||
git_suites,
|
||||
|
||||
local temp_stable_suites = if std.count(py2_blacklist, distro.slug) > 0 then
|
||||
[]
|
||||
else if std.count(stable_distros, distro.slug) > 0 then
|
||||
stable_suites
|
||||
else
|
||||
[],
|
||||
|
||||
local temp_git_py3_suites = if std.count(py3_distros, distro.slug) < 1 then
|
||||
[]
|
||||
else if std.count(blacklist_2018, distro.slug) > 0 then
|
||||
git_py3_suites[1:]
|
||||
else if std.count(py3_distros, distro.slug) > 0 then
|
||||
git_py3_suites
|
||||
else
|
||||
[],
|
||||
|
||||
local temp_stable_py3_suites = if std.count(stable_distros, distro.slug) < 1 then
|
||||
[]
|
||||
else if std.count(blacklist_2018, distro.slug) > 0 then
|
||||
stable_py3_suites[1:]
|
||||
else if std.count(py3_distros, distro.slug) > 0 then
|
||||
stable_py3_suites
|
||||
else
|
||||
[],
|
||||
|
||||
local suites = temp_git_suites + temp_stable_suites + temp_git_py3_suites + temp_stable_py3_suites,
|
||||
|
||||
steps: [
|
||||
{
|
||||
name: 'throttle-build',
|
||||
image: 'alpine',
|
||||
commands: [
|
||||
std.format(
|
||||
"sh -c 't=%(offset)s; echo Sleeping %(offset)s seconds; sleep %(offset)s'",
|
||||
{ offset: 6 * std.length(suites) * distro.multiplier }
|
||||
),
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'create',
|
||||
image: 'saltstack/drone-salt-bootstrap-testing',
|
||||
environment: {
|
||||
DOCKER_HOST: 'tcp://docker:2375',
|
||||
},
|
||||
depends_on: [
|
||||
'throttle-build',
|
||||
],
|
||||
commands: [
|
||||
'bundle install --with docker --without opennebula ec2 windows vagrant',
|
||||
"echo 'Waiting for docker to start'",
|
||||
'sleep 20', // give docker enough time to start
|
||||
'docker ps -a',
|
||||
std.format('bundle exec kitchen create %s', [distro.slug]),
|
||||
],
|
||||
},
|
||||
] + [
|
||||
{
|
||||
name: suite.name,
|
||||
image: 'saltstack/drone-salt-bootstrap-testing',
|
||||
environment: {
|
||||
DOCKER_HOST: 'tcp://docker:2375',
|
||||
},
|
||||
depends_on: [
|
||||
'throttle-build',
|
||||
'create',
|
||||
],
|
||||
commands: [
|
||||
'pip install -U pip',
|
||||
'pip install -r tests/requirements.txt',
|
||||
'bundle install --with docker --without opennebula ec2 windows vagrant',
|
||||
std.format('bundle exec kitchen test %s-%s', [suite.slug, distro.slug]),
|
||||
],
|
||||
}
|
||||
for suite in suites
|
||||
],
|
||||
services: [
|
||||
{
|
||||
name: 'docker',
|
||||
image: 'saltstack/drone-salt-bootstrap-testing',
|
||||
privileged: true,
|
||||
environment: {},
|
||||
command: [
|
||||
'--storage-driver=overlay2',
|
||||
],
|
||||
},
|
||||
],
|
||||
depends_on: [
|
||||
'Lint',
|
||||
] + distro.depends,
|
||||
};
|
||||
|
||||
|
||||
[
|
||||
Shellcheck(),
|
||||
] + [
|
||||
Build(distro)
|
||||
for distro in distros
|
||||
]
|
1748
.drone.yml
1748
.drone.yml
File diff suppressed because it is too large
Load diff
4
.github/actionlint.yaml
vendored
Normal file
4
.github/actionlint.yaml
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
self-hosted-runner:
|
||||
# Labels of self-hosted runner in array of string
|
||||
labels:
|
||||
- repo-release
|
315
.github/workflows/ci.yml
vendored
Normal file
315
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,315 @@
|
|||
name: CI
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
concurrency:
|
||||
# If changes are pushed to a PR, stop all running workflows before starting new ones
|
||||
group: ${{ github.head_ref || (github.repository == 'saltstack/salt-bootstrap' && github.run_id || github.ref_name) }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
collect-changed-files:
|
||||
name: Collect changed files
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
run-tests: ${{ steps.set-output.outputs.run-tests }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get specific changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
separator: ","
|
||||
files: |
|
||||
bootstrap-salt.*
|
||||
tests/**
|
||||
.github/workflows/**
|
||||
files_ignore: |
|
||||
.github/workflows/release.yml
|
||||
|
||||
- name: Set Job Output
|
||||
id: set-output
|
||||
run: |
|
||||
echo "::set-output name=run-tests::${{ steps.changed-files.outputs.any_modified }}"
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
generate-actions-workflow:
|
||||
name: Generate The Actions Workflow
|
||||
runs-on: ubuntu-latest
|
||||
needs: collect-changed-files
|
||||
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install Pre-Commit
|
||||
run: |
|
||||
python3 -m pip install -U pip
|
||||
python3 -m pip install pre-commit
|
||||
pre-commit install --install-hooks
|
||||
|
||||
- name: Generate Workflow Actions
|
||||
run: |
|
||||
pre-commit run -av generate-actions-workflow
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
needs: collect-changed-files
|
||||
container: koalaman/shellcheck-alpine:latest
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: ShellCheck
|
||||
run: |
|
||||
shellcheck -s sh -f tty bootstrap-salt.sh
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
|
||||
|
||||
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-13
|
||||
display-name: macOS 13
|
||||
container-slug: macos-13
|
||||
timeout: 20
|
||||
runs-on: macos-13
|
||||
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
|
||||
|
||||
|
||||
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-14
|
||||
display-name: macOS 14
|
||||
container-slug: macOS 14
|
||||
timeout: 20
|
||||
runs-on: macos-14
|
||||
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
|
||||
|
||||
|
||||
|
||||
windows-2022:
|
||||
name: Windows 2022
|
||||
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-2022
|
||||
display-name: Windows 2022
|
||||
container-slug: windows-2022
|
||||
timeout: 20
|
||||
runs-on: windows-2022
|
||||
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
|
||||
|
||||
|
||||
|
||||
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: amazonlinux-2023
|
||||
display-name: Amazon 2023
|
||||
container-slug: amazonlinux-2023
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
debian-11:
|
||||
name: Debian 11
|
||||
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-11
|
||||
display-name: Debian 11
|
||||
container-slug: debian-11
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
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: debian-12
|
||||
display-name: Debian 12
|
||||
container-slug: debian-12
|
||||
timeout: 20
|
||||
instances: '["stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
|
||||
|
||||
|
||||
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: photon-5
|
||||
display-name: Photon OS 5
|
||||
container-slug: photon-5
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
rockylinux-8:
|
||||
name: Rocky 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: rockylinux-8
|
||||
display-name: Rocky Linux 8
|
||||
container-slug: rockylinux-8
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
rockylinux-9:
|
||||
name: Rocky Linux 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: rockylinux-9
|
||||
display-name: Rocky Linux 9
|
||||
container-slug: rockylinux-9
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'
|
||||
|
||||
|
||||
ubuntu-2204:
|
||||
name: Ubuntu 22.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-2204
|
||||
display-name: Ubuntu 22.04
|
||||
container-slug: ubuntu-22.04
|
||||
timeout: 20
|
||||
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:
|
||||
# This step is just so we can make github require this step, to pass checks
|
||||
# on a pull request instead of requiring all
|
||||
name: Set the ${{ github.workflow }} Pipeline Exit Status
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
- macos-13
|
||||
- macos-14
|
||||
- windows-2022
|
||||
- amazonlinux-2023
|
||||
- debian-11
|
||||
- debian-12
|
||||
- photon-5
|
||||
- rockylinux-8
|
||||
- rockylinux-9
|
||||
- ubuntu-2204
|
||||
if: always()
|
||||
steps:
|
||||
|
||||
- name: Download Exit Status Files
|
||||
if: always()
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: exitstatus/
|
||||
pattern: exitstatus-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Delete Exit Status Artifacts
|
||||
if: always()
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
pattern: exitstatus-*
|
||||
failOnError: false
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
run: |
|
||||
grep -RE 'failure|cancelled' exitstatus/ && exit 1 || exit 0
|
||||
|
||||
- name: Done
|
||||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
5886
.github/workflows/main.yml
vendored
5886
.github/workflows/main.yml
vendored
File diff suppressed because it is too large
Load diff
43
.github/workflows/nightly.yml
vendored
Normal file
43
.github/workflows/nightly.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: Nightly S3 Update
|
||||
run-name: "Nightly S3 (branch: ${{ github.ref_name }})"
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
schedule:
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
|
||||
- cron: '0 1 * * *' # Every day at 1AM
|
||||
|
||||
jobs:
|
||||
|
||||
workflow-requirements:
|
||||
name: Check Workflow Requirements
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
requirements-met: ${{ steps.check-requirements.outputs.requirements-met }}
|
||||
steps:
|
||||
- name: Check For Admin Permission
|
||||
if: ${{ github.event_name != 'schedule' }}
|
||||
uses: actions-cool/check-user-permission@v2
|
||||
with:
|
||||
require: admin
|
||||
username: ${{ github.triggering_actor }}
|
||||
|
||||
- name: Check Requirements
|
||||
id: check-requirements
|
||||
run: |
|
||||
if [ "${{ vars.RUN_SCHEDULED_BUILDS }}" = "1" ]; then
|
||||
MSG="Running workflow because RUN_SCHEDULED_BUILDS=1"
|
||||
echo "${MSG}"
|
||||
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
elif [ "${{ github.event.repository.fork }}" = "true" ]; then
|
||||
MSG="Not running workflow because ${{ github.repository }} is a fork"
|
||||
echo "${MSG}"
|
||||
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo "requirements-met=false" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
MSG="Running workflow because ${{ github.repository }} is not a fork"
|
||||
echo "${MSG}"
|
||||
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
283
.github/workflows/release.yml
vendored
Normal file
283
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,283 @@
|
|||
name: Cut Release
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
|
||||
check-requirements:
|
||||
name: Check Requirements
|
||||
runs-on: ubuntu-latest
|
||||
environment: release-check
|
||||
steps:
|
||||
- name: Check For Admin Permission
|
||||
uses: actions-cool/check-user-permission@v2
|
||||
with:
|
||||
require: admin
|
||||
username: ${{ github.triggering_actor }}
|
||||
|
||||
- name: Check Repository
|
||||
run: |
|
||||
if [ "${{ vars.RUN_RELEASE_BUILDS }}" = "1" ]; then
|
||||
MSG="Running workflow because RUN_RELEASE_BUILDS=1"
|
||||
echo "${MSG}"
|
||||
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
exit 0
|
||||
fi
|
||||
echo "Trying to run the release workflow from repository ${{ github.repository }}"
|
||||
if [ "${{ github.repository }}" != "saltstack/salt-bootstrap" ]; then
|
||||
MSG="Running the release workflow from the ${{ github.repository }} repository is not allowed"
|
||||
echo "${MSG}"
|
||||
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
MSG="Allowed repository: saltstack/salt-bootstrap"
|
||||
echo "${MSG}"
|
||||
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
exit 1
|
||||
else
|
||||
MSG="Allowed to release from repository ${{ github.repository }}"
|
||||
echo "${MSG}"
|
||||
echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
fi
|
||||
|
||||
- name: Check Branch
|
||||
run: |
|
||||
echo "Trying to run the release workflow from branch ${{ github.ref_name }}"
|
||||
if [ "${{ github.ref_name }}" != "develop" ]; then
|
||||
echo "Running the release workflow from the ${{ github.ref_name }} branch is not allowed"
|
||||
echo "Allowed branches: develop"
|
||||
exit 1
|
||||
else
|
||||
echo "Allowed to release from branch ${{ github.ref_name }}"
|
||||
fi
|
||||
|
||||
update-develop:
|
||||
name: Update CHANGELOG.md and bootstrap-salt.sh
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # To be able to publish the release
|
||||
environment: release
|
||||
needs:
|
||||
- check-requirements
|
||||
outputs:
|
||||
release-version: ${{ steps.update-repo.outputs.release-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: develop
|
||||
repository: ${{ github.repository }}
|
||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||
|
||||
- name: Install Requirements
|
||||
run: |
|
||||
python3 -m pip install -r requirements/release.txt
|
||||
pre-commit install --install-hooks
|
||||
|
||||
- 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 commit.gpgsign false
|
||||
|
||||
- name: Update Repository
|
||||
id: update-repo
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
python3 .github/workflows/scripts/cut-release.py --repo ${{ github.repository }}
|
||||
|
||||
- name: Show Changes
|
||||
run: |
|
||||
git status
|
||||
git diff
|
||||
|
||||
- name: Commit Changes
|
||||
run: |
|
||||
git commit -am "Update develop branch for the ${{ steps.update-repo.outputs.release-version }} release" || \
|
||||
git commit -am "Update develop branch for the ${{ steps.update-repo.outputs.release-version }} release"
|
||||
|
||||
- name: Push Changes
|
||||
uses: ad-m/github-push-action@b87afee92c6e70ea888be6203a3e9426fda49839
|
||||
with:
|
||||
ssh: true
|
||||
atomic: true
|
||||
branch: develop
|
||||
repository: ${{ github.repository }}
|
||||
|
||||
- name: Upload Release Details
|
||||
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: ubuntu-latest
|
||||
needs:
|
||||
- update-develop
|
||||
environment: release
|
||||
permissions:
|
||||
contents: write # To be able to publish the release
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: stable
|
||||
repository: ${{ github.repository }}
|
||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||
fetch-depth: 0
|
||||
|
||||
- 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 commit.gpgsign false
|
||||
|
||||
- name: Download Release Details
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release-details
|
||||
|
||||
- name: Merge develop into stable
|
||||
run: |
|
||||
git merge --no-ff -m "Merge develop into stable for ${{ needs.update-develop.outputs.release-version }} release" origin/develop || touch .git-conflicts
|
||||
if [ -f .git-conflicts ]
|
||||
then
|
||||
git diff
|
||||
for f in $(git status | grep 'both modified' | awk '{ print $3 }')
|
||||
do
|
||||
git checkout --theirs "$f"
|
||||
pre-commit run -av --files "$f"
|
||||
git add "$f"
|
||||
done
|
||||
git commit -a -m "Merge develop into stable for ${{ needs.update-develop.outputs.release-version }} release(auto resolving conflicts to the develop version)"
|
||||
fi
|
||||
|
||||
- name: Tag The ${{ needs.update-develop.outputs.release-version }} Release
|
||||
run: |
|
||||
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: |
|
||||
sha256sum bootstrap-salt.sh | awk '{ print $1 }' > bootstrap-salt.sh.sha256
|
||||
sha256sum bootstrap-salt.ps1 | awk '{ print $1 }' > bootstrap-salt.ps1.sha256
|
||||
git commit -a -m "Update sha256 checksums" || git commit -a -m "Update sha256 checksums"
|
||||
|
||||
- name: Push Changes
|
||||
uses: ad-m/github-push-action@b87afee92c6e70ea888be6203a3e9426fda49839
|
||||
with:
|
||||
ssh: true
|
||||
tags: true
|
||||
atomic: true
|
||||
branch: stable
|
||||
repository: ${{ github.repository }}
|
||||
|
||||
publish-release:
|
||||
name: Create GitHub Release
|
||||
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@v4
|
||||
with:
|
||||
ref: stable
|
||||
repository: ${{ github.repository }}
|
||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||
|
||||
- name: Download Release Details
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release-details
|
||||
|
||||
- name: Update Environment
|
||||
run: |
|
||||
CUT_RELEASE_VERSION=$(cat .cut_release_version)
|
||||
echo "CUT_RELEASE_VERSION=${CUT_RELEASE_VERSION}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Create Github Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ env.CUT_RELEASE_VERSION }}
|
||||
tag_name: ${{ env.CUT_RELEASE_VERSION }}
|
||||
body_path: .cut_release_changes
|
||||
target_commitish: stable
|
||||
draft: false
|
||||
prerelease: false
|
||||
generate_release_notes: false
|
||||
files: |
|
||||
bootstrap-salt.sh
|
||||
bootstrap-salt.sh.sha256
|
||||
bootstrap-salt.ps1
|
||||
bootstrap-salt.ps1.sha256
|
||||
LICENSE
|
||||
|
||||
- name: Delete Release Details Artifact
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: release-details
|
||||
failOnError: false
|
||||
|
||||
update-develop-checksums:
|
||||
name: Update Release Checksums on Develop
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- publish-release
|
||||
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@v4
|
||||
with:
|
||||
ref: stable
|
||||
repository: ${{ github.repository }}
|
||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||
|
||||
- name: Get bootstrap-salt.sh on stable branch sha256sum
|
||||
run: |
|
||||
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@v4
|
||||
with:
|
||||
ref: develop
|
||||
repository: ${{ github.repository }}
|
||||
ssh-key: ${{ secrets.SALT_BOOTSTRAP_RELEASE_KEY }}
|
||||
|
||||
- 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 commit.gpgsign false
|
||||
|
||||
- name: Update Latest Release on README
|
||||
run: |
|
||||
python3 .github/workflows/scripts/update-release-shasum.py ${{ env.BS_VERSION }} ${{ env.SH }}
|
||||
|
||||
- name: Show Changes
|
||||
run: |
|
||||
git status
|
||||
git diff
|
||||
|
||||
- name: Commit Changes
|
||||
run: |
|
||||
git commit -am "Update README.rst with ${{ env.BS_VERSION }} release sha256sum" || \
|
||||
git commit -am "Update README.rst with ${{ env.BS_VERSION }} release sha256sum"
|
||||
|
||||
- name: Push Changes
|
||||
uses: ad-m/github-push-action@b87afee92c6e70ea888be6203a3e9426fda49839
|
||||
with:
|
||||
ssh: true
|
||||
atomic: true
|
||||
branch: develop
|
||||
repository: ${{ github.repository }}
|
225
.github/workflows/scripts/cut-release.py
vendored
Normal file
225
.github/workflows/scripts/cut-release.py
vendored
Normal file
|
@ -0,0 +1,225 @@
|
|||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
import requests
|
||||
|
||||
REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent.parent.parent
|
||||
|
||||
|
||||
class ClassPropertyDescriptor:
|
||||
def __init__(self, fget, fset=None):
|
||||
self.fget = fget
|
||||
self.fset = fset
|
||||
|
||||
def __get__(self, obj, klass=None):
|
||||
if klass is None:
|
||||
klass = type(obj)
|
||||
return self.fget.__get__(obj, klass)()
|
||||
|
||||
def __set__(self, obj, value):
|
||||
if not self.fset:
|
||||
raise AttributeError("can't set attribute")
|
||||
type_ = type(obj)
|
||||
return self.fset.__get__(obj, type_)(value)
|
||||
|
||||
def setter(self, func):
|
||||
if not isinstance(func, (classmethod, staticmethod)):
|
||||
func = classmethod(func)
|
||||
self.fset = func
|
||||
return self
|
||||
|
||||
|
||||
def classproperty(func):
|
||||
if not isinstance(func, (classmethod, staticmethod)):
|
||||
func = classmethod(func)
|
||||
|
||||
return ClassPropertyDescriptor(func)
|
||||
|
||||
|
||||
class Session:
|
||||
|
||||
_instance = None
|
||||
|
||||
def __init__(self, endpoint=None):
|
||||
if endpoint is None:
|
||||
endpoint = "https://api.github.com"
|
||||
self.endpoint = endpoint
|
||||
self.session = requests.Session()
|
||||
self.session.headers.update(
|
||||
{
|
||||
"Accept": "application/vnd.github+json",
|
||||
"Authorization": f"token {os.environ['GITHUB_TOKEN']}",
|
||||
}
|
||||
)
|
||||
|
||||
@classproperty
|
||||
def instance(cls):
|
||||
if cls._instance is None:
|
||||
cls._instance = cls()
|
||||
return cls._instance
|
||||
|
||||
def get(self, path, **kwargs):
|
||||
return self.session.get(f"{self.endpoint}/{path.lstrip('/')}", **kwargs)
|
||||
|
||||
def post(self, path, **kwargs):
|
||||
return self.session.post(f"{self.endpoint}/{path.lstrip('/')}", **kwargs)
|
||||
|
||||
def __enter__(self):
|
||||
self.session.__enter__()
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
self.session.__exit__(*args)
|
||||
|
||||
|
||||
def get_latest_release(options):
|
||||
response = Session.instance.get(f"/repos/{options.repo}/releases/latest")
|
||||
if response.status_code != 404:
|
||||
return response.json()["tag_name"]
|
||||
|
||||
print(
|
||||
f"Failed to get latest release. HTTP Response:\n{response.text}",
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
print("Searching tags...", file=sys.stderr, flush=True)
|
||||
|
||||
tags = []
|
||||
page = 0
|
||||
while True:
|
||||
page += 1
|
||||
response = Session.instance.get(
|
||||
f"/repos/{options.repo}/tags", data={"pre_page": 100, "page": page}
|
||||
)
|
||||
repo_tags = response.json()
|
||||
added_tags = False
|
||||
for tag in repo_tags:
|
||||
if tag["name"] not in tags:
|
||||
tags.append(tag["name"])
|
||||
added_tags = True
|
||||
if added_tags is False:
|
||||
break
|
||||
|
||||
return list(sorted(tags))[-1]
|
||||
|
||||
|
||||
def get_generated_changelog(options):
|
||||
response = Session.instance.post(
|
||||
f"/repos/{options.repo}/releases/generate-notes",
|
||||
json={
|
||||
"tag_name": options.release_tag,
|
||||
"previous_tag_name": options.previous_tag,
|
||||
"target_commitish": "develop",
|
||||
},
|
||||
)
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
return response.text
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--repo", required=True, help="The <user>/<repo> to use")
|
||||
parser.add_argument("--release-tag", required=False, help="The tag of the release")
|
||||
parser.add_argument(
|
||||
"--previous-tag",
|
||||
required=False,
|
||||
help="The previous release tag. If not passed, the GH Api will be queried for it.",
|
||||
)
|
||||
|
||||
changelog_file = REPO_ROOT / "CHANGELOG.md"
|
||||
|
||||
if not os.environ.get("GITHUB_TOKEN"):
|
||||
parser.exit(status=1, message="GITHUB_TOKEN environment variable not set")
|
||||
|
||||
options = parser.parse_args()
|
||||
if not options.release_tag:
|
||||
options.release_tag = f"v{datetime.utcnow().strftime('%Y.%m.%d')}"
|
||||
if not options.previous_tag:
|
||||
options.previous_tag = get_latest_release(options)
|
||||
|
||||
print(
|
||||
f"Creating changelog entries from {options.previous_tag} to {options.release_tag} ...",
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
|
||||
changelog = get_generated_changelog(options)
|
||||
if not isinstance(changelog, dict):
|
||||
parser.exit(
|
||||
status=1,
|
||||
message=f"Unable to generate changelog. HTTP Response:\n{changelog}",
|
||||
)
|
||||
|
||||
github_output = os.environ.get("GITHUB_OUTPUT")
|
||||
|
||||
cut_release_version = REPO_ROOT / ".cut_release_version"
|
||||
print(
|
||||
f"* Writing {cut_release_version.relative_to(REPO_ROOT)} ...",
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
cut_release_version.write_text(options.release_tag)
|
||||
if github_output is not None:
|
||||
with open(github_output, "a", encoding="utf-8") as wfh:
|
||||
wfh.write(f"release-version={options.release_tag}\n")
|
||||
|
||||
cut_release_changes = REPO_ROOT / ".cut_release_changes"
|
||||
print(
|
||||
f"* Writing {cut_release_changes.relative_to(REPO_ROOT)} ...",
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
cut_release_changes.write_text(changelog["body"])
|
||||
print(
|
||||
f"* Updating {changelog_file.relative_to(REPO_ROOT)} ...",
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
changelog_file.write_text(
|
||||
f"# {changelog['name']}\n\n"
|
||||
+ changelog["body"]
|
||||
+ "\n\n"
|
||||
+ 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)} ...",
|
||||
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(),
|
||||
)
|
||||
)
|
||||
|
||||
# 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")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
49
.github/workflows/scripts/update-release-shasum.py
vendored
Normal file
49
.github/workflows/scripts/update-release-shasum.py
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
THIS_FILE = pathlib.Path(__file__).resolve()
|
||||
CODE_ROOT = THIS_FILE.parent.parent.parent.parent
|
||||
README_PATH = CODE_ROOT / "README.rst"
|
||||
|
||||
|
||||
def main(version, sha256sum):
|
||||
in_contents = README_PATH.read_text()
|
||||
if version in in_contents:
|
||||
print(f"README file already contains an entry for version {version}")
|
||||
sys.exit(1)
|
||||
out_contents = ""
|
||||
found_anchor = False
|
||||
updated_version = False
|
||||
if version not in in_contents:
|
||||
for line in in_contents.splitlines(True):
|
||||
if updated_version:
|
||||
out_contents += line
|
||||
continue
|
||||
if found_anchor:
|
||||
if not line.startswith("-"):
|
||||
out_contents += line
|
||||
continue
|
||||
out_contents += "- {}: ``{}``\n".format(version, sha256sum)
|
||||
out_contents += line
|
||||
updated_version = True
|
||||
continue
|
||||
|
||||
out_contents += line
|
||||
if line.startswith(".. _sha256sums:"):
|
||||
found_anchor = True
|
||||
if in_contents != out_contents:
|
||||
README_PATH.write_text(out_contents)
|
||||
|
||||
ret = subprocess.run(
|
||||
["git", "diff", "--stat"], universal_newlines=True, capture_output=True
|
||||
)
|
||||
if "1 file changed, 1 insertion(+)" not in ret.stdout:
|
||||
print("Too Many Changes to the readme file")
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1], sys.argv[2])
|
34
.github/workflows/templates/ci-tail.yml
vendored
Normal file
34
.github/workflows/templates/ci-tail.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
set-pipeline-exit-status:
|
||||
# This step is just so we can make github require this step, to pass checks
|
||||
# on a pull request instead of requiring all
|
||||
name: Set the ${{{{ github.workflow }}}} Pipeline Exit Status
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
{needs}
|
||||
if: always()
|
||||
steps:
|
||||
|
||||
- name: Download Exit Status Files
|
||||
if: always()
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: exitstatus/
|
||||
pattern: exitstatus-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Delete Exit Status Artifacts
|
||||
if: always()
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
pattern: exitstatus-*
|
||||
failOnError: false
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
run: |
|
||||
grep -RE 'failure|cancelled' exitstatus/ && exit 1 || exit 0
|
||||
|
||||
- name: Done
|
||||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
113
.github/workflows/templates/ci.yml
vendored
Normal file
113
.github/workflows/templates/ci.yml
vendored
Normal file
|
@ -0,0 +1,113 @@
|
|||
name: CI
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
concurrency:
|
||||
# If changes are pushed to a PR, stop all running workflows before starting new ones
|
||||
group: ${{ github.head_ref || (github.repository == 'saltstack/salt-bootstrap' && github.run_id || github.ref_name) }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
collect-changed-files:
|
||||
name: Collect changed files
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
run-tests: ${{ steps.set-output.outputs.run-tests }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get specific changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
separator: ","
|
||||
files: |
|
||||
bootstrap-salt.*
|
||||
tests/**
|
||||
.github/workflows/**
|
||||
files_ignore: |
|
||||
.github/workflows/release.yml
|
||||
|
||||
- name: Set Job Output
|
||||
id: set-output
|
||||
run: |
|
||||
echo "::set-output name=run-tests::${{ steps.changed-files.outputs.any_modified }}"
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
generate-actions-workflow:
|
||||
name: Generate The Actions Workflow
|
||||
runs-on: ubuntu-latest
|
||||
needs: collect-changed-files
|
||||
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install Pre-Commit
|
||||
run: |
|
||||
python3 -m pip install -U pip
|
||||
python3 -m pip install pre-commit
|
||||
pre-commit install --install-hooks
|
||||
|
||||
- name: Generate Workflow Actions
|
||||
run: |
|
||||
pre-commit run -av generate-actions-workflow
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
needs: collect-changed-files
|
||||
container: koalaman/shellcheck-alpine:latest
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: ShellCheck
|
||||
run: |
|
||||
shellcheck -s sh -f tty bootstrap-salt.sh
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}
|
||||
path: exitstatus/
|
579
.github/workflows/templates/generate.py
vendored
579
.github/workflows/templates/generate.py
vendored
|
@ -1,206 +1,455 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
#!/usr/bin/env python3
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
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 = [
|
||||
# 'amazon-1',
|
||||
'amazon-2',
|
||||
'arch',
|
||||
'centos-6',
|
||||
'centos-7',
|
||||
'centos-8',
|
||||
'debian-10',
|
||||
'debian-8',
|
||||
'debian-9',
|
||||
'fedora-30',
|
||||
'fedora-31',
|
||||
'fedora-32',
|
||||
'opensuse-15',
|
||||
'ubuntu-1604',
|
||||
'ubuntu-1804'
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"photon-5",
|
||||
"rockylinux-8",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
OSX = WINDOWS = []
|
||||
|
||||
WINDOWS = [
|
||||
"windows-2022",
|
||||
]
|
||||
|
||||
OSX = [
|
||||
"macos-13",
|
||||
"macos-14",
|
||||
]
|
||||
|
||||
# "amazonlinux-2",
|
||||
# "debian-13",
|
||||
# "fedora-40",
|
||||
# "photon-4",
|
||||
# "ubuntu-2004",
|
||||
# "ubuntu-2404",
|
||||
STABLE_DISTROS = [
|
||||
'amazon-1',
|
||||
'amazon-2',
|
||||
'centos-6',
|
||||
'centos-7',
|
||||
'centos-8',
|
||||
'debian-10',
|
||||
'debian-8',
|
||||
'debian-9',
|
||||
'fedora-30',
|
||||
'fedora-31',
|
||||
'ubuntu-1604',
|
||||
'ubuntu-1804',
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"photon-5",
|
||||
"rockylinux-8",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
PY2_BLACKLIST = [
|
||||
'centos-8',
|
||||
'debian-10',
|
||||
'fedora-30',
|
||||
'fedora-31',
|
||||
'fedora-32'
|
||||
# "amazonlinux-2",
|
||||
# "debian-13",
|
||||
# "fedora-40",
|
||||
# "photon-4",
|
||||
# "ubuntu-2004",
|
||||
# "ubuntu-2404",
|
||||
ONEDIR_DISTROS = [
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"photon-5",
|
||||
"rockylinux-8",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
PY3_BLACKLIST = [
|
||||
'arch', # Defaults to Py3.8
|
||||
'amazon-1',
|
||||
'centos-6',
|
||||
'debian-8',
|
||||
'fedora-32' # Defaults to Py3.8
|
||||
# "amazonlinux-2",
|
||||
# "amazonlinux-2023",
|
||||
# "photon-4",
|
||||
# "photon-5",
|
||||
# "rockylinux-8",
|
||||
# "ubuntu-2404",
|
||||
ONEDIR_RC_DISTROS = [
|
||||
"debian-12",
|
||||
"photon-5",
|
||||
"rockylinux-9",
|
||||
"ubuntu-2204",
|
||||
]
|
||||
|
||||
BLACKLIST_2018 = [
|
||||
'amazon-2',
|
||||
'centos-8',
|
||||
'debian-10',
|
||||
BLACKLIST_3006 = [
|
||||
"debian-12",
|
||||
"fedora-40",
|
||||
"ubuntu-2404",
|
||||
]
|
||||
|
||||
SALT_BRANCHES = [
|
||||
'2018-3',
|
||||
'2019-2',
|
||||
'3000',
|
||||
'master',
|
||||
'latest'
|
||||
# "photon-5",
|
||||
BLACKLIST_3007 = [
|
||||
"photon-4",
|
||||
]
|
||||
|
||||
BRANCH_DISPLAY_NAMES = {
|
||||
'2018-3': 'v2018.3',
|
||||
'2019-2': 'v2019.2',
|
||||
'3000': 'v3000',
|
||||
'master': 'Master',
|
||||
'latest': 'Latest'
|
||||
# "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-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 = [
|
||||
"amazonlinux-2",
|
||||
"amazonlinux-2023",
|
||||
"debian-11",
|
||||
"debian-13",
|
||||
"fedora-40",
|
||||
"photon-4",
|
||||
"photon-5",
|
||||
"rockylinux-9",
|
||||
]
|
||||
|
||||
SALT_VERSIONS = [
|
||||
"3006",
|
||||
"3006-8",
|
||||
"3007",
|
||||
"3007-1",
|
||||
"master",
|
||||
"latest",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
ONEDIR_SALT_VERSIONS = [
|
||||
"3006",
|
||||
"3007",
|
||||
"latest",
|
||||
]
|
||||
|
||||
ONEDIR_RC_SALT_VERSIONS = []
|
||||
|
||||
VERSION_DISPLAY_NAMES = {
|
||||
"3006": "v3006",
|
||||
"3006-8": "v3006.8",
|
||||
"3007": "v3007",
|
||||
"3007-1": "v3007.1",
|
||||
"master": "Master",
|
||||
"latest": "Latest",
|
||||
"nightly": "Nightly",
|
||||
}
|
||||
|
||||
STABLE_BRANCH_BLACKLIST = [
|
||||
STABLE_VERSION_BLACKLIST = [
|
||||
"master",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
LATEST_PKG_BLACKLIST = [
|
||||
'arch', # No packages are built
|
||||
'centos-8', # Once Neon is out, this can be removed from here
|
||||
'debian-10' # Once Neon is out, this can be removed from here
|
||||
MAC_STABLE_VERSION_BLACKLIST = [
|
||||
"master",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
GIT_VERSION_BLACKLIST = [
|
||||
"3006-8",
|
||||
"3007-1",
|
||||
"nightly",
|
||||
]
|
||||
|
||||
# TODO: Revert the commit relating to this section, once the Git-based builds
|
||||
# have been fixed for the distros listed below
|
||||
#
|
||||
# Apparent failure is:
|
||||
#
|
||||
# /usr/lib/python3.11/site-packages/setuptools/command/install.py:34:
|
||||
# SetuptoolsDeprecationWarning: setup.py install is deprecated.
|
||||
# Use build and pip and other standards-based tools.
|
||||
#
|
||||
GIT_DISTRO_BLACKLIST = [
|
||||
"rockylinux-8",
|
||||
]
|
||||
|
||||
LATEST_PKG_BLACKLIST = []
|
||||
|
||||
DISTRO_DISPLAY_NAMES = {
|
||||
'amazon-1': 'Amazon 1',
|
||||
'amazon-2': 'Amazon 2',
|
||||
'arch': 'Arch',
|
||||
'centos-6': 'CentOS 6',
|
||||
'centos-7': 'CentOS 7',
|
||||
'centos-8': 'CentOS 8',
|
||||
'debian-10': 'Debian 10',
|
||||
'debian-8': 'Debian 8',
|
||||
'debian-9': 'Debian 9',
|
||||
'fedora-30': 'Fedora 30',
|
||||
'fedora-31': 'Fedora 31',
|
||||
'fedora-32': 'Fedora 32',
|
||||
'opensuse-15': 'Opensuse 15',
|
||||
'ubuntu-1604': 'Ubuntu 16.04',
|
||||
'ubuntu-1804': 'Ubuntu 18.04'
|
||||
"amazonlinux-2": "Amazon 2",
|
||||
"amazonlinux-2023": "Amazon 2023",
|
||||
"debian-11": "Debian 11",
|
||||
"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",
|
||||
"ubuntu-2404": "Ubuntu 24.04",
|
||||
"macos-13": "macOS 13",
|
||||
"macos-14": "macOS 14",
|
||||
"windows-2022": "Windows 2022",
|
||||
}
|
||||
|
||||
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",
|
||||
}
|
||||
|
||||
TIMEOUT_DEFAULT = 20
|
||||
TIMEOUT_OVERRIDES = {}
|
||||
VERSION_ONLY_OVERRIDES = []
|
||||
|
||||
TEMPLATE = """
|
||||
{distro}:
|
||||
name: {display_name}{ifcheck}
|
||||
uses: {uses}
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: {distro}
|
||||
display-name: {display_name}
|
||||
container-slug: {container_name}
|
||||
timeout: {timeout_minutes}{runs_on}
|
||||
instances: '{instances}'
|
||||
"""
|
||||
|
||||
|
||||
def generate_test_jobs():
|
||||
test_jobs = ''
|
||||
test_jobs = ""
|
||||
needs = ["lint", "generate-actions-workflow"]
|
||||
|
||||
for distro in LINUX_DISTROS + OSX + WINDOWS:
|
||||
for branch in SALT_BRANCHES:
|
||||
if branch == 'latest':
|
||||
if distro in LATEST_PKG_BLACKLIST:
|
||||
continue
|
||||
if distro in LINUX_DISTROS:
|
||||
template = 'linux.yml'
|
||||
elif distro in OSX:
|
||||
template = 'osx.yml'
|
||||
elif distro in WINDOWS:
|
||||
template = 'windows.yml'
|
||||
else:
|
||||
print("Don't know how to handle {}".format(distro))
|
||||
test_jobs += "\n"
|
||||
for distro in OSX:
|
||||
test_jobs += "\n"
|
||||
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"
|
||||
instances = []
|
||||
timeout_minutes = (
|
||||
TIMEOUT_OVERRIDES[distro]
|
||||
if distro in TIMEOUT_OVERRIDES
|
||||
else TIMEOUT_DEFAULT
|
||||
)
|
||||
|
||||
with open(template) as rfh:
|
||||
test_jobs += '\n{}\n'.format(
|
||||
rfh.read().replace(
|
||||
'{python_version}-{bootstrap_type}-{branch}-{distro}',
|
||||
'{branch}-{distro}'
|
||||
).format(
|
||||
distro=distro,
|
||||
branch=branch,
|
||||
display_name='{} Latest packaged release'.format(
|
||||
DISTRO_DISPLAY_NAMES[distro],
|
||||
)
|
||||
)
|
||||
)
|
||||
for salt_version in SALT_VERSIONS:
|
||||
if salt_version == "latest":
|
||||
instances.append(salt_version)
|
||||
continue
|
||||
|
||||
for python_version in ('py2', 'py3'):
|
||||
for bootstrap_type in ('stable', 'git'):
|
||||
if bootstrap_type == 'stable' and branch == 'master':
|
||||
continue
|
||||
if bootstrap_type == 'stable' and distro not in STABLE_DISTROS:
|
||||
for bootstrap_type in ["stable"]:
|
||||
if bootstrap_type == "stable":
|
||||
if salt_version in MAC_STABLE_VERSION_BLACKLIST:
|
||||
continue
|
||||
|
||||
if bootstrap_type == 'stable' and branch in STABLE_BRANCH_BLACKLIST:
|
||||
continue
|
||||
test_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(test_target)
|
||||
|
||||
if branch == '2018-3' and distro in BLACKLIST_2018:
|
||||
continue
|
||||
for bootstrap_type in ["default"]:
|
||||
if distro not in STABLE_DISTROS:
|
||||
continue
|
||||
instances.append(bootstrap_type)
|
||||
|
||||
if python_version == 'py2' and distro in PY2_BLACKLIST:
|
||||
continue
|
||||
|
||||
if python_version == 'py3' and distro in PY3_BLACKLIST:
|
||||
continue
|
||||
|
||||
if distro in LINUX_DISTROS:
|
||||
template = 'linux.yml'
|
||||
elif distro in OSX:
|
||||
template = 'osx.yml'
|
||||
elif distro in WINDOWS:
|
||||
template = 'windows.yml'
|
||||
else:
|
||||
print("Don't know how to handle {}".format(distro))
|
||||
|
||||
with open(template) as rfh:
|
||||
test_jobs += '\n{}\n'.format(
|
||||
rfh.read().format(
|
||||
distro=distro,
|
||||
branch=branch,
|
||||
python_version=python_version,
|
||||
bootstrap_type=bootstrap_type,
|
||||
display_name='{} {} {} {}'.format(
|
||||
DISTRO_DISPLAY_NAMES[distro],
|
||||
BRANCH_DISPLAY_NAMES[branch],
|
||||
python_version.capitalize(),
|
||||
bootstrap_type.capitalize()
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
with open('lint.yml') as rfh:
|
||||
lint_job = '\n{}\n'.format(rfh.read())
|
||||
|
||||
with open('pre-commit.yml') as rfh:
|
||||
pre_commit_job = '\n{}\n'.format(rfh.read())
|
||||
|
||||
with open('../main.yml', 'w') as wfh:
|
||||
with open('main.yml') as rfh:
|
||||
wfh.write(
|
||||
'{}\n'.format(
|
||||
rfh.read().format(
|
||||
jobs='{pre_commit}{lint}{test}'.format(
|
||||
lint=lint_job,
|
||||
test=test_jobs,
|
||||
pre_commit=pre_commit_job,
|
||||
)
|
||||
).strip()
|
||||
)
|
||||
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],
|
||||
container_name=CONTAINER_SLUG_NAMES[distro],
|
||||
timeout_minutes=timeout_minutes,
|
||||
)
|
||||
|
||||
test_jobs += "\n"
|
||||
for distro in WINDOWS:
|
||||
test_jobs += "\n"
|
||||
runs_on = f"\n runs-on: {distro}"
|
||||
ifcheck = "\n if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'"
|
||||
uses = "./.github/workflows/test-windows.yml"
|
||||
instances = []
|
||||
timeout_minutes = (
|
||||
TIMEOUT_OVERRIDES[distro]
|
||||
if distro in TIMEOUT_OVERRIDES
|
||||
else TIMEOUT_DEFAULT
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
for salt_version in SALT_VERSIONS:
|
||||
|
||||
if salt_version == "latest":
|
||||
|
||||
instances.append(salt_version)
|
||||
continue
|
||||
|
||||
for bootstrap_type in ["stable"]:
|
||||
if bootstrap_type == "stable":
|
||||
if salt_version in STABLE_VERSION_BLACKLIST:
|
||||
continue
|
||||
|
||||
test_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(test_target)
|
||||
|
||||
for bootstrap_type in ["default"]:
|
||||
if distro not in STABLE_DISTROS:
|
||||
continue
|
||||
instances.append(bootstrap_type)
|
||||
|
||||
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],
|
||||
container_name=CONTAINER_SLUG_NAMES[distro],
|
||||
timeout_minutes=timeout_minutes,
|
||||
)
|
||||
|
||||
test_jobs += "\n"
|
||||
for distro in LINUX_DISTROS:
|
||||
test_jobs += "\n"
|
||||
runs_on = ""
|
||||
ifcheck = "\n if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'"
|
||||
uses = "./.github/workflows/test-linux.yml"
|
||||
instances = []
|
||||
timeout_minutes = (
|
||||
TIMEOUT_OVERRIDES[distro]
|
||||
if distro in TIMEOUT_OVERRIDES
|
||||
else TIMEOUT_DEFAULT
|
||||
)
|
||||
if distro in VERSION_ONLY_OVERRIDES:
|
||||
ifcheck = "\n if: github.event_name == 'push'"
|
||||
|
||||
for salt_version in SALT_VERSIONS:
|
||||
|
||||
if salt_version == "latest":
|
||||
if distro in LATEST_PKG_BLACKLIST:
|
||||
continue
|
||||
|
||||
instances.append(salt_version)
|
||||
continue
|
||||
|
||||
for bootstrap_type in (
|
||||
"stable",
|
||||
"git",
|
||||
"onedir",
|
||||
"onedir-rc",
|
||||
):
|
||||
if bootstrap_type == "onedir":
|
||||
if salt_version not in ONEDIR_SALT_VERSIONS:
|
||||
continue
|
||||
if distro not in ONEDIR_DISTROS:
|
||||
continue
|
||||
|
||||
if bootstrap_type == "onedir-rc":
|
||||
if salt_version not in ONEDIR_RC_SALT_VERSIONS:
|
||||
continue
|
||||
if distro not in ONEDIR_RC_DISTROS:
|
||||
continue
|
||||
|
||||
if bootstrap_type == "stable":
|
||||
if salt_version in STABLE_VERSION_BLACKLIST:
|
||||
continue
|
||||
if distro not in STABLE_DISTROS:
|
||||
continue
|
||||
|
||||
if bootstrap_type == "git":
|
||||
if salt_version in GIT_VERSION_BLACKLIST:
|
||||
continue
|
||||
if distro in GIT_DISTRO_BLACKLIST:
|
||||
continue
|
||||
|
||||
BLACKLIST = {
|
||||
"3006": BLACKLIST_3006,
|
||||
"3006-8": BLACKLIST_3006,
|
||||
"3007": BLACKLIST_3007,
|
||||
"3007-1": BLACKLIST_3007,
|
||||
}
|
||||
if bootstrap_type == "git":
|
||||
BLACKLIST = {
|
||||
"3006": BLACKLIST_GIT_3006,
|
||||
"3007": BLACKLIST_GIT_3007,
|
||||
"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 ("3006", "3006-8", "3007", "3007-1", "master")
|
||||
and distro in BLACKLIST[salt_version]
|
||||
):
|
||||
continue
|
||||
|
||||
test_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(test_target)
|
||||
|
||||
for bootstrap_type in ["default"]:
|
||||
if distro not in STABLE_DISTROS:
|
||||
continue
|
||||
instances.append(bootstrap_type)
|
||||
|
||||
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],
|
||||
container_name=CONTAINER_SLUG_NAMES[distro],
|
||||
timeout_minutes=timeout_minutes,
|
||||
)
|
||||
|
||||
ci_src_workflow = pathlib.Path("ci.yml").resolve()
|
||||
ci_tail_src_workflow = pathlib.Path("ci-tail.yml").resolve()
|
||||
ci_dst_workflow = pathlib.Path("../ci.yml").resolve()
|
||||
ci_workflow_contents = ci_src_workflow.read_text() + test_jobs + "\n"
|
||||
ci_workflow_contents += ci_tail_src_workflow.read_text().format(
|
||||
needs="\n".join([f" - {need}" for need in needs]).lstrip()
|
||||
)
|
||||
ci_dst_workflow.write_text(ci_workflow_contents)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate_test_jobs()
|
||||
|
|
12
.github/workflows/templates/lint.yml
vendored
12
.github/workflows/templates/lint.yml
vendored
|
@ -1,12 +0,0 @@
|
|||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: generate-actions-workflow
|
||||
|
||||
container: koalaman/shellcheck-alpine:v0.6.0
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: ShellCheck
|
||||
run: |
|
||||
shellcheck -s sh -f tty bootstrap-salt.sh
|
44
.github/workflows/templates/linux.yml
vendored
44
.github/workflows/templates/linux.yml
vendored
|
@ -1,44 +0,0 @@
|
|||
{python_version}-{bootstrap_type}-{branch}-{distro}:
|
||||
name: {display_name}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
needs: lint
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
|
||||
- name: Install Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
|
||||
- name: Setup Bundle
|
||||
run: |
|
||||
bundle install --with docker --without opennebula ec2 windows vagrant
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Container
|
||||
run: |
|
||||
bundle exec kitchen create {python_version}-{bootstrap_type}-{branch}-{distro} || bundle exec kitchen create {python_version}-{bootstrap_type}-{branch}-{distro}
|
||||
|
||||
- name: Test Bootstrap In Test Container
|
||||
run: |
|
||||
bundle exec kitchen verify {python_version}-{bootstrap_type}-{branch}-{distro}
|
||||
|
||||
- name: Destroy Test Container
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy {python_version}-{bootstrap_type}-{branch}-{distro}
|
10
.github/workflows/templates/main.yml
vendored
10
.github/workflows/templates/main.yml
vendored
|
@ -1,10 +0,0 @@
|
|||
# DO NOT EDIT THIS FILE DIRECTLY!
|
||||
#
|
||||
# This file was generated by .github/workflows/templates/generate.py
|
||||
|
||||
name: Testing
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
{jobs}
|
20
.github/workflows/templates/pre-commit.yml
vendored
20
.github/workflows/templates/pre-commit.yml
vendored
|
@ -1,20 +0,0 @@
|
|||
generate-actions-workflow:
|
||||
name: Generate The Actions Workflow
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install Pre-Commit
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install pre-commit
|
||||
pre-commit install
|
||||
|
||||
- name: Generate Workflow Actions
|
||||
run: |
|
||||
pre-commit run -av generate-actions-workflow
|
99
.github/workflows/test-linux.yml
vendored
Normal file
99
.github/workflows/test-linux.yml
vendored
Normal file
|
@ -0,0 +1,99 @@
|
|||
name: Test Linux
|
||||
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
|
||||
|
||||
instances:
|
||||
type: string
|
||||
required: true
|
||||
description: The Instances To Test
|
||||
|
||||
container-slug:
|
||||
type: string
|
||||
required: true
|
||||
description: The Container Slug
|
||||
|
||||
timeout:
|
||||
type: number
|
||||
required: false
|
||||
default: 20
|
||||
|
||||
|
||||
jobs:
|
||||
Test:
|
||||
name: ${{ matrix.instance }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: ${{ inputs.timeout }}
|
||||
strategy:
|
||||
max-parallel: 2
|
||||
fail-fast: false
|
||||
matrix:
|
||||
instance: ${{ fromJSON(inputs.instances) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- 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_parm_ver=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
|
||||
echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
|
||||
|
||||
- name: "Pull container ${{ inputs.container-slug }}"
|
||||
run: |
|
||||
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: |
|
||||
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()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
path: exitstatus/
|
93
.github/workflows/test-macos.yml
vendored
Normal file
93
.github/workflows/test-macos.yml
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
name: Test MacOS
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
jobs:
|
||||
Test:
|
||||
name: ${{ matrix.instance }}
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
## runs-on: macos-13
|
||||
timeout-minutes: ${{ inputs.timeout }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
instance: ${{ fromJSON(inputs.instances) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python Dependencies with pip breakage
|
||||
if: ${{ inputs.distro-slug != 'macos-13' }}
|
||||
run: |
|
||||
python3 -m pip install --break-system-packages -r tests/requirements.txt
|
||||
|
||||
- name: Install Python Dependencies without pip breakage
|
||||
if: ${{ inputs.distro-slug == 'macos-13' }}
|
||||
run: |
|
||||
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: |
|
||||
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
||||
|
||||
- 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@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
path: exitstatus/
|
89
.github/workflows/test-windows.yml
vendored
Normal file
89
.github/workflows/test-windows.yml
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
name: Test Windows
|
||||
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 Windows Worker To Run Workflow On
|
||||
|
||||
instances:
|
||||
type: string
|
||||
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
|
||||
|
||||
jobs:
|
||||
Test:
|
||||
name: ${{ matrix.instance }}
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: ${{ inputs.timeout }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
instance: ${{ fromJSON(inputs.instances) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
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
|
||||
$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: |
|
||||
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
||||
|
||||
- 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@v4
|
||||
with:
|
||||
name: exitstatus-${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
path: exitstatus/
|
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -1,11 +1,10 @@
|
|||
/.project
|
||||
*.sw?
|
||||
*.un~
|
||||
.vagrant
|
||||
*__pycache__
|
||||
tools
|
||||
venv
|
||||
|
||||
# Pycharm
|
||||
.idea
|
||||
|
||||
# test-kitchen
|
||||
.kitchen
|
||||
.bundle
|
||||
Gemfile.lock
|
||||
|
|
235
.kitchen.yml
235
.kitchen.yml
|
@ -1,235 +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
|
||||
|
||||
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: amazon-1
|
||||
driver_config:
|
||||
image: amazonlinux:1
|
||||
platform: rhel
|
||||
run_command: /sbin/init
|
||||
provision_command:
|
||||
- yum install -y upstart
|
||||
- name: amazon-2
|
||||
driver_config:
|
||||
image: amazonlinux:2
|
||||
platform: rhel
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- yum -y install procps-ng
|
||||
- name: arch
|
||||
driver_config:
|
||||
image: archlinux/base
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- pacman -Syu --noconfirm --needed systemd grep awk procps which
|
||||
- systemctl enable sshd
|
||||
provisioner:
|
||||
salt_bootstrap_options: -MPfq -D -y -x python2 git %s
|
||||
- name: centos-8
|
||||
driver_config:
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
- name: centos-7
|
||||
driver_config:
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
- name: centos-6
|
||||
driver_config:
|
||||
run_command: /sbin/init
|
||||
provision_command:
|
||||
- yum install -y upstart
|
||||
provisioner:
|
||||
salt_bootstrap_options: -MPfq -y -x python2.7 git %s
|
||||
- name: debian-8
|
||||
driver_config:
|
||||
run_command: /lib/systemd/systemd
|
||||
provision_command:
|
||||
- apt-get install -y dbus
|
||||
- name: debian-9
|
||||
driver_config:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: debian-10
|
||||
driver_config:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: fedora-30
|
||||
driver_config:
|
||||
image: fedora:30
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- dnf -y install procps-ng
|
||||
- name: fedora-31
|
||||
driver_config:
|
||||
image: fedora:31
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- dnf -y install procps-ng
|
||||
- name: fedora-32
|
||||
driver_config:
|
||||
image: fedora:32
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- dnf -y install procps-ng
|
||||
- name: opensuse-15
|
||||
driver_config:
|
||||
image: opensuse/leap:15.1
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provision_command:
|
||||
- zypper --non-interactive install --auto-agree-with-licenses dbus-1
|
||||
- zypper --non-interactive install --auto-agree-with-licenses sudo openssh which curl
|
||||
- systemctl enable sshd.service
|
||||
provisioner:
|
||||
salt_bootstrap_options: -MPfq -y -x python2 git %s
|
||||
- name: ubuntu-18.04
|
||||
driver_config:
|
||||
run_command: /lib/systemd/systemd
|
||||
- name: ubuntu-16.04
|
||||
driver_config:
|
||||
run_command: /lib/systemd/systemd
|
||||
|
||||
suites:
|
||||
- name: py2-git-2018-3
|
||||
provisioner:
|
||||
salt_version: 2018.3
|
||||
- name: py2-git-2019-2
|
||||
provisioner:
|
||||
salt_version: 2019.2
|
||||
- name: py2-git-3000
|
||||
provisioner:
|
||||
salt_version: 3000
|
||||
- name: py2-git-master
|
||||
provisioner:
|
||||
salt_version: master
|
||||
- name: py2-stable-2018-3
|
||||
provisioner:
|
||||
salt_version: 2018.3
|
||||
salt_bootstrap_options: -MP stable %s
|
||||
excludes:
|
||||
- arch
|
||||
- opensuse-15
|
||||
- fedora-30
|
||||
- fedora-31
|
||||
- fedora-32
|
||||
- name: py2-stable-2019-2
|
||||
provisioner:
|
||||
salt_version: 2019.2
|
||||
salt_bootstrap_options: -MP stable %s
|
||||
excludes:
|
||||
- arch
|
||||
- opensuse-15
|
||||
- fedora-30
|
||||
- fedora-31
|
||||
- fedora-32
|
||||
- name: py2-stable-3000
|
||||
provisioner:
|
||||
salt_version: 3000
|
||||
salt_bootstrap_options: -MP stable %s
|
||||
excludes:
|
||||
- arch
|
||||
- opensuse-15
|
||||
- fedora-30
|
||||
- fedora-31
|
||||
- fedora-32
|
||||
|
||||
- name: py3-git-2018-3
|
||||
provisioner:
|
||||
salt_version: 2018.3
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- amazon-1
|
||||
- centos-6
|
||||
- debian-8
|
||||
- amazon-2
|
||||
- name: py3-git-3000
|
||||
provisioner:
|
||||
salt_version: 3000
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- arch
|
||||
- amazon-1
|
||||
- centos-6
|
||||
- debian-8
|
||||
- name: py3-git-2019-2
|
||||
provisioner:
|
||||
salt_version: 2019.2
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- amazon-1
|
||||
- centos-6
|
||||
- debian-8
|
||||
- name: py3-stable-2018-3
|
||||
provisioner:
|
||||
salt_version: 2018.3
|
||||
salt_bootstrap_options: -x python3 -MP stable %s
|
||||
excludes:
|
||||
- amazon-1
|
||||
- centos-6
|
||||
- debian-8
|
||||
- opensuse-15
|
||||
- amazon-2
|
||||
- name: py3-stable-2019-2
|
||||
provisioner:
|
||||
salt_version: 2019.2
|
||||
salt_bootstrap_options: -x python3 -MP stable %s
|
||||
excludes:
|
||||
- amazon-1
|
||||
- centos-6
|
||||
- debian-8
|
||||
- opensuse-15
|
||||
- arch
|
||||
- name: py3-stable-3000
|
||||
provisioner:
|
||||
salt_version: 3000
|
||||
salt_bootstrap_options: -x python3 -MP stable %s
|
||||
excludes:
|
||||
- amazon-1
|
||||
- centos-6
|
||||
- debian-8
|
||||
- opensuse-15
|
||||
- arch
|
||||
- name: py3-git-master
|
||||
provisioner:
|
||||
salt_version: master
|
||||
salt_bootstrap_options: -x python3 -MPfq -D git %s
|
||||
excludes:
|
||||
- arch
|
||||
- amazon-1
|
||||
- centos-6
|
||||
- debian-8
|
||||
- fedora-32
|
||||
- opensuse-15
|
||||
|
||||
- name: latest
|
||||
provisioner:
|
||||
salt_version: latest
|
||||
salt_bootstrap_options: -MP stable %s
|
||||
excludes:
|
||||
- arch
|
||||
|
||||
verifier:
|
||||
name: shell
|
||||
remote_exec: false
|
||||
command: pytest --cache-clear -v tests/integration/
|
|
@ -2,7 +2,7 @@
|
|||
minimum_pre_commit_version: 1.15.2
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.1.0
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: check-merge-conflict # Check for files that contain merge conflict strings.
|
||||
- id: trailing-whitespace # Trims trailing whitespace.
|
||||
|
@ -11,17 +11,89 @@ repos:
|
|||
args: [--fix=lf]
|
||||
- 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.17
|
||||
hooks:
|
||||
- id: mdformat
|
||||
|
||||
- repo: https://github.com/s0undt3ch/python-tools-scripts
|
||||
rev: "0.18.6"
|
||||
hooks:
|
||||
- id: tools
|
||||
alias: actionlint
|
||||
name: Lint GitHub Actions Workflows
|
||||
files: "^.github/workflows/"
|
||||
types:
|
||||
- yaml
|
||||
args:
|
||||
- pre-commit
|
||||
- actionlint
|
||||
|
||||
- repo: https://github.com/jazzband/pip-tools
|
||||
rev: 7.4.1
|
||||
hooks:
|
||||
- id: pip-compile
|
||||
files: ^requirements/release\.(in|txt)$
|
||||
args:
|
||||
- requirements/release.in
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.15.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
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.12.0
|
||||
hooks:
|
||||
- id: reorder-python-imports
|
||||
args: [--py310-plus]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 24.10.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: []
|
||||
|
||||
# - repo: https://github.com/PyCQA/flake8
|
||||
# rev: 3.9.2
|
||||
# hooks:
|
||||
# - id: flake8
|
||||
# language_version: python3
|
||||
# additional_dependencies:
|
||||
# - flake8-mypy-fork
|
||||
# - flake8-docstrings
|
||||
# - flake8-typing-imports
|
||||
#
|
||||
# - repo: https://github.com/pre-commit/mirrors-mypy
|
||||
# rev: v1.0.0
|
||||
# hooks:
|
||||
# - id: mypy
|
||||
# alias: mypy-tools
|
||||
# name: Run mypy against tools
|
||||
# files: ^tools/.*\.py$
|
||||
# #args: [--strict]
|
||||
# additional_dependencies:
|
||||
# - attrs
|
||||
# - rich
|
||||
# - types-attrs
|
||||
# - types-pyyaml
|
||||
# - types-requests
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: generate-actions-workflow
|
||||
name: Generate Github Actions Workflow
|
||||
entry: .github/workflows/templates/generate.py
|
||||
pass_filenames: false
|
||||
files: '.github/workflows/templates/.*'
|
||||
files: '^.github/workflows/.*$'
|
||||
language: script
|
||||
|
||||
- id: shellcheck
|
||||
name: Run ShellCheck against bootstrap-salt.sh
|
||||
entry: koalaman/shellcheck-alpine:v0.6.0 shellcheck -s sh -f tty
|
||||
entry: koalaman/shellcheck-alpine:v0.7.0 shellcheck -s sh -f tty
|
||||
files: 'bootstrap-salt\.sh'
|
||||
language: docker_image
|
||||
|
|
26
AUTHORS.rst
26
AUTHORS.rst
|
@ -1,5 +1,11 @@
|
|||
This authors list is kept for historical purposes
|
||||
=================================================
|
||||
|
||||
Feel free to add yourself to this list, but for a full list of contributors,
|
||||
`check here <https://github.com/saltstack/salt-bootstrap/graphs/contributors>`_.
|
||||
|
||||
Authors
|
||||
=======
|
||||
-------
|
||||
|
||||
Here's a list of everyone who contributed to salt-bootstrap in alphabetical
|
||||
order.
|
||||
|
@ -20,6 +26,7 @@ Andrew Dean ndrwdn ndrwdn@gmail.com
|
|||
Andy Boff caelor github@plek.me.uk
|
||||
Angelo Gründler plueschopath angelo.gruendler@w1r3.net
|
||||
Ari Aosved devaos ari.aosved@gmail.com
|
||||
Ari Maniatis ari ari@ish.com.au
|
||||
Ashok Raja R ashokrajar ashokrajar@users.noreply.github.com
|
||||
Beau Hargis beaucephus beau@customermobile.com
|
||||
Benjamin Drung bdrung bdrung@debian.org
|
||||
|
@ -30,7 +37,7 @@ Brandon Clifford brandon099 brandon.clifford@vivint.com
|
|||
Bret Fisher BretFisher bret@fishbrains.com
|
||||
Brian Kruger bkruger99 brian.kruger@elliemae.com
|
||||
bruce-one bruce-one
|
||||
Bryce Larson bryceml
|
||||
Bryce Larson bryceml brycel@vmware.com
|
||||
C. R. Oldham cro cr@saltstack.com
|
||||
Cam camereonsparr
|
||||
Charles McLaughlin cmclaughlin
|
||||
|
@ -45,11 +52,14 @@ Dan Mick dmick dan.mick@inktank.com
|
|||
Daniel Poelzleithner poelzi
|
||||
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
|
||||
Diego Woitasen diegows diego@flugel.it
|
||||
Dmitry Kuzmenko DmitryKuzmenko dmitry.kuzmenko@dsr-corporation.com
|
||||
EHJ-52n EHJ-52n EHJ-52n@users.noreply.github.com
|
||||
ek9 ek9
|
||||
Elias Probst eliasp
|
||||
|
@ -68,29 +78,38 @@ gdm85 gdm85
|
|||
Geoff Garside geoffgarside geoff@geoffgarside.co.uk
|
||||
George aflat gstock.public@gmail.com
|
||||
ggillies ggillies
|
||||
Gilles Debunne gdebunne
|
||||
Giuseppe Iannello giannello giuseppe.iannello@brokenloop.net
|
||||
Gregory Meno GregMeno gregory.meno@inktank.com
|
||||
Guillaume Derval GuillaumeDerval guillaume@guillaumederval.be
|
||||
gweis gweis
|
||||
Henrik Holmboe holmboe
|
||||
Howard Mei HowardMei howardleomei@gmail.com
|
||||
Ivo Jánský ijansky
|
||||
Imran Iqbal myii
|
||||
James Booth absolutejam vvalentine1337@gmail.com
|
||||
Jamie Alessio jalessio jamie@stoic.net
|
||||
Jan Heidbrink jheidbrink
|
||||
Jared Bristow jars99
|
||||
Jared E Stroud jaredestroud jaredestroud@gmail.com
|
||||
Jasper Lievisse Adriaanse jasperla jasper@humppa.nl
|
||||
Jaydeep jay1648
|
||||
JD decomposite
|
||||
Jeff Hui jeffh jeff@jeffhui.net
|
||||
Jeff Strunk jstrunk
|
||||
John Hubbard ender8282 ender8282@gmail.com
|
||||
Jorge Schrauwen sjorge sjorge@blackdot.be
|
||||
Joseph Pacura jpacura
|
||||
Juan A. Moyano wincus wincus.public@gmail.com
|
||||
Justin Anderson justinta justin.ta@outlook.com
|
||||
Justin Findlay jfindlay jfindlay@gmail.com
|
||||
kgbsd
|
||||
Karl Grzeszczak karlgrz
|
||||
Ken Crowell oeuftete kcrowell@saltstack.com
|
||||
Kenneth Wilke KennethWilke
|
||||
Kevin Quinn kevinquinnyo kevin.quinn@totalserversolutions.com
|
||||
kiemlicz kiemlicz
|
||||
Kirill Ponomarev krionbsd krion@freebsd.org
|
||||
Ky-Anh Huynh icy
|
||||
Liu Xiaohui oreh herolxh@gmail.com
|
||||
lomeroe lomeroe
|
||||
|
@ -109,6 +128,7 @@ Matthew Mead-Briggs mattmb
|
|||
Matthew Richardson mrichar1
|
||||
Matthew Willson ixela
|
||||
Matthieu Guegan mguegan
|
||||
Max Arnold max-arnold
|
||||
Megan Wilhite Ch3LL megan.wilhite@gmail.com
|
||||
mfapouw mfapouw
|
||||
Michael A. Smith kojiromike michaels@syapse.com
|
||||
|
@ -122,6 +142,7 @@ nevins-b nevins-b
|
|||
Nicholas Henry nshenry03 nshenry03@gmail.com
|
||||
Nicole Thomas rallytime nicole@saltstack.com
|
||||
Niels Abspoel aboe76 aboe76@gmail.com
|
||||
Nikita mbochenk
|
||||
Nitin Madhok nmadhok nmadhok@clemson.edu
|
||||
panticz panticz
|
||||
Paul Brian lifeisstillgood paul@mikadosoftware.com
|
||||
|
@ -157,6 +178,7 @@ stanzgy stanzgy stanzgy@gmail.com
|
|||
Steve Groesz wolfpackmars2 wolfpackmars2@yahoo.com
|
||||
Sven R hackacad admin@hackacad.net
|
||||
sybix sybix
|
||||
Tai Groot taigrr tai@taigrr.com
|
||||
Tate Eskew tateeskew
|
||||
Thomas S. Hatch thatch45 thatch45@saltstack.com
|
||||
Tobias Jungel toanju Tobias.Jungel@gmail.com
|
||||
|
|
1346
CHANGELOG.md
Normal file
1346
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load diff
175
CONTRIBUTING.md
175
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 develop
|
||||
```
|
||||
```
|
||||
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,10 +163,10 @@ 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.saltstack.com` with the new stable release. The checksum on the
|
||||
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)
|
||||
should also be updated.
|
||||
1. Merge the new stable release into [Salt](https://github.com/saltstack/salt).
|
||||
|
@ -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**
|
||||
|
||||
|
|
790
ChangeLog
790
ChangeLog
|
@ -1,790 +0,0 @@
|
|||
Version TBD (In Progress on the Develop Branch):
|
||||
|
||||
Version 2020.02.24:
|
||||
* Fix SLES 15 install (max298) #1431
|
||||
* Fix 3000(Neon) stable install (sblaisot) #1433
|
||||
* Fix Amazon Linux Py3 install (s0undt3ch) #1434
|
||||
|
||||
Version 2020.02.04:
|
||||
* Add support for the Salt Neon(3000) release (s0undt3ch) #1424
|
||||
* Drop support for Fedora < 30 (s0undt3ch) #1424
|
||||
* Drop support for Debian < 8 (s0undt3ch) #1424
|
||||
|
||||
Version 2020.01.29:
|
||||
* FreeBSD fixes (cedwards) #1413
|
||||
* Support the upcoming Neon release (s0undt3ch) #1420
|
||||
|
||||
Version 2020.01.21:
|
||||
* FreeBSD fixes (kgbsd) #1376
|
||||
* Fix macOS support (s0undt3ch) #1397
|
||||
|
||||
Version 2019.11.04:
|
||||
* Fix busybox mktemp compatibility (stanzgy) #1369
|
||||
* Install debian 10 packages on debian 10 instead of 9 (kiemlicz) #1375
|
||||
* move centos to python36, use python specified by -x (Ch3LL,bryceml) #1380
|
||||
* Add debian 10 git install support (Ch3LL) #1378
|
||||
|
||||
Version 2019.10.03:
|
||||
* Fix possible typo with `gnupg-curl` vs `gnupg curl` (zahiar)
|
||||
* Install only python3 packges if requested on ubuntu (noelmcloughlin) #1356
|
||||
* Fixing debian wheezy (bryceml) #1359
|
||||
* Fixed Amazon Linux 2 detection when lsb_release is installed (jars99) #1361
|
||||
* Mac OS Support (felippeb) #1363 #1364 #1365 #1366
|
||||
|
||||
Version 2019.05.20:
|
||||
* Allow stable version selection for amazon linux (puluanau) #1328
|
||||
* FreeBSD 12 support (sticky-note) #1329
|
||||
* Apt wait for lock modification (ripesensor) #1335
|
||||
* Opensuse 15 Git installation fixes (s0undt3ch) #1340 #1341
|
||||
* Amazon Linux Image fixes (nshenry03) #1343
|
||||
* apt_key_fetch fixes (greut) #1344
|
||||
* CentOS Git and PIP installation m2crypto fixes (s0undt3ch) #1347
|
||||
* CI process enhancements/fixes (s0undt3ch) #1347
|
||||
|
||||
Version 2019.02.27:
|
||||
* Add support for bunsenlabs devian derivative (kevinquinnyo) #1300
|
||||
* Add support for TurnKey devian derivative (dafyddj) #1313
|
||||
* Fix BSD develop install (hackacad) #1316
|
||||
* Ensure python-concurrent.futures is installed for Ubuntu (garethgreenaway) #1321
|
||||
|
||||
Version 2019.01.08:
|
||||
* use official amazon linux 2 repo for amazon linux 2 (mchugh19) #1287
|
||||
* Add release info to applicable docs (rallytime) #1292
|
||||
* Modify wait_for_apt function (ripesensor) #1291
|
||||
* Add support for LinuxMint 19 (darkocerdic) #1289
|
||||
* FIX #1237 SmartOS should use pkgin show-deps (sjorge) #1283
|
||||
* Fedora: Reduce DNF calls to 2 during install_dep phase (The-Loeki) #1278
|
||||
|
||||
Version 2018.08.15:
|
||||
* Add tests using kitchen-salt (gtmanfred) #1279
|
||||
* Add python-futures to Py2 installs (gtmanfred) #1279
|
||||
|
||||
Version 2018.08.13:
|
||||
* Fedora Py3 fixes (The-Loeki) #1273
|
||||
* Handle commented lines in the requirements files for pip pkgs (rallytime) #1271
|
||||
* Remove typo: extra 'c' was accidentally added in #1269 (rallytime) #1270
|
||||
* [Arch] Add python2-futures to list of pkgs on git install (rallytime) #1269
|
||||
* Fix undefined variable warn_msg on amd64 (alexandruavadanii) #1268
|
||||
* SLES12SP changed packages git to git-core and libzmq3 to libzmq4 (mfapouw) #1266
|
||||
* Add opensuse 15 specific installation functions (rallytime) #1263
|
||||
* Remove support for openSUSE Leap 42.2 (rallytime) #1262
|
||||
* Remove support for Fedora 26 (rallytime) #1261
|
||||
* Remove support for Ubuntu 17.10 (rallytime) #1260
|
||||
* Ensure pipe is absent before mkfifo/mknod (noelmcloughlin) #1256
|
||||
* fix for opensuse15 if no lsb_release pkg (noelmcloughlin) #1255
|
||||
* Fix Up ShellCheck errors/warnings for latest version of shellcheck (rallytime) #1253
|
||||
* Remove daily install option on Ubuntu system (icy) #1250
|
||||
* Add python 3 support for Ubuntu 18 (rallytime) #1248
|
||||
* Return immediately if apt-get fails (icy) #1247
|
||||
* Disable shell error about unbound variable during daily install (icy) #1246
|
||||
* OpenSuse_Leap_15.0 saltstack repo support (noelmcloughlin) #1244
|
||||
* Add Python3 package support for Debian 9 (rallytime) #1243
|
||||
* Add Python3 package support for CentOS 7 (rallytime) #1242
|
||||
* Shellcheck fixes found when running latest version (rallytime) #1239
|
||||
* Add Python3 package support for Ubuntu 16.04 (rallytime) #1238
|
||||
* Fix the variable ref from #803 (rallytime) #1229
|
||||
* Add Ubuntu 18.04 support (rallytime) #1228
|
||||
* Call __git_clone_and_checkout directly (jheidbrink) #1226
|
||||
* Fix for silently ignored version argument on CentOS/RHEL (pjcreath) #1210
|
||||
|
||||
Version 2018.04.25:
|
||||
* Install py-tornado4 for FreeBSD. (abednarik) #1219
|
||||
* Remove COPR repos configuration for Fedora (vutny ) #1211
|
||||
* Fix for silently ignored version argument on CentOS/RHEL (pjcreath) #1210
|
||||
* Use integer parameter for sleep command (bdrung) #1205
|
||||
* Add 2018.3 branch to list of stable options (rallytime) #1204
|
||||
* If installing with -P, install tornado<5.0. (rallytime) #1203
|
||||
* Add M2Crypto to python27 centos 6 bootstrap install (Ch3LL) #1201
|
||||
* Update README to include mention of bootstrap-salt.ps1 for Windows (rallytime) #1200
|
||||
* Port spelling fixes from change in Salt to Bootstrap (rallytime) #1199
|
||||
* Add M2Crypto package back to git install functions (rallytime) #1198
|
||||
* OpenBSD has a cdn which handles selecting the best mirror (jasperla) #1197
|
||||
* Change gnupg2 pacakge to gnupg for non-LTS versions of Ubuntu (rallytime) #1196
|
||||
* Install swig30 as freebsd dep instead of swig. (abednarik) #1191
|
||||
* make salt-syndic optional on salt bootstrap (sybix) #1190
|
||||
* Add __wait_for_apt function: avoid locking on the apt-get process (rallytime) #1186
|
||||
* Update the README.rst file with some grammatical changes (rallytime) #1185
|
||||
* Update Fedora support: 25 is EOL, 27 is supported (rallytime) #1184
|
||||
* Add a note about the use of sudo when running commands to README (rallytime) #1183
|
||||
* Adding support for minor release pinning on AWS Linux (cmclaughlin) #1182
|
||||
* Wait for zypper processes to finish before calling zypper again (rallytime) #1181
|
||||
* only install ca-certificates on opensuse if it isn't already installed (gtmanfred) #1179
|
||||
|
||||
Version 2017.12.13:
|
||||
* Use HTTPS URL for OpenSuse's saltstack repo (gdm85) #1174
|
||||
* Respect disable repos (-r) option on OpenBSD (eradman) #1171
|
||||
* Fix #1168 : -b option causes error (vutny) #1170
|
||||
* Fix fatal error with using the -b option. (arizvisa) #1169
|
||||
* Devuan support (ymasson) #1165
|
||||
* Fix yum repo on AWS Linux (cmclaughlin) #1164
|
||||
* Use suse repo to install packages, rather than defining them (rallytime) #1157
|
||||
* Remove patch-level-1 specific code for SLES installs (rallytime) #1156
|
||||
* priority sort fedora-release (toanju) #1153
|
||||
* Declare EOL for SUSE Linux Enterprise Server releases (vutny) #1150
|
||||
* Fix #1142: allow git install on Raspbian 9 (vutny) #1146
|
||||
* Follow symlinks when parsing distro release files (vutny) #1145
|
||||
* fedora: use dnf-utils for F26 and above (toanju) #1144
|
||||
* Declare EOL for openSUSE LEAP 42.1 (vutny) #1143
|
||||
* Fix #1137: import GPG key through an HTTP(S) proxy (vutny) #1139
|
||||
* Fix #1138: git install on Debian/Ubuntu various arches (vutny) #1141
|
||||
* Declare EOL for openSUSE releases earlier and including 13.X (vutny) #1136
|
||||
* Update Fedora support: 24 is EOL (rallytime) #1134
|
||||
|
||||
Version 2017.08.17:
|
||||
* Add new authors (rallytime) #1130
|
||||
* README: Fix typo and Table of Contents for Debian section (vutny) #1129
|
||||
* Reduce the # of days an issue is stale to 6 months (rallytime) #1125
|
||||
* Only install Python version if "-y" is defined (rallytime) #1124
|
||||
* Allow powershell bootstrap script to specify PY2 or 3 (rallytime) #1123
|
||||
* Remove the test that checks if the EPEL RPM was installed (amendlik) #1122
|
||||
* added latest version string of nitrogen release 2017.7 (sourceindex) #1120
|
||||
* use versions specified in base.txt when doing pip installs (aflat) #1116
|
||||
* Remove pip install requirement on Fedora git installs (rallytime) #1114
|
||||
* Introductory support for Debian 10 (Buster) (rallytime) #1113
|
||||
* Add Debian 9 support using official repo.saltstack.com packages (rallytime) #1111
|
||||
* Fix 1105 (vernondcole) #1110
|
||||
* Move SUSE specific function closer to related code (vutny) #1107
|
||||
* Update Authors file (rallytime) #1103
|
||||
* Fix ubuntu 16.04 LTS installation (BlaineAtAffirm) #1102
|
||||
* Add debian_codename_translation function, similar to Ubuntu (rallytime) #1101
|
||||
* Add the CODE_OF_CONDUCT.md file (rallytime) #1100
|
||||
* Update Debian and Ubuntu service file paths to be consistent with salt (rallytime) #1099
|
||||
* Add hash verification information to installation instructions (rallytime) #1098
|
||||
* Fix installing salt-cloud package on Arch Linux (rallytime) #1097
|
||||
* Support bootstrapping on upcoming Debian GNU/Linux 9.0 (vutny) #1096
|
||||
* Removes faulty explicit version ordering (absolutejam) #1095
|
||||
* Remove configuring EPEL repo for Amazon Linux (vutny) #1093
|
||||
* Fix -j/-J (JSON configs) options for Debian 8 (vutny) #1092
|
||||
* Fix #1035: detect and log errors earlier (vutny) #1091
|
||||
* Update AUTHORS file (rallytime) #1089
|
||||
* Autounmask as separate step (decomposite) #1088
|
||||
* Ensure presence of CONFIG_PROTECT_MASK files (decomposite) #1087
|
||||
* Update Fedora support: 23 is EOL now. (rallytime) #1084
|
||||
* Fix the -R option on Debian/Ubuntu (rallytime) #1082
|
||||
* Declare End-Of-Life for Ubuntu 12.04 LTS (vutny) #1080
|
||||
|
||||
Version 2017.05.24:
|
||||
* Use freebsd repo to query for salt dependencies (Ch3LL) #1076
|
||||
* Allow amazon to work with python2.7 on installs over 2016.11 (Ch3LL) #1073
|
||||
* ensure sles12 enables services with stable installs (Ch3LL) #1075
|
||||
* Declare End-of-Life for RHEL 5 and its variants (vutny) #1070
|
||||
* Fix configuring SaltStack's repo URL for RHEL variants (vutny) #1068
|
||||
* Add Manjaro as Arch derivative (luthes) #1063
|
||||
* Add "unmarkComment" option to probot-stale config (rallytime) #1064
|
||||
* Properly detect all supported Debian GNU/Linux derivatives (vutny) #1062
|
||||
* Archlinux must always update (gtmanfred) #1060
|
||||
* Alpine: fix adding, checking and running Salt Syndic in stable mode (vutny) #1059
|
||||
* Add KDE neon... (EHJ-52n) #1058
|
||||
* Update probot-stale message formatting. (rallytime) #1057
|
||||
* Fix `git` bootstrap mode for CentOS (vutny) #1054
|
||||
* update install_freebsd_10_stable to use FreeBSD repo (bytesatwork-xx) #1053
|
||||
* Support OpenBSD 6.1 (eradman) #1048
|
||||
* Update daysUntilStale value in probot-stale config (rallytime) #1055
|
||||
* Add ability to install and use a different python version when installing salt (Ch3LL) #1049
|
||||
* Add non-LTS type support for Ubuntu 17.04 (rallytime) #1051
|
||||
* Allow -R option to work for Debian/Ubuntu (rallytime) #1045
|
||||
* Adjust "daysUntilStale" variable to 190 days. #1047
|
||||
* Reduce the number of days an issue is considered "stale" (rallytime) #1046
|
||||
* Alpine: fix bootstrapping from Git -- install OpenRC initscripts (vutny) #1044
|
||||
* Add probot-stale config file (rallytime) #1042
|
||||
* Shallow cloning and Python setup fix for BSD (amontalban) #1040
|
||||
* Fix not needed quoting for salt/salt-bootstrap#1026 (amontalban) #1039
|
||||
* Update README file with supported release documentation (rallytime) #1034
|
||||
* Remove <<< bashism (The-Loeki) #1032
|
||||
* [-R option] Fix logic error where we trying to enable epel with -R (rallytime) #1033
|
||||
* Alpine: check Salt services have been enabled to start on boot (vutny) #1031
|
||||
* AWS Linux Native Support (bkruger99) #1022
|
||||
* Correct package name for FreeBSD installation (amontalban) #1030
|
||||
* README: describe architectures support for Salt deps on Linux distros (vutny) #1029
|
||||
* This commit addresses some of the issues in salt/salt-bootstrap#996 (amontalban) #1026
|
||||
* Add support for stable installation on Alpine Linux release 3.5 (vutny) #1028
|
||||
* Alpine Linux: fix installation of multiple pkgs ("stable" bootstrap) (vutny) #1027
|
||||
* Add Void Linux support (ndrwdn) #1025
|
||||
* RHEL6: disable stdin to fix shell session hang on killing tee pipe (vutny) #1018
|
||||
* Adding 2016.11 to stable version (ashokrajar) #1017
|
||||
* Update bootstrap-salt.sh (caelor) #1015
|
||||
* Alpine Linux support #1009 (ek9) #1010
|
||||
* Add Table of Contents in README (vutny) #1014
|
||||
|
||||
Version 2017.01.10:
|
||||
* Update AUTHORS.rst with new contributors (rallytime) #1011
|
||||
* fix bootstrap in Arch Linux by updating package name from salt-zmq to salt (ek9) #1007
|
||||
* Add python-systemd package to debian 8 git install (rallytime) #1003
|
||||
* Updated supported versions for Ubuntu: 12.04, 14.04, 16.04, and 16.10 (best effort) (rallytime) #1002
|
||||
* Add "yakkety" to ubuntu_codename_translation function (rallytime) #1001
|
||||
* Update supported versions for Fedora: 23, 24, and 25. (rallytime) #1000
|
||||
* Handle renaming of gnupg-curl to gnupg1-curl for Ubuntu 16.10 (marco-m) #998
|
||||
* fix systemctl path (dmitrievav) #997
|
||||
* Drop unnecessary workarounds (creating directories) for early releases (vutny) #995
|
||||
* Let's detect newly released Salt 2016.11 stable release (vutny) #994
|
||||
* Adjust code examples to use the actual bootstrap-salt.sh file name (rallytime) #993
|
||||
* Install TLS certs before cloning git repo via https (vutny) #991
|
||||
* Remove fix me comment and fix systemsmanagement link (rallytime) #990
|
||||
* Correct usage description about "config only" mode (vutny) #989
|
||||
* Fix overwriting Minion config from temporarily directory (vutny) #988
|
||||
* Configure Salt components after the dependencies installation (vutny) #987
|
||||
* Add CloudLinux support (rallytime) #986
|
||||
* Apply the insecure flag to git as well (cachedout) #981
|
||||
|
||||
Version 2016.10.25:
|
||||
* Update AUTHORS.rst with new contributors (rallytime) #978
|
||||
* Let's start detecting the upcoming Debian 9 (Stretch) (lhost) #975
|
||||
* FreeBSD: set _SALT_ETC_DIR directory to match ports (eradman) #970
|
||||
* Update OpenBSD 6.0+ provisioning (eradman) #969
|
||||
* adds supports for Cumulus Linux (plumbis) #967
|
||||
* Run "pip install -U futures" for SmartOS git install (rallytime) #966
|
||||
* Change /pkg/rpm/ to /pkg/deb/ in install_ubuntu_git_post func (rallytime) #965
|
||||
* SUSE: Refactor systemsmanagement_saltstack repo checks to be DRY (rallytime) #964
|
||||
* Fix detection of EPEL repository with not-expired metadata (sp1r) #963
|
||||
* Display warning message about deprecating the `-G` option (vutny) #958
|
||||
* Allow correct salt paths to be used when -c is passed (justinta) #955
|
||||
* Fix issues with replacing configs when python3 is default in os. (fizmat) #954
|
||||
* Remove m2crypto package installs (rallytime) #951
|
||||
* Try to install SP4 packages on SLE 11 when SP version is older (rallytime) #950
|
||||
* Add python-futures package to install_centos_git_deps (rallytime) #948
|
||||
* Add /etc/portage/package.accept_keywords to CONFIG_PROTECT_MASK (rallytime) #947
|
||||
* Deprecate `-G` option: use `https` scheme for GitHub by default (vutny) #945
|
||||
* [SECURITY] Properly handle GnuPG keys for APT repositories (vutny) #940
|
||||
|
||||
Version 2016.08.16:
|
||||
* Ubuntu git mode: install all deps from SaltStack corp repo by default. (vutny) #936
|
||||
|
||||
Version 2016.08.15:
|
||||
* Remove chris-lea python-zmq repo. (rallytime) #929
|
||||
* Disable the '--enablerepo=${_EPEL_REPO}' part of yum install cmds when passing -R/-r. (rallytime) #928
|
||||
* Fix grep pattern in `__check_services_sysvinit`. (vutny) #927
|
||||
* Missing python dependency for salt-cloud added. (toanju) #925
|
||||
* Fix git install mode when using commit hash with `-g` option. (vutny) #922
|
||||
* Install `salt-cloud` package with `-L` option in `stable` mode. (vutny) #919
|
||||
* Fix bootstrapping from Git on CentOS7 when `systemd` is not running. (vutny) #915
|
||||
|
||||
Version 2016.07.07:
|
||||
* Add new contributors to authors list. (rallytime) #910
|
||||
* Split up python-requests and python-msgpack packages for newer Fedora. (rallytime) #909
|
||||
* Fix typo in repository configuration for FreeBSD. (ekollof) #907
|
||||
* Make sure $STABLE_REV is set before setting up SaltStack repo. (rallytime) #906
|
||||
* Remove tests written question from template. (rallytime) #904
|
||||
* Adding support for Linux Mint 18 (based on Ubuntu 16.04). (eliezerlp) #902
|
||||
* Allow git installation for SLES 12. (rallytime) #903
|
||||
* Set repo_arch for raspberry pi installs. (mrichar1) #899
|
||||
* Change temporary directory for storing executable to C:\Windows\Temp. (themalkolm) #897
|
||||
* 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
|
||||
|
||||
Version 2016.06.27:
|
||||
* Fix race condition when doing one-liner bootstrap. (vutny) #889
|
||||
* Add space back in between 'install' and '--install'. (rallytime) #890
|
||||
|
||||
Version 2016.06.24:
|
||||
* Save invocation command and arguments into variables. (jfindlay) #885
|
||||
* Update the authors list with new contributors. (rallytime) #884
|
||||
* Add option to make setup.py install quiet. (nasenbaer13) #865
|
||||
* Fix lint. (jfindlay) #881
|
||||
* Add -R option to allow a custom repo URL. (rallytime) #877
|
||||
* Exclude path of script when called from another dir. (l2ol33rt) #871
|
||||
* Print invocation info. (jfindlay) #869
|
||||
* Always refresh the Arch Linux keyring if needed. (cachedout) #868
|
||||
* Ubuntu 16.04 LTS Xenial Support. (notpeter) #852
|
||||
* Install Salt packages from repo.saltstack.com on Debian 7 "Wheezy". (vutny) #864
|
||||
* Drop support for Debian 6 old-old-stable "squeeze": reached end-of-life. (vutny) #860
|
||||
* Removed ubuntu version restriction for apt-get update. (marccardinal) #859
|
||||
* Fix bootstrapping from git on Debian 8 by installing latest `tornado` via pip. (vutny) #828
|
||||
* Add the ability to override master and/or minion configs from CLI. (rallytime) #841
|
||||
* Don't sleep 11 seconds if the user allowed overwrite of config files. (poelzi) #832
|
||||
|
||||
Version 2016.05.11:
|
||||
* Only overwrite the minion config file if '-C' is passed. Otherwise, preserve it. (rallytime) #848
|
||||
|
||||
Version 2016.05.10:
|
||||
* Removed libzmq4 and forking-deamon-patch for Opensuse13. (jtand) #840
|
||||
* Ubuntu 12.04 needs to be updated before installing packages. (jtand) #829
|
||||
* Always download and install *latest* `epel-release` package on RHEL systems. (vutny) #825
|
||||
* Fix Amazon Linux EOL check. (vutny) #818
|
||||
|
||||
Version 2016.04.18:
|
||||
* Add support for openSUSE Leap. Thanks Roman Inflianskas(rominf). #693
|
||||
* Fix missing deps installation on Debian. Thanks Steve Groesz(wolfpackmars2). #699
|
||||
* Update SaltStack repo location and latest version for Windows. (brandon099) #711
|
||||
* Better EPEL repository detection on RHEL and CentOS. (vutny) #717
|
||||
* Fix git invocation fail when `man` command is not available. (vutny) #718
|
||||
* Fix `epel-release` package installation on CentOS/RHEL 5. (vutny) #719
|
||||
* Removed deprecated cli option. (abednarik) #705
|
||||
* Remove RHEL optional repo check and enable. (vutny) #720
|
||||
* Remove SaltStack COPR repository configuration for CentOS/RHEL5. (vutny) #721
|
||||
* Add opensuse_Tumbleweed support. (aboe76) #725
|
||||
* Sometimes bootstrap doesn't install zmq. (jtand) #726
|
||||
* Process -s (default sleep for service restarts) in bootstrap-salt.sh. (hipikat) #692
|
||||
* Minion keys and /etc/salt/minion should be overwritten on -C. (cro) #541
|
||||
* Fix for -C (_CONFIG_ONLY). (beaucephus) #544
|
||||
* Fix when using upstream tags. (The-Loeki) #564
|
||||
* COPR project moved. (rmohr) #738
|
||||
* Update license year range. (pra85) #743
|
||||
* Use POSIX-Compliant Command-Exists Test. (kojiromike) #741
|
||||
* Add -f option to force shallow cloning. (eyj) #660
|
||||
* add SLE 12 support, fix OpenSUSE support. (grep4linux) #748
|
||||
* Fix CentOS git setup.py syntax error upon installation. (The-Loeki) #746
|
||||
* Enable shallow cloning for version branches by default, not only tags. (vutny) #750
|
||||
* do not install copr repo on fedora 22+. (toanju) #751
|
||||
* Add support for pegged versions on YUM based OS'ses through repo.saltstack.com. (The-Loeki) #685
|
||||
* fix for FreeBSD 11 CURRENT install functions. (serge-p) #723
|
||||
* Don't add zypp repo if it already exists. (furlongm) #731
|
||||
* switch repositories for suse and sles fixes `#706`_. (aboe76) #734
|
||||
* Reformat and correct usage instructions. (vutny) #755
|
||||
* fixed missing repo for suse 12. (aboe76) #756
|
||||
* fix for Amazon Linux. (shawnbutts) #700
|
||||
* adding support for OpenBSD distribution. (serge-p) #722
|
||||
* fixing syntax errors. (beardedeagle) #760
|
||||
* Import CentOS 7 GPG key on RHEL for installing base dependencies from Salt corp repo. (vutny) #765
|
||||
* Fix multiple lint errors (shellcheck) and make some refactoring. (vutny) #768
|
||||
* Fix sleep time option to recognize a numeric argument. (vutny) #771
|
||||
* Update README. (vutny) #787
|
||||
* get tornado from pip on a fedora git install. (jfindlay) #785
|
||||
* Remove the Saltstack repo's alias. (cro) #794
|
||||
* Ability to change cache dir. (clarkperkins) #761
|
||||
* Add config_freebsd_salt func so freebsd puts cfgs in the right place. (ryanwalder) #779
|
||||
* Allow archive versions. (clarkperkins) #769
|
||||
* Lack of HTTPS for RPM packages. (jaredestroud) #783
|
||||
* Ability to change cache dir. (clarkperkins) #761
|
||||
* Bootstrap on Docker. (vutny) #793
|
||||
* add downstream pkg repo for SUSE. (jfindlay) #791
|
||||
* Fixed use of HTTP over HTTPS for anonscm.debian.org. (gdm85) #788
|
||||
* Bump Salt version to latest stable in PS bootstrap script for Windows. (vutny) #801
|
||||
* Add an -l option to switch https to http links. (rallytime) #795
|
||||
* Virtualenv support for Ubuntu. (l2ol33rt) #666
|
||||
* Lint. (jfindlay) #805
|
||||
* use portable command check. (jfindlay) #806
|
||||
* Update epel-release version number (RuriRyan) #809
|
||||
|
||||
|
||||
Version 2015.11.09
|
||||
* Make sure that wget is installed. #868
|
||||
|
||||
|
||||
Version 2015.11.04:
|
||||
* Allow bypassing dependencies installation. Thanks EYJ. #656.
|
||||
* Add FreeBSD 11 support. Thanks Chris Buechler(cbuechler). #653
|
||||
* Move RHEL installations to use repo.saltstack.com #674
|
||||
* Move Debian 8 installation to use repo.saltstack.com #674
|
||||
* Fix error finding python-jinja2 in RHEL 7. Thanks Rob Eden(hedinfaok). #654
|
||||
* Move Ubuntu 12 and 14 installations to use repo.saltstack.com #674
|
||||
* Move FreeBSD installations to use repo.saltstack.com #674
|
||||
* Use dnf on Fedora 22 and later. Thanks Michele Bologna (mbologna). #665
|
||||
|
||||
|
||||
Version 2015.08.06:
|
||||
* Fix python-requests installations for Ubuntu >= 14.04 LTS. #631, #632, #633
|
||||
* Install python-crypto from Chris Lea's PPA for Ubuntu < 14.04
|
||||
* Exit the git checkout directory before deleting it. Thanks Bret Fisher. #634
|
||||
* Use prefix /usr for centos git install. Thanks Stanislav B. #638
|
||||
* Drop Ubuntu EOL versions. All Ubuntu version before 12.04.
|
||||
* Make sure python-dev is installed wheb trying to install tornado from PyPi. #640
|
||||
|
||||
|
||||
Version 2015.07.22:
|
||||
* Fix tornado installation in Ubuntu. Thanks Yushi Nakai. #627
|
||||
* Install tornado using pip on Ubuntu for Salt's v2015.8.xx onward stable releases.
|
||||
* Install requests on Ubuntu from Chris Lea's PPA. #630
|
||||
|
||||
Version 2015.07.17:
|
||||
* Make sure setuptools is installed before using it. #598.
|
||||
* `systemd` is only fully supported from 15.04 onwards. #602
|
||||
* Fix debian mirrors issue. Thanks Wolodja Wentland(babilen). #606
|
||||
* Fix python-jinja2 repo move on RHEL6. Thanks lomeroe. #621
|
||||
* Allow skipping services. Thanks denmat. #455
|
||||
* Fix missing Debian init script. #607 saltstack/salt#25270 and saltstack/salt#25456
|
||||
* Fix SmartOS etc path. Thanks Bret Fisher. #624
|
||||
* Fix possible unbound variable in Gentoo. #625
|
||||
* Properly detect the git binary in SmartOS. #611
|
||||
|
||||
Version 2015.05.07:
|
||||
* Lower required requests version dependency. Use system requests package where possible.
|
||||
* Allow Ubuntu alternate ppas. Thanks Peter Tripp(notpeter). #563
|
||||
|
||||
Version 2015.05.04:
|
||||
* Fix the configuration path for FreeBSD. #567/#552. Thanks Ronald van Zantvoort(The-Loeki).
|
||||
+ Fix non grouping support in POSIX sed. Thanks Ronald van Zantvoort(The-Loeki).
|
||||
* Add Debian 8 support. Thanks Matt Black(mafrosis)
|
||||
* Improve Debian version parsing. Thanks Mark Lee(malept)
|
||||
* Make sure we update packages list one Chris Lea's PPA repository is added.
|
||||
* Hard code the Debian Squeeze backports to the DE mirror since the main repository is down.
|
||||
Thanks @panticz. #589.
|
||||
* Only install git if not already installed. #560
|
||||
* Fix openSUSE 13.2 where we need to pass --replaceflags. Thanks Roman Inflianskas(rominf).
|
||||
#504.
|
||||
* Make sure that a recent enough requests package is installed in Debian/Ubuntu.
|
||||
* Install tornado on git installs for the develop branch if necessary. #580
|
||||
* Add support for Ubuntu 15.04
|
||||
|
||||
Version 2015.03.15:
|
||||
* Add multi-master support. Thanks Fred Reimer(freimer). #555
|
||||
|
||||
Version 2015.03.04:
|
||||
* Fix the salt package selection on Arch stable installs.
|
||||
|
||||
Version 2015.02.28:
|
||||
* Fix Debian backports repository.
|
||||
|
||||
Version 2015.02.27:
|
||||
* Try other tools besides wget when downloading the COPR repo file. Thanks Ronald van
|
||||
Zantvoort(The-Loeki)
|
||||
* No need to install packages from the Unstable repository for debian, use backports. Thanks
|
||||
Ari Aosved(devaos)
|
||||
* Fix an issue in CentOS where the syndic package wasn't being installed(since it's now a
|
||||
separate package). Thanks Ronald van Zantvoort(The-Loeki)
|
||||
* Enable the server-optionals repository for RHEL >= 7
|
||||
* RHEL/CentOS 5 now uses the COPR repository. #533
|
||||
|
||||
Version 2015.01.12:
|
||||
* Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl).
|
||||
* Make sure wget is installed on debian bare systems.
|
||||
* Make sure the Arch pacman database is up to date
|
||||
* Install `python-hashlib` in CentOS 5 in order to use the COPR repository
|
||||
|
||||
Version 2014.12.11:
|
||||
* Enable binary installations on CentOS 7. Thanks ggillies
|
||||
* Updated the URL for EPEL 7
|
||||
|
||||
Version 2014.10.30:
|
||||
* Apply the forking patch to openSUSE git installations.
|
||||
|
||||
Version 2014.10.28:
|
||||
* Install the python systemd bindings for Arch and Fedora git installations
|
||||
* Allow cloning from Salt's git repository using HTTPS. #475
|
||||
|
||||
Version 2014.10.21:
|
||||
* Fix path to python on FreeBSD. Thanks Pavel Snagovsky(paha)
|
||||
* Fix syndic installation on RHEL based installations. Thanks markgaylard
|
||||
* Properly detect the git checkout `basename` directory instead of hard coding it. Thanks
|
||||
Howard Mei(HowardMei).
|
||||
* Allow installing ZMQ for SaltStack's COPR repository.
|
||||
* Allow installing ZMQ4/PyZMQ14 from Chris Lea's PPA repository.
|
||||
|
||||
Version 2014.10.14:
|
||||
* Fixed a regex issue with matching Salt's tags. Match v2014.7 but not 2014.7 as a valid tag
|
||||
* Distro Support Added:
|
||||
* Added Linux Mint 17 support(Thanks Skyler Berg)
|
||||
* Disrto Suuport Fixed:
|
||||
* Init pacman keys if not done so previously
|
||||
|
||||
Version 2014.09.25:
|
||||
* Properly detect Amazon AMI's >= 2014.9. #468
|
||||
|
||||
Version 2014.09.09:
|
||||
* Distro Support Fixes:
|
||||
* Updated the URL for EPEL 7
|
||||
* PIP based installations on Ubuntu 10.04 need setuptools installed
|
||||
* Arch stopped providing the version information on `/etc/arch-release`
|
||||
* Complete `salt-api` services checking. #450
|
||||
|
||||
Version 2014.08.30:
|
||||
* Skip service checks for `salt-api`, since this should be an opt-in service not necessarily
|
||||
meant to start at boot time.
|
||||
* Distro Support Fixes:
|
||||
* Also install the salt-api service on RHEL based distributions for git based
|
||||
installations.
|
||||
* Properly detect Arch Linux when lsb-release is available
|
||||
* Updated the URL for EPEL 7
|
||||
|
||||
Version 2014.08.23:
|
||||
* Avoid redirect breakage when installing EPEL with rpm on RHEL 5
|
||||
* Ensure python-apt is installed by the bootstrap script for Debian & Ubuntu minions. Thanks
|
||||
@garethgreenaway.
|
||||
* Don't shallow clone on git versions lower than 1.7.10
|
||||
* Only shallow clone on git tag based installations
|
||||
* Configurable Salt repository clone directory for git based installations
|
||||
* Distro Support Fixed:
|
||||
* Fixed the URL to download EPEL for Cent 5
|
||||
* Use the full path to the `chkconfig` binary when checking for services in SysV init
|
||||
systems.
|
||||
* Fixed an issue where the default sleep period(3 secs) on Ubuntu would cause a race
|
||||
condition with upstart wherein the package installation would call an upstart start and
|
||||
before it could complete, bootstrap would call another. The result was *two* copies of salt
|
||||
running which ended up causing a most stubborn bug that's documented in
|
||||
https://github.com/saltstack/salt/issues/12248
|
||||
|
||||
Version 2014.07.29:
|
||||
* Shallow clone Salt's repository for speed improvements. In case of failure, resume old
|
||||
behaviour.
|
||||
* Fixed bug introduced in 0577622 when salt-api service install and checks were added
|
||||
* Distro Support Fixed:
|
||||
* Fixed infinite loop when handling RHEL dependencies. Thanks Dan Mick(@dmick).
|
||||
|
||||
Version 2014.07.27:
|
||||
* Amazon Linux AMI 2010.xx is not explicitly not supported.
|
||||
* Install the `salt-api` scripts if available when the `salt-master` is also installed.
|
||||
* Added support for a configurable sleep time when starting, restarting and checking for
|
||||
enabled services.
|
||||
* Drop the `tsflags` requirement for RHEL and RHEL based distributions.
|
||||
* When sorting release files, oracle-release has higher priority than redhat-release.
|
||||
* Distro Support Fixed:
|
||||
* Debian >= 7 uses system's python-requests package, not PIP
|
||||
* Install 'python-zypp' in SuSE and openSUSE(required by Salt's zypper module)
|
||||
* Only install EPEL on requiring distributions if not already installed
|
||||
* CentOS 7 now uses systemd and the script now properly handles it
|
||||
* systemd in openSUSE 12.2 complains if service does not contain `.service``
|
||||
* Properly detect openSUSE using `lsb_release
|
||||
* SLES 11 SP3 ships with both python-M2Crypto-0.22.* and python-m2crypto-0.21 and we will
|
||||
be asked which we want to install, even with --non-interactive. Let's try to install the
|
||||
higher version first and then the lower one in case of failure.
|
||||
* Allow some extra time on RHEL for the optionals repo check in case the repository
|
||||
subscription is being managed externally.
|
||||
|
||||
Version 2014.06.30:
|
||||
* Distro Support Fixed:
|
||||
* Bump build/maintenance version for epel-release package. Thanks Gregory Meno(GregMeno)
|
||||
* Properly detect Amazon Linux AMI when using `lsb_release`
|
||||
* Fix `tsflags` installation.
|
||||
|
||||
Version 2014.06.28:
|
||||
* Fixed `tsflags` packages detection for RHEL and Oracle Linux 6.5
|
||||
|
||||
Version 2014.06.21:
|
||||
* Also export the HTTPS proxy environment variable. Thanks Giuseppe Iannello(gianello).
|
||||
* Distro Support Fixed:
|
||||
* Improve Oracle Linux Server detection
|
||||
* Overcome the Oracle Linux awkwardness. `--enablerepo=XYX` disables ALL OTHER REPOS!!!!
|
||||
* Oracle Linux also support testing repositories installation
|
||||
|
||||
Version 2014.06.19:
|
||||
* Allow passing the master address as an environment variable, `BS_SALT_MASTER_ADDRESS`
|
||||
* Fixed an issue with the keys pre-seed. We were passing absolute paths where we only needed
|
||||
basenames.
|
||||
* Added HTTP proxy configuration support. Thanks Giuseppe Iannello(gianello),
|
||||
* Distro Support Added:
|
||||
* Elementary OS
|
||||
* RHEL 7 Beta/RC
|
||||
* Kali Linux. Thanks Valentin Bud(valentinbud)
|
||||
* Distro Support Fixed:
|
||||
* Improved RHEL optionals repository detection
|
||||
|
||||
Version 2014.04.16:
|
||||
* Fixed a bug for RHEL 6 based distributions where yum-utils was not getting installed.
|
||||
* Added minor version check for RHEL 6 optional channel.
|
||||
* Added quotes around "apache-libcloud>=$_LIBCLOUD_MIN_VERSION" for proper version requirements
|
||||
handling.
|
||||
* Install the python 'requests' package which is now a hard dependency in Salt.
|
||||
* When installing from a user defined repository add the official one as a remote and fetch
|
||||
its tags for proper versioning.
|
||||
* Distro Support Fixed:
|
||||
* CentOS netinstall ISO's don't install `chkconfig`
|
||||
* Improved RHEL optional repository detection. This allows user repository usage, which
|
||||
don't need the optional repository support since they usually provide their packages.
|
||||
* Distro Support Added:
|
||||
* Oracle Linux
|
||||
* Scientific Linux
|
||||
|
||||
Version 2014.03.10-1:
|
||||
* Distro Support Fixed:
|
||||
* Fix the Debian services running function
|
||||
|
||||
Version 2014.03.10:
|
||||
* Debian based distributions which don't use upstart now also check if the salt services are
|
||||
enabled.
|
||||
* Distro Support Fixed:
|
||||
* RedHat based distributions now have a proper services enabled checker.
|
||||
|
||||
Version 2014.02.27:
|
||||
* Fixed a bug on the services enabled function searching logic.
|
||||
* Arch, Fedora, openSUSE and SuSE now check for services enabled, if using systemd
|
||||
* CentOS(and any RedHat based) and Ubuntu now check for services enabled is using upstart
|
||||
* Distro Support Added:
|
||||
* Debian 8. Thank You Boris Feld(Lothiraldan).
|
||||
|
||||
Version 2014.02.19:
|
||||
* Fixed a problem with the quotes of an error message
|
||||
* Arch installations now uses the community repository
|
||||
* Distro Support Fixed:
|
||||
* Fixed Fedora Git based installations(git was not being installed)
|
||||
|
||||
Version 2014.02.18:
|
||||
* Debian based distribution now get a warning stating that NOT starting daemons does not work
|
||||
as supposed, mainly because that's the Debian policy.
|
||||
* Fix bug introduced when implementing the master ip flag. The default minion includes
|
||||
directory is `minion.d`, not `minion.conf.d`
|
||||
|
||||
Version 2014.02.16:
|
||||
* The script now allows setting up the salt-master address as a separate configuration file by
|
||||
passing `-A` to the script.
|
||||
* Add support to install apache-libcloud by passing the `-L` flag. In some distribution it's
|
||||
also needed to pass `-P` because the minimal apache-libcloud version is `0.14.0`. This support
|
||||
is still missing for FreeBSD and SmartOS.
|
||||
* Fixed an issue when copying or moving files. We now test to see if the destination is a
|
||||
directory and create a full path from that so that the "do not override" logic works as
|
||||
supposed. #294.
|
||||
* Allow passing additional package names to install while installing Salt's dependencies. #262
|
||||
* Pass the salt configuration directory, default or from environment variable to the setup.py
|
||||
script for git based installations. #305
|
||||
* Distro Support Fixed:
|
||||
* FreeBSD `fetch` now has a notion of insecure certificates. Handle this properly. Thank
|
||||
You Mike Carlson(m87carlson).
|
||||
* Arch, openSUSE and SuSE are now upgradable when the `-U` flag is passed.
|
||||
* Force overwrites now works for existing init.d scripts on CentOS git installations. #259
|
||||
* Distro Support Added:
|
||||
* FreeBSD 10 is now also supported. Thank You Mike Carlson(m87carlson).
|
||||
* Red Had Enterprise Workstation is now supported.
|
||||
|
||||
Version 1.5.11:
|
||||
* Fixed an out of scope variable missed when moving functions around.
|
||||
|
||||
Version 1.5.10:
|
||||
* Salt no longer has the master branch in git, install from develop as default.
|
||||
* Installing from Git on Red Hat based distributions now also needs `yum-utils` installed.
|
||||
* Allow the script to use a different git repository to install from.
|
||||
* Fixed a bug where a branch name with dashes would be wrongly detected as an option to the
|
||||
script.
|
||||
* Default to secure file downloads(if any).
|
||||
* Distro Support Fixed:
|
||||
* Minimal Ubuntu installation might not have upstart installed, fixed.
|
||||
* FreeBSD now uses the official FreeBSD repository. Thank You Paul Brian(lifeisstillgood)!
|
||||
|
||||
Version 1.5.9:
|
||||
* Allow to not start the daemons after bootstrapping salt. This will allow `vagrant-lxc`
|
||||
installations, `debootstrap*`, etc, to finish properly. Thanks Henrik Holmboe (holmboe).
|
||||
* Distro Support Fixed:
|
||||
* Salt >= 0.17 requires ElementTree which is on the python standard library after python
|
||||
2.6 but openSUSE split that into a separate package.
|
||||
* Fixed a logic preventing proper Ubuntu bootstrapping on some situations.
|
||||
|
||||
Version 1.5.8:
|
||||
* Fixed an Ubuntu regression. `add-apt-repository` is only available on
|
||||
`software-properties-common` after 12.10, inclusive. Thanks Diego Woitasen(diegows)
|
||||
|
||||
Version 1.5.7:
|
||||
* For RedHat based distributions which rely on `epel`, the user can now pass `testing` to the
|
||||
script and `epel-testing` shall be used to bootstrap salt and it's dependencies.
|
||||
* No full system upgrades, if optional by the distribution, shall be done unless `-U` is passed
|
||||
to the bootstrap script(required upgrade procedures must exist on the script, currently Debian
|
||||
and RedHat based distributions support system upgrades).
|
||||
* Fixed an issue where passing BS_KEEP_TEMP_FILES=1 to the script was causing an error. #206.
|
||||
* Switched FreeBSD default packages repository to PCBSD(http://www.pcbsd.org) and added
|
||||
multiple repository support to install salt from the SaltStack's FreeBSD repository. Thanks
|
||||
Christer Edwards(cedwards).
|
||||
* Improved Gentoo Support. Thanks Elias Probst(eliasp).
|
||||
* Stop execution soon for end of life distributions or non supported distribution versions.
|
||||
* Distro Support Fixed:
|
||||
* Fixed an unbound variable while bootstraping Gentoo.
|
||||
* Fixed CentOS/RHEL 5.
|
||||
* Fixed crypto++ compilation. Thanks Kenneth Wilke(KennethWilke)!
|
||||
* Fixed FreeBSD git installations not pointing to the proper salt configuration directory,
|
||||
which on FreeBSD is '/usr/local/etc/salt'.
|
||||
* Fixed testing installation for Red Hat based distributions. Thanks Jeff Strunk(jstrunk)
|
||||
* Fixed wrong package name on Arch. Thanks Niels Abspoel(aboe76)
|
||||
* Make sure the Ubuntu universe repository is enabled. Thanks Karl Grzeszczak(karlgrz).
|
||||
* Fixed SmartOS installation. Thanks Matthieu Guegan(mguegan).
|
||||
|
||||
Version 1.5.6:
|
||||
* If there's a `grains` file on the provided temporary configuration directory, move it to the
|
||||
proper place while moving the minion configuration file.
|
||||
* Gentoo bootstraps can now use a bin host to provide binary packages, just set the
|
||||
`BS_GENTOO_USE_BINHOST` environment variable.
|
||||
* If `BS_KEEP_TEMP_FILES=1` is found on the environment, the script will copy the files instead
|
||||
of moving them.
|
||||
* There were still some `mv` and `cp` occurrences which were not using their `{move,copy}file`
|
||||
replacements which ended up on now respecting the "Do not override existing configuration"
|
||||
feature.
|
||||
* Distro Support Fixed:
|
||||
* Arch now upgrades it's system package properly as suggested on their mailing list.
|
||||
* Arch now moves back any configuration files provided by the user renamed by pacman on the
|
||||
installation process.
|
||||
* Fixed SmartOS detection(was being detected as Solaris) and bootstrapping. Fixed SmartOS
|
||||
different gcc package names for different package sets.
|
||||
* Fixed FreeBSD git based installations(no rc.d scripts were available).
|
||||
* Fixed FreeBSD not re-evaluating the `PKI_DIR` variable since the `SALT_ETC_DIR` was
|
||||
redefined.
|
||||
* Distro Support Added:
|
||||
* Linux Mint. Thanks Alex Van't Hof(alexvh)!
|
||||
* Linaro.
|
||||
|
||||
|
||||
Version 1.5.5:
|
||||
* Fixed a variable error in the new pre-seed feature.
|
||||
* Fixed the destination path to where the pre-seed minions keys should be copied.
|
||||
* Debian installations now use SaltStack's repository.
|
||||
* Configuration files can now be passed as an URL to a compressed file. Thanks Geoff Garside!
|
||||
* Distro Support Fixed:
|
||||
* Debian's optional ZMQ3 support was fixed (libzmq3 has moved from experimental to
|
||||
unstable).
|
||||
* Ubuntu Lucid Daily PPA
|
||||
* SmartOS no longer ignores $SALT_ETC_DIR. Matthieu Guegan!
|
||||
* FreeBSD no longer ignores $SALT_ETC_DIR. Thanks Geoff Garside!
|
||||
* FreeBSD does not try to install pkgng if pkg is installed. Thanks Geoff Garside!
|
||||
* SunOS (Make use of XPG4 binaries on SunOS). Thanks Matthieu Guegan!
|
||||
* openSUSE (Don't fail if only one of the repositories failed to update)
|
||||
* Arch (Fixed the GPG issues for git installations)
|
||||
* Distro Support Added:
|
||||
* Gentoo. Thanks kaithar!
|
||||
|
||||
|
||||
Version 1.5.4:
|
||||
* Fixed an issue we had when /proc/cpuinfo had more than one CPU. Detected on AMD CPUs.
|
||||
* OpenSUSE 12.3 uses lsb_release. Fix the returned distro name "openSUSE project" to "openSUSE"
|
||||
which the script handles.
|
||||
* Added an custom move function which will only override if required and if we permit it.
|
||||
* Implemented the necessary function to pre-seed minion keys on a salt master as an optional
|
||||
argument.
|
||||
* Distro Support Fixed:
|
||||
* FreeBSD (Don't let the script fail if PACKAGESITE is not set)
|
||||
* Debian Stable installations (the function search was not working as supposed)
|
||||
* Distro Support Added:
|
||||
* Ubuntu 13.04 (Was disabled because of a bad beta1. Fixed in beta2)
|
||||
|
||||
|
||||
Version 1.5.3:
|
||||
* Return 0 or 1 from functions
|
||||
* Convert several pipes into a single awk call
|
||||
* Fixed `/etc/os-release` parsing
|
||||
* Fixed `config_salt()`
|
||||
* Distro Support Fixed:
|
||||
* EPEL-based installations (CentOS, Amazon Linux, RedHat)
|
||||
* SuSE/OpenSUSE (problem running the script twice, ie, existing `devel_languages_python`
|
||||
repository)
|
||||
* SuSE 11 SP1 (pip based install and config trigger)
|
||||
* Distro Support Added:
|
||||
* Debian 7 (Only git installations at the moment)
|
||||
|
||||
|
||||
Version 1.5.2:
|
||||
* Fix issue with Travis testing (it installs it's own ZeroMQ3 lib
|
||||
* Allow setting the debug output from an environment variable
|
||||
* Fix an escape issue in the `printf` calls used in our echo calls
|
||||
* Don't overwrite files (`config`, `init.d`, etc). Use a specific flag to force overwrites.
|
||||
* Distro Support Fixed:
|
||||
* Ubuntu daily installs.
|
||||
* Distro Support Added:
|
||||
* Trisquel 6.0 (Ubuntu 12.04)
|
||||
|
||||
|
||||
Version 1.5.1:
|
||||
* Improved unittesting.
|
||||
* Starting daemons.
|
||||
* Make sure that daemons are really running.
|
||||
* For the users to make the choice if installing from PIP (if required since there aren't system
|
||||
pacakges).
|
||||
* Fixed salt's git cloning when the salt git tree is already present on the system.
|
||||
* Distro Support Fixed:
|
||||
* Debian 6
|
||||
* Ubuntu 12.10
|
||||
* CentOS
|
||||
* Distro Support Added:
|
||||
* SuSE 11 SP1/11 SP2
|
||||
* OpenSUSE 12.x
|
||||
|
||||
|
||||
Version 1.5:
|
||||
* First stable version of the script
|
||||
* Support for:
|
||||
* Ubuntu 10.x/11.x/12.x
|
||||
* Debian 6.x
|
||||
* CentOS 5/6
|
||||
* Red Hat 5/6
|
||||
* Red Hat Enterprise 5/6
|
||||
* Fedora
|
||||
* Arch
|
||||
* SmartOS
|
||||
* FreeBSD 9.0
|
||||
|
||||
|
||||
# Don't remove the line below.
|
||||
# vim: fenc=utf-8 spell spl=en cc=100 tw=99 fo=want ts=4
|
1
ChangeLog
Symbolic link
1
ChangeLog
Symbolic link
|
@ -0,0 +1 @@
|
|||
CHANGELOG.md
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# docker build --rm -t saltstack/drone-salt-bootstrap-testing -f Dockerfile.drone-builds .
|
||||
FROM docker:edge-dind
|
||||
|
||||
COPY Gemfile /Gemfile
|
||||
COPY tests/requirements.txt /requirements.txt
|
||||
|
||||
RUN apk --update add \
|
||||
wget python python-dev py-pip git ruby-bundler ruby-rdoc ruby-dev gcc make libc-dev openssl-dev libffi-dev && \
|
||||
gem install bundler && \
|
||||
bundle install --gemfile=/Gemfile --with docker --without opennebula ec2 windows vagrant && \
|
||||
pip install -U pip && \
|
||||
pip install -r /requirements.txt && \
|
||||
rm -rf /requirements.txt /Gemfile /root/.cache
|
||||
|
||||
VOLUME /var/lib/docker
|
||||
EXPOSE 2375
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh"]
|
||||
CMD []
|
5
Gemfile
5
Gemfile
|
@ -1,5 +0,0 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem 'test-kitchen', '>= 2.0.1'
|
||||
gem 'kitchen-salt', '>= 0.5'
|
||||
gem 'kitchen-docker', '>= 2.9.0'
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
Salt Bootstrap - Generic Salt Bootstrap Script
|
||||
|
||||
Copyright 2012-2019 SaltStack (saltstack.com)
|
||||
Copyright 2012-2021 SaltStack (saltproject.io)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
484
README.rst
484
README.rst
|
@ -22,32 +22,53 @@ 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
|
||||
=========
|
||||
|
||||
In every two-step installation example, you would be well-served to **verify against the SHA256
|
||||
sum** of the downloaded ``bootstrap-salt.sh`` file.
|
||||
|
||||
.. _sha256sums:
|
||||
|
||||
The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:
|
||||
|
||||
- 2020.02.04: ``ce877651b4938e3480f76b1629f582437f6ca8b73d7199fdb9e905e86fe85b34``
|
||||
- 2020.01.29: ``e9afdfa877998c1c7f0e141a6728b33d0d24348e197aab2b9bde4fe6bc6db1b2``
|
||||
- 2020.01.21: ``53299aa0dfbf7ab381f3856bb7babfc04a1d6525be11db0b9466277b1e4d0c1a``
|
||||
- 2019.11.04: ``905924fccd4ebf168d19ba598bf10af53efe02302b792aeb15433e73fd3ad1d2``
|
||||
- 2019.10.03: ``34f196f06d586ce9e1b9907660ea6e67caf57abcecfea66e0343697e3fd0d17d``
|
||||
- 2019.05.20: ``46fb5e4b7815efafd69fd703f033fe86e7b584b6770f7e0b936995bcae1cedd8``
|
||||
- 2019.02.27: ``23728e4b5e54f564062070e3be53c5602b55c24c9a76671968abbf3d609258cb``
|
||||
- 2019.01.08: ``ab7f29b75711da4bb79aff98d46654f910d569ebe3e908753a3c5119017bb163``
|
||||
- 2018.08.15: ``6d414a39439a7335af1b78203f9d37e11c972b3c49c519742c6405e2944c6c4b``
|
||||
- 2018.08.13: ``98284bdc2b5ebaeb619b22090374e42a68e8fdefe6bff1e73bd1760db4407ed0``
|
||||
- 2018.04.25: ``e2e3397d6642ba6462174b4723f1b30d04229b75efc099a553e15ea727877dfb``
|
||||
- 2017.12.13: ``c127b3aa4a8422f6b81f5b4a40d31d13cec97bf3a39bca9c11a28f24910a6895``
|
||||
- 2017.08.17: ``909b4d35696b9867b34b22ef4b60edbc5a0e9f8d1ed8d05f922acb79a02e46e3``
|
||||
- 2017.05.24: ``8c42c2e5ad3d4384ddc557da5c214ba3e40c056ca1b758d14a392c1364650e89``
|
||||
- 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``
|
||||
- 2023.04.26: ``516fa9cc2e258cb8484ff360b9674b46918f657985c21ca9301e42a3dd263d60``
|
||||
- 2023.04.21: ``e364428aa7a25f8e2c5e18e36e222351724c6cf35a1d57158f3357cde1e0a0f0``
|
||||
- 2023.04.06: ``994bf7e8bd92fe6d70d291c7562aff299f5651046b4e76dfa506cee0d9bb0843``
|
||||
|
||||
If you're looking for a *one-liner* to install Salt, please scroll to the bottom and use the
|
||||
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://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
|
||||
------------
|
||||
|
||||
|
@ -60,6 +81,133 @@ process.
|
|||
Examples
|
||||
--------
|
||||
|
||||
To view the latest options and descriptions for ``salt-bootstrap``, use ``-h`` and the terminal:
|
||||
|
||||
.. code:: console
|
||||
|
||||
./salt-bootstrap.sh -h
|
||||
|
||||
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 packages.broadcom.com
|
||||
- stable [version] Install a specific version. Only supported for
|
||||
packages available at packages.broadcom.com
|
||||
To pin a 3xxx minor version, specify it as 3xxx.0
|
||||
- testing RHEL-family specific: configure EPEL testing repo
|
||||
- git Install from the head of the master branch
|
||||
- git [ref] Install from any git ref (such as a branch, tag, or
|
||||
commit)
|
||||
- onedir Install latest onedir release.
|
||||
- onedir [version] Install a specific version. Only supported for
|
||||
onedir packages available at packages.broadcom.com
|
||||
|
||||
- onedir_rc Install latest onedir RC release.
|
||||
- onedir_rc [version] Install a specific version. Only supported for
|
||||
onedir RC packages available at packages.broadcom.com
|
||||
|
||||
Examples:
|
||||
- bootstrap-salt.sh
|
||||
- bootstrap-salt.sh stable
|
||||
- bootstrap-salt.sh stable 3006
|
||||
- bootstrap-salt.sh stable 3006.1
|
||||
- bootstrap-salt.sh testing
|
||||
- bootstrap-salt.sh git
|
||||
- bootstrap-salt.sh git 3006.7
|
||||
- bootstrap-salt.sh git v3006.8
|
||||
- bootstrap-salt.sh git 3007.1
|
||||
- bootstrap-salt.sh git v3007.1
|
||||
- bootstrap-salt.sh git 06f249901a2e2f1ed310d58ea3921a129f214358
|
||||
- bootstrap-salt.sh onedir
|
||||
- bootstrap-salt.sh onedir 3006
|
||||
- bootstrap-salt.sh onedir_rc
|
||||
- bootstrap-salt.sh onedir_rc 3008
|
||||
|
||||
|
||||
Options:
|
||||
-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
|
||||
-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}
|
||||
-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.
|
||||
-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)
|
||||
-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``
|
||||
is not needed when running these commands as the ``root`` user.
|
||||
|
@ -68,46 +216,61 @@ is not needed when running these commands as the ``root`` user.
|
|||
|
||||
The examples below show how to bootstrap Salt directly from GitHub or another Git repository.
|
||||
Run the script without any parameters to get latest stable Salt packages for your system from
|
||||
`SaltStack's corporate repository`_. See first example in the `Install using wget`_ section.
|
||||
the `Salt Project's repository`_. See first example in the `Install using wget`_ section.
|
||||
|
||||
|
||||
Install using curl
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want to install a package of a specific release version, from the Salt Project repo:
|
||||
|
||||
.. code:: console
|
||||
|
||||
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://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.saltstack.com
|
||||
sudo sh bootstrap-salt.sh git develop
|
||||
|
||||
If you want to install a specific release version (based on the Git tags):
|
||||
|
||||
.. code:: console
|
||||
|
||||
curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
|
||||
sudo sh bootstrap-salt.sh git v2016.11.5
|
||||
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.saltstack.com
|
||||
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.saltstack.com
|
||||
sudo sh bootstrap-salt.sh -M -N git develop
|
||||
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:
|
||||
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.saltstack.com
|
||||
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:
|
||||
|
||||
.. code:: console
|
||||
|
||||
PROXY='http://user:password@myproxy.example.com:3128'
|
||||
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
|
||||
|
||||
|
||||
|
@ -118,68 +281,47 @@ Using ``wget`` to install your distribution's stable packages:
|
|||
|
||||
.. code:: console
|
||||
|
||||
wget -O bootstrap-salt.sh https://bootstrap.saltstack.com
|
||||
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.saltstack.com
|
||||
sudo sh bootstrap-salt.sh -P git v2016.11.5
|
||||
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://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh -P stable 3006.8
|
||||
|
||||
**NOTE**
|
||||
|
||||
On the above example we added ``-P`` which will allow PIP packages to be installed if required.
|
||||
On the above examples we added ``-P`` which will allow PIP packages to be installed if required.
|
||||
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.saltstack.com" > bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git develop
|
||||
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
|
||||
|
||||
All Python versions should support the following in-line code:
|
||||
With python version 3:
|
||||
|
||||
.. code:: console
|
||||
|
||||
python -c 'import urllib; print urllib.urlopen("https://bootstrap.saltstack.com").read()' > bootstrap-salt.sh
|
||||
sudo sh bootstrap-salt.sh git develop
|
||||
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.saltstack.com
|
||||
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
|
||||
|
@ -199,43 +341,81 @@ Installing the latest stable release of Salt (default):
|
|||
|
||||
.. code:: console
|
||||
|
||||
curl -L https://bootstrap.saltstack.com | 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.saltstack.com | sudo sh
|
||||
wget -O - https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh
|
||||
|
||||
Installing the latest develop branch of Salt:
|
||||
Installing a target version package of Salt from the Salt Project repo:
|
||||
|
||||
.. code:: console
|
||||
|
||||
curl -L https://bootstrap.saltstack.com | sudo sh -s -- git develop
|
||||
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://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
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Using ``PowerShell`` to install latest stable version:
|
||||
|
||||
.. code:: powershell
|
||||
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
|
||||
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:
|
||||
|
||||
.. code:: powershell
|
||||
|
||||
Get-Help $env:TEMP\bootstrap-salt.ps1 -Detailed
|
||||
|
||||
Using ``cygwin`` to install latest stable version:
|
||||
|
||||
.. code:: console
|
||||
|
||||
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"
|
||||
|
||||
|
||||
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 `SaltStack's corporate repository`_
|
||||
are CPU architecture independent and could be installed on any hardware supported by Linux kernel.
|
||||
However, SaltStack does package Salt's binary dependencies only for ``x86_64`` (``amd64``) and
|
||||
``AArch32`` (``armhf``). The latter is available only for Debian/Raspbian 8 platforms.
|
||||
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.:
|
||||
|
||||
.. code:: console
|
||||
|
||||
sudo sh bootstrap-salt.sh -r -P git develop
|
||||
sudo sh bootstrap-salt.sh -r -P git master
|
||||
|
||||
**NOTE**
|
||||
|
||||
|
@ -248,36 +428,23 @@ Debian and derivatives
|
|||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Cumulus Linux 2/3
|
||||
- Debian GNU/Linux 7/8/9/10
|
||||
- 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)
|
||||
|
||||
Debian Best Effort Support: Testing Release
|
||||
*******************************************
|
||||
|
||||
This script provides best-effort support for the upcoming Debian testing release. Package
|
||||
repositories are not provided on `SaltStack's Debian repository`_ for Debian testing releases.
|
||||
However, the bootstrap script will attempt to install the packages for the current stable
|
||||
version of Debian.
|
||||
|
||||
For example, when installing Salt on Debian 10 (Buster), the bootstrap script will setup the
|
||||
repository for Debian 9 (Stretch) from `SaltStack's Debian repository`_ and install the
|
||||
Debian 9 packages.
|
||||
|
||||
|
||||
Red Hat family
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
- Amazon Linux 2012.3 and later
|
||||
- Amazon Linux 2
|
||||
- CentOS 6/7/8
|
||||
- Amazon Linux 2023
|
||||
- CentOS 8/9
|
||||
- Cloud Linux 6/7
|
||||
- Fedora 30/31 (install latest stable from standard repositories)
|
||||
- Oracle Linux 6/7
|
||||
- Red Hat Enterprise Linux 6/7/8
|
||||
- Scientific Linux 6/7
|
||||
- Fedora 40 (install latest stable from standard repositories)
|
||||
- Oracle Linux 8/9
|
||||
- Red Hat Enterprise Linux 8/9
|
||||
- Scientific Linux 8/9
|
||||
|
||||
|
||||
SUSE family
|
||||
|
@ -289,31 +456,29 @@ 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
|
||||
|
||||
sh bootstrap-salt.sh -x python2 git v2018.3.2
|
||||
sh bootstrap-salt.sh -x python3 git v3006.1
|
||||
|
||||
|
||||
Ubuntu and derivatives
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- KDE neon (based on Ubuntu 16.04)
|
||||
- KDE neon (based on Ubuntu 20.04/22.04/24.04)
|
||||
- Linux Mint 17/18
|
||||
- Ubuntu 14.04/16.04/18.04 and subsequent non-LTS releases (see below)
|
||||
|
||||
Ubuntu Best Effort Support: Non-LTS Releases
|
||||
********************************************
|
||||
|
||||
This script provides best-effort support for current, non-LTS Ubuntu releases. If package
|
||||
repositories are not provided on `SaltStack's Ubuntu repository`_ for the non-LTS release, the
|
||||
bootstrap script will attempt to install the packages for the most closely related LTS Ubuntu
|
||||
repositories are not provided on the `Salt Project's Ubuntu repository`_ for the non-LTS release,
|
||||
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 18.10, the bootstrap script will setup the repository
|
||||
for Ubuntu 18.04 from `SaltStack's Ubuntu repository`_ and install the 18.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`_.
|
||||
|
@ -332,12 +497,28 @@ UNIX systems
|
|||
|
||||
**BSD**:
|
||||
|
||||
- OpenBSD (``pip`` installation)
|
||||
- FreeBSD 11/12
|
||||
- No longer supported
|
||||
|
||||
**SunOS**:
|
||||
|
||||
- SmartOS (2015Q4 and later)
|
||||
- No longer supported
|
||||
|
||||
|
||||
Using a custom salt bootstrap
|
||||
-----------------------------
|
||||
|
||||
By default the ``salt-cloud -p`` provisioning command will use the latest release from this
|
||||
repository to bootstrap new minions. If
|
||||
|
||||
- your needs are not met by that script,
|
||||
- you want to lock salt bootstrap to a specific release, or
|
||||
- you want to use an unreleased development version of this script
|
||||
|
||||
you can add your bootstrap-salt script to your salt cloud configuration and point to it with the
|
||||
``script`` attribute.
|
||||
|
||||
`Read more`: https://docs.saltproject.io/en/latest/topics/cloud/deploy.html
|
||||
|
||||
|
||||
Unsupported Distributions
|
||||
-------------------------
|
||||
|
@ -353,44 +534,6 @@ please run the following commands and report their output when creating an issue
|
|||
For information on how to add support for a currently unsupported distribution, please refer to the
|
||||
`Contributing Guidelines`_.
|
||||
|
||||
Python 3 Support
|
||||
----------------
|
||||
|
||||
Some distributions support installing Salt to use Python 3 instead of Python 2. The availability of
|
||||
this offering, while limited, is as follows:
|
||||
|
||||
- CentOS 7
|
||||
- Centos 8
|
||||
- Debian 8
|
||||
- Debian 9
|
||||
- Debian 10
|
||||
- Fedora (only git installations)
|
||||
- Ubuntu 16.04
|
||||
- Ubuntu 18.04
|
||||
|
||||
On Fedora, PIP installation must be allowed (-P) due to incompatibility with the shipped Tornado
|
||||
library.
|
||||
|
||||
Installing the Python 3 packages for Salt is done via the ``-x`` option:
|
||||
|
||||
.. code:: console
|
||||
|
||||
sh bootstrap-salt.sh -x python3
|
||||
|
||||
See the ``-x`` option for more information.
|
||||
|
||||
The earliest release of Salt that supports Python3 is `2018.3.4`.
|
||||
|
||||
Tornado 5/6 Workaround
|
||||
----------------------
|
||||
Salt does not support tornado>=5.0 currently. This support will not be added until the neon
|
||||
release. In order to work around this requirement on OSs that no longer have the tornado 4 package
|
||||
available in their repositories we are pip installing tornado<5.0 in the bootstrap script. This
|
||||
requires the user to pass -P to the bootstrap script if installing via git to ensure tornado is pip
|
||||
installed. If a user does not pass this argument they will be warned that it is required for the
|
||||
tornado 5 workaround. So far the OSs that are using this workaround are Debian 10, Centos 8 and
|
||||
Fedora 31.
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
|
@ -436,37 +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.
|
||||
|
||||
Updating Drone Pipelines
|
||||
========================
|
||||
|
||||
You should install and configure the drone-cli as shown here: https://docs.drone.io/cli/install/
|
||||
|
||||
Make edits to .drone.jsonnet and then save them into the .drone.yml by doing the following:
|
||||
|
||||
.. code:: console
|
||||
|
||||
drone jsonnet --format --stream
|
||||
drone sign saltstack/salt-bootstrap --save
|
||||
|
||||
.. _Contributing Guidelines: https://github.com/saltstack/salt-bootstrap/blob/develop/CONTRIBUTING.md
|
||||
.. _Docker: https://www.docker.com/
|
||||
.. _`pre-accepted Minion keys`: https://docs.saltstack.com/en/latest/topics/tutorials/preseed_key.html
|
||||
.. _`read the source`: https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh
|
||||
.. _`Salt`: https://saltstack.com/community/
|
||||
.. _`Salt's Supported Operating Systems`: http://get.saltstack.com/rs/304-PHQ-615/images/SaltStack-Supported-Operating-Systems.pdf
|
||||
.. _`SaltStack's corporate repository`: https://repo.saltstack.com/
|
||||
.. _`SaltStack's Debian repository`: http://repo.saltstack.com/#debian
|
||||
.. _`SaltStack's Ubuntu repository`: http://repo.saltstack.com/#ubuntu
|
||||
.. _`Ubuntu's release schedule`: https://wiki.ubuntu.com/Releases
|
||||
.. _Vagrant: http://www.vagrantup.com
|
||||
.. _hardening salt: https://docs.saltstack.com/en/latest/topics/hardening.html
|
||||
|
||||
.. |build| image:: https://drone.saltstack.com/api/badges/saltstack/salt-bootstrap/status.svg
|
||||
:target: https://drone.saltstack.com/saltstack/salt-bootstrap
|
||||
:alt: Build status on Linux
|
||||
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
|
||||
|
|
12
RELEASE.md
Normal file
12
RELEASE.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
[#](#) Release process
|
||||
|
||||
- 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.
|
||||
- Bump version for release.
|
||||
- Open PR against develop with these changes.
|
||||
- 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
|
32
appveyor.yml
32
appveyor.yml
|
@ -1,32 +0,0 @@
|
|||
platform: Any CPU
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- bootstrap_args:
|
||||
test_args: -master salt -runservice
|
||||
|
||||
- bootstrap_args: -runservice false
|
||||
test_args: -master salt -noservice
|
||||
|
||||
- bootstrap_args: -minion a-minion
|
||||
test_args: -minion a-minion -master salt -runservice
|
||||
|
||||
- bootstrap_args: -minion a-minion -master a-master
|
||||
test_args: -minion a-minion -master a-master -runservice
|
||||
|
||||
build_script:
|
||||
- ps: |
|
||||
$Path = (Get-Location).Path | Join-Path -ChildPath bootstrap-salt.ps1
|
||||
Invoke-Expression "$Path -verbose $env:bootstrap_args"
|
||||
|
||||
before_test:
|
||||
- SET PATH=%PATH%;C:\salt
|
||||
- salt-call --version
|
||||
|
||||
test_script:
|
||||
- ps: |
|
||||
$Path = (Get-Location).Path | Join-Path -ChildPath tests\runtests.ps1
|
||||
Invoke-Expression "$Path -verbose $env:test_args"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
|
@ -1,108 +1,129 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
A simple Powershell script to download and install a salt minion on windows.
|
||||
A simple Powershell script to download and install a Salt minion on Windows.
|
||||
|
||||
.DESCRIPTION
|
||||
The script will download the official salt package from saltstack. It will
|
||||
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.
|
||||
|
||||
.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
|
||||
Default version defined in this script.
|
||||
|
||||
.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
|
||||
versions >= 2017.7.0.
|
||||
|
||||
.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.saltstack.com/windows"
|
||||
|
||||
.NOTES
|
||||
All of the parameters are optional. The default should be the latest
|
||||
version. The architecture is dynamically determined by the script.
|
||||
|
||||
.LINK
|
||||
Bootstrap GitHub Project (script home) - https://github.com/saltstack/salt-windows-bootstrap
|
||||
Original Vagrant Provisioner Project -https://github.com/saltstack/salty-vagrant
|
||||
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
|
||||
SaltStack Download Location - https://repo.saltstack.com/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
|
||||
#>
|
||||
|
||||
#===============================================================================
|
||||
# Commandlet Binding
|
||||
# Bind Parameters
|
||||
#===============================================================================
|
||||
[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)]
|
||||
[string]$version = '',
|
||||
param(
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[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)]
|
||||
# Doesn't support Python versions prior to "2017.7.0"
|
||||
[ValidateSet("2","3")]
|
||||
[string]$pythonVersion = "2",
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[Alias("s")]
|
||||
# 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)]
|
||||
[ValidateSet("true","false")]
|
||||
[string]$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)]
|
||||
[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)]
|
||||
[string]$master = "not-specified",
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[Alias("r")]
|
||||
# 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)]
|
||||
[string]$repourl= "https://repo.saltstack.com/windows"
|
||||
[Parameter(Mandatory=$false, ValueFromPipeline=$True)]
|
||||
[Alias("c")]
|
||||
# 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
|
||||
#===============================================================================
|
||||
# Powershell supports only TLS 1.0 by default. Add support for TLS 1.2
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
|
||||
#===============================================================================
|
||||
# Script Functions
|
||||
|
@ -119,22 +140,227 @@ function Get-IsUacEnabled
|
|||
(Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System).EnableLua -ne 0
|
||||
}
|
||||
|
||||
function Get-MajorVersion {
|
||||
# Parses a version string and returns the major version
|
||||
#
|
||||
# Args:
|
||||
# Version (string): The Version to parse
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[String] $Version
|
||||
)
|
||||
return ( $Version -split "\." )[0]
|
||||
}
|
||||
|
||||
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"
|
||||
|
||||
$available_versions = [System.Collections.ArrayList]@()
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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 {
|
||||
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 {
|
||||
# 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,
|
||||
|
||||
[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"
|
||||
)
|
||||
|
||||
if ( !(Test-Path $Path) ) {
|
||||
Write-Verbose "Invalid path for hashing: $Path"
|
||||
return @{}
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Check for Elevated Privileges
|
||||
#===============================================================================
|
||||
If (!(Get-IsAdministrator)) {
|
||||
If (Get-IsUacEnabled) {
|
||||
if (!(Get-IsAdministrator)) {
|
||||
if (Get-IsUacEnabled) {
|
||||
# We are not running "as Administrator" - so relaunch as administrator
|
||||
# Create a new process object that starts PowerShell
|
||||
$newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
|
||||
|
||||
# Specify the current script path and name as a parameter`
|
||||
$parameters = ""
|
||||
If($minion -ne "not-specified") {$parameters = "-minion $minion"}
|
||||
If($master -ne "not-specified") {$parameters = "$parameters -master $master"}
|
||||
If($runservice -eq $false) {$parameters = "$parameters -runservice false"}
|
||||
If($version -ne '') {$parameters = "$parameters -version $version"}
|
||||
If($pythonVersion -ne "") {$parameters = "$parameters -pythonVersion $pythonVersion"}
|
||||
foreach ($boundParam in $PSBoundParameters.GetEnumerator())
|
||||
{
|
||||
$parameters = "$parameters -{0} '{1}'" -f $boundParam.Key, $boundParam.Value
|
||||
}
|
||||
$newProcess.Arguments = $myInvocation.MyCommand.Definition, $parameters
|
||||
|
||||
# Specify the current working directory
|
||||
|
@ -147,97 +373,193 @@ If (!(Get-IsAdministrator)) {
|
|||
[System.Diagnostics.Process]::Start($newProcess);
|
||||
|
||||
# Exit from the current, unelevated, process
|
||||
Exit
|
||||
exit
|
||||
}
|
||||
Else {
|
||||
Throw "You must be administrator to run this script"
|
||||
else {
|
||||
throw "You must be administrator to run this script"
|
||||
}
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Check for older versions
|
||||
#===============================================================================
|
||||
$majorVersion = Get-MajorVersion -Version $Version
|
||||
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
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Declare variables
|
||||
#===============================================================================
|
||||
$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) {
|
||||
if ($null -ne (Get-ItemProperty $SaltRegKey).root_dir) {
|
||||
$RootDir = (Get-ItemProperty $SaltRegKey).root_dir
|
||||
}
|
||||
}
|
||||
|
||||
# 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 = ""
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# 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: $repourl"
|
||||
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.ToLower() -eq "true") {
|
||||
if ($RunService) {
|
||||
Write-Verbose "Windows service will be set to run"
|
||||
[bool]$runservice = $True
|
||||
}
|
||||
ElseIf ($runservice.ToLower() -eq "false") {
|
||||
[bool]$RunService = $True
|
||||
} else {
|
||||
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
|
||||
[bool]$RunService = $False
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Ensure Directories are present, copy Vagrant Configs if found
|
||||
# Copy Vagrant Files to their proper location.
|
||||
#===============================================================================
|
||||
# Create C:\tmp\
|
||||
New-Item C:\tmp\ -ItemType directory -Force | Out-Null
|
||||
|
||||
# Copy Vagrant Files to their proper location. Vagrant files will be placed
|
||||
# in C:\tmp
|
||||
$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) {
|
||||
New-Item C:\salt\conf\pki\minion\ -ItemType Directory -Force | Out-Null
|
||||
# Copy minion keys & config to correct location
|
||||
cp C:\tmp\minion.pem C:\salt\conf\pki\minion\
|
||||
cp C:\tmp\minion.pub C:\salt\conf\pki\minion\
|
||||
if (Test-Path C:\tmp\minion.pem) {
|
||||
New-Item $PkiDir -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\minion.pem -Destination $PkiDir -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\minion.pub -Destination $PkiDir -Force | Out-Null
|
||||
$ConfiguredAnything = $True
|
||||
}
|
||||
|
||||
# Check if minion config has been uploaded
|
||||
# This should be done before the installer is run so that it can be updated with
|
||||
# id: and master: settings when the installer runs
|
||||
If (Test-Path C:\tmp\minion) {
|
||||
New-Item C:\salt\conf\ -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\minion -Destination C:\salt\conf\ -Force | Out-Null
|
||||
if (Test-Path C:\tmp\minion) {
|
||||
New-Item $ConfDir -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\minion -Destination $ConfDir -Force | Out-Null
|
||||
$ConfiguredAnything = $True
|
||||
}
|
||||
|
||||
# Check if grains config has been uploaded
|
||||
if (Test-Path C:\tmp\grains) {
|
||||
New-Item $ConfDir -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -Path C:\tmp\grains -Destination $ConfDir -Force | Out-Null
|
||||
$ConfiguredAnything = $True
|
||||
}
|
||||
|
||||
if ( $ConfigureOnly ) {
|
||||
if ( !$ConfiguredAnything ) {
|
||||
Write-Host "No configuration or keys were copied over." -ForegroundColor yes
|
||||
Write-Host "No configuration was done!" -ForegroundColor Yellow
|
||||
} else {
|
||||
Write-Host "Salt minion successfully configured" -ForegroundColor Green
|
||||
}
|
||||
# If we're only configuring, we want to end here
|
||||
exit 0
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Detect architecture
|
||||
#===============================================================================
|
||||
If ([IntPtr]::Size -eq 4) {
|
||||
$arch = "x86"
|
||||
}
|
||||
Else {
|
||||
$arch = "AMD64"
|
||||
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 {
|
||||
Write-Host "Version $Version is not available" -ForegroundColor Red
|
||||
Write-Host "Available versions are:" -ForegroundColor Yellow
|
||||
$versions
|
||||
exit 1
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Use version "Latest" if no version is passed
|
||||
# Get file url and sha256
|
||||
#===============================================================================
|
||||
If ((!$version) -or ($version.ToLower() -eq 'latest')){
|
||||
$versionSection = "Latest-Py$pythonVersion"
|
||||
} else {
|
||||
$versionSection = $version
|
||||
$year = $version.Substring(0, 4)
|
||||
If ([int]$year -ge 2017) {
|
||||
If ($pythonVersion -eq "3") {
|
||||
$versionSection = "$version-Py3"
|
||||
} Else {
|
||||
$versionSection = "$version-Py2"
|
||||
}
|
||||
}
|
||||
}
|
||||
$saltFileName = "Salt-Minion-$Version-Py3-$arch-Setup.exe"
|
||||
$saltFileUrl = "$base_url/$Version/$saltFileName"
|
||||
$saltSha256 = Get-HashFromArtifactory -SaltVersion $Version -SaltFileName $saltFileName
|
||||
|
||||
#===============================================================================
|
||||
# Download minion setup file
|
||||
#===============================================================================
|
||||
$saltExe = "Salt-Minion-$versionSection-$arch-Setup.exe"
|
||||
Write-Output "Downloading Salt minion installer $saltExe"
|
||||
$webclient = New-Object System.Net.WebClient
|
||||
$url = "$repourl/$saltExe"
|
||||
$file = "C:\Windows\Temp\$saltExe"
|
||||
$webclient.DownloadFile($url, $file)
|
||||
Write-Host "===============================================================================" -ForegroundColor Yellow
|
||||
Write-Host " Bootstrapping Salt Minion" -ForegroundColor Green
|
||||
Write-Host " - version: $Version"
|
||||
Write-Host " - file name: $saltFileName"
|
||||
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
|
||||
|
||||
$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
|
||||
}
|
||||
|
||||
# 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
|
||||
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
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Set the parameters for the installer
|
||||
|
@ -247,56 +569,135 @@ $webclient.DownloadFile($url, $file)
|
|||
# - master: salt
|
||||
# - Start the service
|
||||
$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"}
|
||||
if($Minion -ne "not-specified") {$parameters = "/minion-name=$Minion"}
|
||||
if($Master -ne "not-specified") {$parameters = "$parameters /master=$Master"}
|
||||
|
||||
#===============================================================================
|
||||
# Install minion silently
|
||||
#===============================================================================
|
||||
#Wait for process to exit before continuing.
|
||||
Write-Output "Installing Salt minion"
|
||||
Start-Process C:\Windows\Temp\$saltExe -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($runservice) {
|
||||
# Start service
|
||||
Write-Output "Starting the Salt minion service"
|
||||
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( $RunService ) {
|
||||
# Start the service
|
||||
Write-Host "Starting Service: " -NoNewline
|
||||
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 "Success" -ForegroundColor Green
|
||||
}
|
||||
|
||||
# If the salt-minion service is still not running, something probably
|
||||
# went wrong and user intervention is required - report failure.
|
||||
If ($service.Status -eq "Stopped") {
|
||||
Write-Output -NoNewline "Failed to start salt minion"
|
||||
exit 1
|
||||
} else {
|
||||
# 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
|
||||
}
|
||||
}
|
||||
# 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
|
||||
}
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Write-Output -NoNewline "Stopping salt minion and setting it to 'Manual'"
|
||||
Set-Service "salt-minion" -StartupType "Manual"
|
||||
Stop-Service "salt-minion"
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# Script Complete
|
||||
#===============================================================================
|
||||
Write-Output "Salt minion successfully installed"
|
||||
Write-Host "-------------------------------------------------------------------------------" -ForegroundColor Yellow
|
||||
Write-Host "Salt Minion Installed Successfully" -ForegroundColor Green
|
||||
Write-Host "===============================================================================" -ForegroundColor Yellow
|
||||
exit 0
|
||||
|
|
5664
bootstrap-salt.sh
5664
bootstrap-salt.sh
File diff suppressed because it is too large
Load diff
3
requirements/release.in
Normal file
3
requirements/release.in
Normal file
|
@ -0,0 +1,3 @@
|
|||
pre-commit
|
||||
python-tools-scripts >= 0.18.6
|
||||
boto3
|
78
requirements/release.txt
Normal file
78
requirements/release.txt
Normal file
|
@ -0,0 +1,78 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile with Python 3.10
|
||||
# by the following command:
|
||||
#
|
||||
# pip-compile requirements/release.in
|
||||
#
|
||||
annotated-types==0.7.0
|
||||
# via pydantic
|
||||
attrs==24.3.0
|
||||
# via python-tools-scripts
|
||||
boto3==1.35.98
|
||||
# via -r requirements/release.in
|
||||
botocore==1.35.98
|
||||
# via
|
||||
# boto3
|
||||
# s3transfer
|
||||
certifi==2024.12.14
|
||||
# via requests
|
||||
cfgv==3.4.0
|
||||
# via pre-commit
|
||||
charset-normalizer==3.4.1
|
||||
# via requests
|
||||
distlib==0.3.9
|
||||
# via virtualenv
|
||||
filelock==3.16.1
|
||||
# via
|
||||
# python-tools-scripts
|
||||
# virtualenv
|
||||
identify==2.6.5
|
||||
# via pre-commit
|
||||
idna==3.10
|
||||
# via requests
|
||||
jmespath==1.0.1
|
||||
# via
|
||||
# boto3
|
||||
# botocore
|
||||
markdown-it-py==3.0.0
|
||||
# via rich
|
||||
mdurl==0.1.2
|
||||
# via markdown-it-py
|
||||
nodeenv==1.9.1
|
||||
# via pre-commit
|
||||
platformdirs==4.3.6
|
||||
# via virtualenv
|
||||
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.9.0.post0
|
||||
# via botocore
|
||||
python-tools-scripts==0.20.5
|
||||
# via -r requirements/release.in
|
||||
pyyaml==6.0.2
|
||||
# via pre-commit
|
||||
requests==2.32.3
|
||||
# via python-tools-scripts
|
||||
rich==13.9.4
|
||||
# via python-tools-scripts
|
||||
s3transfer==0.10.4
|
||||
# via boto3
|
||||
six==1.17.0
|
||||
# via python-dateutil
|
||||
typing-extensions==4.12.2
|
||||
# via
|
||||
# pydantic
|
||||
# pydantic-core
|
||||
# python-tools-scripts
|
||||
# rich
|
||||
urllib3==2.3.0
|
||||
# via
|
||||
# botocore
|
||||
# requests
|
||||
virtualenv==20.28.1
|
||||
# via pre-commit
|
267
salt-quick-start.ps1
Normal file
267
salt-quick-start.ps1
Normal file
|
@ -0,0 +1,267 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
A simple Powershell script to quickly start using Salt.
|
||||
|
||||
.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.
|
||||
|
||||
.EXAMPLE
|
||||
./salt-quick-start.ps1
|
||||
|
||||
.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
|
||||
#>
|
||||
|
||||
# This is so the -Verbose parameter will work
|
||||
[CmdletBinding()] param()
|
||||
|
||||
function Expand-ZipFile {
|
||||
# Extract a zip file
|
||||
#
|
||||
# Args:
|
||||
# ZipFile (string): The file to extract
|
||||
# Destination (string): The location to extract to
|
||||
#
|
||||
# Error:
|
||||
# Sets the failed status and exits with a scriptFailed exit code
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $ZipFile,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $Destination
|
||||
)
|
||||
|
||||
if (!(Test-Path -Path $Destination)) {
|
||||
Write-Debug "Creating missing directory: $Destination"
|
||||
New-Item -ItemType directory -Path $Destination
|
||||
}
|
||||
Write-Debug "Unzipping '$ZipFile' to '$Destination'"
|
||||
if ($PSVersionTable.PSVersion.Major -ge 5) {
|
||||
# PowerShell 5 introduced Expand-Archive
|
||||
Write-Debug "Using Expand-Archive to unzip"
|
||||
try{
|
||||
Expand-Archive -Path $ZipFile -DestinationPath $Destination -Force
|
||||
} catch {
|
||||
Write-Debug "Failed to unzip $ZipFile : $_"
|
||||
exit 1
|
||||
}
|
||||
} else {
|
||||
# This method will work with older versions of powershell, but it is
|
||||
# slow
|
||||
Write-Debug "Using Shell.Application to unzip"
|
||||
$objShell = New-Object -Com Shell.Application
|
||||
$objZip = $objShell.NameSpace($ZipFile)
|
||||
try{
|
||||
foreach ($item in $objZip.Items()) {
|
||||
$objShell.Namespace($Destination).CopyHere($item, 0x14)
|
||||
}
|
||||
} catch {
|
||||
Write-Debug "Failed to unzip $ZipFile : $_"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
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,
|
||||
|
||||
[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"
|
||||
)
|
||||
|
||||
if ( !(Test-Path $Path) ) {
|
||||
Write-Verbose "Invalid path for hashing: $Path"
|
||||
return @{}
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#===============================================================================
|
||||
# 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: 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
|
||||
config_dir: $PATH\salt\conf
|
||||
log_file: $PATH\salt\var\log\salt\minion
|
||||
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: " -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: "-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 ""
|
251
salt-quick-start.sh
Executable file
251
salt-quick-start.sh
Executable file
|
@ -0,0 +1,251 @@
|
|||
#!/bin/sh
|
||||
|
||||
__ScriptName="salt-quick-start.sh"
|
||||
SALT_REPO_URL="https://packages.broadcom.com/artifactory/salt-project-generic/onedir"
|
||||
_COLORS=${QS_COLORS:-$(tput colors 2>/dev/null || echo 0)}
|
||||
|
||||
_LOCAL=0
|
||||
_FULL=0
|
||||
_STOP=0
|
||||
|
||||
PWD="$(pwd)"
|
||||
_PATH=${PWD}/salt
|
||||
|
||||
|
||||
__usage() {
|
||||
cat << EOT
|
||||
|
||||
Usage : ${__ScriptName} [options]
|
||||
|
||||
Options:
|
||||
-h Show usage.
|
||||
-f Full setup with a Salt minion and Salt master running.
|
||||
-l Local setup, no Salt minion or Salt master running.
|
||||
-s Attempt to stop a running Salt minion and Salt master.
|
||||
|
||||
EOT
|
||||
} # ---------- end of function __usage ----------
|
||||
|
||||
|
||||
echoinfo() {
|
||||
printf "${GC} * INFO${EC}: %s\\n" "$@";
|
||||
}
|
||||
|
||||
echoerror() {
|
||||
printf "${RC} * ERROR${EC}: %s\\n" "$@" 1>&2;
|
||||
}
|
||||
|
||||
__detect_color_support() {
|
||||
# shellcheck disable=SC2181
|
||||
if [ $? -eq 0 ] && [ "$_COLORS" -gt 2 ]; then
|
||||
RC='\033[1;31m'
|
||||
GC='\033[1;32m'
|
||||
BC='\033[1;34m'
|
||||
YC='\033[1;33m'
|
||||
EC='\033[0m'
|
||||
else
|
||||
RC=""
|
||||
GC=""
|
||||
BC=""
|
||||
YC=""
|
||||
EC=""
|
||||
fi
|
||||
}
|
||||
|
||||
__detect_color_support
|
||||
|
||||
while getopts ':fhls' opt
|
||||
do
|
||||
case "${opt}" in
|
||||
|
||||
h ) __usage; exit 0 ;;
|
||||
l ) _LOCAL=1 ;;
|
||||
f ) _FULL=1 ;;
|
||||
s ) _STOP=1 ;;
|
||||
|
||||
esac # --- end of case ---
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [[ "${_STOP}" == "1" ]]; then
|
||||
if [[ -f "${_PATH}/var/run/salt-minion.pid" ]]; then
|
||||
echoinfo "Stopping the salt-minion"
|
||||
kill $(cat "${_PATH}/var/run/salt-minion.pid")
|
||||
else
|
||||
echoerror "${_PATH}/var/run/salt-minion.pid not found"
|
||||
fi
|
||||
if [[ -f "${_PATH}/var/run/salt-master.pid" ]]; then
|
||||
echoinfo "Stopping the salt-master"
|
||||
kill $(cat "${_PATH}/var/run/salt-master.pid")
|
||||
else
|
||||
echoerror "${_PATH}/var/run/salt-master.pid not found"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$_LOCAL" == "1" && "$_FULL" == "1" ]]; then
|
||||
echo "Only specify either local or full"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
__parse_repo_json_jq() {
|
||||
|
||||
# $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() {
|
||||
# shellcheck disable=SC2086
|
||||
curl $_CURL_ARGS -L -s -f -o "$1" "$2" >/dev/null 2>&1 ||
|
||||
wget $_WGET_ARGS -q -O "$1" "$2" >/dev/null 2>&1 ||
|
||||
fetch $_FETCH_ARGS -q -o "$1" "$2" >/dev/null 2>&1 || # FreeBSD
|
||||
fetch -q -o "$1" "$2" >/dev/null 2>&1 || # Pre FreeBSD 10
|
||||
ftp -o "$1" "$2" >/dev/null 2>&1 || # OpenBSD
|
||||
(echoerror "$2 failed to download to $1"; exit 1)
|
||||
}
|
||||
|
||||
__gather_os_info() {
|
||||
OS_NAME=$(uname -s 2>/dev/null)
|
||||
OS_NAME_L=$( echo "$OS_NAME" | tr '[:upper:]' '[:lower:]' )
|
||||
OS_VERSION=$(uname -r)
|
||||
# shellcheck disable=SC2034
|
||||
OS_VERSION_L=$( echo "$OS_VERSION" | tr '[:upper:]' '[:lower:]' )
|
||||
}
|
||||
|
||||
__gather_hardware_info() {
|
||||
if [ -f /proc/cpuinfo ]; then
|
||||
CPU_VENDOR_ID=$(awk '/vendor_id|Processor/ {sub(/-.*$/,"",$3); print $3; exit}' /proc/cpuinfo )
|
||||
elif [ -f /usr/bin/kstat ]; then
|
||||
# SmartOS.
|
||||
# Solaris!?
|
||||
# This has only been tested for a GenuineIntel CPU
|
||||
CPU_VENDOR_ID=$(/usr/bin/kstat -p cpu_info:0:cpu_info0:vendor_id | awk '{print $2}')
|
||||
else
|
||||
CPU_VENDOR_ID=$( sysctl -n hw.model )
|
||||
fi
|
||||
# shellcheck disable=SC2034
|
||||
CPU_VENDOR_ID_L=$( echo "$CPU_VENDOR_ID" | tr '[:upper:]' '[:lower:]' )
|
||||
CPU_ARCH=$(uname -m 2>/dev/null || uname -p 2>/dev/null || echo "unknown")
|
||||
CPU_ARCH_L=$( echo "$CPU_ARCH" | tr '[:upper:]' '[:lower:]' )
|
||||
}
|
||||
|
||||
__gather_hardware_info
|
||||
__gather_os_info
|
||||
|
||||
_DARWIN_ARM=0
|
||||
if [[ "${OS_NAME_L}" == "darwin" ]]; then
|
||||
OS_NAME="macos"
|
||||
# Use x86_64 packages until we are able build arm packages
|
||||
if [[ "${CPU_ARCH_L}" == "arm64" ]]; then
|
||||
CPU_ARCH_L="x86_64"
|
||||
_DARWIN_ARM=1
|
||||
fi
|
||||
else
|
||||
OS_NAME="${OS_NAME_L}"
|
||||
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}/${_JSON_VERSION}/${FILE}"
|
||||
|
||||
if [[ ! -f ${FILE} ]]; then
|
||||
echoinfo "Downloading Salt"
|
||||
__fetch_url "${FILE}" "${URL}"
|
||||
fi
|
||||
|
||||
if [[ ! -d "salt" ]]; then
|
||||
echoinfo "Extracting Salt"
|
||||
tar xf ${FILE}
|
||||
|
||||
# very very hacky, remove ASAP
|
||||
if [[ "${_DARWIN_ARM}" == "1" ]]; then
|
||||
mkdir -p ${_PATH}/opt/openssl/lib
|
||||
ln -s ${_PATH}/lib/libcrypto.dylib ${_PATH}/opt/openssl/lib/libcrypto.dylib
|
||||
fi
|
||||
else
|
||||
echoinfo "A salt directory already exists here, not extracting."
|
||||
fi
|
||||
|
||||
mkdir -p ${_PATH}/etc/salt
|
||||
mkdir -p ${_PATH}/srv/salt
|
||||
|
||||
cat <<EOT >${_PATH}/etc/salt/master
|
||||
root_dir: ${_PATH}
|
||||
file_root: ${_PATH}/srv/salt
|
||||
EOT
|
||||
|
||||
cat <<EOT >${_PATH}/etc/salt/minion
|
||||
root_dir: ${_PATH}
|
||||
master: 127.0.0.1
|
||||
id: minion
|
||||
EOT
|
||||
|
||||
cat <<EOT >${_PATH}/Saltfile
|
||||
salt-call:
|
||||
local: True
|
||||
config_dir: ${_PATH}/etc/salt
|
||||
log_file: ${_PATH}/var/log/salt/minion
|
||||
cachedir: ${_PATH}/var/cache/salt
|
||||
file_root: ${_PATH}/srv/salt
|
||||
|
||||
salt-master:
|
||||
config_dir: ${_PATH}/etc/salt
|
||||
file_root: ${_PATH}/srv/salt
|
||||
|
||||
salt-minion:
|
||||
config_dir: ${_PATH}/etc/salt
|
||||
file_root: ${_PATH}/srv/salt
|
||||
|
||||
salt-key:
|
||||
config_dir: ${_PATH}/etc/salt
|
||||
|
||||
salt:
|
||||
config_dir: ${_PATH}/etc/salt
|
||||
EOT
|
||||
|
||||
PATH_MSG="export PATH=${_PATH}"
|
||||
PATH_MSG+=':$PATH'
|
||||
|
||||
echoinfo "Get started with Salt by running the following commands"
|
||||
echoinfo "Add Salt to current path"
|
||||
echoinfo " ${PATH_MSG}"
|
||||
echoinfo "Use the provided Saltfile"
|
||||
echoinfo " export SALT_SALTFILE=${_PATH}/Saltfile"
|
||||
# very very hacky, remove ASAP
|
||||
if [[ "${_DARWIN_ARM}" == "1" ]]; then
|
||||
echoinfo "Setup HOMEBREW"
|
||||
echoinfo " export HOMEBREW_PREFIX=${_PATH}"
|
||||
fi
|
||||
|
||||
echoinfo "Create Salt states in ${_PATH}/srv/salt"
|
||||
|
||||
if [[ "${_FULL}" == "1" ]]; then
|
||||
|
||||
export PATH="${_PATH}:$PATH"
|
||||
export SALT_SALTFILE="${_PATH}/Saltfile"
|
||||
# very very hacky, remove ASAP
|
||||
if [[ "${_DARWIN_ARM}" == "1" ]]; then
|
||||
export HOMEBREW_PREFIX=${_PATH}
|
||||
fi
|
||||
echoinfo "Starting salt-master"
|
||||
salt-master -d -c ${_PATH}/etc/salt
|
||||
sleep 5
|
||||
echoinfo "Starting salt-minion"
|
||||
salt-minion -d -c ${_PATH}/etc/salt
|
||||
|
||||
echoinfo "Run salt-key -L to see pending minion keys"
|
||||
echoinfo "Run salt-key -a minion to accept the pending minion key"
|
||||
|
||||
fi
|
|
@ -1,16 +1,48 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
import pytest
|
||||
import testinfra
|
||||
import requests
|
||||
|
||||
API_URL = (
|
||||
"https://packages.broadcom.com/artifactory/api/storage/saltproject-generic/windows"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def host():
|
||||
if os.environ.get('KITCHEN_USERNAME') == 'vagrant':
|
||||
if 'windows' in os.environ.get('KITCHEN_INSTANCE'):
|
||||
return testinfra.get_host(
|
||||
'winrm://{KITCHEN_USERNAME}:{KITCHEN_PASSWORD}@{KITCHEN_HOSTNAME}:{KITCHEN_PORT}'.format(**os.environ),
|
||||
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))
|
||||
@pytest.fixture(scope="session")
|
||||
def target_python_version():
|
||||
return 3
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def target_salt_version():
|
||||
|
||||
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 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 versions[target_salt]
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
|
@ -1,7 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import pytest
|
||||
|
||||
|
||||
def test_ping(host):
|
||||
with host.sudo():
|
||||
assert host.salt('test.ping', '--timeout=120')
|
82
tests/integration/test_installation.py
Normal file
82
tests/integration/test_installation.py
Normal file
|
@ -0,0 +1,82 @@
|
|||
import json
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
import pytest
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@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 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:
|
||||
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,4 +1,2 @@
|
|||
testinfra
|
||||
paramiko
|
||||
pywinrm; sys.platform == 'win32'
|
||||
six>=1.10.0
|
||||
pytest
|
||||
requests
|
||||
|
|
9
tools/__init__.py
Normal file
9
tools/__init__.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import logging
|
||||
|
||||
import ptscripts
|
||||
|
||||
ptscripts.register_tools_module("tools.pre_commit")
|
||||
ptscripts.register_tools_module("tools.release")
|
||||
|
||||
for name in ("boto3", "botocore", "urllib3"):
|
||||
logging.getLogger(name).setLevel(logging.INFO)
|
51
tools/pre_commit.py
Normal file
51
tools/pre_commit.py
Normal file
|
@ -0,0 +1,51 @@
|
|||
"""
|
||||
These commands are used by pre-commit.
|
||||
"""
|
||||
# pylint: disable=resource-leakage,broad-except,3rd-party-module-not-gated
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import shutil
|
||||
|
||||
from ptscripts import Context, command_group
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# Define the command group
|
||||
cgroup = command_group(
|
||||
name="pre-commit", help="Pre-Commit Related Commands", description=__doc__
|
||||
)
|
||||
|
||||
|
||||
@cgroup.command(
|
||||
name="actionlint",
|
||||
arguments={
|
||||
"files": {
|
||||
"help": "Files to run actionlint against",
|
||||
"nargs": "*",
|
||||
},
|
||||
"no_color": {
|
||||
"help": "Disable colors in output",
|
||||
},
|
||||
},
|
||||
)
|
||||
def actionlint(ctx: Context, files: list[str], no_color: bool = False):
|
||||
"""
|
||||
Run `actionlint`
|
||||
"""
|
||||
actionlint = shutil.which("actionlint")
|
||||
if not actionlint:
|
||||
ctx.warn("Could not find the 'actionlint' binary")
|
||||
ctx.exit(0)
|
||||
cmdline = [actionlint]
|
||||
if no_color is False:
|
||||
cmdline.append("-color")
|
||||
shellcheck = shutil.which("shellcheck")
|
||||
if shellcheck:
|
||||
cmdline.append(f"-shellcheck={shellcheck}")
|
||||
pyflakes = shutil.which("pyflakes")
|
||||
if pyflakes:
|
||||
cmdline.append(f"-pyflakes={pyflakes}")
|
||||
ret = ctx.run(*cmdline, *files, check=False)
|
||||
ctx.exit(ret.returncode)
|
147
tools/release.py
Normal file
147
tools/release.py
Normal file
|
@ -0,0 +1,147 @@
|
|||
"""
|
||||
These commands are used to release Salt Bootstrap.
|
||||
"""
|
||||
# pylint: disable=resource-leakage,broad-except,3rd-party-module-not-gated
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from ptscripts import command_group
|
||||
from ptscripts import Context
|
||||
|
||||
import tools.utils
|
||||
|
||||
try:
|
||||
import boto3
|
||||
except ImportError:
|
||||
print(
|
||||
"\nPlease run 'python -m pip install -r requirements/release.txt'\n",
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
raise
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# Define the command group
|
||||
release = command_group(
|
||||
name="release",
|
||||
help="Release Related Commands",
|
||||
description=__doc__,
|
||||
)
|
||||
|
||||
|
||||
@release.command(
|
||||
name="s3-publish",
|
||||
arguments={
|
||||
"branch": {
|
||||
"help": "The kind of publish to do.",
|
||||
"choices": ("stable", "develop"),
|
||||
},
|
||||
"key_id": {
|
||||
"help": "The GnuPG key ID used to sign.",
|
||||
"required": True,
|
||||
},
|
||||
},
|
||||
)
|
||||
def s3_publish(ctx: Context, branch: str, key_id: str = None):
|
||||
"""
|
||||
Publish scripts to S3.
|
||||
"""
|
||||
if TYPE_CHECKING:
|
||||
assert key_id
|
||||
|
||||
ctx.info("Preparing upload ...")
|
||||
s3 = boto3.client("s3")
|
||||
|
||||
ctx.info(
|
||||
f"Uploading release artifacts to {tools.utils.RELEASE_BUCKET_NAME!r} bucket ..."
|
||||
)
|
||||
upload_files = {
|
||||
"stable": {
|
||||
f"{tools.utils.GPG_KEY_FILENAME}.gpg": [
|
||||
f"bootstrap/stable/{tools.utils.GPG_KEY_FILENAME}.gpg",
|
||||
],
|
||||
f"{tools.utils.GPG_KEY_FILENAME}.pub": [
|
||||
f"bootstrap/stable/{tools.utils.GPG_KEY_FILENAME}.pub",
|
||||
],
|
||||
"bootstrap-salt.sh": [
|
||||
"bootstrap/stable/bootstrap-salt.sh",
|
||||
],
|
||||
"bootstrap-salt.sh.sha256": [
|
||||
"bootstrap/stable/bootstrap-salt.sh.sha256",
|
||||
"bootstrap/stable/bootstrap/sha256",
|
||||
],
|
||||
"bootstrap-salt.ps1": [
|
||||
"bootstrap/stable/bootstrap-salt.ps1",
|
||||
],
|
||||
"bootstrap-salt.ps1.sha256": [
|
||||
"bootstrap/stable/bootstrap-salt.ps1.sha256",
|
||||
"bootstrap/stable/winbootstrap/sha256",
|
||||
],
|
||||
},
|
||||
"develop": {
|
||||
f"{tools.utils.GPG_KEY_FILENAME}.gpg": [
|
||||
f"bootstrap/develop/{tools.utils.GPG_KEY_FILENAME}.gpg",
|
||||
],
|
||||
f"{tools.utils.GPG_KEY_FILENAME}.pub": [
|
||||
f"bootstrap/develop/{tools.utils.GPG_KEY_FILENAME}.pub",
|
||||
],
|
||||
"bootstrap-salt.sh": [
|
||||
"bootstrap/develop/bootstrap-salt.sh",
|
||||
"bootstrap/develop/bootstrap/develop",
|
||||
],
|
||||
"bootstrap-salt.sh.sha256": [
|
||||
"bootstrap/develop/bootstrap-salt.sh.sha256",
|
||||
],
|
||||
"bootstrap-salt.ps1": [
|
||||
"bootstrap/develop/bootstrap-salt.ps1",
|
||||
"bootstrap/develop/winbootstrap/develop",
|
||||
],
|
||||
"bootstrap-salt.ps1.sha256": [
|
||||
"bootstrap/develop/bootstrap-salt.ps1.sha256",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
files_to_upload: list[tuple[str, str]] = []
|
||||
|
||||
try:
|
||||
# Export the GPG key in use
|
||||
tools.utils.export_gpg_key(ctx, key_id, tools.utils.REPO_ROOT)
|
||||
for lpath, rpaths in upload_files[branch].items():
|
||||
ctx.info(f"Processing {lpath} ...")
|
||||
if lpath.endswith(".sha256") and not os.path.exists(lpath):
|
||||
ret = ctx.run(
|
||||
"sha256sum",
|
||||
lpath.replace(".sha256", ""),
|
||||
capture=True,
|
||||
check=False,
|
||||
)
|
||||
if ret.returncode:
|
||||
ctx.error(f"Failed to get the sha256sum of {lpath}")
|
||||
ctx.exit(1)
|
||||
pathlib.Path(lpath).write_bytes(ret.stdout)
|
||||
for rpath in rpaths:
|
||||
files_to_upload.append((lpath, rpath))
|
||||
if not lpath.endswith((".gpg", ".pub")):
|
||||
tools.utils.gpg_sign(ctx, key_id, pathlib.Path(lpath))
|
||||
files_to_upload.append((f"{lpath}.asc", f"{rpaths[0]}.asc"))
|
||||
|
||||
for lpath, rpath in sorted(files_to_upload):
|
||||
size = pathlib.Path(lpath).stat().st_size
|
||||
ctx.info(f" Uploading {lpath} -> {rpath}")
|
||||
with tools.utils.create_progress_bar(file_progress=True) as progress:
|
||||
task = progress.add_task(description="Uploading...", total=size)
|
||||
s3.upload_file(
|
||||
lpath,
|
||||
tools.utils.RELEASE_BUCKET_NAME,
|
||||
rpath,
|
||||
Callback=tools.utils.UpdateProgress(progress, task),
|
||||
)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
80
tools/utils.py
Normal file
80
tools/utils.py
Normal file
|
@ -0,0 +1,80 @@
|
|||
# pylint: disable=resource-leakage,broad-except,3rd-party-module-not-gated
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
from ptscripts import Context
|
||||
from rich.progress import BarColumn
|
||||
from rich.progress import Column
|
||||
from rich.progress import DownloadColumn
|
||||
from rich.progress import Progress
|
||||
from rich.progress import TextColumn
|
||||
from rich.progress import TimeRemainingColumn
|
||||
from rich.progress import TransferSpeedColumn
|
||||
|
||||
REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent
|
||||
GPG_KEY_FILENAME = "SALT-PROJECT-GPG-PUBKEY-2023"
|
||||
SPB_ENVIRONMENT = os.environ.get("SPB_ENVIRONMENT") or "prod"
|
||||
RELEASE_BUCKET_NAME = f"salt-project-{SPB_ENVIRONMENT}-salt-artifacts-release"
|
||||
|
||||
|
||||
class UpdateProgress:
|
||||
def __init__(self, progress, task):
|
||||
self.progress = progress
|
||||
self.task = task
|
||||
|
||||
def __call__(self, chunk_size):
|
||||
self.progress.update(self.task, advance=chunk_size)
|
||||
|
||||
|
||||
def create_progress_bar(file_progress: bool = False, **kwargs):
|
||||
if file_progress:
|
||||
return Progress(
|
||||
TextColumn("[progress.description]{task.description}"),
|
||||
BarColumn(),
|
||||
DownloadColumn(),
|
||||
TransferSpeedColumn(),
|
||||
TextColumn("eta"),
|
||||
TimeRemainingColumn(),
|
||||
**kwargs,
|
||||
)
|
||||
return Progress(
|
||||
TextColumn(
|
||||
"[progress.description]{task.description}", table_column=Column(ratio=3)
|
||||
),
|
||||
BarColumn(),
|
||||
expand=True,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
def export_gpg_key(ctx: Context, key_id: str, export_path: pathlib.Path):
|
||||
keyfile_gpg = export_path.joinpath(GPG_KEY_FILENAME).with_suffix(".gpg")
|
||||
if keyfile_gpg.exists():
|
||||
keyfile_gpg.unlink()
|
||||
ctx.info(f"Exporting GnuPG Key '{key_id}' to {keyfile_gpg} ...")
|
||||
ctx.run("gpg", "--output", str(keyfile_gpg), "--export", key_id)
|
||||
keyfile_pub = export_path.joinpath(GPG_KEY_FILENAME).with_suffix(".pub")
|
||||
if keyfile_pub.exists():
|
||||
keyfile_pub.unlink()
|
||||
ctx.info(f"Exporting GnuPG Key '{key_id}' to {keyfile_pub} ...")
|
||||
ctx.run("gpg", "--armor", "--output", str(keyfile_pub), "--export", key_id)
|
||||
|
||||
|
||||
def gpg_sign(ctx: Context, key_id: str, path: pathlib.Path):
|
||||
ctx.info(f"GPG Signing '{path}' ...")
|
||||
signature_fpath = path.parent / f"{path.name}.asc"
|
||||
if signature_fpath.exists():
|
||||
signature_fpath.unlink()
|
||||
ctx.run(
|
||||
"gpg",
|
||||
"--local-user",
|
||||
key_id,
|
||||
"--output",
|
||||
str(signature_fpath),
|
||||
"--armor",
|
||||
"--detach-sign",
|
||||
"--sign",
|
||||
str(path),
|
||||
)
|
Loading…
Add table
Reference in a new issue