Compare commits
2129 Commits
release-2.
...
reduce-vm-
Author | SHA1 | Date | |
---|---|---|---|
2214071a82 | |||
dedc00661a | |||
0624a3061a | |||
3082fa3d0f | |||
d85b29aae1 | |||
af593465b2 | |||
870049523f | |||
184b1add54 | |||
37d824fd2d | |||
ff48144607 | |||
0faa805525 | |||
bc21433a05 | |||
19851bb07c | |||
7f7b65d388 | |||
d50f61eae5 | |||
77bfb53455 | |||
0e449ca75e | |||
f6d9ff4196 | |||
21aba10e08 | |||
bd9d90e00c | |||
5616a4a3ee | |||
4b9349a052 | |||
7e0a407250 | |||
1173711acc | |||
998e04e5a7 | |||
40cbdceb3c | |||
e54e7c0e1d | |||
53ad8d9126 | |||
96bb0a3e12 | |||
76dae63c69 | |||
fae41172ed | |||
f85111f6d4 | |||
30d057a0a8 | |||
4123cf13ef | |||
5d01dfa179 | |||
4dbfd42f1d | |||
0b464b5239 | |||
dac4705ebe | |||
d5f6838fba | |||
354ffe7bd6 | |||
427f868718 | |||
d7756d85ef | |||
2c2b2ed96e | |||
361d2def09 | |||
f47ad82991 | |||
f488ecb6cc | |||
08293f2ef7 | |||
fe1a2d5dd9 | |||
73c2722d00 | |||
a5714a8c6b | |||
e410e30694 | |||
0b2533143f | |||
3e4ea1065a | |||
6dbb09435c | |||
d8a4aea9bc | |||
a8f58c244b | |||
169280ba64 | |||
fa03f4ffd0 | |||
7aa415e707 | |||
cd459a04f3 | |||
a00b0c48fe | |||
8a1ee990a2 | |||
523d016767 | |||
d321e42d9e | |||
a512b861e0 | |||
d870a3ee4e | |||
41036e3b53 | |||
975362249c | |||
ce2642f27b | |||
5dc12b2a15 | |||
edc33888a3 | |||
8c12dedf05 | |||
1697182e73 | |||
1c638bdb06 | |||
7eaf2bc4b8 | |||
0b0faf8f72 | |||
9bb38163c2 | |||
a09c73a356 | |||
d94f3ce965 | |||
966a8b95de | |||
a01d0c047a | |||
21e8809186 | |||
4cb688d5e4 | |||
e385ac7b40 | |||
5ce530c909 | |||
f82cf29a8a | |||
9f62f60814 | |||
315cfe1edd | |||
e01355834b | |||
001df231a6 | |||
def88b26a4 | |||
537891a380 | |||
85ae701b0f | |||
e57e958a39 | |||
91dea023ae | |||
245454855d | |||
3a112e834c | |||
cf0de0904c | |||
d772350b04 | |||
3351dc0925 | |||
f0e20705aa | |||
ff4e572e0c | |||
97e71da97b | |||
a7f98116ca | |||
088b1b0cec | |||
11f35e462c | |||
da3ff1cc11 | |||
663fcd104c | |||
a2019c1c24 | |||
3a43ac4506 | |||
f91e00a61b | |||
c6bdc38776 | |||
08a7010e80 | |||
538deff9ea | |||
cd7d11fea2 | |||
23b56e3f89 | |||
eee5b5890d | |||
ab0ef182fb | |||
4db3e2c3cf | |||
3d19e744f0 | |||
929c818b63 | |||
4baa2c8704 | |||
f3065cc5c4 | |||
ed2059395c | |||
8919901ed5 | |||
cc0c3d73dc | |||
dd0f42171f | |||
1b870a1862 | |||
8a423abd0f | |||
3ec2e497c6 | |||
7844b8dbac | |||
e87040d5ba | |||
d58343d201 | |||
b2cce8d6dc | |||
3067e565c0 | |||
c6fcbf6ee0 | |||
fdf5988ea8 | |||
a7d42824be | |||
9ef6678b7e | |||
70a54451b1 | |||
c6758fe544 | |||
10315590c7 | |||
03ac02afe4 | |||
fd83ec9d91 | |||
c58497cde9 | |||
baf4842774 | |||
01c86af77f | |||
e7d29715b4 | |||
30da721f82 | |||
a1cf8291a9 | |||
ef95eb078a | |||
7ddc175b70 | |||
3305383873 | |||
7f6ca804a1 | |||
7f785a5e4e | |||
eff331ad32 | |||
71fa66c08d | |||
26af6c7fda | |||
43c1e3b15e | |||
69bf6639f3 | |||
c275b3db37 | |||
66eaba3775 | |||
44950efc34 | |||
90b0151caf | |||
04e40f2e6f | |||
7a9def547e | |||
4317723d3c | |||
26034b296e | |||
e250bb65bb | |||
12c8d0456f | |||
667bb2c913 | |||
d40b073f97 | |||
5d822ad8cb | |||
4a259ee3f0 | |||
b34b7e0385 | |||
a0d2bda742 | |||
c13b21e830 | |||
9442f28c60 | |||
8fa5ae1865 | |||
65b0604db7 | |||
082ac10fbb | |||
8d5091a3f7 | |||
b60220c597 | |||
bf42ccee4e | |||
bfbb3f8d33 | |||
250b80ee7c | |||
ffda3656d1 | |||
f5474ec6cc | |||
ad9f194c24 | |||
ef7197f925 | |||
9648300994 | |||
4b0a134bc9 | |||
ad565ad922 | |||
65e22481c6 | |||
6f419aa18e | |||
c698790122 | |||
de4d6a69ee | |||
989ba207e9 | |||
f2bdd4bb2f | |||
200b630319 | |||
21289db181 | |||
c9a44e4089 | |||
0dbde7536f | |||
8d53c1723c | |||
dce68e6839 | |||
11c01ef600 | |||
785366c2de | |||
e3ea19307a | |||
ee8b909a67 | |||
1d119f1a3c | |||
4ea1a0132e | |||
0ddf872163 | |||
a487667b9d | |||
7863fde552 | |||
758d34a7d1 | |||
c80f2cd573 | |||
0e26f6f3e2 | |||
ab0163a3ad | |||
2eb588bed9 | |||
a88bad7947 | |||
89d42a7716 | |||
b4dd8b4313 | |||
4fc1fc729e | |||
13e1f33898 | |||
de2c4429a4 | |||
22bb0976d5 | |||
a2ed5fcd3d | |||
6497ecc767 | |||
54fb75f0e0 | |||
5a405336ae | |||
fd6bb0f7fd | |||
0e971a37aa | |||
4e52fb7a1f | |||
3e7b568d3e | |||
a45a40a398 | |||
4cb1f529d1 | |||
fe819a6ec3 | |||
df5a06dc70 | |||
64447e745e | |||
78eb74c252 | |||
669589f761 | |||
b7a83531e7 | |||
a9e29a9eb2 | |||
a0a2f40295 | |||
7b7c9f509e | |||
beb2660aa8 | |||
3f78bf9298 | |||
06a2a3ed6c | |||
eb40523388 | |||
50fbfa2a9a | |||
747d8bb4c2 | |||
e90cae9344 | |||
bb67d9524d | |||
a306f15a74 | |||
8c09c3fda2 | |||
a656b7ed9a | |||
2e8b72e278 | |||
ddf5c6ee12 | |||
eda7ea5695 | |||
08c0b34270 | |||
1a86b4cb6d | |||
aea150e5dc | |||
ee2dd4fd28 | |||
c3b674526d | |||
565eab901b | |||
c3315ac742 | |||
da9b34d1b0 | |||
243ca5d08f | |||
29ea790c30 | |||
ae780e6a9b | |||
471326f458 | |||
7395c27932 | |||
d435edefc4 | |||
eb73f1d27d | |||
9a31f3285a | |||
45a070f1ba | |||
ccb742c7ab | |||
cb848fa7cb | |||
8abf49ae13 | |||
8f2390a120 | |||
81a3f81aa1 | |||
0fb404c775 | |||
51069223f5 | |||
17b51240c9 | |||
306103ed05 | |||
eb628efbc4 | |||
2c3ea84e6f | |||
85f15900a4 | |||
af1f318852 | |||
b31afe235f | |||
a9321aaf86 | |||
d2944d2813 | |||
fe02d21d23 | |||
5160e7e20b | |||
c440106eff | |||
a1c47b1b20 | |||
93724ed29c | |||
75fecf1542 | |||
0d7bdc6cca | |||
c87d70b04b | |||
fa7a504fa5 | |||
612cfdceb1 | |||
70bb19dd23 | |||
94d3f65f09 | |||
cf3ac625da | |||
c2e3071a33 | |||
21e8b96e22 | |||
3acacc6150 | |||
d583d331b5 | |||
b321ca3e64 | |||
6b1188e3dc | |||
0d4f57aa22 | |||
bc5b38a771 | |||
f46910eac3 | |||
adb8ff14b9 | |||
7ba85710ad | |||
cbd3a83a06 | |||
eb015c0362 | |||
17681a7e31 | |||
cca7615456 | |||
a4b15690b8 | |||
32743868c7 | |||
7d221be408 | |||
2d75077d4a | |||
802da0bcb0 | |||
6305dd39e9 | |||
b3f6d05131 | |||
8ebeb88e57 | |||
c9d685833b | |||
f3332af3f2 | |||
870065517f | |||
267a8c6025 | |||
edff3f8afd | |||
cdc8d17d0b | |||
8f0e553e11 | |||
5f9a7b9d49 | |||
af7bc17c9a | |||
e2b62ba154 | |||
5da421c178 | |||
becb6267fb | |||
34754ccb38 | |||
dcd0edce40 | |||
7a0030b145 | |||
fa9e41047e | |||
f5f1f9478c | |||
6a70f02662 | |||
3bc0dfb354 | |||
418df29ff0 | |||
1f47d5b74f | |||
e52d70885e | |||
3f1409d87d | |||
0b2e5b2f82 | |||
228efcba0e | |||
401ea552c2 | |||
8cce6df80a | |||
3e522a9f59 | |||
ae45de3584 | |||
513b6dd6ad | |||
e65050d3f4 | |||
4a8a47d438 | |||
b2d8ec68a4 | |||
d3101d65aa | |||
abaddb4c9b | |||
acb86c23f9 | |||
bea5034ddf | |||
5194d8306e | |||
4846f33136 | |||
de8d1f1a3b | |||
ddd7aa844c | |||
1fd31ccc28 | |||
6f520eacf7 | |||
a0eb7c0d5c | |||
94322ef72e | |||
c6ab6406c2 | |||
2c132dccba | |||
7919a47165 | |||
7b2586943b | |||
f964b3438d | |||
09f3caedaa | |||
fe4b1f6dee | |||
bc5e33791f | |||
d669b93c4f | |||
a81c6d5448 | |||
6b34e3ef08 | |||
dbdc4d4123 | |||
c24c279df7 | |||
0f243d751f | |||
31f6d38cd2 | |||
c31bb9aca7 | |||
748b0b294d | |||
af8210dfea | |||
493969588e | |||
293573c665 | |||
5ffdb7355a | |||
c33e4d7bb7 | |||
24b82917d1 | |||
9696936b59 | |||
aeca9304f4 | |||
8fef156e8f | |||
8497528240 | |||
ebd71f6ad7 | |||
c677438189 | |||
d646053c0e | |||
c9a7ae1cae | |||
e84c1004df | |||
b19b727fe7 | |||
0932318b85 | |||
e573a2f6d4 | |||
52c1826423 | |||
e1881fae02 | |||
5ed85094c2 | |||
bf29ea55cf | |||
cafe4f1352 | |||
a9ee1c4167 | |||
a8c1bccdd5 | |||
71cf553aa8 | |||
a894a5e29b | |||
9bc7492ff2 | |||
77bda0df1c | |||
4c37399c75 | |||
cd69283184 | |||
cf3b3ca6fd | |||
1955943d4a | |||
3b68d63643 | |||
d21bfb84ad | |||
2a7c9d27b2 | |||
9c610ee11d | |||
7295d13d60 | |||
2fbbb70baa | |||
b5ce69cf3c | |||
1c5f657f97 | |||
9613ed8782 | |||
b142995808 | |||
36e5d742dc | |||
b9e3861385 | |||
f2bb3aba1e | |||
4243003c94 | |||
050bd0527f | |||
fe32de94b9 | |||
d2383d27a9 | |||
788190beca | |||
13aa32278a | |||
38ce02c610 | |||
9312ae7c6e | |||
1d86919883 | |||
78c1775661 | |||
5d00b851ce | |||
f8b93fa88a | |||
0405af1107 | |||
872e173887 | |||
b42757d330 | |||
a4d8d15a0e | |||
f8f197e26b | |||
4f85b75087 | |||
8895e38060 | |||
9a896957d9 | |||
37e004164b | |||
77069354cf | |||
2aafab6c19 | |||
35aaf97216 | |||
25cb90bc2d | |||
3311e0a296 | |||
eb31653d66 | |||
180df831ba | |||
2fa64f9fd6 | |||
a1521dc16e | |||
bf31a3a872 | |||
4a8fd94a5f | |||
e214bd0e1b | |||
4ad89ef8f1 | |||
7a66be8254 | |||
db696785d5 | |||
dfec133273 | |||
41605b4135 | |||
475abcc3a8 | |||
3a7d84e014 | |||
ad3f84df98 | |||
79e742c03b | |||
d79ada931d | |||
b2f6abe4ab | |||
c5dac1cdf6 | |||
89a0f515c7 | |||
d296adcd65 | |||
141064c443 | |||
54859cb814 | |||
0f0991b145 | |||
658d62be16 | |||
0139bfdb71 | |||
efeac70e40 | |||
b4db077e6a | |||
280e4e3b57 | |||
a962fa2357 | |||
775851b00c | |||
f8fadf53cd | |||
ce13699dfa | |||
fc5937e948 | |||
729e2c565b | |||
26ed50f04a | |||
2b80d053f3 | |||
f5ee8b71ff | |||
4c76feb574 | |||
18d84db41c | |||
08a571b4a1 | |||
5ebd305d17 | |||
edc73bc3c8 | |||
b7fa2d7b87 | |||
7771ac6074 | |||
f25b6fce1c | |||
d7b79395c7 | |||
ce18b0f22d | |||
2d8f60000c | |||
0b102287d1 | |||
d325fd6af7 | |||
e949b8a1e8 | |||
ab6e284180 | |||
7421b6e180 | |||
a2f03c559a | |||
3ced391fab | |||
ea7dcd46d7 | |||
94e33bdbbf | |||
29f833e9a4 | |||
8c32be5feb | |||
0ba2e655f4 | |||
78189186e5 | |||
96e875cd50 | |||
808524bed6 | |||
75e00420ec | |||
8be5604da4 | |||
02624554ae | |||
9d1e9a6a78 | |||
861d5b763d | |||
4013c48acb | |||
f264426646 | |||
862fd2c5c4 | |||
4014a1cccb | |||
c55844b80e | |||
a4fa9aed75 | |||
659001c9d7 | |||
07647fb720 | |||
161bd55ab2 | |||
4b67c7d6a6 | |||
e26921e3e1 | |||
f80a5755c3 | |||
feeea7e512 | |||
09ea2ca688 | |||
b7a8d7a4d5 | |||
9405eb821b | |||
708677caf1 | |||
d5cdae1f16 | |||
b7a9217d77 | |||
82633c6f61 | |||
7afbdb3e1e | |||
c14d9c5c97 | |||
48035e3a7e | |||
a257e61f60 | |||
9948863d3a | |||
3a3addb91e | |||
72b8830f62 | |||
e6ba73349e | |||
55e581be3b | |||
9cd7d66332 | |||
6ea7abf443 | |||
3254080a1c | |||
4ffe138dfa | |||
86b81a855a | |||
bde261bd06 | |||
2b75552d1c | |||
951face343 | |||
07d45e6b62 | |||
9a72de54de | |||
4313c13656 | |||
c880b24a80 | |||
29827711f1 | |||
ab6d204641 | |||
426b8913c0 | |||
970ecbb008 | |||
eb951f1c2a | |||
3378c9f385 | |||
4c820b853b | |||
a505a4c71f | |||
8727f88e41 | |||
c2a8d543fb | |||
4ddbd2bd2d | |||
f9f5143c93 | |||
fccd99c96c | |||
dc7cf7ecd8 | |||
169eb34a59 | |||
4deeaba335 | |||
a59e27cb6b | |||
617af4beda | |||
b3ed25ee35 | |||
c7072b48dc | |||
02dc9fbd3e | |||
c98e1d1b5b | |||
e907d55621 | |||
cb318931aa | |||
709ae1d244 | |||
73ce6aef97 | |||
6682a843b4 | |||
dc33a1971d | |||
ed6f8df784 | |||
43216436ab | |||
cdc25523bf | |||
b77780ebf7 | |||
f27bea574e | |||
c38cf5dd5c | |||
2985b129fc | |||
107cb7f549 | |||
6c30b3f263 | |||
0104396c50 | |||
eecaec2919 | |||
4a03d13d08 | |||
fcb5e77338 | |||
ece174da7c | |||
a94b893e2c | |||
5e2cb4d244 | |||
dff58023d9 | |||
9a8f95e73d | |||
766d3696c9 | |||
b88229a662 | |||
c00cea7b17 | |||
0c4f57a093 | |||
3a6069916d | |||
e6eda9d811 | |||
e8f0fb82fe | |||
19856cf692 | |||
3450865d3f | |||
deb532ce27 | |||
1bb4f88af1 | |||
dcc04e54f3 | |||
4020a93d7e | |||
a676c106d3 | |||
acbf44a1b4 | |||
baed5f0b32 | |||
8afd74ce1f | |||
f6e4a231cb | |||
3a5f5692ca | |||
9b37699d0d | |||
cc382f2412 | |||
9a8bf0e38a | |||
97dfdcd8fe | |||
a9f52060c9 | |||
8cf5fefe84 | |||
f73b941d8a | |||
fb8631cdf6 | |||
7859aee735 | |||
83c3ce7f8f | |||
309aaee427 | |||
349c8901f8 | |||
df9aba6298 | |||
8f0bd36155 | |||
2ae3ea9ee3 | |||
99115ad04b | |||
7747ff2572 | |||
fff400513b | |||
eb4bd36f73 | |||
2d20f0c024 | |||
b0793df293 | |||
ab213a7db0 | |||
9fb1814784 | |||
1ca50f3eea | |||
82f68ca395 | |||
3a675393dc | |||
9c41769dab | |||
dba29db58d | |||
e175ccdde0 | |||
9e2104c7d3 | |||
1d9502e01d | |||
c710c93c02 | |||
13c793fd0d | |||
1555d78155 | |||
fd8260b930 | |||
6769bb32b1 | |||
677b7ecd89 | |||
659fa0eddc | |||
501deecdd0 | |||
7fec254f62 | |||
835811ec84 | |||
b7fe368469 | |||
8b3f3c04cc | |||
ecd649846a | |||
27c2d7e9e2 | |||
f366863a99 | |||
5bb54ef6a2 | |||
f7dade867a | |||
5cbcec8968 | |||
62f34c6085 | |||
d908e86590 | |||
f9ce176211 | |||
1dab5b5d9c | |||
739608454d | |||
260dad8f10 | |||
c950bfface | |||
75b07ad40c | |||
bd84353fc9 | |||
9ee2fbc51c | |||
fa92d9c0e9 | |||
4aacec4542 | |||
6278b12af6 | |||
64e4de371e | |||
ad4958249f | |||
29f01d3e5b | |||
3fd7d91452 | |||
4ba1df5237 | |||
145c80e9ab | |||
ab0e06eae6 | |||
786ce8ddd7 | |||
f06de0735f | |||
6ff845a199 | |||
fe9e11b501 | |||
3c2eb52828 | |||
2838a7c304 | |||
2788a02096 | |||
8a2e1189fb | |||
bdd1c7bcb5 | |||
d81978625c | |||
2c93c997cf | |||
10337f2fcb | |||
6c41191646 | |||
7730cfd619 | |||
1853085ffe | |||
9247137e60 | |||
e8f048c71d | |||
6cb027dfab | |||
edde594bbe | |||
0707c8ea6f | |||
c0c2cd6e03 | |||
36c6de9abd | |||
c5debf013c | |||
f9cc8ae10c | |||
94dd02121b | |||
c360501854 | |||
8523f525aa | |||
b9a34b83d4 | |||
2a24c2e359 | |||
8d6cfd6e53 | |||
1f36df666d | |||
64dbf2e429 | |||
6881398941 | |||
57638124c5 | |||
ee2193d4cf | |||
eb56130433 | |||
5fbbcedebc | |||
18f2abad2f | |||
391dd97f95 | |||
44243eada9 | |||
34d0451585 | |||
c4346e590f | |||
bd81c615c3 | |||
3d9fd082ff | |||
826282fe89 | |||
73774326b3 | |||
374438a3d6 | |||
fd80ef1ff1 | |||
235173bb5f | |||
1750dec254 | |||
52f52db8f3 | |||
db94812163 | |||
4a6eb7eaa2 | |||
58fe1a0ed6 | |||
c80bb0007a | |||
8a03bb1bb4 | |||
d919c58e21 | |||
19bc610f44 | |||
85a5a79ef5 | |||
c7cffb14a7 | |||
6f61f3d9cb | |||
6b4bb2a121 | |||
e288449c5d | |||
ea35021c96 | |||
754424eca7 | |||
4ad56e2772 | |||
6f1352eb53 | |||
bf8c64af08 | |||
a98ab40434 | |||
6549bb12fc | |||
1329d3f03b | |||
843e908fa4 | |||
0ff883afeb | |||
0d5bcd3e20 | |||
a8cef962e2 | |||
b50890172b | |||
ffad2152b3 | |||
6674438849 | |||
4bc5e8d912 | |||
8ca0bfffe0 | |||
48282a344f | |||
050fde6327 | |||
4d3104b334 | |||
85fa6af313 | |||
1c4db6132d | |||
744c81d451 | |||
61be93b173 | |||
406fbdb4e7 | |||
136f14dec4 | |||
ab80342750 | |||
2c2e608eac | |||
8267922a16 | |||
90719a9990 | |||
93f71df628 | |||
791064a3d9 | |||
e90f32bdee | |||
9fe89a0641 | |||
14699f5e98 | |||
2f81bfa25e | |||
438da0c8e6 | |||
25f317233c | |||
5e4d68b848 | |||
4728739597 | |||
fc0d58ff48 | |||
491e260d20 | |||
a132733b2d | |||
b377dbb96f | |||
c4d753c931 | |||
ee3b7c5da5 | |||
dcc267f6f4 | |||
ccf60fc9ca | |||
a38a3e7ddf | |||
beb4aa52ea | |||
f7d0fb9ab2 | |||
ff331f4eba | |||
94eae6a8dc | |||
f8d6b54dbb | |||
67c4f2d95e | |||
03fefa8933 | |||
c8ec77a734 | |||
4f32f94a51 | |||
3dc384a17a | |||
f1d0d1a9fe | |||
c036a7d871 | |||
6e63f3d2b4 | |||
09748e80e9 | |||
44a4f356ba | |||
a0f41bf82a | |||
5ae3e2818b | |||
1a0b81ac64 | |||
20d99886ca | |||
b9fe301036 | |||
b5844018f2 | |||
30508502d3 | |||
bca601d377 | |||
65191375b8 | |||
a534eb45ce | |||
e796f08184 | |||
ed38d8d3a1 | |||
07ad5ecfce | |||
4db5e663c3 | |||
529faeea9e | |||
47510899c7 | |||
4cd949c7e1 | |||
31d7e64073 | |||
7c1ee142dd | |||
25e86c5ca9 | |||
c41dd92007 | |||
a564d89d46 | |||
6c6a6e85da | |||
ed0acd8027 | |||
b9a690463d | |||
cbf4586c4c | |||
c3986957c4 | |||
8795cf6494 | |||
80af8a5e79 | |||
b60f65c1e8 | |||
943107115a | |||
ddbe9956e4 | |||
fdbcce3a5e | |||
f007c77641 | |||
9439487219 | |||
df6da52195 | |||
6ca89c80af | |||
7fe0b87d83 | |||
8a654b6955 | |||
5a8cf824f6 | |||
5c25b57989 | |||
5d1fe64bc8 | |||
a731e25778 | |||
0d6dc08578 | |||
40261fdf14 | |||
590b4aa240 | |||
2a696ddb34 | |||
d7f08d1b0c | |||
4aa1ef28ea | |||
58faef6ff6 | |||
34a52a7028 | |||
ce751cb89d | |||
5cf2883444 | |||
6bff338bad | |||
c78862052c | |||
1f54cef71c | |||
d00508105b | |||
c272421910 | |||
78624c5bcb | |||
c681435432 | |||
4d3f637684 | |||
5e14398af4 | |||
990f87acc8 | |||
eeb376460d | |||
ef707b3461 | |||
2af918132e | |||
b9b654714e | |||
fe399e0e0c | |||
b192053e28 | |||
a84271aa7e | |||
1901b512d2 | |||
9fdda7eca8 | |||
a68ed897f0 | |||
582ff96d19 | |||
0374a55eb3 | |||
ccbe38f78c | |||
958840da89 | |||
1530411218 | |||
e5ec0f18c0 | |||
0f44e8c812 | |||
1cc0f3c8c9 | |||
d9c39c274e | |||
c38fb866b7 | |||
5ad1d9db5e | |||
32f3d92d6b | |||
72b45eec2e | |||
23716b0eff | |||
859df84b45 | |||
131bd933a6 | |||
52904ee6ad | |||
e3339fe3d8 | |||
547ef747da | |||
63b27ea067 | |||
bc5881b70a | |||
f4b95d42a6 | |||
ef76a578a4 | |||
3b99d24ceb | |||
4701abff4c | |||
717b8daafe | |||
c346e46022 | |||
24632ae81b | |||
befde271eb | |||
d689f57c94 | |||
ad3f503c0c | |||
ae6c780af6 | |||
8b9cd3959a | |||
dffeab320e | |||
999586a110 | |||
f8d5487f8e | |||
4189008245 | |||
44115d7d7a | |||
841e2f44c0 | |||
a8e4984cf7 | |||
49196c2ec4 | |||
3646dc0bd2 | |||
694de1d67b | |||
31caab5f92 | |||
472996c8b3 | |||
d62c67a5f5 | |||
e486151aea | |||
9c407e667d | |||
18efdc2c51 | |||
6dff39344b | |||
c4de3df492 | |||
f2e11f088b | |||
782f0511b9 | |||
fa093ee609 | |||
612bcc4bb8 | |||
4ad67acedd | |||
467dc19cbd | |||
726711513f | |||
9468642269 | |||
d387d4811f | |||
1b3c2dab2e | |||
76573bf293 | |||
5d3326b93f | |||
68dac4e181 | |||
262c96ec0b | |||
2acdc33aa1 | |||
8acd33d0df | |||
a2e23c1a71 | |||
1b5cc175b9 | |||
a71da25b57 | |||
5ac614f97d | |||
b8b8b82ff4 | |||
7da3dbcb39 | |||
680293e79c | |||
023b16349e | |||
c4976437a8 | |||
97ca2f3c78 | |||
e76385e7cd | |||
7c2fb227f4 | |||
08bfa0b18f | |||
952cad8d63 | |||
5bce39abf8 | |||
fc57c0b27e | |||
dd4bc5fbfe | |||
d2a7434c67 | |||
5fa885b150 | |||
f3fb758f0c | |||
6386ec029c | |||
ad7cefa352 | |||
09d9bc910e | |||
e2f1f8d69d | |||
be2bfd867c | |||
133a7a0e1b | |||
efb47edb9f | |||
36bec19a84 | |||
6db6c8678c | |||
5603f9f374 | |||
7ebb8c3f2e | |||
acb6f243fd | |||
220f149299 | |||
1baabb3c05 | |||
617b17ad46 | |||
8af86e4c1e | |||
9dc9a670a5 | |||
b46ddf35fc | |||
de762400ad | |||
e60ece2b5e | |||
e6976a54e1 | |||
64daaf1887 | |||
1c75ec9ec1 | |||
c8a61ec98c | |||
aeeae76750 | |||
30b062fd43 | |||
8f899a1101 | |||
386c739d5b | |||
fddff783c8 | |||
bbd1161147 | |||
ab938602a9 | |||
e31890806c | |||
30c77ea4c1 | |||
175cdba9b1 | |||
ea29cd0890 | |||
68653c31c0 | |||
be5fdab3aa | |||
f4daf5856e | |||
49d869f662 | |||
b36bb9115a | |||
9ad2d24ad8 | |||
0088fe0ab7 | |||
ab93b17a7e | |||
9f1b980844 | |||
86d05ac180 | |||
bf6fcf6347 | |||
b9e4e27195 | |||
8585134db4 | |||
7e862939db | |||
0d3bd69a17 | |||
2b97b661d8 | |||
24f12b024d | |||
f7d363dc96 | |||
47050003a0 | |||
4df6e35270 | |||
307f598bc8 | |||
eb10249a75 | |||
b4318e9967 | |||
c53561c9a0 | |||
f2f9f1d377 | |||
4487a374b1 | |||
06f8368ce6 | |||
5b976a8d80 | |||
e73803c72c | |||
b3876142d2 | |||
9f11946f8a | |||
9c28f61dbd | |||
09291bbdd2 | |||
7fa6314791 | |||
65d95d767a | |||
8306adb102 | |||
4b3db07cdb | |||
c24a3a3b15 | |||
aca6be3adf | |||
9617532561 | |||
ff5e487e32 | |||
9c51ac5157 | |||
07eab539a6 | |||
a608a048ad | |||
0cfa03fa8a | |||
6525461d97 | |||
f592fa1235 | |||
2e1863af78 | |||
2a282711df | |||
91073d7379 | |||
3ce5458f32 | |||
98c194735c | |||
626ea64f66 | |||
0d32c0d92b | |||
ce04fdde72 | |||
4ed3c85a88 | |||
14063b023c | |||
3d32f0e953 | |||
d821bed2ea | |||
058e05df41 | |||
a7ba7cdcd5 | |||
c01656b1e3 | |||
5071529a74 | |||
6d543b830a | |||
e6154998fd | |||
01c6239043 | |||
4607ac2e93 | |||
9ca5632582 | |||
51195212b4 | |||
7414409aa0 | |||
adfd77f11d | |||
f3ea8cf45e | |||
3bb9542606 | |||
1d0b3829ed | |||
a5d7178bf8 | |||
cbef8ea407 | |||
2ff4ae1f08 | |||
edf7f53f76 | |||
f58816c33c | |||
1562a9c2ec | |||
6cd243f14e | |||
4b03f6c20f | |||
d0a2ba37e8 | |||
e8ccbebd6f | |||
d4de9d096f | |||
e1f06dd406 | |||
6f82cf12f5 | |||
ca8080a695 | |||
55d14090d0 | |||
da8498bb6f | |||
b33896844e | |||
ca212c08de | |||
784439dccf | |||
d818c1c6d9 | |||
b9384ad913 | |||
76b0cbcb4e | |||
6bf3306401 | |||
bf477c24d3 | |||
79f6cd774a | |||
c3c9a42502 | |||
4a92b7221a | |||
9d5d945bdb | |||
475ce05979 | |||
57d7029317 | |||
e4fe679916 | |||
123632f5ed | |||
56d83c931b | |||
a22ae6143a | |||
a1ec0571b2 | |||
2db39d4856 | |||
e7729daefc | |||
97b4d79ed5 | |||
890fad389d | |||
0c203ece2d | |||
9e7f89d2a2 | |||
24c8ba832a | |||
c2700266b0 | |||
2cd8c51a07 | |||
589823bdc1 | |||
5dc8be9aa2 | |||
fad296616c | |||
ec01b40e85 | |||
2de5c4821c | |||
9efe145688 | |||
51bc64fb35 | |||
6380483e8b | |||
ae1dcb031f | |||
9535a41187 | |||
47495c336b | |||
d69d4a8303 | |||
ab4d590547 | |||
85271fc2e5 | |||
f6159c5677 | |||
668b9b026c | |||
77de7cb785 | |||
e5d6c042a9 | |||
3ae397019c | |||
7d3e59cf2e | |||
4eb83bb7f6 | |||
1429ba9a07 | |||
889454f2bc | |||
2fba94c5e5 | |||
4726a110fc | |||
6b43d6aff2 | |||
024a3ee551 | |||
cd7381d8de | |||
f53764f949 | |||
57c3aa4560 | |||
bb530da5c2 | |||
cc6cbfbe71 | |||
6f556f5451 | |||
9074bd297b | |||
8030e6f76c | |||
27bd7fd737 | |||
77f436fa39 | |||
814760ba25 | |||
14c0f368b6 | |||
0761659a43 | |||
a4f752fb02 | |||
b2346cdaec | |||
01ca7293f5 | |||
4dfce51ded | |||
f82ed24c03 | |||
1f65e6d3b5 | |||
9bf7aaf6cd | |||
5512465b34 | |||
2f30ab558a | |||
5c136ae3af | |||
c927da00e0 | |||
1600fd9082 | |||
14acd124bc | |||
e3cbbfb9ed | |||
5f21e0b58b | |||
d22204a59f | |||
90289b8502 | |||
78aacee21b | |||
f47aca3558 | |||
73fc70dbe8 | |||
dc2a18e436 | |||
82590eb087 | |||
4c97ce747c | |||
ebbc5ed0ce | |||
dc1af5a9c5 | |||
85bd1eea27 | |||
2b151c6aa2 | |||
93fe3e06ef | |||
9d3a894991 | |||
0e6b727e53 | |||
e42a01f203 | |||
a28b58dbd0 | |||
a26a9ee14f | |||
c09fcd4f92 | |||
593359ec77 | |||
34ec4d5d40 | |||
3d8f3bc0b7 | |||
eea7bb7692 | |||
3a89e31dee | |||
0c504e4984 | |||
0bf070c33b | |||
dc8ad78206 | |||
48e938660d | |||
632d457f78 | |||
569a319ff5 | |||
47812ec002 | |||
c27dee57ea | |||
b289f533b3 | |||
3eb0a4071a | |||
5684610a55 | |||
f26f544ff6 | |||
b9e5b0cb53 | |||
13443b05a6 | |||
e70c00a0fe | |||
bb67b654c5 | |||
aef25819bc | |||
1d96f465f4 | |||
8f618ab408 | |||
5296d7ef9c | |||
b715500b48 | |||
37a5271f5a | |||
42fc71fafa | |||
02b6e4833a | |||
323a111362 | |||
e7df4d3dd9 | |||
3e52a0db95 | |||
94484873d1 | |||
0d6ea85167 | |||
674ec92224 | |||
e7e5037a86 | |||
fbcf426240 | |||
2301554e98 | |||
5bc35002ba | |||
9143810a4d | |||
8f118fb619 | |||
1113460b68 | |||
74c7e009b7 | |||
c20ab7d987 | |||
fe66121287 | |||
9605bbaa67 | |||
b7ce6a9f79 | |||
c04a73c11a | |||
f184725c5f | |||
26a0b0f1e8 | |||
fa1d222eee | |||
56cf163a23 | |||
afcedf6d77 | |||
21fc197ee0 | |||
fcb4c8fb61 | |||
b6e2c56ae6 | |||
b005985d4e | |||
1294fd5730 | |||
835fd86a08 | |||
b7004d72c5 | |||
eb566ca626 | |||
aa12f1c56b | |||
6cc5b38a2e | |||
e6c4330e4e | |||
1e827f9807 | |||
a4f26dc8f3 | |||
3f065918d9 | |||
2c2d4513ac | |||
937e64d296 | |||
3261d26181 | |||
c98a0a448f | |||
7e7218f5ce | |||
45262da726 | |||
aef5f1e139 | |||
3d4baea01c | |||
30306d6ec7 | |||
d7254eead6 | |||
9dced7133c | |||
c2fb1a0747 | |||
00a4d2d3c4 | |||
424ef3b3f9 | |||
996ef98b87 | |||
19d5a1c7c3 | |||
0481dd946f | |||
29109575f5 | |||
3782573ede | |||
bba91a7524 | |||
b67cadf743 | |||
56dda4392c | |||
34fec09ff1 | |||
cefd1339fc | |||
b915376194 | |||
455cc6ff75 | |||
cc9c376d0f | |||
018611f829 | |||
1781eab21f | |||
78b05d0ffc | |||
1c0df78278 | |||
6cc9da6b0a | |||
6af9cae0a5 | |||
ef29455652 | |||
503ab0f722 | |||
90883e76af | |||
113de8381c | |||
652f2edbe1 | |||
a67e36703f | |||
73c6943402 | |||
d46817d690 | |||
97cb64c62d | |||
3f70241fb7 | |||
21b71b38a3 | |||
b2f9442aba | |||
fa9f85c7e9 | |||
ffa285c2e7 | |||
7b1dc600d5 | |||
5e67ebeb9e | |||
af7066d33c | |||
dd2d95ecdf | |||
a86d9bd8e8 | |||
21b1516d80 | |||
4c15038194 | |||
538f9df5cc | |||
efb0412b63 | |||
5a486a5cca | |||
394857b5ce | |||
5043517cfb | |||
307d122a84 | |||
d444a2fb83 | |||
fb7c56e3d3 | |||
2b79be68e7 | |||
512d5e3348 | |||
4b6892ece9 | |||
5a49ac52f9 | |||
db1e30e4fc | |||
b4a61370c8 | |||
58b2f39ce5 | |||
56d882abed | |||
39acb2b84d | |||
3ccba08983 | |||
632aa764e6 | |||
f6342b6cf4 | |||
471585dcd5 | |||
51821a811f | |||
299a9ae7ba | |||
bf7a506f79 | |||
2e925f82ef | |||
ddef7e1139 | |||
672e47a7eb | |||
3e8e64a3e5 | |||
b554246502 | |||
6d683c98a3 | |||
ee079f4740 | |||
a090038d02 | |||
4f1499bd23 | |||
36393d77d3 | |||
e053ee4272 | |||
1d46c07307 | |||
f9b5e448c1 | |||
3effb008c9 | |||
a088f492f4 | |||
e9c8913248 | |||
b9a27c91da | |||
d4f654275b | |||
f6eb4c749d | |||
418fc00718 | |||
2537177929 | |||
9af719bf99 | |||
9e020b252e | |||
cc45e365ae | |||
97c667f67c | |||
063fc525b1 | |||
0f73d87509 | |||
402e85ad6e | |||
1d635e04e4 | |||
98d5d0cdd5 | |||
31d4a38f09 | |||
1ebe456f2d | |||
c6e5314fab | |||
a6a79883b7 | |||
b02e68222f | |||
da8522af64 | |||
84b93090a8 | |||
5695c892d0 | |||
696101a910 | |||
54dfe73d24 | |||
87928baa31 | |||
6a4fd33a03 | |||
790448f48b | |||
7759494c85 | |||
aed187e56c | |||
eac799f589 | |||
5ecb07b59a | |||
ff621fb7f1 | |||
958bca8800 | |||
eacd55fbca | |||
0e2ab5c273 | |||
c47634290e | |||
92d612c3e0 | |||
2bbe5732b7 | |||
e6e7fbc25f | |||
7d4d554436 | |||
d31db847b7 | |||
3562d3378b | |||
ababcd5481 | |||
7caffde0b6 | |||
c40b43de01 | |||
b0eb5650da | |||
52f221f976 | |||
26a5948d2a | |||
d86a3b962c | |||
d64b341b38 | |||
d580014c66 | |||
be9a1f80c1 | |||
73ff3b0d3b | |||
9fce9ca42a | |||
f1adb734e3 | |||
575e0ca457 | |||
69f088bb82 | |||
ef34f5fe7d | |||
e88aa7c96b | |||
38d129a0b6 | |||
392815d97c | |||
6e2e61012a | |||
e791089466 | |||
418f12f62a | |||
caff539ccd | |||
c0d1bb1a5c | |||
ea44d64511 | |||
1a69f8c3ad | |||
ccd3180a69 | |||
01dcbc18ac | |||
7c67ec4976 | |||
43d128362f | |||
1337c9c244 | |||
86953b2ac4 | |||
135c9b29a7 | |||
e0d67367ed | |||
d007132655 | |||
cfd9873bbc | |||
b2b95cc8f9 | |||
73c889eb10 | |||
642725efe7 | |||
29aafff2ce | |||
df425ac143 | |||
57a1d18db3 | |||
aa4a3d7afd | |||
06ad5525b8 | |||
f80fd24a55 | |||
51bd9bee0d | |||
52266406f8 | |||
cd601c77c7 | |||
6abae713f7 | |||
1312f92a8d | |||
92abf26d29 | |||
c11e4ba9a7 | |||
7ae00947f5 | |||
59f62473c9 | |||
8fbd08d027 | |||
dda557ed23 | |||
cb54eb40ce | |||
3eab1129b9 | |||
24f1402a14 | |||
bf00550388 | |||
78c83a8f26 | |||
e72f8e0412 | |||
6136fa7c49 | |||
8d2b4ed4a9 | |||
9e9b177674 | |||
4c4c83f0a1 | |||
0e98814732 | |||
92f25bf267 | |||
63a53c79d0 | |||
2f9a8c04dc | |||
8c67f42689 | |||
783a51e9ac | |||
841c61aaa1 | |||
157942a462 | |||
e88a27790c | |||
ed3932b7d5 | |||
2b5c185826 | |||
996ecca78b | |||
c3c128352f | |||
02a89543d6 | |||
c1954ff918 | |||
b49ae8c21d | |||
1a7b4435f3 | |||
ff5ca5f7f8 | |||
db0e458217 | |||
f01f7c54aa | |||
c59407f105 | |||
fdc5d7458f | |||
6aafb9b2d4 | |||
aa9ad1ed60 | |||
aa9b8453a0 | |||
4daa824b3c | |||
4f2e4524b8 | |||
8ac510e4d6 | |||
4f27c763af | |||
0e969c0b72 | |||
b396801e28 | |||
682c8a59c2 | |||
5a25de37ef | |||
bdb923df4a | |||
4ef2cf4c28 | |||
990ca38d21 | |||
c7e430573f | |||
a328b64464 | |||
a16d427536 | |||
c98a07825b | |||
a98ca6fcf3 | |||
4550f8c50f | |||
9afca43807 | |||
27ab364df5 | |||
615216f397 | |||
46b1b7ab34 | |||
30d9882851 | |||
dfdebda0b6 | |||
9d8a83314b | |||
e19ce27352 | |||
4d711691d0 | |||
ee0f1e9d58 | |||
a24162f596 | |||
e82443241b | |||
9f052702e5 | |||
b38382a68f | |||
785324827c | |||
31c7b6747b | |||
dc767c14b9 | |||
30ec03259d | |||
38c12288f1 | |||
0e22a90579 | |||
0cdf75d41a | |||
3c6fa6e583 | |||
ee882fa462 | |||
3431ed9857 | |||
279808b44e | |||
2fd529a993 | |||
1f6f79c91e | |||
52ee5d0fff | |||
2f44b40d68 | |||
20157254c3 | |||
09c17ba581 | |||
a5f88e14d0 | |||
e78bda65fe | |||
3ea496013f | |||
7e1873d927 | |||
fe0810aff9 | |||
e35a87e3eb | |||
a6fcf2e066 | |||
25316825b1 | |||
c74e1c9db3 | |||
be9de6b9d9 | |||
fe8c843cc8 | |||
f48ae18630 | |||
83e0b786d4 | |||
acd5185ad4 | |||
0263c649f4 | |||
8176e9155b | |||
424163c7d3 | |||
2c87170ccf | |||
02322c46de | |||
28b5281c45 | |||
4d79a55904 | |||
027cbefb87 | |||
a08d82d94e | |||
5f1456337b | |||
6eeb4883af | |||
b5a5478a8a | |||
0d0468e127 | |||
b7ae4a2cfd | |||
039205560a | |||
801268d5c1 | |||
46c536d261 | |||
4a8757161e | |||
65540c5771 | |||
6c1ab24981 | |||
61c2ae5549 | |||
04711d3b00 | |||
cb7c30a4f1 | |||
8922c45556 | |||
58390c79d0 | |||
b7eb1cf936 | |||
6e5b9e0ebf | |||
c94291558d | |||
8d553f7e91 | |||
a0be7f0e26 | |||
1c3d082b8d | |||
2ed211ba15 | |||
1161326b54 | |||
d473a6d442 | |||
8d82033bff | |||
9d4cdb7b02 | |||
b353e062c7 | |||
d8f9b9b61f | |||
0b441ade2c | |||
6f6fad5a16 | |||
465ffa3c9f | |||
539c9e0d99 | |||
649f962ac6 | |||
16bdb3fe51 | |||
7c3369e1b9 | |||
9eacde212f | |||
331647f4ab | |||
c2d4822c38 | |||
3c30be1320 | |||
d8d01bf5aa | |||
d42b7228c2 | |||
4db057e9c2 | |||
ea8e2fc651 | |||
10c30ea5b1 | |||
84b56d23a4 | |||
19d07a4f2e | |||
6a5b87dda4 | |||
6aac59394e | |||
f147163b24 | |||
16bf3549c1 | |||
b912dafd7a | |||
8b3481f511 | |||
7019c2685d | |||
d18cc38586 | |||
cee481f63d | |||
e4c8c7188e | |||
6c004efd5f | |||
1a57780a75 | |||
ce25e4aa21 | |||
ef4044b62f | |||
9ffe5940fe | |||
c8d9afce1a | |||
285983a555 | |||
ab4356aa69 | |||
e87d4e9ce3 | |||
5fcf047191 | |||
c68fb81aa7 | |||
e707f78899 | |||
41e0ca3f85 | |||
c5c10067ed | |||
43958614e3 | |||
af04906b51 | |||
c7e17688b9 | |||
ac76840c5d | |||
f5885d05ea | |||
af949cd967 | |||
eee2eb11d8 | |||
8d3961edbe | |||
4c5328fd1f | |||
1472528f6d | |||
9416c9aa86 | |||
da92c7e215 | |||
d27cf375af | |||
432a312a35 | |||
3a6230af6b | |||
ecd267854b | |||
ac846667b7 | |||
33146b9481 | |||
4bace2491d | |||
469b3ec525 | |||
22017b7ff0 | |||
88c11b5946 | |||
843252c968 | |||
ddea79f0f0 | |||
c0e1211abe | |||
c8d7f000c9 | |||
598f178054 | |||
6f8b24f367 | |||
5d1b34bdcd | |||
8efde799e1 | |||
96b61a5f53 | |||
a517a8db01 | |||
2211504790 | |||
fb8662ec19 | |||
6f7911264f | |||
ae44aff330 | |||
b83e8b020a | |||
30cd91dc6b | |||
09af3ab074 | |||
f2fa9c3b31 | |||
30a7dfa4f8 | |||
62ab477838 | |||
1edb7d771f | |||
f8a57f7598 | |||
85d18fc107 | |||
aa00c1d91a | |||
a5a88e41af | |||
35c928798d | |||
83f64a7ff9 | |||
60853fa682 | |||
b66356be65 | |||
efae2dbad6 | |||
a7b56a616d | |||
bd8b8916a8 | |||
57063b6828 | |||
69b67a293a | |||
d57ddf0be8 | |||
43e7e2d663 | |||
d355b43dce | |||
5d52025266 | |||
db470f8529 | |||
c8f3d88288 | |||
b54cf5bd0a | |||
7e4b176323 | |||
81bf4f9304 | |||
e1967b0700 | |||
507091ec8b | |||
c7529270ff | |||
48ceca4919 | |||
0171c71de0 | |||
46d0df394f | |||
207d3e7b4e | |||
426ad81db0 | |||
497d2ca306 | |||
9d3888a756 | |||
c8e090c17f | |||
77a74adedd | |||
1ccf32e08f | |||
b5aced20e1 | |||
17af348be8 | |||
1afdb05ea9 | |||
425b6741c6 | |||
d635961120 | |||
d5b865da4d | |||
89993e4833 | |||
6b5da84014 | |||
1c3d33e146 | |||
71af4b4a85 | |||
c49dd50ef3 | |||
f66c49bf42 | |||
4c9d7dedb3 | |||
5336943a8c | |||
9dfade5641 | |||
a040e521b4 | |||
dad4b26c6f | |||
0ac364dfae | |||
dfd35892f2 | |||
79166496f3 | |||
c7d12cddec | |||
1f09229740 | |||
c2d4700571 | |||
c06896a352 | |||
c119620f7c | |||
7f309bb092 | |||
e2b67b5700 | |||
82a9064d8d | |||
a70fab2249 | |||
86b45fce6a | |||
31a5a4e808 | |||
5db86f4c2b | |||
20c284c276 | |||
befc6cd650 | |||
97d95775a5 | |||
8f44cd35d8 | |||
627a06e30d | |||
bfebcfa2c5 | |||
56e230863a | |||
e5ee47408e | |||
f21a707e99 | |||
0ef7af76bc | |||
18666b3e2d | |||
ed87386d7b | |||
1ad9b33b08 | |||
000b4565c2 | |||
eda75fc706 | |||
6583add63a | |||
441ad841cc | |||
6511c5dd7a | |||
d5cbb19b39 | |||
b0fcc1ad1d | |||
417180246c | |||
1892562614 | |||
22b128dfd2 | |||
802fb8b591 | |||
c2cf0d9945 | |||
3b3ccac212 | |||
e61a9077f4 | |||
59ce9f9b87 | |||
bf54dc082b | |||
3ff7bc1f64 | |||
7516fe142f | |||
b0e4c375a7 | |||
d1388d69d0 | |||
a3149a41f1 | |||
823bd9118e | |||
394afc957b | |||
63e92d719a | |||
9b87131b19 | |||
4a15994da0 | |||
d0fb537448 | |||
59cf1770bc | |||
b77f207512 | |||
b46a69f5e1 | |||
0aaba5ea30 | |||
bd6d810d0a | |||
e3850fbbbc | |||
05d864c913 | |||
a3e34f589a | |||
a2cf6816ce | |||
7b3bc54cc3 | |||
cda88e6770 | |||
70f1abbc18 | |||
bbcafb5d7b | |||
d7039ef707 | |||
271be92b02 | |||
a31baf3c16 | |||
e83728897b | |||
282a27a07c | |||
3fe6dbb65c | |||
7547e6a272 | |||
1928dafc7e | |||
0cbc0f4119 | |||
e77b9bf3ee | |||
7f7e83a4d9 | |||
85fe716d46 | |||
85ff3eb8be | |||
e55c359cf9 | |||
8d7327c188 | |||
ca731dca95 | |||
d66da21726 | |||
1069b05e68 | |||
ec0c0d4a28 | |||
1739b27231 | |||
d9d29af87f | |||
7036b704b3 | |||
54cda80018 | |||
b46e751573 | |||
6a2ea94b39 | |||
4674b03661 | |||
e2f1964389 | |||
922de32290 | |||
7896bc7831 | |||
da07459bd6 | |||
3ca205446e | |||
eff1931283 | |||
3a37a49690 | |||
fd8ae54fa7 | |||
79fdee3979 | |||
a754c0d476 | |||
7208169db3 | |||
94dac10be7 | |||
d5fcbcd89f | |||
7b5d43cc00 | |||
c5ccedb694 | |||
858b29f425 | |||
7db76f8809 | |||
bcf695913f | |||
23cd1d41fb | |||
62f5369237 | |||
59fc17f4e3 | |||
26c1d42fff | |||
c1aa755a3c | |||
b3d9f2b4a2 | |||
29c2fbdbc1 | |||
4b9f98f933 | |||
e9870b8d25 | |||
e0c74fa082 | |||
5b93a97281 | |||
bdf74c6749 | |||
d6f9a8d752 | |||
e357d8678c | |||
b1b407a0b4 | |||
6c3d1649a6 | |||
14cf3e138b | |||
afbabebfd5 | |||
8c0a2741ae | |||
1d078e1119 | |||
d90baa8601 | |||
d5660cd37c | |||
63cec45597 | |||
f07e24db8f | |||
5d5be3e96a | |||
6e7649360f | |||
1dd38721b3 | |||
6a001e4971 | |||
96e6a6ac3f | |||
2556eb2733 | |||
d29ea386d6 | |||
a0ee569091 | |||
3f4eb9be08 | |||
5ea2d1eb67 | |||
ffc38a2237 | |||
360aff4a57 | |||
d26191373a | |||
4c06aa98b5 | |||
1b267b6599 | |||
dd6efb73f7 | |||
dfeed1c1a4 | |||
0071e3c99c | |||
0feec14b15 | |||
975f84494c | |||
7c86734d2e | |||
8665e1de87 | |||
c16efc9ab8 | |||
324c95d37f | |||
69806e0a46 | |||
ad15a4b755 | |||
002a4b03a4 | |||
96476430a3 | |||
73db44b00c | |||
b32d25942d | |||
fce705a92b | |||
6164c90f70 | |||
e036b899a3 | |||
8c7b90ebbf | |||
38d9d2ea0e | |||
384d30b675 | |||
add61868c6 | |||
b599f3084f | |||
a7493e26e1 | |||
ae3a1d7c01 | |||
e39e3d5c26 | |||
1e7d48846a | |||
6001edeecd | |||
ce0b7834ff | |||
3ac92689f0 | |||
1c0836946f | |||
bccbe323b7 | |||
d73249a793 | |||
cd9a03f86c | |||
b47c21c683 | |||
6de5303e3f | |||
2a2fb68b2f | |||
844ebb7838 | |||
332cc1cd58 | |||
e7ce83016e | |||
bf6a39eb84 | |||
42382e2cde | |||
f8e4650791 | |||
e444b3c140 | |||
d56ac216f4 | |||
420a412234 | |||
90c643f3ab | |||
1d4e380231 | |||
6d293ba899 | |||
aa086e5407 | |||
cce0940e1f | |||
daed3e5b6a | |||
e2a7f3e2ab | |||
5a351b4b00 | |||
6f2abbf79c | |||
bef1e628ac | |||
7340a163a4 | |||
a6622b176b | |||
771a5e26bb | |||
be278f9dba | |||
6479e26904 | |||
1c7053c9d8 | |||
596d0289f8 | |||
7df7054bdc | |||
5377aac936 | |||
ceb6c172ad | |||
7f52c1d3a2 | |||
af1e16b934 | |||
2257181ca8 | |||
7e75d48cc4 | |||
6330db89a7 | |||
f05d6b3711 | |||
cce9d3125d | |||
e381ce57e2 | |||
5dbce6a2bd | |||
5b0e88339a | |||
db43891f2b | |||
f72063e7c2 | |||
36a3a78952 | |||
2d1597bf10 | |||
edfa3e9b14 | |||
6fa3565dac | |||
7dec8e5caa | |||
49abf6007a | |||
f0cdf71ccb | |||
8655b92e93 | |||
e1c6992c55 | |||
486b223e01 | |||
d53fd29e34 | |||
4f89bfac48 | |||
5fee96b404 | |||
12873f916b | |||
efa180392b | |||
6d9ed398e3 | |||
6d3dbb43a4 | |||
811f546ea6 | |||
ead8a4e4de | |||
05f132c136 | |||
5f2c8ac38f | |||
14511053aa | |||
8353532a09 | |||
1c62af0c95 | |||
f103ac7640 | |||
274e06a48d | |||
a39f306184 | |||
69d11daef6 | |||
057e8b4358 | |||
18c0e54e4f | |||
85007fa9a7 | |||
5c5bf41afe | |||
5dba53a223 | |||
2bcd9eb9e9 | |||
5a54db2f3c | |||
b47542b003 | |||
14b63ede8c | |||
b07c5966a6 | |||
c7db72e1da | |||
dc5df57c26 | |||
a9c97e5253 | |||
53e5ef6b4e | |||
8800b5c01d | |||
280036fad6 | |||
a6e1f5ece9 | |||
fedd671d68 | |||
b7c22659e3 | |||
c9c0c01de0 | |||
e442b1d2b9 | |||
e9f4ff227e | |||
668bbe0528 | |||
e045a45e48 | |||
2c9fc18903 | |||
d4eecac108 | |||
ef351e0234 | |||
05adeed1fa | |||
15f1b19136 | |||
154fa45422 | |||
e35becebf8 | |||
bdd36c2d34 | |||
0a0156c946 | |||
100d9333ca | |||
a4cc416511 | |||
2ea5793782 | |||
0ddf915027 | |||
067db686f6 | |||
ed2b4b805e | |||
8375aa72e2 | |||
6334e4bd84 | |||
86ce8aac85 | |||
de46f86137 | |||
5616b08229 | |||
8682a57ea3 | |||
662a37ab4f | |||
42947c9840 | |||
3749729d5a | |||
fb8b075110 | |||
1c5391dda7 | |||
f2d10e9465 | |||
796d3fb975 | |||
5c04bdd52b | |||
17143dbc51 | |||
1c8bba36db | |||
95b329b64d | |||
de1d9df787 | |||
6450207713 | |||
edc4bb4a49 | |||
a21ee33180 | |||
bcaa31ae33 | |||
0cc1726781 | |||
aad78840a0 | |||
e3ab665e90 | |||
1a91792e7c | |||
670c37b428 | |||
040dacd5cd | |||
59541de437 | |||
fc8551bcba | |||
c2c97c36bc | |||
211fdde742 | |||
366cbb3e6f | |||
a318624fad | |||
3cf5981146 | |||
4cc065e66d | |||
ba731ed145 | |||
b77460ec34 | |||
88bee6c68e | |||
1f84d6344b | |||
699fbd64ab | |||
b42bf39fb7 | |||
5368d51d63 | |||
c5db012c9a | |||
b70d986bfa | |||
973628fc1b | |||
91fea7c956 | |||
d378d789cf | |||
9007d6621a | |||
774ec49396 | |||
bba55faae8 | |||
8f2b0772f9 | |||
1a409dc7ae | |||
404ea0270e | |||
ef939dee74 | |||
f1576eabb1 | |||
49c4345c9a | |||
f94182f77d | |||
222a77dfe7 | |||
24ceee134e | |||
04c8a73889 | |||
9a75501152 | |||
f6fbbc17a4 | |||
15dc3868c3 | |||
2525d7aff8 | |||
a5d2137ed9 | |||
a8e51e686e | |||
a2429ef64d | |||
1b88678cf3 | |||
0e96852159 | |||
19a61d838f | |||
4eec302e86 | |||
f3885aa589 | |||
b493c81ce8 | |||
9ef62194c3 | |||
91ee4aa542 | |||
e3caff833c | |||
b2995e4ec4 | |||
ccd3aeebbc | |||
7a033a1d55 | |||
1652d8bf4b | |||
c85f275bdb |
@ -7,14 +7,33 @@ skip_list:
|
|||||||
|
|
||||||
# These rules are intentionally skipped:
|
# These rules are intentionally skipped:
|
||||||
#
|
#
|
||||||
# [E204]: "Lines should be no longer than 160 chars"
|
# [role-name] "meta/main.yml" Role name role-name does not match ``^+$`` pattern
|
||||||
# This could be re-enabled with a major rewrite in the future.
|
# Meta roles in Kubespray don't need proper names
|
||||||
# For now, there's not enough value gain from strictly limiting line length.
|
# (Disabled in June 2021)
|
||||||
# (Disabled in May 2019)
|
- 'role-name'
|
||||||
- '204'
|
|
||||||
|
|
||||||
# [E701]: "meta/main.yml should contain relevant info"
|
# [var-naming] "defaults/main.yml" File defines variable 'apiVersion' that violates variable naming standards
|
||||||
# Roles in Kubespray are not intended to be used/imported by Ansible Galaxy.
|
# In Kubespray we use variables that use camelCase to match their k8s counterparts
|
||||||
# While it can be useful to have these metadata available, they are also available in the existing documentation.
|
# (Disabled in June 2021)
|
||||||
# (Disabled in May 2019)
|
- 'var-naming'
|
||||||
- '701'
|
|
||||||
|
# [fqcn-builtins]
|
||||||
|
# Roles in kubespray don't need fully qualified collection names
|
||||||
|
# (Disabled in Feb 2023)
|
||||||
|
- 'fqcn-builtins'
|
||||||
|
|
||||||
|
# We use template in names
|
||||||
|
- 'name[template]'
|
||||||
|
|
||||||
|
# No changed-when on commands
|
||||||
|
# (Disabled in June 2023 after ansible upgrade; FIXME)
|
||||||
|
- 'no-changed-when'
|
||||||
|
|
||||||
|
# Disable run-once check with free strategy
|
||||||
|
# (Disabled in June 2023 after ansible upgrade; FIXME)
|
||||||
|
- 'run-once[task]'
|
||||||
|
exclude_paths:
|
||||||
|
# Generated files
|
||||||
|
- tests/files/custom_cni/cilium.yaml
|
||||||
|
- venv
|
||||||
|
- .github
|
||||||
|
8
.ansible-lint-ignore
Normal file
8
.ansible-lint-ignore
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# This file contains ignores rule violations for ansible-lint
|
||||||
|
inventory/sample/group_vars/k8s_cluster/k8s-cluster.yml jinja[spacing]
|
||||||
|
roles/kubernetes/control-plane/defaults/main/kube-proxy.yml jinja[spacing]
|
||||||
|
roles/kubernetes/control-plane/defaults/main/main.yml jinja[spacing]
|
||||||
|
roles/kubernetes/kubeadm/defaults/main.yml jinja[spacing]
|
||||||
|
roles/kubernetes/node/defaults/main.yml jinja[spacing]
|
||||||
|
roles/kubernetes/preinstall/defaults/main.yml jinja[spacing]
|
||||||
|
roles/kubespray-defaults/defaults/main/main.yml jinja[spacing]
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
docs/_sidebar.md linguist-generated=true
|
44
.github/ISSUE_TEMPLATE/bug-report.md
vendored
44
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -1,44 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug Report
|
|
||||||
about: Report a bug encountered while operating Kubernetes
|
|
||||||
labels: kind/bug
|
|
||||||
|
|
||||||
---
|
|
||||||
<!--
|
|
||||||
Please, be ready for followup questions, and please respond in a timely
|
|
||||||
manner. If we can't reproduce a bug or think a feature already exists, we
|
|
||||||
might close your issue. If we're wrong, PLEASE feel free to reopen it and
|
|
||||||
explain why.
|
|
||||||
-->
|
|
||||||
|
|
||||||
**Environment**:
|
|
||||||
- **Cloud provider or hardware configuration:**
|
|
||||||
|
|
||||||
- **OS (`printf "$(uname -srm)\n$(cat /etc/os-release)\n"`):**
|
|
||||||
|
|
||||||
- **Version of Ansible** (`ansible --version`):
|
|
||||||
|
|
||||||
- **Version of Python** (`python --version`):
|
|
||||||
|
|
||||||
|
|
||||||
**Kubespray version (commit) (`git rev-parse --short HEAD`):**
|
|
||||||
|
|
||||||
|
|
||||||
**Network plugin used**:
|
|
||||||
|
|
||||||
|
|
||||||
**Full inventory with variables (`ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"`):**
|
|
||||||
<!-- We recommend using snippets services like https://gist.github.com/ etc. -->
|
|
||||||
|
|
||||||
**Command used to invoke ansible**:
|
|
||||||
|
|
||||||
|
|
||||||
**Output of ansible run**:
|
|
||||||
<!-- We recommend using snippets services like https://gist.github.com/ etc. -->
|
|
||||||
|
|
||||||
**Anything else do we need to know**:
|
|
||||||
<!-- By running scripts/collect-info.yaml you can get a lot of useful informations.
|
|
||||||
Script can be started by:
|
|
||||||
ansible-playbook -i <inventory_file_path> -u <ssh_user> -e ansible_ssh_user=<ssh_user> -b --become-user=root -e dir=`pwd` scripts/collect-info.yaml
|
|
||||||
(If you using CoreOS remember to add '-e ansible_python_interpreter=/opt/bin/python').
|
|
||||||
After running this command you can find logs in `pwd`/logs.tar.gz. You can even upload somewhere entire file and paste link here.-->
|
|
124
.github/ISSUE_TEMPLATE/bug-report.yaml
vendored
Normal file
124
.github/ISSUE_TEMPLATE/bug-report.yaml
vendored
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
---
|
||||||
|
name: Bug Report
|
||||||
|
description: Report a bug encountered while using Kubespray
|
||||||
|
labels: kind/bug
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Please, be ready for followup questions, and please respond in a timely
|
||||||
|
manner. If we can't reproduce a bug or think a feature already exists, we
|
||||||
|
might close your issue. If we're wrong, PLEASE feel free to reopen it and
|
||||||
|
explain why.
|
||||||
|
- type: textarea
|
||||||
|
id: problem
|
||||||
|
attributes:
|
||||||
|
label: What happened?
|
||||||
|
description: |
|
||||||
|
Please provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: expected
|
||||||
|
attributes:
|
||||||
|
label: What did you expect to happen?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: repro
|
||||||
|
attributes:
|
||||||
|
label: How can we reproduce it (as minimally and precisely as possible)?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: '### Environment'
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: os
|
||||||
|
attributes:
|
||||||
|
label: OS
|
||||||
|
placeholder: 'printf "$(uname -srm)\n$(cat /etc/os-release)\n"'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: ansible_version
|
||||||
|
attributes:
|
||||||
|
label: Version of Ansible
|
||||||
|
placeholder: 'ansible --version'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: python_version
|
||||||
|
attributes:
|
||||||
|
label: Version of Python
|
||||||
|
placeholder: 'python --version'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: kubespray_version
|
||||||
|
attributes:
|
||||||
|
label: Version of Kubespray (commit)
|
||||||
|
placeholder: 'git rev-parse --short HEAD'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: network_plugin
|
||||||
|
attributes:
|
||||||
|
label: Network plugin used
|
||||||
|
options:
|
||||||
|
- calico
|
||||||
|
- cilium
|
||||||
|
- cni
|
||||||
|
- custom_cni
|
||||||
|
- flannel
|
||||||
|
- kube-ovn
|
||||||
|
- kube-router
|
||||||
|
- macvlan
|
||||||
|
- meta
|
||||||
|
- multus
|
||||||
|
- ovn4nfv
|
||||||
|
- weave
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: inventory
|
||||||
|
attributes:
|
||||||
|
label: Full inventory with variables
|
||||||
|
placeholder: 'ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"'
|
||||||
|
description: We recommend using snippets services like https://gist.github.com/ etc.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: ansible_command
|
||||||
|
attributes:
|
||||||
|
label: Command used to invoke ansible
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: ansible_output
|
||||||
|
attributes:
|
||||||
|
label: Output of ansible run
|
||||||
|
description: We recommend using snippets services like https://gist.github.com/ etc.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: anything_else
|
||||||
|
attributes:
|
||||||
|
label: Anything else we need to know
|
||||||
|
description: |
|
||||||
|
By running scripts/collect-info.yaml you can get a lot of useful informations.
|
||||||
|
Script can be started by:
|
||||||
|
ansible-playbook -i <inventory_file_path> -u <ssh_user> -e ansible_ssh_user=<ssh_user> -b --become-user=root -e dir=`pwd` scripts/collect-info.yaml
|
||||||
|
(If you using CoreOS remember to add '-e ansible_python_interpreter=/opt/bin/python').
|
||||||
|
After running this command you can find logs in `pwd`/logs.tar.gz. You can even upload somewhere entire file and paste link here
|
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
contact_links:
|
||||||
|
- name: Support Request
|
||||||
|
url: https://kubernetes.slack.com/channels/kubespray
|
||||||
|
about: Support request or question relating to Kubernetes
|
11
.github/ISSUE_TEMPLATE/enhancement.md
vendored
11
.github/ISSUE_TEMPLATE/enhancement.md
vendored
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
name: Enhancement Request
|
|
||||||
about: Suggest an enhancement to the Kubespray project
|
|
||||||
labels: kind/feature
|
|
||||||
|
|
||||||
---
|
|
||||||
<!-- Please only use this template for submitting enhancement requests -->
|
|
||||||
|
|
||||||
**What would you like to be added**:
|
|
||||||
|
|
||||||
**Why is this needed**:
|
|
20
.github/ISSUE_TEMPLATE/enhancement.yaml
vendored
Normal file
20
.github/ISSUE_TEMPLATE/enhancement.yaml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Enhancement Request
|
||||||
|
description: Suggest an enhancement to the Kubespray project
|
||||||
|
labels: kind/feature
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: Please only use this template for submitting enhancement requests
|
||||||
|
- type: textarea
|
||||||
|
id: what
|
||||||
|
attributes:
|
||||||
|
label: What would you like to be added
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: why
|
||||||
|
attributes:
|
||||||
|
label: Why is this needed
|
||||||
|
validations:
|
||||||
|
required: true
|
20
.github/ISSUE_TEMPLATE/failing-test.md
vendored
20
.github/ISSUE_TEMPLATE/failing-test.md
vendored
@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
name: Failing Test
|
|
||||||
about: Report test failures in Kubespray CI jobs
|
|
||||||
labels: kind/failing-test
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!-- Please only use this template for submitting reports about failing tests in Kubespray CI jobs -->
|
|
||||||
|
|
||||||
**Which jobs are failing**:
|
|
||||||
|
|
||||||
**Which test(s) are failing**:
|
|
||||||
|
|
||||||
**Since when has it been failing**:
|
|
||||||
|
|
||||||
**Testgrid link**:
|
|
||||||
|
|
||||||
**Reason for failure**:
|
|
||||||
|
|
||||||
**Anything else we need to know**:
|
|
41
.github/ISSUE_TEMPLATE/failing-test.yaml
vendored
Normal file
41
.github/ISSUE_TEMPLATE/failing-test.yaml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
name: Failing Test
|
||||||
|
description: Report test failures in Kubespray CI jobs
|
||||||
|
labels: kind/failing-test
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: Please only use this template for submitting reports about failing tests in Kubespray CI jobs
|
||||||
|
- type: textarea
|
||||||
|
id: failing_jobs
|
||||||
|
attributes:
|
||||||
|
label: Which jobs are failing ?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: failing_tests
|
||||||
|
attributes:
|
||||||
|
label: Which tests are failing ?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: since_when
|
||||||
|
attributes:
|
||||||
|
label: Since when has it been failing ?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: failure_reason
|
||||||
|
attributes:
|
||||||
|
label: Reason for failure
|
||||||
|
description: If you don't know and have no guess, just put "Unknown"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: anything_else
|
||||||
|
attributes:
|
||||||
|
label: Anything else we need to know
|
18
.github/ISSUE_TEMPLATE/support.md
vendored
18
.github/ISSUE_TEMPLATE/support.md
vendored
@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
name: Support Request
|
|
||||||
about: Support request or question relating to Kubespray
|
|
||||||
labels: kind/support
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
STOP -- PLEASE READ!
|
|
||||||
|
|
||||||
GitHub is not the right place for support requests.
|
|
||||||
|
|
||||||
If you're looking for help, check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubespray) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).
|
|
||||||
|
|
||||||
You can also post your question on the [Kubernetes Slack](http://slack.k8s.io/) or the [Discuss Kubernetes](https://discuss.kubernetes.io/) forum.
|
|
||||||
|
|
||||||
If the matter is security related, please disclose it privately via https://kubernetes.io/security/.
|
|
||||||
-->
|
|
7
.github/dependabot.yml
vendored
Normal file
7
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "pip"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
labels: [ "dependencies" ]
|
23
.gitignore
vendored
23
.gitignore
vendored
@ -3,14 +3,21 @@
|
|||||||
**/vagrant_ansible_inventory
|
**/vagrant_ansible_inventory
|
||||||
*.iml
|
*.iml
|
||||||
temp
|
temp
|
||||||
|
contrib/offline/container-images
|
||||||
|
contrib/offline/container-images.tar.gz
|
||||||
|
contrib/offline/offline-files
|
||||||
|
contrib/offline/offline-files.tar.gz
|
||||||
.idea
|
.idea
|
||||||
|
.vscode
|
||||||
.tox
|
.tox
|
||||||
.cache
|
.cache
|
||||||
*.bak
|
*.bak
|
||||||
*.tfstate
|
*.tfstate
|
||||||
*.tfstate.backup
|
*.tfstate*backup
|
||||||
|
*.lock.hcl
|
||||||
.terraform/
|
.terraform/
|
||||||
contrib/terraform/aws/credentials.tfvars
|
contrib/terraform/aws/credentials.tfvars
|
||||||
|
.terraform.lock.hcl
|
||||||
/ssh-bastion.conf
|
/ssh-bastion.conf
|
||||||
**/*.sw[pon]
|
**/*.sw[pon]
|
||||||
*~
|
*~
|
||||||
@ -99,3 +106,17 @@ target/
|
|||||||
# virtualenv
|
# virtualenv
|
||||||
venv/
|
venv/
|
||||||
ENV/
|
ENV/
|
||||||
|
|
||||||
|
# molecule
|
||||||
|
roles/**/molecule/**/__pycache__/
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Temp location used by our scripts
|
||||||
|
scripts/tmp/
|
||||||
|
tmp.md
|
||||||
|
|
||||||
|
# Ansible collection files
|
||||||
|
kubernetes_sigs-kubespray*tar.gz
|
||||||
|
ansible_collections
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
stages:
|
stages:
|
||||||
|
- build
|
||||||
- unit-tests
|
- unit-tests
|
||||||
- deploy-part1
|
- deploy-part1
|
||||||
- moderator
|
- moderator
|
||||||
@ -8,14 +9,15 @@ stages:
|
|||||||
- deploy-special
|
- deploy-special
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
KUBESPRAY_VERSION: v2.14.1
|
KUBESPRAY_VERSION: v2.25.0
|
||||||
FAILFASTCI_NAMESPACE: 'kargo-ci'
|
FAILFASTCI_NAMESPACE: 'kargo-ci'
|
||||||
GITLAB_REPOSITORY: 'kargo-ci/kubernetes-sigs-kubespray'
|
GITLAB_REPOSITORY: 'kargo-ci/kubernetes-sigs-kubespray'
|
||||||
ANSIBLE_FORCE_COLOR: "true"
|
ANSIBLE_FORCE_COLOR: "true"
|
||||||
MAGIC: "ci check this"
|
MAGIC: "ci check this"
|
||||||
TEST_ID: "$CI_PIPELINE_ID-$CI_BUILD_ID"
|
TEST_ID: "$CI_PIPELINE_ID-$CI_JOB_ID"
|
||||||
CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
|
CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
|
||||||
CI_TEST_REGISTRY_MIRROR: "./tests/common/_docker_hub_registry_mirror.yml"
|
CI_TEST_REGISTRY_MIRROR: "./tests/common/_docker_hub_registry_mirror.yml"
|
||||||
|
CI_TEST_SETTING: "./tests/common/_kubespray_test_settings.yml"
|
||||||
GS_ACCESS_KEY_ID: $GS_KEY
|
GS_ACCESS_KEY_ID: $GS_KEY
|
||||||
GS_SECRET_ACCESS_KEY: $GS_SECRET
|
GS_SECRET_ACCESS_KEY: $GS_SECRET
|
||||||
CONTAINER_ENGINE: docker
|
CONTAINER_ENGINE: docker
|
||||||
@ -26,22 +28,23 @@ variables:
|
|||||||
ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
|
ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
|
||||||
IDEMPOT_CHECK: "false"
|
IDEMPOT_CHECK: "false"
|
||||||
RESET_CHECK: "false"
|
RESET_CHECK: "false"
|
||||||
|
REMOVE_NODE_CHECK: "false"
|
||||||
UPGRADE_TEST: "false"
|
UPGRADE_TEST: "false"
|
||||||
MITOGEN_ENABLE: "false"
|
MITOGEN_ENABLE: "false"
|
||||||
ANSIBLE_LOG_LEVEL: "-vv"
|
ANSIBLE_LOG_LEVEL: "-vv"
|
||||||
RECOVER_CONTROL_PLANE_TEST: "false"
|
RECOVER_CONTROL_PLANE_TEST: "false"
|
||||||
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube-master[1:]"
|
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:]:kube_control_plane[1:]"
|
||||||
|
TERRAFORM_VERSION: 1.3.7
|
||||||
|
PIPELINE_IMAGE: "$CI_REGISTRY_IMAGE/pipeline:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- ./tests/scripts/rebase.sh
|
- ./tests/scripts/rebase.sh
|
||||||
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1
|
|
||||||
- python -m pip install -r tests/requirements.txt
|
|
||||||
- mkdir -p /.ssh
|
- mkdir -p /.ssh
|
||||||
|
|
||||||
.job: &job
|
.job: &job
|
||||||
tags:
|
tags:
|
||||||
- packet
|
- packet
|
||||||
image: quay.io/kubespray/kubespray:$KUBESPRAY_VERSION
|
image: $PIPELINE_IMAGE
|
||||||
artifacts:
|
artifacts:
|
||||||
when: always
|
when: always
|
||||||
paths:
|
paths:
|
||||||
@ -49,6 +52,8 @@ before_script:
|
|||||||
|
|
||||||
.testcases: &testcases
|
.testcases: &testcases
|
||||||
<<: *job
|
<<: *job
|
||||||
|
retry: 1
|
||||||
|
interruptible: true
|
||||||
before_script:
|
before_script:
|
||||||
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1
|
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1
|
||||||
- ./tests/scripts/rebase.sh
|
- ./tests/scripts/rebase.sh
|
||||||
@ -70,8 +75,9 @@ ci-authorized:
|
|||||||
only: []
|
only: []
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
- .gitlab-ci/build.yml
|
||||||
- .gitlab-ci/lint.yml
|
- .gitlab-ci/lint.yml
|
||||||
- .gitlab-ci/shellcheck.yml
|
|
||||||
- .gitlab-ci/terraform.yml
|
- .gitlab-ci/terraform.yml
|
||||||
- .gitlab-ci/packet.yml
|
- .gitlab-ci/packet.yml
|
||||||
- .gitlab-ci/vagrant.yml
|
- .gitlab-ci/vagrant.yml
|
||||||
|
- .gitlab-ci/molecule.yml
|
||||||
|
40
.gitlab-ci/build.yml
Normal file
40
.gitlab-ci/build.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
.build:
|
||||||
|
stage: build
|
||||||
|
image:
|
||||||
|
name: moby/buildkit:rootless
|
||||||
|
entrypoint: [""]
|
||||||
|
variables:
|
||||||
|
BUILDKITD_FLAGS: --oci-worker-no-process-sandbox
|
||||||
|
before_script:
|
||||||
|
- mkdir ~/.docker
|
||||||
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > ~/.docker/config.json
|
||||||
|
|
||||||
|
pipeline image:
|
||||||
|
extends: .build
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
buildctl-daemonless.sh build \
|
||||||
|
--frontend=dockerfile.v0 \
|
||||||
|
--local context=. \
|
||||||
|
--local dockerfile=. \
|
||||||
|
--opt filename=./pipeline.Dockerfile \
|
||||||
|
--output type=image,name=$PIPELINE_IMAGE,push=true \
|
||||||
|
--import-cache type=registry,ref=$CI_REGISTRY_IMAGE/pipeline:cache
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH'
|
||||||
|
|
||||||
|
pipeline image and build cache:
|
||||||
|
extends: .build
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
buildctl-daemonless.sh build \
|
||||||
|
--frontend=dockerfile.v0 \
|
||||||
|
--local context=. \
|
||||||
|
--local dockerfile=. \
|
||||||
|
--opt filename=./pipeline.Dockerfile \
|
||||||
|
--output type=image,name=$PIPELINE_IMAGE,push=true \
|
||||||
|
--import-cache type=registry,ref=$CI_REGISTRY_IMAGE/pipeline:cache \
|
||||||
|
--export-cache type=registry,ref=$CI_REGISTRY_IMAGE/pipeline:cache,mode=max
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
|
@ -1,76 +1,40 @@
|
|||||||
---
|
---
|
||||||
yamllint:
|
generate-pre-commit:
|
||||||
extends: .job
|
image: 'mikefarah/yq@sha256:bcb889a1f9bdb0613c8a054542d02360c2b1b35521041be3e1bd8fbd0534d411'
|
||||||
stage: unit-tests
|
stage: build
|
||||||
tags: [light]
|
before_script: []
|
||||||
variables:
|
|
||||||
LANG: C.UTF-8
|
|
||||||
script:
|
script:
|
||||||
- yamllint --strict .
|
- >
|
||||||
except: ['triggers', 'master']
|
yq -r < .pre-commit-config.yaml '.repos[].hooks[].id' |
|
||||||
|
sed 's/^/ - /' |
|
||||||
|
cat .gitlab-ci/pre-commit-dynamic-stub.yml - > pre-commit-generated.yml
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- pre-commit-generated.yml
|
||||||
|
|
||||||
|
run-pre-commit:
|
||||||
|
stage: unit-tests
|
||||||
|
trigger:
|
||||||
|
include:
|
||||||
|
- artifact: pre-commit-generated.yml
|
||||||
|
job: generate-pre-commit
|
||||||
|
strategy: depend
|
||||||
|
|
||||||
vagrant-validate:
|
vagrant-validate:
|
||||||
extends: .job
|
extends: .job
|
||||||
stage: unit-tests
|
stage: unit-tests
|
||||||
tags: [light]
|
tags: [light]
|
||||||
variables:
|
variables:
|
||||||
VAGRANT_VERSION: 2.2.10
|
VAGRANT_VERSION: 2.3.7
|
||||||
script:
|
script:
|
||||||
- ./tests/scripts/vagrant-validate.sh
|
- ./tests/scripts/vagrant-validate.sh
|
||||||
except: ['triggers', 'master']
|
except: ['triggers', 'master']
|
||||||
|
|
||||||
ansible-lint:
|
|
||||||
extends: .job
|
|
||||||
stage: unit-tests
|
|
||||||
tags: [light]
|
|
||||||
# lint every yml/yaml file that looks like it contains Ansible plays
|
|
||||||
script: |-
|
|
||||||
grep -Rl '^- hosts: \|^ hosts: ' --include \*.yml --include \*.yaml . | xargs -P 4 -n 25 ansible-lint -v
|
|
||||||
except: ['triggers', 'master']
|
|
||||||
|
|
||||||
syntax-check:
|
# TODO: convert to pre-commit hook
|
||||||
extends: .job
|
check-galaxy-version:
|
||||||
stage: unit-tests
|
|
||||||
tags: [light]
|
|
||||||
variables:
|
|
||||||
ANSIBLE_INVENTORY: inventory/local-tests.cfg
|
|
||||||
ANSIBLE_REMOTE_USER: root
|
|
||||||
ANSIBLE_BECOME: "true"
|
|
||||||
ANSIBLE_BECOME_USER: root
|
|
||||||
ANSIBLE_VERBOSITY: "3"
|
|
||||||
script:
|
|
||||||
- ansible-playbook --syntax-check cluster.yml
|
|
||||||
- ansible-playbook --syntax-check upgrade-cluster.yml
|
|
||||||
- ansible-playbook --syntax-check reset.yml
|
|
||||||
- ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
|
|
||||||
except: ['triggers', 'master']
|
|
||||||
|
|
||||||
tox-inventory-builder:
|
|
||||||
stage: unit-tests
|
|
||||||
tags: [light]
|
|
||||||
extends: .job
|
|
||||||
before_script:
|
|
||||||
- ./tests/scripts/rebase.sh
|
|
||||||
- apt-get update && apt-get install -y python3-pip
|
|
||||||
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
|
||||||
- python -m pip install -r tests/requirements.txt
|
|
||||||
script:
|
|
||||||
- pip3 install tox
|
|
||||||
- cd contrib/inventory_builder && tox
|
|
||||||
except: ['triggers', 'master']
|
|
||||||
|
|
||||||
markdownlint:
|
|
||||||
stage: unit-tests
|
|
||||||
tags: [light]
|
|
||||||
image: node
|
|
||||||
before_script:
|
|
||||||
- npm install -g markdownlint-cli@0.22.0
|
|
||||||
script:
|
|
||||||
- markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
|
|
||||||
|
|
||||||
ci-matrix:
|
|
||||||
stage: unit-tests
|
stage: unit-tests
|
||||||
tags: [light]
|
tags: [light]
|
||||||
image: python:3
|
image: python:3
|
||||||
script:
|
script:
|
||||||
- tests/scripts/md-table/test.sh
|
- tests/scripts/check_galaxy_version.sh
|
||||||
|
83
.gitlab-ci/molecule.yml
Normal file
83
.gitlab-ci/molecule.yml
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
.molecule:
|
||||||
|
tags: [c3.small.x86]
|
||||||
|
only: [/^pr-.*$/]
|
||||||
|
except: ['triggers']
|
||||||
|
image: $PIPELINE_IMAGE
|
||||||
|
services: []
|
||||||
|
stage: deploy-part1
|
||||||
|
before_script:
|
||||||
|
- tests/scripts/rebase.sh
|
||||||
|
- ./tests/scripts/vagrant_clean.sh
|
||||||
|
script:
|
||||||
|
- ./tests/scripts/molecule_run.sh
|
||||||
|
after_script:
|
||||||
|
- chronic ./tests/scripts/molecule_logs.sh
|
||||||
|
artifacts:
|
||||||
|
when: always
|
||||||
|
paths:
|
||||||
|
- molecule_logs/
|
||||||
|
|
||||||
|
# CI template for periodic CI jobs
|
||||||
|
# Enabled when PERIODIC_CI_ENABLED var is set
|
||||||
|
.molecule_periodic:
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $PERIODIC_CI_ENABLED
|
||||||
|
allow_failure: true
|
||||||
|
extends: .molecule
|
||||||
|
|
||||||
|
molecule_full:
|
||||||
|
extends: .molecule_periodic
|
||||||
|
|
||||||
|
molecule_no_container_engines:
|
||||||
|
extends: .molecule
|
||||||
|
script:
|
||||||
|
- ./tests/scripts/molecule_run.sh -e container-engine
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
molecule_docker:
|
||||||
|
extends: .molecule
|
||||||
|
script:
|
||||||
|
- ./tests/scripts/molecule_run.sh -i container-engine/cri-dockerd
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
molecule_containerd:
|
||||||
|
extends: .molecule
|
||||||
|
script:
|
||||||
|
- ./tests/scripts/molecule_run.sh -i container-engine/containerd
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
molecule_cri-o:
|
||||||
|
extends: .molecule
|
||||||
|
stage: deploy-part2
|
||||||
|
script:
|
||||||
|
- ./tests/scripts/molecule_run.sh -i container-engine/cri-o
|
||||||
|
allow_failure: true
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
# Stage 3 container engines don't get as much attention so allow them to fail
|
||||||
|
molecule_kata:
|
||||||
|
extends: .molecule
|
||||||
|
stage: deploy-part3
|
||||||
|
script:
|
||||||
|
- ./tests/scripts/molecule_run.sh -i container-engine/kata-containers
|
||||||
|
when: manual
|
||||||
|
# FIXME: this test is broken (perma-failing)
|
||||||
|
|
||||||
|
molecule_gvisor:
|
||||||
|
extends: .molecule
|
||||||
|
stage: deploy-part3
|
||||||
|
script:
|
||||||
|
- ./tests/scripts/molecule_run.sh -i container-engine/gvisor
|
||||||
|
when: manual
|
||||||
|
# FIXME: this test is broken (perma-failing)
|
||||||
|
|
||||||
|
molecule_youki:
|
||||||
|
extends: .molecule
|
||||||
|
stage: deploy-part3
|
||||||
|
script:
|
||||||
|
- ./tests/scripts/molecule_run.sh -i container-engine/youki
|
||||||
|
when: manual
|
||||||
|
# FIXME: this test is broken (perma-failing)
|
@ -2,6 +2,7 @@
|
|||||||
.packet:
|
.packet:
|
||||||
extends: .testcases
|
extends: .testcases
|
||||||
variables:
|
variables:
|
||||||
|
ANSIBLE_TIMEOUT: "120"
|
||||||
CI_PLATFORM: packet
|
CI_PLATFORM: packet
|
||||||
SSH_USER: kubespray
|
SSH_USER: kubespray
|
||||||
tags:
|
tags:
|
||||||
@ -22,61 +23,81 @@
|
|||||||
allow_failure: true
|
allow_failure: true
|
||||||
extends: .packet
|
extends: .packet
|
||||||
|
|
||||||
packet_ubuntu18-calico-aio:
|
packet_cleanup_old:
|
||||||
stage: deploy-part1
|
stage: deploy-part1
|
||||||
extends: .packet_pr
|
extends: .packet_periodic
|
||||||
when: on_success
|
script:
|
||||||
|
- cd tests
|
||||||
|
- make cleanup-packet
|
||||||
|
after_script: []
|
||||||
|
|
||||||
# Future AIO job
|
# The ubuntu20-calico-all-in-one jobs are meant as early stages to prevent running the full CI if something is horribly broken
|
||||||
packet_ubuntu20-calico-aio:
|
packet_ubuntu20-calico-all-in-one:
|
||||||
stage: deploy-part1
|
stage: deploy-part1
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: on_success
|
when: on_success
|
||||||
|
variables:
|
||||||
|
RESET_CHECK: "true"
|
||||||
|
|
||||||
# ### PR JOBS PART2
|
# ### PR JOBS PART2
|
||||||
|
|
||||||
packet_centos7-flannel-containerd-addons-ha:
|
packet_ubuntu20-all-in-one-docker:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_ubuntu20-calico-all-in-one-hardening:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_ubuntu22-all-in-one-docker:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_ubuntu22-calico-all-in-one:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_ubuntu24-all-in-one-docker:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_ubuntu24-calico-all-in-one:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_ubuntu24-calico-etcd-datastore:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_centos7-flannel-addons-ha:
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
|
||||||
MITOGEN_ENABLE: "true"
|
|
||||||
|
|
||||||
packet_centos7-crio:
|
packet_almalinux8-crio:
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
allow_failure: true
|
||||||
MITOGEN_ENABLE: "true"
|
|
||||||
|
|
||||||
packet_ubuntu18-crio:
|
packet_ubuntu20-crio:
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
when: manual
|
when: manual
|
||||||
variables:
|
|
||||||
MITOGEN_ENABLE: "true"
|
|
||||||
|
|
||||||
packet_ubuntu16-canal-kubeadm-ha:
|
packet_fedora37-crio:
|
||||||
stage: deploy-part2
|
|
||||||
extends: .packet_periodic
|
|
||||||
when: on_success
|
|
||||||
|
|
||||||
packet_ubuntu16-canal-sep:
|
|
||||||
stage: deploy-special
|
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
|
stage: deploy-part2
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
packet_ubuntu16-flannel-ha:
|
packet_ubuntu20-flannel-ha:
|
||||||
stage: deploy-part2
|
|
||||||
extends: .packet_pr
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
packet_ubuntu16-kube-router-sep:
|
|
||||||
stage: deploy-part2
|
|
||||||
extends: .packet_pr
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
packet_ubuntu16-kube-router-svc-proxy:
|
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
@ -86,12 +107,40 @@ packet_debian10-cilium-svc-proxy:
|
|||||||
extends: .packet_periodic
|
extends: .packet_periodic
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|
||||||
packet_debian10-containerd:
|
packet_debian10-calico:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
|
||||||
MITOGEN_ENABLE: "true"
|
packet_debian10-docker:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_debian11-calico:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_debian11-docker:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_debian12-calico:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_debian12-docker:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_debian12-cilium:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_periodic
|
||||||
|
when: on_success
|
||||||
|
|
||||||
packet_centos7-calico-ha-once-localhost:
|
packet_centos7-calico-ha-once-localhost:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
@ -103,54 +152,78 @@ packet_centos7-calico-ha-once-localhost:
|
|||||||
services:
|
services:
|
||||||
- docker:19.03.9-dind
|
- docker:19.03.9-dind
|
||||||
|
|
||||||
packet_centos8-kube-ovn:
|
packet_almalinux8-kube-ovn:
|
||||||
stage: deploy-part2
|
|
||||||
extends: .packet_periodic
|
|
||||||
when: on_success
|
|
||||||
|
|
||||||
packet_centos8-calico:
|
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|
||||||
packet_fedora32-weave:
|
packet_almalinux8-calico:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|
||||||
packet_opensuse-canal:
|
packet_rockylinux8-calico:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_periodic
|
extends: .packet_pr
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|
||||||
packet_ubuntu18-ovn4nfv:
|
packet_rockylinux9-calico:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_periodic
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_rockylinux9-cilium:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
variables:
|
||||||
|
RESET_CHECK: "true"
|
||||||
|
|
||||||
|
packet_almalinux8-docker:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_amazon-linux-2-all-in-one:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_fedora38-docker-weave:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
packet_opensuse-docker-cilium:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|
||||||
# ### MANUAL JOBS
|
# ### MANUAL JOBS
|
||||||
|
|
||||||
packet_ubuntu16-weave-sep:
|
packet_ubuntu20-docker-weave-sep:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
packet_ubuntu18-cilium-sep:
|
packet_ubuntu20-cilium-sep:
|
||||||
stage: deploy-special
|
stage: deploy-special
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
packet_ubuntu18-flannel-containerd-ha:
|
packet_ubuntu20-flannel-ha-once:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
packet_ubuntu18-flannel-containerd-ha-once:
|
# Calico HA eBPF
|
||||||
|
packet_almalinux8-calico-ha-ebpf:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
packet_debian9-macvlan:
|
packet_debian10-macvlan:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
@ -160,38 +233,53 @@ packet_centos7-calico-ha:
|
|||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
packet_centos7-kube-router:
|
|
||||||
stage: deploy-part2
|
|
||||||
extends: .packet_pr
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
packet_centos7-multus-calico:
|
packet_centos7-multus-calico:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
packet_oracle7-canal-ha:
|
packet_fedora38-docker-calico:
|
||||||
stage: deploy-part2
|
|
||||||
extends: .packet_pr
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
packet_fedora33-calico:
|
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_periodic
|
extends: .packet_periodic
|
||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
variables:
|
||||||
MITOGEN_ENABLE: "true"
|
RESET_CHECK: "true"
|
||||||
|
|
||||||
packet_amazon-linux-2-aio:
|
packet_fedora37-calico-selinux:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_periodic
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_fedora37-calico-swap-selinux:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
packet_fedora32-kube-ovn-containerd:
|
packet_almalinux8-calico-nodelocaldns-secondary:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
packet_fedora38-kube-ovn:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .packet_periodic
|
extends: .packet_periodic
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|
||||||
|
packet_debian11-custom-cni:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
packet_debian11-kubelet-csr-approver:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
packet_debian12-custom-cni-helm:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: manual
|
||||||
|
|
||||||
# ### PR JOBS PART3
|
# ### PR JOBS PART3
|
||||||
# Long jobs (45min+)
|
# Long jobs (45min+)
|
||||||
|
|
||||||
@ -201,36 +289,59 @@ packet_centos7-weave-upgrade-ha:
|
|||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
variables:
|
||||||
UPGRADE_TEST: basic
|
UPGRADE_TEST: basic
|
||||||
MITOGEN_ENABLE: "false"
|
|
||||||
|
|
||||||
packet_debian9-calico-upgrade:
|
packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha:
|
||||||
|
stage: deploy-part3
|
||||||
|
extends: .packet_periodic
|
||||||
|
when: on_success
|
||||||
|
variables:
|
||||||
|
UPGRADE_TEST: basic
|
||||||
|
|
||||||
|
# Calico HA Wireguard
|
||||||
|
packet_ubuntu20-calico-ha-wireguard:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .packet_pr
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
packet_debian11-calico-upgrade:
|
||||||
stage: deploy-part3
|
stage: deploy-part3
|
||||||
extends: .packet_pr
|
extends: .packet_pr
|
||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
variables:
|
||||||
UPGRADE_TEST: graceful
|
UPGRADE_TEST: graceful
|
||||||
MITOGEN_ENABLE: "false"
|
|
||||||
|
|
||||||
packet_debian9-calico-upgrade-once:
|
packet_almalinux8-calico-remove-node:
|
||||||
|
stage: deploy-part3
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
variables:
|
||||||
|
REMOVE_NODE_CHECK: "true"
|
||||||
|
REMOVE_NODE_NAME: "instance-3"
|
||||||
|
|
||||||
|
packet_ubuntu20-calico-etcd-kubeadm:
|
||||||
|
stage: deploy-part3
|
||||||
|
extends: .packet_pr
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
packet_debian11-calico-upgrade-once:
|
||||||
stage: deploy-part3
|
stage: deploy-part3
|
||||||
extends: .packet_periodic
|
extends: .packet_periodic
|
||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
variables:
|
||||||
UPGRADE_TEST: graceful
|
UPGRADE_TEST: graceful
|
||||||
MITOGEN_ENABLE: "false"
|
|
||||||
|
|
||||||
packet_ubuntu18-calico-ha-recover:
|
packet_ubuntu20-calico-ha-recover:
|
||||||
stage: deploy-part3
|
stage: deploy-part3
|
||||||
extends: .packet_periodic
|
extends: .packet_periodic
|
||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
variables:
|
||||||
RECOVER_CONTROL_PLANE_TEST: "true"
|
RECOVER_CONTROL_PLANE_TEST: "true"
|
||||||
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube-master[1:]"
|
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:]:kube_control_plane[1:]"
|
||||||
|
|
||||||
packet_ubuntu18-calico-ha-recover-noquorum:
|
packet_ubuntu20-calico-ha-recover-noquorum:
|
||||||
stage: deploy-part3
|
stage: deploy-part3
|
||||||
extends: .packet_periodic
|
extends: .packet_periodic
|
||||||
when: on_success
|
when: on_success
|
||||||
variables:
|
variables:
|
||||||
RECOVER_CONTROL_PLANE_TEST: "true"
|
RECOVER_CONTROL_PLANE_TEST: "true"
|
||||||
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[1:],kube-master[1:]"
|
RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[1:]:kube_control_plane[1:]"
|
||||||
|
17
.gitlab-ci/pre-commit-dynamic-stub.yml
Normal file
17
.gitlab-ci/pre-commit-dynamic-stub.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
# stub pipeline for dynamic generation
|
||||||
|
pre-commit:
|
||||||
|
tags:
|
||||||
|
- light
|
||||||
|
image: 'ghcr.io/pre-commit-ci/runner-image@sha256:aaf2c7b38b22286f2d381c11673bec571c28f61dd086d11b43a1c9444a813cef'
|
||||||
|
variables:
|
||||||
|
PRE_COMMIT_HOME: /pre-commit-cache
|
||||||
|
script:
|
||||||
|
- pre-commit run -a $HOOK_ID
|
||||||
|
cache:
|
||||||
|
key: pre-commit-$HOOK_ID
|
||||||
|
paths:
|
||||||
|
- /pre-commit-cache
|
||||||
|
parallel:
|
||||||
|
matrix:
|
||||||
|
- HOOK_ID:
|
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
shellcheck:
|
|
||||||
extends: .job
|
|
||||||
stage: unit-tests
|
|
||||||
tags: [light]
|
|
||||||
variables:
|
|
||||||
SHELLCHECK_VERSION: v0.7.1
|
|
||||||
before_script:
|
|
||||||
- ./tests/scripts/rebase.sh
|
|
||||||
- curl --silent --location "https://github.com/koalaman/shellcheck/releases/download/"${SHELLCHECK_VERSION}"/shellcheck-"${SHELLCHECK_VERSION}".linux.x86_64.tar.xz" | tar -xJv
|
|
||||||
- cp shellcheck-"${SHELLCHECK_VERSION}"/shellcheck /usr/bin/
|
|
||||||
- shellcheck --version
|
|
||||||
script:
|
|
||||||
# Run shellcheck for all *.sh except contrib/
|
|
||||||
- find . -name '*.sh' -not -path './contrib/*' -not -path './.git/*' | xargs shellcheck --severity error
|
|
||||||
except: ['triggers', 'master']
|
|
@ -12,13 +12,13 @@
|
|||||||
# Prepare inventory
|
# Prepare inventory
|
||||||
- cp contrib/terraform/$PROVIDER/sample-inventory/cluster.tfvars .
|
- cp contrib/terraform/$PROVIDER/sample-inventory/cluster.tfvars .
|
||||||
- ln -s contrib/terraform/$PROVIDER/hosts
|
- ln -s contrib/terraform/$PROVIDER/hosts
|
||||||
- terraform init contrib/terraform/$PROVIDER
|
- terraform -chdir="contrib/terraform/$PROVIDER" init
|
||||||
# Copy SSH keypair
|
# Copy SSH keypair
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- echo "$PACKET_PRIVATE_KEY" | base64 -d > ~/.ssh/id_rsa
|
- echo "$PACKET_PRIVATE_KEY" | base64 -d > ~/.ssh/id_rsa
|
||||||
- chmod 400 ~/.ssh/id_rsa
|
- chmod 400 ~/.ssh/id_rsa
|
||||||
- echo "$PACKET_PUBLIC_KEY" | base64 -d > ~/.ssh/id_rsa.pub
|
- echo "$PACKET_PUBLIC_KEY" | base64 -d > ~/.ssh/id_rsa.pub
|
||||||
- mkdir -p group_vars
|
- mkdir -p contrib/terraform/$PROVIDER/group_vars
|
||||||
# Random subnet to avoid routing conflicts
|
# Random subnet to avoid routing conflicts
|
||||||
- export TF_VAR_subnet_cidr="10.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).0/24"
|
- export TF_VAR_subnet_cidr="10.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).0/24"
|
||||||
|
|
||||||
@ -28,8 +28,8 @@
|
|||||||
tags: [light]
|
tags: [light]
|
||||||
only: ['master', /^pr-.*$/]
|
only: ['master', /^pr-.*$/]
|
||||||
script:
|
script:
|
||||||
- terraform validate -var-file=cluster.tfvars contrib/terraform/$PROVIDER
|
- terraform -chdir="contrib/terraform/$PROVIDER" validate
|
||||||
- terraform fmt -check -diff contrib/terraform/$PROVIDER
|
- terraform -chdir="contrib/terraform/$PROVIDER" fmt -check -diff
|
||||||
|
|
||||||
.terraform_apply:
|
.terraform_apply:
|
||||||
extends: .terraform_install
|
extends: .terraform_install
|
||||||
@ -56,93 +56,69 @@
|
|||||||
tf-validate-openstack:
|
tf-validate-openstack:
|
||||||
extends: .terraform_validate
|
extends: .terraform_validate
|
||||||
variables:
|
variables:
|
||||||
TF_VERSION: 0.12.29
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: openstack
|
PROVIDER: openstack
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
|
|
||||||
tf-validate-packet:
|
tf-validate-equinix:
|
||||||
extends: .terraform_validate
|
extends: .terraform_validate
|
||||||
variables:
|
variables:
|
||||||
TF_VERSION: 0.12.29
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: packet
|
PROVIDER: equinix
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
|
|
||||||
tf-validate-aws:
|
tf-validate-aws:
|
||||||
extends: .terraform_validate
|
extends: .terraform_validate
|
||||||
variables:
|
variables:
|
||||||
TF_VERSION: 0.12.29
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: aws
|
PROVIDER: aws
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
|
|
||||||
tf-0.13.x-validate-openstack:
|
tf-validate-exoscale:
|
||||||
extends: .terraform_validate
|
extends: .terraform_validate
|
||||||
variables:
|
variables:
|
||||||
TF_VERSION: 0.13.5
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: openstack
|
PROVIDER: exoscale
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
|
||||||
|
|
||||||
tf-0.13.x-validate-packet:
|
tf-validate-hetzner:
|
||||||
extends: .terraform_validate
|
extends: .terraform_validate
|
||||||
variables:
|
variables:
|
||||||
TF_VERSION: 0.13.5
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: packet
|
PROVIDER: hetzner
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
|
||||||
|
|
||||||
tf-0.13.x-validate-aws:
|
tf-validate-vsphere:
|
||||||
extends: .terraform_validate
|
extends: .terraform_validate
|
||||||
variables:
|
variables:
|
||||||
TF_VERSION: 0.13.5
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: aws
|
PROVIDER: vsphere
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
|
|
||||||
tf-0.14.x-validate-openstack:
|
tf-validate-upcloud:
|
||||||
extends: .terraform_validate
|
extends: .terraform_validate
|
||||||
variables:
|
variables:
|
||||||
TF_VERSION: 0.14.3
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: openstack
|
PROVIDER: upcloud
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
|
|
||||||
tf-0.14.x-validate-packet:
|
tf-validate-nifcloud:
|
||||||
extends: .terraform_validate
|
extends: .terraform_validate
|
||||||
variables:
|
variables:
|
||||||
TF_VERSION: 0.14.3
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: packet
|
PROVIDER: nifcloud
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
|
||||||
|
|
||||||
tf-0.14.x-validate-aws:
|
# tf-packet-ubuntu20-default:
|
||||||
extends: .terraform_validate
|
|
||||||
variables:
|
|
||||||
TF_VERSION: 0.14.3
|
|
||||||
PROVIDER: aws
|
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
|
||||||
|
|
||||||
# tf-packet-ubuntu16-default:
|
|
||||||
# extends: .terraform_apply
|
# extends: .terraform_apply
|
||||||
# variables:
|
# variables:
|
||||||
# TF_VERSION: 0.12.29
|
# TF_VERSION: $TERRAFORM_VERSION
|
||||||
# PROVIDER: packet
|
# PROVIDER: packet
|
||||||
# CLUSTER: $CI_COMMIT_REF_NAME
|
# CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
# TF_VAR_number_of_k8s_masters: "1"
|
# TF_VAR_number_of_k8s_masters: "1"
|
||||||
# TF_VAR_number_of_k8s_nodes: "1"
|
# TF_VAR_number_of_k8s_nodes: "1"
|
||||||
# TF_VAR_plan_k8s_masters: t1.small.x86
|
# TF_VAR_plan_k8s_masters: t1.small.x86
|
||||||
# TF_VAR_plan_k8s_nodes: t1.small.x86
|
# TF_VAR_plan_k8s_nodes: t1.small.x86
|
||||||
# TF_VAR_facility: ewr1
|
# TF_VAR_metro: am
|
||||||
# TF_VAR_public_key_path: ""
|
# TF_VAR_public_key_path: ""
|
||||||
# TF_VAR_operating_system: ubuntu_16_04
|
# TF_VAR_operating_system: ubuntu_20_04
|
||||||
#
|
|
||||||
# tf-packet-ubuntu18-default:
|
|
||||||
# extends: .terraform_apply
|
|
||||||
# variables:
|
|
||||||
# TF_VERSION: 0.12.29
|
|
||||||
# PROVIDER: packet
|
|
||||||
# CLUSTER: $CI_COMMIT_REF_NAME
|
|
||||||
# TF_VAR_number_of_k8s_masters: "1"
|
|
||||||
# TF_VAR_number_of_k8s_nodes: "1"
|
|
||||||
# TF_VAR_plan_k8s_masters: t1.small.x86
|
|
||||||
# TF_VAR_plan_k8s_nodes: t1.small.x86
|
|
||||||
# TF_VAR_facility: ams1
|
|
||||||
# TF_VAR_public_key_path: ""
|
|
||||||
# TF_VAR_operating_system: ubuntu_18_04
|
|
||||||
|
|
||||||
.ovh_variables: &ovh_variables
|
.ovh_variables: &ovh_variables
|
||||||
OS_AUTH_URL: https://auth.cloud.ovh.net/v3
|
OS_AUTH_URL: https://auth.cloud.ovh.net/v3
|
||||||
@ -168,10 +144,6 @@ tf-0.14.x-validate-aws:
|
|||||||
OS_INTERFACE: public
|
OS_INTERFACE: public
|
||||||
OS_IDENTITY_API_VERSION: "3"
|
OS_IDENTITY_API_VERSION: "3"
|
||||||
TF_VAR_router_id: "ab95917c-41fb-4881-b507-3a6dfe9403df"
|
TF_VAR_router_id: "ab95917c-41fb-4881-b507-3a6dfe9403df"
|
||||||
# Since ELASTX is in Stockholm, Mitogen helps with latency
|
|
||||||
MITOGEN_ENABLE: "false"
|
|
||||||
# Mitogen doesn't support interpreter discovery yet
|
|
||||||
ANSIBLE_PYTHON_INTERPRETER: "/usr/bin/python3"
|
|
||||||
|
|
||||||
tf-elastx_cleanup:
|
tf-elastx_cleanup:
|
||||||
stage: unit-tests
|
stage: unit-tests
|
||||||
@ -184,13 +156,14 @@ tf-elastx_cleanup:
|
|||||||
script:
|
script:
|
||||||
- ./scripts/openstack-cleanup/main.py
|
- ./scripts/openstack-cleanup/main.py
|
||||||
|
|
||||||
tf-elastx_ubuntu18-calico:
|
tf-elastx_ubuntu20-calico:
|
||||||
extends: .terraform_apply
|
extends: .terraform_apply
|
||||||
stage: deploy-part3
|
stage: deploy-part3
|
||||||
when: on_success
|
when: on_success
|
||||||
|
allow_failure: true
|
||||||
variables:
|
variables:
|
||||||
<<: *elastx_variables
|
<<: *elastx_variables
|
||||||
TF_VERSION: 0.12.29
|
TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: openstack
|
PROVIDER: openstack
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
ANSIBLE_TIMEOUT: "60"
|
ANSIBLE_TIMEOUT: "60"
|
||||||
@ -213,47 +186,48 @@ tf-elastx_ubuntu18-calico:
|
|||||||
TF_VAR_az_list_node: '["sto1"]'
|
TF_VAR_az_list_node: '["sto1"]'
|
||||||
TF_VAR_flavor_k8s_master: 3f73fc93-ec61-4808-88df-2580d94c1a9b # v1-standard-2
|
TF_VAR_flavor_k8s_master: 3f73fc93-ec61-4808-88df-2580d94c1a9b # v1-standard-2
|
||||||
TF_VAR_flavor_k8s_node: 3f73fc93-ec61-4808-88df-2580d94c1a9b # v1-standard-2
|
TF_VAR_flavor_k8s_node: 3f73fc93-ec61-4808-88df-2580d94c1a9b # v1-standard-2
|
||||||
TF_VAR_image: ubuntu-18.04-server-latest
|
TF_VAR_image: ubuntu-20.04-server-latest
|
||||||
TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
|
TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
|
||||||
|
|
||||||
|
# OVH voucher expired, commenting job until things are sorted out
|
||||||
|
|
||||||
tf-ovh_cleanup:
|
# tf-ovh_cleanup:
|
||||||
stage: unit-tests
|
# stage: unit-tests
|
||||||
tags: [light]
|
# tags: [light]
|
||||||
image: python
|
# image: python
|
||||||
environment: ovh
|
# environment: ovh
|
||||||
variables:
|
# variables:
|
||||||
<<: *ovh_variables
|
# <<: *ovh_variables
|
||||||
before_script:
|
# before_script:
|
||||||
- pip install -r scripts/openstack-cleanup/requirements.txt
|
# - pip install -r scripts/openstack-cleanup/requirements.txt
|
||||||
script:
|
# script:
|
||||||
- ./scripts/openstack-cleanup/main.py
|
# - ./scripts/openstack-cleanup/main.py
|
||||||
|
|
||||||
tf-ovh_ubuntu18-calico:
|
# tf-ovh_ubuntu20-calico:
|
||||||
extends: .terraform_apply
|
# extends: .terraform_apply
|
||||||
when: on_success
|
# when: on_success
|
||||||
environment: ovh
|
# environment: ovh
|
||||||
variables:
|
# variables:
|
||||||
<<: *ovh_variables
|
# <<: *ovh_variables
|
||||||
TF_VERSION: 0.12.29
|
# TF_VERSION: $TERRAFORM_VERSION
|
||||||
PROVIDER: openstack
|
# PROVIDER: openstack
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
# CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
ANSIBLE_TIMEOUT: "60"
|
# ANSIBLE_TIMEOUT: "60"
|
||||||
SSH_USER: ubuntu
|
# SSH_USER: ubuntu
|
||||||
TF_VAR_number_of_k8s_masters: "0"
|
# TF_VAR_number_of_k8s_masters: "0"
|
||||||
TF_VAR_number_of_k8s_masters_no_floating_ip: "1"
|
# TF_VAR_number_of_k8s_masters_no_floating_ip: "1"
|
||||||
TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
|
# TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
|
||||||
TF_VAR_number_of_etcd: "0"
|
# TF_VAR_number_of_etcd: "0"
|
||||||
TF_VAR_number_of_k8s_nodes: "0"
|
# TF_VAR_number_of_k8s_nodes: "0"
|
||||||
TF_VAR_number_of_k8s_nodes_no_floating_ip: "1"
|
# TF_VAR_number_of_k8s_nodes_no_floating_ip: "1"
|
||||||
TF_VAR_number_of_gfs_nodes_no_floating_ip: "0"
|
# TF_VAR_number_of_gfs_nodes_no_floating_ip: "0"
|
||||||
TF_VAR_number_of_bastions: "0"
|
# TF_VAR_number_of_bastions: "0"
|
||||||
TF_VAR_number_of_k8s_masters_no_etcd: "0"
|
# TF_VAR_number_of_k8s_masters_no_etcd: "0"
|
||||||
TF_VAR_use_neutron: "0"
|
# TF_VAR_use_neutron: "0"
|
||||||
TF_VAR_floatingip_pool: "Ext-Net"
|
# TF_VAR_floatingip_pool: "Ext-Net"
|
||||||
TF_VAR_external_net: "6011fbc9-4cbf-46a4-8452-6890a340b60b"
|
# TF_VAR_external_net: "6011fbc9-4cbf-46a4-8452-6890a340b60b"
|
||||||
TF_VAR_network_name: "Ext-Net"
|
# TF_VAR_network_name: "Ext-Net"
|
||||||
TF_VAR_flavor_k8s_master: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
|
# TF_VAR_flavor_k8s_master: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
|
||||||
TF_VAR_flavor_k8s_node: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
|
# TF_VAR_flavor_k8s_node: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
|
||||||
TF_VAR_image: "Ubuntu 18.04"
|
# TF_VAR_image: "Ubuntu 20.04"
|
||||||
TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
|
# TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
|
||||||
|
@ -1,21 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
molecule_tests:
|
|
||||||
tags: [c3.small.x86]
|
|
||||||
only: [/^pr-.*$/]
|
|
||||||
except: ['triggers']
|
|
||||||
image: quay.io/kubespray/vagrant:$KUBESPRAY_VERSION
|
|
||||||
services: []
|
|
||||||
stage: deploy-part1
|
|
||||||
before_script:
|
|
||||||
- tests/scripts/rebase.sh
|
|
||||||
- apt-get update && apt-get install -y python3-pip
|
|
||||||
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
|
||||||
- python -m pip install -r tests/requirements.txt
|
|
||||||
- ./tests/scripts/vagrant_clean.sh
|
|
||||||
script:
|
|
||||||
- ./tests/scripts/molecule_run.sh
|
|
||||||
|
|
||||||
.vagrant:
|
.vagrant:
|
||||||
extends: .testcases
|
extends: .testcases
|
||||||
variables:
|
variables:
|
||||||
@ -26,24 +10,22 @@ molecule_tests:
|
|||||||
tags: [c3.small.x86]
|
tags: [c3.small.x86]
|
||||||
only: [/^pr-.*$/]
|
only: [/^pr-.*$/]
|
||||||
except: ['triggers']
|
except: ['triggers']
|
||||||
image: quay.io/kubespray/vagrant:$KUBESPRAY_VERSION
|
image: $PIPELINE_IMAGE
|
||||||
services: []
|
services: []
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update && apt-get install -y python3-pip
|
|
||||||
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
|
||||||
- python -m pip install -r tests/requirements.txt
|
|
||||||
- ./tests/scripts/vagrant_clean.sh
|
- ./tests/scripts/vagrant_clean.sh
|
||||||
script:
|
script:
|
||||||
- ./tests/scripts/testcases_run.sh
|
- ./tests/scripts/testcases_run.sh
|
||||||
after_script:
|
after_script:
|
||||||
- chronic ./tests/scripts/testcases_cleanup.sh
|
- chronic ./tests/scripts/testcases_cleanup.sh
|
||||||
|
|
||||||
vagrant_ubuntu18-flannel:
|
vagrant_ubuntu20-calico-dual-stack:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .vagrant
|
extends: .vagrant
|
||||||
when: on_success
|
when: manual
|
||||||
|
# FIXME: this test if broken (perma-failing)
|
||||||
|
|
||||||
vagrant_ubuntu18-weave-medium:
|
vagrant_ubuntu20-weave-medium:
|
||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .vagrant
|
extends: .vagrant
|
||||||
when: manual
|
when: manual
|
||||||
@ -52,3 +34,31 @@ vagrant_ubuntu20-flannel:
|
|||||||
stage: deploy-part2
|
stage: deploy-part2
|
||||||
extends: .vagrant
|
extends: .vagrant
|
||||||
when: on_success
|
when: on_success
|
||||||
|
allow_failure: false
|
||||||
|
|
||||||
|
vagrant_ubuntu20-flannel-collection:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .vagrant
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
vagrant_ubuntu20-kube-router-sep:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .vagrant
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
# Service proxy test fails connectivity testing
|
||||||
|
vagrant_ubuntu20-kube-router-svc-proxy:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .vagrant
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
vagrant_fedora37-kube-router:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .vagrant
|
||||||
|
when: manual
|
||||||
|
# FIXME: this test if broken (perma-failing)
|
||||||
|
|
||||||
|
vagrant_centos7-kube-router:
|
||||||
|
stage: deploy-part2
|
||||||
|
extends: .vagrant
|
||||||
|
when: manual
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
MD013: false
|
|
4
.md_style.rb
Normal file
4
.md_style.rb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all
|
||||||
|
exclude_rule 'MD013'
|
||||||
|
exclude_rule 'MD029'
|
||||||
|
rule 'MD007', :indent => 2
|
111
.pre-commit-config.yaml
Normal file
111
.pre-commit-config.yaml
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.6.0
|
||||||
|
hooks:
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-case-conflict
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-xml
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: detect-private-key
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: forbid-new-submodules
|
||||||
|
- id: requirements-txt-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
|
||||||
|
- repo: https://github.com/adrienverge/yamllint.git
|
||||||
|
rev: v1.35.1
|
||||||
|
hooks:
|
||||||
|
- id: yamllint
|
||||||
|
args: [--strict]
|
||||||
|
|
||||||
|
- repo: https://github.com/markdownlint/markdownlint
|
||||||
|
rev: v0.12.0
|
||||||
|
hooks:
|
||||||
|
- id: markdownlint
|
||||||
|
exclude: "^.github|(^docs/_sidebar\\.md$)"
|
||||||
|
|
||||||
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
|
rev: v0.10.0.1
|
||||||
|
hooks:
|
||||||
|
- id: shellcheck
|
||||||
|
args: ["--severity=error"]
|
||||||
|
exclude: "^.git"
|
||||||
|
files: "\\.sh$"
|
||||||
|
|
||||||
|
- repo: https://github.com/ansible/ansible-lint
|
||||||
|
rev: v24.5.0
|
||||||
|
hooks:
|
||||||
|
- id: ansible-lint
|
||||||
|
additional_dependencies:
|
||||||
|
- ansible==9.5.1
|
||||||
|
- jsonschema==4.22.0
|
||||||
|
- jmespath==1.0.1
|
||||||
|
- netaddr==1.2.1
|
||||||
|
- distlib
|
||||||
|
|
||||||
|
- repo: https://github.com/VannTen/misspell
|
||||||
|
# Waiting on https://github.com/golangci/misspell/pull/19 to get merged
|
||||||
|
rev: 8592a4e
|
||||||
|
hooks:
|
||||||
|
- id: misspell
|
||||||
|
exclude: "OWNERS_ALIASES$"
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: ansible-syntax-check
|
||||||
|
name: ansible-syntax-check
|
||||||
|
entry: env ANSIBLE_INVENTORY=inventory/local-tests.cfg ANSIBLE_REMOTE_USER=root ANSIBLE_BECOME="true" ANSIBLE_BECOME_USER=root ANSIBLE_VERBOSITY="3" ansible-playbook --syntax-check
|
||||||
|
language: python
|
||||||
|
files: "^cluster.yml|^upgrade-cluster.yml|^reset.yml|^extra_playbooks/upgrade-only-k8s.yml"
|
||||||
|
additional_dependencies:
|
||||||
|
- ansible==9.5.1
|
||||||
|
|
||||||
|
- id: tox-inventory-builder
|
||||||
|
name: tox-inventory-builder
|
||||||
|
entry: bash -c "cd contrib/inventory_builder && tox"
|
||||||
|
language: python
|
||||||
|
pass_filenames: false
|
||||||
|
additional_dependencies:
|
||||||
|
- tox==4.15.0
|
||||||
|
|
||||||
|
- id: check-readme-versions
|
||||||
|
name: check-readme-versions
|
||||||
|
entry: tests/scripts/check_readme_versions.sh
|
||||||
|
language: script
|
||||||
|
pass_filenames: false
|
||||||
|
|
||||||
|
- id: collection-build-install
|
||||||
|
name: Build and install kubernetes-sigs.kubespray Ansible collection
|
||||||
|
language: python
|
||||||
|
additional_dependencies:
|
||||||
|
- ansible-core>=2.16.4
|
||||||
|
- distlib
|
||||||
|
entry: tests/scripts/collection-build-install.sh
|
||||||
|
pass_filenames: false
|
||||||
|
|
||||||
|
- id: generate-docs-sidebar
|
||||||
|
name: generate-docs-sidebar
|
||||||
|
entry: scripts/gen_docs_sidebar.sh
|
||||||
|
language: script
|
||||||
|
pass_filenames: false
|
||||||
|
|
||||||
|
- id: ci-matrix
|
||||||
|
name: ci-matrix
|
||||||
|
entry: tests/scripts/md-table/main.py
|
||||||
|
language: python
|
||||||
|
pass_filenames: false
|
||||||
|
additional_dependencies:
|
||||||
|
- jinja2
|
||||||
|
- pathlib
|
||||||
|
- pyaml
|
||||||
|
|
||||||
|
- id: jinja-syntax-check
|
||||||
|
name: jinja-syntax-check
|
||||||
|
entry: tests/scripts/check-templates.py
|
||||||
|
language: python
|
||||||
|
types:
|
||||||
|
- jinja
|
||||||
|
additional_dependencies:
|
||||||
|
- jinja2
|
@ -3,6 +3,9 @@ extends: default
|
|||||||
|
|
||||||
ignore: |
|
ignore: |
|
||||||
.git/
|
.git/
|
||||||
|
.github/
|
||||||
|
# Generated file
|
||||||
|
tests/files/custom_cni/cilium.yaml
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
braces:
|
braces:
|
||||||
|
1
CHANGELOG.md
Normal file
1
CHANGELOG.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# See our release notes on [GitHub](https://github.com/kubernetes-sigs/kubespray/releases)
|
@ -6,11 +6,23 @@
|
|||||||
|
|
||||||
It is recommended to use filter to manage the GitHub email notification, see [examples for setting filters to Kubernetes Github notifications](https://github.com/kubernetes/community/blob/master/communication/best-practices.md#examples-for-setting-filters-to-kubernetes-github-notifications)
|
It is recommended to use filter to manage the GitHub email notification, see [examples for setting filters to Kubernetes Github notifications](https://github.com/kubernetes/community/blob/master/communication/best-practices.md#examples-for-setting-filters-to-kubernetes-github-notifications)
|
||||||
|
|
||||||
To install development dependencies you can use `pip install -r tests/requirements.txt`
|
To install development dependencies you can set up a python virtual env with the necessary dependencies:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
virtualenv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
pip install -r tests/requirements.txt
|
||||||
|
ansible-galaxy install -r tests/requirements.yml
|
||||||
|
```
|
||||||
|
|
||||||
#### Linting
|
#### Linting
|
||||||
|
|
||||||
Kubespray uses `yamllint` and `ansible-lint`. To run them locally use `yamllint .` and `ansible-lint`
|
Kubespray uses [pre-commit](https://pre-commit.com) hook configuration to run several linters, please install this tool and use it to run validation tests before submitting a PR.
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
pre-commit install
|
||||||
|
pre-commit run -a # To run pre-commit hook on all files in the repository, even if they were not modified
|
||||||
|
```
|
||||||
|
|
||||||
#### Molecule
|
#### Molecule
|
||||||
|
|
||||||
@ -27,5 +39,9 @@ Vagrant with VirtualBox or libvirt driver helps you to quickly spin test cluster
|
|||||||
1. Submit an issue describing your proposed change to the repo in question.
|
1. Submit an issue describing your proposed change to the repo in question.
|
||||||
2. The [repo owners](OWNERS) will respond to your issue promptly.
|
2. The [repo owners](OWNERS) will respond to your issue promptly.
|
||||||
3. Fork the desired repo, develop and test your code changes.
|
3. Fork the desired repo, develop and test your code changes.
|
||||||
4. Sign the CNCF CLA (<https://git.k8s.io/community/CLA.md#the-contributor-license-agreement>)
|
4. Install [pre-commit](https://pre-commit.com) and install it in your development repo.
|
||||||
5. Submit a pull request.
|
5. Addess any pre-commit validation failures.
|
||||||
|
6. Sign the CNCF CLA (<https://git.k8s.io/community/CLA.md#the-contributor-license-agreement>)
|
||||||
|
7. Submit a pull request.
|
||||||
|
8. Work with the reviewers on their suggestions.
|
||||||
|
9. Ensure to rebase to the HEAD of your target branch and squash un-necessary commits (<https://blog.carbonfive.com/always-squash-and-rebase-your-git-commits/>) before final merger of your contribution.
|
||||||
|
71
Dockerfile
71
Dockerfile
@ -1,25 +1,52 @@
|
|||||||
# Use imutable image tags rather than mutable tags (like ubuntu:18.04)
|
# syntax=docker/dockerfile:1
|
||||||
FROM ubuntu:bionic-20200807
|
|
||||||
|
|
||||||
ENV KUBE_VERSION=v1.19.7
|
# Use imutable image tags rather than mutable tags (like ubuntu:22.04)
|
||||||
|
FROM ubuntu:22.04@sha256:149d67e29f765f4db62aa52161009e99e389544e25a8f43c8c89d4a445a7ca37
|
||||||
RUN mkdir /kubespray
|
|
||||||
WORKDIR /kubespray
|
|
||||||
RUN apt update -y && \
|
|
||||||
apt install -y \
|
|
||||||
libssl-dev python3-dev sshpass apt-transport-https jq moreutils \
|
|
||||||
ca-certificates curl gnupg2 software-properties-common python3-pip rsync
|
|
||||||
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
|
||||||
add-apt-repository \
|
|
||||||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
|
|
||||||
$(lsb_release -cs) \
|
|
||||||
stable" \
|
|
||||||
&& apt update -y && apt-get install docker-ce -y
|
|
||||||
COPY . .
|
|
||||||
RUN /usr/bin/python3 -m pip install pip -U && /usr/bin/python3 -m pip install -r tests/requirements.txt && python3 -m pip install -r requirements.txt && update-alternatives --install /usr/bin/python python /usr/bin/python3 1
|
|
||||||
|
|
||||||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$KUBE_VERSION/bin/linux/amd64/kubectl \
|
|
||||||
&& chmod a+x kubectl && cp kubectl /usr/local/bin/kubectl
|
|
||||||
|
|
||||||
# Some tools like yamllint need this
|
# Some tools like yamllint need this
|
||||||
ENV LANG=C.UTF-8
|
# Pip needs this as well at the moment to install ansible
|
||||||
|
# (and potentially other packages)
|
||||||
|
# See: https://github.com/pypa/pip/issues/10219
|
||||||
|
ENV LANG=C.UTF-8 \
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
|
WORKDIR /kubespray
|
||||||
|
|
||||||
|
# hadolint ignore=DL3008
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
|
apt-get update -q \
|
||||||
|
&& apt-get install -yq --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sshpass \
|
||||||
|
vim \
|
||||||
|
rsync \
|
||||||
|
openssh-client \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /var/log/*
|
||||||
|
|
||||||
|
RUN --mount=type=bind,source=requirements.txt,target=requirements.txt \
|
||||||
|
--mount=type=cache,sharing=locked,id=pipcache,mode=0777,target=/root/.cache/pip \
|
||||||
|
pip install --no-compile --no-cache-dir -r requirements.txt \
|
||||||
|
&& find /usr -type d -name '*__pycache__' -prune -exec rm -rf {} \;
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
|
RUN --mount=type=bind,source=roles/kubespray-defaults/defaults/main/main.yml,target=roles/kubespray-defaults/defaults/main/main.yml \
|
||||||
|
KUBE_VERSION=$(sed -n 's/^kube_version: //p' roles/kubespray-defaults/defaults/main/main.yml) \
|
||||||
|
OS_ARCHITECTURE=$(dpkg --print-architecture) \
|
||||||
|
&& curl -L "https://dl.k8s.io/release/${KUBE_VERSION}/bin/linux/${OS_ARCHITECTURE}/kubectl" -o /usr/local/bin/kubectl \
|
||||||
|
&& echo "$(curl -L "https://dl.k8s.io/release/${KUBE_VERSION}/bin/linux/${OS_ARCHITECTURE}/kubectl.sha256")" /usr/local/bin/kubectl | sha256sum --check \
|
||||||
|
&& chmod a+x /usr/local/bin/kubectl
|
||||||
|
|
||||||
|
COPY *.yml ./
|
||||||
|
COPY *.cfg ./
|
||||||
|
COPY roles ./roles
|
||||||
|
COPY contrib ./contrib
|
||||||
|
COPY inventory ./inventory
|
||||||
|
COPY library ./library
|
||||||
|
COPY extra_playbooks ./extra_playbooks
|
||||||
|
COPY playbooks ./playbooks
|
||||||
|
COPY plugins ./plugins
|
||||||
|
2
LICENSE
2
LICENSE
@ -187,7 +187,7 @@
|
|||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright 2016 Kubespray
|
Copyright 2016 Kubespray
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
4
Makefile
4
Makefile
@ -1,5 +1,7 @@
|
|||||||
mitogen:
|
mitogen:
|
||||||
ansible-playbook -c local mitogen.yml -vv
|
@echo Mitogen support is deprecated.
|
||||||
|
@echo Please run the following command manually:
|
||||||
|
@echo ansible-playbook -c local mitogen.yml -vv
|
||||||
clean:
|
clean:
|
||||||
rm -rf dist/
|
rm -rf dist/
|
||||||
rm *.retry
|
rm *.retry
|
||||||
|
2
OWNERS
2
OWNERS
@ -5,4 +5,4 @@ approvers:
|
|||||||
reviewers:
|
reviewers:
|
||||||
- kubespray-reviewers
|
- kubespray-reviewers
|
||||||
emeritus_approvers:
|
emeritus_approvers:
|
||||||
- kubespray-emeritus_approvers
|
- kubespray-emeritus_approvers
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
aliases:
|
aliases:
|
||||||
kubespray-approvers:
|
kubespray-approvers:
|
||||||
- mattymo
|
- cristicalin
|
||||||
- chadswen
|
|
||||||
- mirwan
|
|
||||||
- miouge1
|
|
||||||
- woopstar
|
|
||||||
- luckysb
|
|
||||||
- floryut
|
- floryut
|
||||||
kubespray-reviewers:
|
- liupeng0518
|
||||||
- holmsten
|
- mzaian
|
||||||
- bozzo
|
|
||||||
- eppo
|
|
||||||
- oomichi
|
- oomichi
|
||||||
kubespray-emeritus_approvers:
|
- yankay
|
||||||
- riverzhang
|
|
||||||
- atoms
|
|
||||||
- ant31
|
- ant31
|
||||||
|
kubespray-reviewers:
|
||||||
|
- cyclinder
|
||||||
|
- erikjiang
|
||||||
|
- mrfreezeex
|
||||||
|
- mzaian
|
||||||
|
- vannten
|
||||||
|
- yankay
|
||||||
|
kubespray-emeritus_approvers:
|
||||||
|
- atoms
|
||||||
|
- chadswen
|
||||||
|
- luckysb
|
||||||
|
- mattymo
|
||||||
|
- miouge1
|
||||||
|
- riverzhang
|
||||||
|
- woopstar
|
||||||
|
240
README.md
240
README.md
@ -5,7 +5,7 @@
|
|||||||
If you have questions, check the documentation at [kubespray.io](https://kubespray.io) and join us on the [kubernetes slack](https://kubernetes.slack.com), channel **\#kubespray**.
|
If you have questions, check the documentation at [kubespray.io](https://kubespray.io) and join us on the [kubernetes slack](https://kubernetes.slack.com), channel **\#kubespray**.
|
||||||
You can get your invite [here](http://slack.k8s.io/)
|
You can get your invite [here](http://slack.k8s.io/)
|
||||||
|
|
||||||
- Can be deployed on **[AWS](docs/aws.md), GCE, [Azure](docs/azure.md), [OpenStack](docs/openstack.md), [vSphere](docs/vsphere.md), [Packet](docs/packet.md) (bare metal), Oracle Cloud Infrastructure (Experimental), or Baremetal**
|
- Can be deployed on **[AWS](docs/cloud_providers/aws.md), GCE, [Azure](docs/cloud_providers/azure.md), [OpenStack](docs/cloud_providers/openstack.md), [vSphere](docs/cloud_providers/vsphere.md), [Equinix Metal](docs/cloud_providers/equinix-metal.md) (bare metal), Oracle Cloud Infrastructure (Experimental), or Baremetal**
|
||||||
- **Highly available** cluster
|
- **Highly available** cluster
|
||||||
- **Composable** (Choice of the network plugin for instance)
|
- **Composable** (Choice of the network plugin for instance)
|
||||||
- Supports most popular **Linux distributions**
|
- Supports most popular **Linux distributions**
|
||||||
@ -13,16 +13,16 @@ You can get your invite [here](http://slack.k8s.io/)
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
To deploy the cluster you can use :
|
Below are several ways to use Kubespray to deploy a Kubernetes cluster.
|
||||||
|
|
||||||
### Ansible
|
### Ansible
|
||||||
|
|
||||||
#### Usage
|
#### Usage
|
||||||
|
|
||||||
```ShellSession
|
Install Ansible according to [Ansible installation guide](/docs/ansible/ansible.md#installing-ansible)
|
||||||
# Install dependencies from ``requirements.txt``
|
then run the following steps:
|
||||||
sudo pip3 install -r requirements.txt
|
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
# Copy ``inventory/sample`` as ``inventory/mycluster``
|
# Copy ``inventory/sample`` as ``inventory/mycluster``
|
||||||
cp -rfp inventory/sample inventory/mycluster
|
cp -rfp inventory/sample inventory/mycluster
|
||||||
|
|
||||||
@ -32,7 +32,14 @@ CONFIG_FILE=inventory/mycluster/hosts.yaml python3 contrib/inventory_builder/inv
|
|||||||
|
|
||||||
# Review and change parameters under ``inventory/mycluster/group_vars``
|
# Review and change parameters under ``inventory/mycluster/group_vars``
|
||||||
cat inventory/mycluster/group_vars/all/all.yml
|
cat inventory/mycluster/group_vars/all/all.yml
|
||||||
cat inventory/mycluster/group_vars/k8s-cluster/k8s-cluster.yml
|
cat inventory/mycluster/group_vars/k8s_cluster/k8s-cluster.yml
|
||||||
|
|
||||||
|
# Clean up old Kubernetes cluster with Ansible Playbook - run the playbook as root
|
||||||
|
# The option `--become` is required, as for example cleaning up SSL keys in /etc/,
|
||||||
|
# uninstalling old packages and interacting with various systemd daemons.
|
||||||
|
# Without --become the playbook will fail to run!
|
||||||
|
# And be mind it will remove the current kubernetes cluster (if it's running)!
|
||||||
|
ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root reset.yml
|
||||||
|
|
||||||
# Deploy Kubespray with Ansible Playbook - run the playbook as root
|
# Deploy Kubespray with Ansible Playbook - run the playbook as root
|
||||||
# The option `--become` is required, as for example writing SSL keys in /etc/,
|
# The option `--become` is required, as for example writing SSL keys in /etc/,
|
||||||
@ -41,121 +48,172 @@ cat inventory/mycluster/group_vars/k8s-cluster/k8s-cluster.yml
|
|||||||
ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root cluster.yml
|
ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root cluster.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: When Ansible is already installed via system packages on the control machine, other python packages installed via `sudo pip install -r requirements.txt` will go to a different directory tree (e.g. `/usr/local/lib/python2.7/dist-packages` on Ubuntu) from Ansible's (e.g. `/usr/lib/python2.7/dist-packages/ansible` still on Ubuntu).
|
Note: When Ansible is already installed via system packages on the control node,
|
||||||
As a consequence, `ansible-playbook` command will fail with:
|
Python packages installed via `sudo pip install -r requirements.txt` will go to
|
||||||
|
a different directory tree (e.g. `/usr/local/lib/python2.7/dist-packages` on
|
||||||
|
Ubuntu) from Ansible's (e.g. `/usr/lib/python2.7/dist-packages/ansible` still on
|
||||||
|
Ubuntu). As a consequence, the `ansible-playbook` command will fail with:
|
||||||
|
|
||||||
```raw
|
```raw
|
||||||
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
|
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
|
||||||
```
|
```
|
||||||
|
|
||||||
probably pointing on a task depending on a module present in requirements.txt (i.e. "unseal vault").
|
This likely indicates that a task depends on a module present in ``requirements.txt``.
|
||||||
|
|
||||||
One way of solving this would be to uninstall the Ansible package and then, to install it via pip but it is not always possible.
|
One way of addressing this is to uninstall the system Ansible package then
|
||||||
A workaround consists of setting `ANSIBLE_LIBRARY` and `ANSIBLE_MODULE_UTILS` environment variables respectively to the `ansible/modules` and `ansible/module_utils` subdirectories of pip packages installation location, which can be found in the Location field of the output of `pip show [package]` before executing `ansible-playbook`.
|
reinstall Ansible via ``pip``, but this not always possible and one must
|
||||||
|
take care regarding package versions.
|
||||||
|
A workaround consists of setting the `ANSIBLE_LIBRARY`
|
||||||
|
and `ANSIBLE_MODULE_UTILS` environment variables respectively to
|
||||||
|
the `ansible/modules` and `ansible/module_utils` subdirectories of the ``pip``
|
||||||
|
installation location, which is the ``Location`` shown by running
|
||||||
|
`pip show [package]` before executing `ansible-playbook`.
|
||||||
|
|
||||||
|
A simple way to ensure you get all the correct version of Ansible is to use
|
||||||
|
the [pre-built docker image from Quay](https://quay.io/repository/kubespray/kubespray?tab=tags).
|
||||||
|
You will then need to use [bind mounts](https://docs.docker.com/storage/bind-mounts/)
|
||||||
|
to access the inventory and SSH key in the container, like this:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
git checkout v2.25.0
|
||||||
|
docker pull quay.io/kubespray/kubespray:v2.25.0
|
||||||
|
docker run --rm -it --mount type=bind,source="$(pwd)"/inventory/sample,dst=/inventory \
|
||||||
|
--mount type=bind,source="${HOME}"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \
|
||||||
|
quay.io/kubespray/kubespray:v2.25.0 bash
|
||||||
|
# Inside the container you may now run the kubespray playbooks:
|
||||||
|
ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Collection
|
||||||
|
|
||||||
|
See [here](docs/ansible/ansible_collection.md) if you wish to use this repository as an Ansible collection
|
||||||
|
|
||||||
### Vagrant
|
### Vagrant
|
||||||
|
|
||||||
For Vagrant we need to install python dependencies for provisioning tasks.
|
For Vagrant we need to install Python dependencies for provisioning tasks.
|
||||||
Check if Python and pip are installed:
|
Check that ``Python`` and ``pip`` are installed:
|
||||||
|
|
||||||
```ShellSession
|
```ShellSession
|
||||||
python -V && pip -V
|
python -V && pip -V
|
||||||
```
|
```
|
||||||
|
|
||||||
If this returns the version of the software, you're good to go. If not, download and install Python from here <https://www.python.org/downloads/source/>
|
If this returns the version of the software, you're good to go. If not, download and install Python from here <https://www.python.org/downloads/source/>
|
||||||
Install the necessary requirements
|
|
||||||
|
Install Ansible according to [Ansible installation guide](/docs/ansible/ansible.md#installing-ansible)
|
||||||
|
then run the following step:
|
||||||
|
|
||||||
```ShellSession
|
```ShellSession
|
||||||
sudo pip install -r requirements.txt
|
|
||||||
vagrant up
|
vagrant up
|
||||||
```
|
```
|
||||||
|
|
||||||
## Documents
|
## Documents
|
||||||
|
|
||||||
- [Requirements](#requirements)
|
- [Requirements](#requirements)
|
||||||
- [Kubespray vs ...](docs/comparisons.md)
|
- [Kubespray vs ...](docs/getting_started/comparisons.md)
|
||||||
- [Getting started](docs/getting-started.md)
|
- [Getting started](docs/getting_started/getting-started.md)
|
||||||
- [Setting up your first cluster](docs/setting-up-your-first-cluster.md)
|
- [Setting up your first cluster](docs/getting_started/setting-up-your-first-cluster.md)
|
||||||
- [Ansible inventory and tags](docs/ansible.md)
|
- [Ansible inventory and tags](docs/ansible/ansible.md)
|
||||||
- [Integration with existing ansible repo](docs/integration.md)
|
- [Integration with existing ansible repo](docs/operations/integration.md)
|
||||||
- [Deployment data variables](docs/vars.md)
|
- [Deployment data variables](docs/ansible/vars.md)
|
||||||
- [DNS stack](docs/dns-stack.md)
|
- [DNS stack](docs/advanced/dns-stack.md)
|
||||||
- [HA mode](docs/ha-mode.md)
|
- [HA mode](docs/operations/ha-mode.md)
|
||||||
- [Network plugins](#network-plugins)
|
- [Network plugins](#network-plugins)
|
||||||
- [Vagrant install](docs/vagrant.md)
|
- [Vagrant install](docs/developers/vagrant.md)
|
||||||
- [Flatcar Container Linux bootstrap](docs/flatcar.md)
|
- [Flatcar Container Linux bootstrap](docs/operating_systems/flatcar.md)
|
||||||
- [Fedora CoreOS bootstrap](docs/fcos.md)
|
- [Fedora CoreOS bootstrap](docs/operating_systems/fcos.md)
|
||||||
- [Debian Jessie setup](docs/debian.md)
|
- [openSUSE setup](docs/operating_systems/opensuse.md)
|
||||||
- [openSUSE setup](docs/opensuse.md)
|
- [Downloaded artifacts](docs/advanced/downloads.md)
|
||||||
- [Downloaded artifacts](docs/downloads.md)
|
- [Cloud providers](docs/cloud_providers/cloud.md)
|
||||||
- [Cloud providers](docs/cloud.md)
|
- [OpenStack](docs/cloud_providers/openstack.md)
|
||||||
- [OpenStack](docs/openstack.md)
|
- [AWS](docs/cloud_providers/aws.md)
|
||||||
- [AWS](docs/aws.md)
|
- [Azure](docs/cloud_providers/azure.md)
|
||||||
- [Azure](docs/azure.md)
|
- [vSphere](docs/cloud_providers/vsphere.md)
|
||||||
- [vSphere](docs/vsphere.md)
|
- [Equinix Metal](docs/cloud_providers/equinix-metal.md)
|
||||||
- [Packet Host](docs/packet.md)
|
- [Large deployments](docs/operations/large-deployments.md)
|
||||||
- [Large deployments](docs/large-deployments.md)
|
- [Adding/replacing a node](docs/operations/nodes.md)
|
||||||
- [Adding/replacing a node](docs/nodes.md)
|
- [Upgrades basics](docs/operations/upgrades.md)
|
||||||
- [Upgrades basics](docs/upgrades.md)
|
- [Air-Gap installation](docs/operations/offline-environment.md)
|
||||||
- [Air-Gap installation](docs/offline-environment.md)
|
- [NTP](docs/advanced/ntp.md)
|
||||||
- [Roadmap](docs/roadmap.md)
|
- [Hardening](docs/operations/hardening.md)
|
||||||
|
- [Mirror](docs/operations/mirror.md)
|
||||||
|
- [Roadmap](docs/roadmap/roadmap.md)
|
||||||
|
|
||||||
## Supported Linux Distributions
|
## Supported Linux Distributions
|
||||||
|
|
||||||
- **Flatcar Container Linux by Kinvolk**
|
- **Flatcar Container Linux by Kinvolk**
|
||||||
- **Debian** Buster, Jessie, Stretch, Wheezy
|
- **Debian** Bookworm, Bullseye, Buster
|
||||||
- **Ubuntu** 16.04, 18.04, 20.04
|
- **Ubuntu** 20.04, 22.04, 24.04
|
||||||
- **CentOS/RHEL** 7, 8 (experimental: see [centos 8 notes](docs/centos8.md))
|
- **CentOS/RHEL** 7, [8, 9](docs/operating_systems/centos.md#centos-8)
|
||||||
- **Fedora** 32, 33
|
- **Fedora** 37, 38
|
||||||
- **Fedora CoreOS** (experimental: see [fcos Note](docs/fcos.md))
|
- **Fedora CoreOS** (see [fcos Note](docs/operating_systems/fcos.md))
|
||||||
- **openSUSE** Leap 42.3/Tumbleweed
|
- **openSUSE** Leap 15.x/Tumbleweed
|
||||||
- **Oracle Linux** 7, 8 (experimental: [centos 8 notes](docs/centos8.md) apply)
|
- **Oracle Linux** 7, [8, 9](docs/operating_systems/centos.md#centos-8)
|
||||||
|
- **Alma Linux** [8, 9](docs/operating_systems/centos.md#centos-8)
|
||||||
|
- **Rocky Linux** [8, 9](docs/operating_systems/centos.md#centos-8)
|
||||||
|
- **Kylin Linux Advanced Server V10** (experimental: see [kylin linux notes](docs/operating_systems/kylinlinux.md))
|
||||||
|
- **Amazon Linux 2** (experimental: see [amazon linux notes](docs/operating_systems/amazonlinux.md))
|
||||||
|
- **UOS Linux** (experimental: see [uos linux notes](docs/operating_systems/uoslinux.md))
|
||||||
|
- **openEuler** (experimental: see [openEuler notes](docs/operating_systems/openeuler.md))
|
||||||
|
|
||||||
Note: Upstart/SysV init based OS types are not supported.
|
Note: Upstart/SysV init based OS types are not supported.
|
||||||
|
|
||||||
## Supported Components
|
## Supported Components
|
||||||
|
|
||||||
- Core
|
- Core
|
||||||
- [kubernetes](https://github.com/kubernetes/kubernetes) v1.19.7
|
- [kubernetes](https://github.com/kubernetes/kubernetes) v1.29.5
|
||||||
- [etcd](https://github.com/coreos/etcd) v3.4.13
|
- [etcd](https://github.com/etcd-io/etcd) v3.5.12
|
||||||
- [docker](https://www.docker.com/) v19.03 (see note)
|
- [docker](https://www.docker.com/) v26.1
|
||||||
- [containerd](https://containerd.io/) v1.3.9
|
- [containerd](https://containerd.io/) v1.7.16
|
||||||
- [cri-o](http://cri-o.io/) v1.19 (experimental: see [CRI-O Note](docs/cri-o.md). Only on fedora, ubuntu and centos based OS)
|
- [cri-o](http://cri-o.io/) v1.29.1 (experimental: see [CRI-O Note](docs/CRI/cri-o.md). Only on fedora, ubuntu and centos based OS)
|
||||||
- Network Plugin
|
- Network Plugin
|
||||||
- [cni-plugins](https://github.com/containernetworking/plugins) v0.9.0
|
- [cni-plugins](https://github.com/containernetworking/plugins) v1.2.0
|
||||||
- [calico](https://github.com/projectcalico/calico) v3.16.5
|
- [calico](https://github.com/projectcalico/calico) v3.27.3
|
||||||
- [canal](https://github.com/projectcalico/canal) (given calico/flannel versions)
|
- [cilium](https://github.com/cilium/cilium) v1.15.4
|
||||||
- [cilium](https://github.com/cilium/cilium) v1.8.6
|
- [flannel](https://github.com/flannel-io/flannel) v0.22.0
|
||||||
- [flanneld](https://github.com/coreos/flannel) v0.13.0
|
- [kube-ovn](https://github.com/alauda/kube-ovn) v1.11.5
|
||||||
- [kube-ovn](https://github.com/alauda/kube-ovn) v1.5.2
|
- [kube-router](https://github.com/cloudnativelabs/kube-router) v2.0.0
|
||||||
- [kube-router](https://github.com/cloudnativelabs/kube-router) v1.1.1
|
- [multus](https://github.com/k8snetworkplumbingwg/multus-cni) v3.8
|
||||||
- [multus](https://github.com/intel/multus-cni) v3.6.0
|
- [weave](https://github.com/weaveworks/weave) v2.8.1
|
||||||
- [ovn4nfv](https://github.com/opnfv/ovn4nfv-k8s-plugin) v1.1.0
|
- [kube-vip](https://github.com/kube-vip/kube-vip) v0.8.0
|
||||||
- [weave](https://github.com/weaveworks/weave) v2.7.0
|
|
||||||
- Application
|
- Application
|
||||||
- [ambassador](https://github.com/datawire/ambassador): v1.5
|
- [cert-manager](https://github.com/jetstack/cert-manager) v1.13.2
|
||||||
|
- [coredns](https://github.com/coredns/coredns) v1.11.1
|
||||||
|
- [ingress-nginx](https://github.com/kubernetes/ingress-nginx) v1.10.1
|
||||||
|
- [krew](https://github.com/kubernetes-sigs/krew) v0.4.4
|
||||||
|
- [argocd](https://argoproj.github.io/) v2.11.0
|
||||||
|
- [helm](https://helm.sh/) v3.14.2
|
||||||
|
- [metallb](https://metallb.universe.tf/) v0.13.9
|
||||||
|
- [registry](https://github.com/distribution/distribution) v2.8.1
|
||||||
|
- Storage Plugin
|
||||||
- [cephfs-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.0-k8s1.11
|
- [cephfs-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.0-k8s1.11
|
||||||
- [rbd-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.1-k8s1.11
|
- [rbd-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.1-k8s1.11
|
||||||
- [cert-manager](https://github.com/jetstack/cert-manager) v0.16.1
|
- [aws-ebs-csi-plugin](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) v0.5.0
|
||||||
- [coredns](https://github.com/coredns/coredns) v1.7.0
|
- [azure-csi-plugin](https://github.com/kubernetes-sigs/azuredisk-csi-driver) v1.10.0
|
||||||
- [ingress-nginx](https://github.com/kubernetes/ingress-nginx) v0.41.2
|
- [cinder-csi-plugin](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md) v1.29.0
|
||||||
|
- [gcp-pd-csi-plugin](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) v1.9.2
|
||||||
|
- [local-path-provisioner](https://github.com/rancher/local-path-provisioner) v0.0.24
|
||||||
|
- [local-volume-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) v2.5.0
|
||||||
|
- [node-feature-discovery](https://github.com/kubernetes-sigs/node-feature-discovery) v0.14.2
|
||||||
|
|
||||||
Note: The list of available docker version is 18.09, 19.03 and 20.10. The recommended docker version is 19.03. The kubelet might break on docker's non-standard version numbering (it no longer uses semantic versioning). To ensure auto-updates don't break your cluster look into e.g. yum versionlock plugin or apt pin).
|
## Container Runtime Notes
|
||||||
|
|
||||||
|
- The cri-o version should be aligned with the respective kubernetes version (i.e. kube_version=1.20.x, crio_version=1.20)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- **Minimum required version of Kubernetes is v1.18**
|
- **Minimum required version of Kubernetes is v1.28**
|
||||||
- **Ansible v2.9.x, Jinja 2.11+ and python-netaddr is installed on the machine that will run Ansible commands, Ansible 2.10.x is not supported for now**
|
- **Ansible v2.14+, Jinja 2.11+ and python-netaddr is installed on the machine that will run Ansible commands**
|
||||||
- The target servers must have **access to the Internet** in order to pull docker images. Otherwise, additional configuration is required (See [Offline Environment](docs/offline-environment.md))
|
- The target servers must have **access to the Internet** in order to pull docker images. Otherwise, additional configuration is required (See [Offline Environment](docs/operations/offline-environment.md))
|
||||||
- The target servers are configured to allow **IPv4 forwarding**.
|
- The target servers are configured to allow **IPv4 forwarding**.
|
||||||
|
- If using IPv6 for pods and services, the target servers are configured to allow **IPv6 forwarding**.
|
||||||
- The **firewalls are not managed**, you'll need to implement your own rules the way you used to.
|
- The **firewalls are not managed**, you'll need to implement your own rules the way you used to.
|
||||||
in order to avoid any issue during deployment you should disable your firewall.
|
in order to avoid any issue during deployment you should disable your firewall.
|
||||||
- If kubespray is ran from non-root user account, correct privilege escalation method
|
- If kubespray is run from non-root user account, correct privilege escalation method
|
||||||
should be configured in the target servers. Then the `ansible_become` flag
|
should be configured in the target servers. Then the `ansible_become` flag
|
||||||
or command parameters `--become or -b` should be specified.
|
or command parameters `--become or -b` should be specified.
|
||||||
|
|
||||||
Hardware:
|
Hardware:
|
||||||
These limits are safe guarded by Kubespray. Actual requirements for your workload can differ. For a sizing guide go to the [Building Large Clusters](https://kubernetes.io/docs/setup/cluster-large/#size-of-master-and-master-components) guide.
|
These limits are safeguarded by Kubespray. Actual requirements for your workload can differ. For a sizing guide go to the [Building Large Clusters](https://kubernetes.io/docs/setup/cluster-large/#size-of-master-and-master-components) guide.
|
||||||
|
|
||||||
- Master
|
- Master
|
||||||
- Memory: 1500 MB
|
- Memory: 1500 MB
|
||||||
@ -164,45 +222,44 @@ These limits are safe guarded by Kubespray. Actual requirements for your workloa
|
|||||||
|
|
||||||
## Network Plugins
|
## Network Plugins
|
||||||
|
|
||||||
You can choose between 10 network plugins. (default: `calico`, except Vagrant uses `flannel`)
|
You can choose among ten network plugins. (default: `calico`, except Vagrant uses `flannel`)
|
||||||
|
|
||||||
- [flannel](docs/flannel.md): gre/vxlan (layer 2) networking.
|
- [flannel](docs/CNI/flannel.md): gre/vxlan (layer 2) networking.
|
||||||
|
|
||||||
- [Calico](https://docs.projectcalico.org/latest/introduction/) is a networking and network policy provider. Calico supports a flexible set of networking options
|
- [Calico](https://docs.tigera.io/calico/latest/about/) is a networking and network policy provider. Calico supports a flexible set of networking options
|
||||||
designed to give you the most efficient networking across a range of situations, including non-overlay
|
designed to give you the most efficient networking across a range of situations, including non-overlay
|
||||||
and overlay networks, with or without BGP. Calico uses the same engine to enforce network policy for hosts,
|
and overlay networks, with or without BGP. Calico uses the same engine to enforce network policy for hosts,
|
||||||
pods, and (if using Istio and Envoy) applications at the service mesh layer.
|
pods, and (if using Istio and Envoy) applications at the service mesh layer.
|
||||||
|
|
||||||
- [canal](https://github.com/projectcalico/canal): a composition of calico and flannel plugins.
|
|
||||||
|
|
||||||
- [cilium](http://docs.cilium.io/en/latest/): layer 3/4 networking (as well as layer 7 to protect and secure application protocols), supports dynamic insertion of BPF bytecode into the Linux kernel to implement security services, networking and visibility logic.
|
- [cilium](http://docs.cilium.io/en/latest/): layer 3/4 networking (as well as layer 7 to protect and secure application protocols), supports dynamic insertion of BPF bytecode into the Linux kernel to implement security services, networking and visibility logic.
|
||||||
|
|
||||||
- [ovn4nfv](docs/ovn4nfv.md): [ovn4nfv-k8s-plugins](https://github.com/opnfv/ovn4nfv-k8s-plugin) is the network controller, OVS agent and CNI server to offer basic SFC and OVN overlay networking.
|
- [weave](docs/CNI/weave.md): Weave is a lightweight container overlay network that doesn't require an external K/V database cluster.
|
||||||
|
|
||||||
- [weave](docs/weave.md): Weave is a lightweight container overlay network that doesn't require an external K/V database cluster.
|
|
||||||
(Please refer to `weave` [troubleshooting documentation](https://www.weave.works/docs/net/latest/troubleshooting/)).
|
(Please refer to `weave` [troubleshooting documentation](https://www.weave.works/docs/net/latest/troubleshooting/)).
|
||||||
|
|
||||||
- [kube-ovn](docs/kube-ovn.md): Kube-OVN integrates the OVN-based Network Virtualization with Kubernetes. It offers an advanced Container Network Fabric for Enterprises.
|
- [kube-ovn](docs/CNI/kube-ovn.md): Kube-OVN integrates the OVN-based Network Virtualization with Kubernetes. It offers an advanced Container Network Fabric for Enterprises.
|
||||||
|
|
||||||
- [kube-router](docs/kube-router.md): Kube-router is a L3 CNI for Kubernetes networking aiming to provide operational
|
- [kube-router](docs/CNI/kube-router.md): Kube-router is a L3 CNI for Kubernetes networking aiming to provide operational
|
||||||
simplicity and high performance: it uses IPVS to provide Kube Services Proxy (if setup to replace kube-proxy),
|
simplicity and high performance: it uses IPVS to provide Kube Services Proxy (if setup to replace kube-proxy),
|
||||||
iptables for network policies, and BGP for ods L3 networking (with optionally BGP peering with out-of-cluster BGP peers).
|
iptables for network policies, and BGP for ods L3 networking (with optionally BGP peering with out-of-cluster BGP peers).
|
||||||
It can also optionally advertise routes to Kubernetes cluster Pods CIDRs, ClusterIPs, ExternalIPs and LoadBalancerIPs.
|
It can also optionally advertise routes to Kubernetes cluster Pods CIDRs, ClusterIPs, ExternalIPs and LoadBalancerIPs.
|
||||||
|
|
||||||
- [macvlan](docs/macvlan.md): Macvlan is a Linux network driver. Pods have their own unique Mac and Ip address, connected directly the physical (layer 2) network.
|
- [macvlan](docs/CNI/macvlan.md): Macvlan is a Linux network driver. Pods have their own unique Mac and Ip address, connected directly the physical (layer 2) network.
|
||||||
|
|
||||||
- [multus](docs/multus.md): Multus is a meta CNI plugin that provides multiple network interface support to pods. For each interface Multus delegates CNI calls to secondary CNI plugins such as Calico, macvlan, etc.
|
- [multus](docs/CNI/multus.md): Multus is a meta CNI plugin that provides multiple network interface support to pods. For each interface Multus delegates CNI calls to secondary CNI plugins such as Calico, macvlan, etc.
|
||||||
|
|
||||||
The choice is defined with the variable `kube_network_plugin`. There is also an
|
- [custom_cni](roles/network-plugin/custom_cni/) : You can specify some manifests that will be applied to the clusters to bring you own CNI and use non-supported ones by Kubespray.
|
||||||
|
See `tests/files/custom_cni/README.md` and `tests/files/custom_cni/values.yaml`for an example with a CNI provided by a Helm Chart.
|
||||||
|
|
||||||
|
The network plugin to use is defined by the variable `kube_network_plugin`. There is also an
|
||||||
option to leverage built-in cloud provider networking instead.
|
option to leverage built-in cloud provider networking instead.
|
||||||
See also [Network checker](docs/netcheck.md).
|
See also [Network checker](docs/advanced/netcheck.md).
|
||||||
|
|
||||||
## Ingress Plugins
|
## Ingress Plugins
|
||||||
|
|
||||||
- [ambassador](docs/ambassador.md): the Ambassador Ingress Controller and API gateway.
|
|
||||||
|
|
||||||
- [nginx](https://kubernetes.github.io/ingress-nginx): the NGINX Ingress Controller.
|
- [nginx](https://kubernetes.github.io/ingress-nginx): the NGINX Ingress Controller.
|
||||||
|
|
||||||
|
- [metallb](docs/ingress/metallb.md): the MetalLB bare-metal service LoadBalancer provider.
|
||||||
|
|
||||||
## Community docs and resources
|
## Community docs and resources
|
||||||
|
|
||||||
- [kubernetes.io/docs/setup/production-environment/tools/kubespray/](https://kubernetes.io/docs/setup/production-environment/tools/kubespray/)
|
- [kubernetes.io/docs/setup/production-environment/tools/kubespray/](https://kubernetes.io/docs/setup/production-environment/tools/kubespray/)
|
||||||
@ -214,11 +271,12 @@ See also [Network checker](docs/netcheck.md).
|
|||||||
|
|
||||||
- [Digital Rebar Provision](https://github.com/digitalrebar/provision/blob/v4/doc/integrations/ansible.rst)
|
- [Digital Rebar Provision](https://github.com/digitalrebar/provision/blob/v4/doc/integrations/ansible.rst)
|
||||||
- [Terraform Contrib](https://github.com/kubernetes-sigs/kubespray/tree/master/contrib/terraform)
|
- [Terraform Contrib](https://github.com/kubernetes-sigs/kubespray/tree/master/contrib/terraform)
|
||||||
|
- [Kubean](https://github.com/kubean-io/kubean)
|
||||||
|
|
||||||
## CI Tests
|
## CI Tests
|
||||||
|
|
||||||
[](https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/pipelines)
|
[](https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/pipelines)
|
||||||
|
|
||||||
CI/end-to-end tests sponsored by: [CNCF](https://cncf.io), [Packet](https://www.packet.com/), [OVHcloud](https://www.ovhcloud.com/), [ELASTX](https://elastx.se/).
|
CI/end-to-end tests sponsored by: [CNCF](https://cncf.io), [Equinix Metal](https://metal.equinix.com/), [OVHcloud](https://www.ovhcloud.com/), [ELASTX](https://elastx.se/).
|
||||||
|
|
||||||
See the [test matrix](docs/test_cases.md) for details.
|
See the [test matrix](docs/developers/test_cases.md) for details.
|
||||||
|
59
RELEASE.md
59
RELEASE.md
@ -2,17 +2,20 @@
|
|||||||
|
|
||||||
The Kubespray Project is released on an as-needed basis. The process is as follows:
|
The Kubespray Project is released on an as-needed basis. The process is as follows:
|
||||||
|
|
||||||
1. An issue is proposing a new release with a changelog since the last release
|
1. An issue is proposing a new release with a changelog since the last release. Please see [a good sample issue](https://github.com/kubernetes-sigs/kubespray/issues/8325)
|
||||||
2. At least one of the [approvers](OWNERS_ALIASES) must approve this release
|
1. At least one of the [approvers](OWNERS_ALIASES) must approve this release
|
||||||
3. The `kube_version_min_required` variable is set to `n-1`
|
1. (Only for major releases) The `kube_version_min_required` variable is set to `n-1`
|
||||||
4. Remove hashes for [EOL versions](https://github.com/kubernetes/sig-release/blob/master/releases/patch-releases.md) of kubernetes from `*_checksums` variables.
|
1. (Only for major releases) Remove hashes for [EOL versions](https://github.com/kubernetes/website/blob/main/content/en/releases/patch-releases.md) of kubernetes from `*_checksums` variables.
|
||||||
5. An approver creates [new release in GitHub](https://github.com/kubernetes-sigs/kubespray/releases/new) using a version and tag name like `vX.Y.Z` and attaching the release notes
|
1. Create the release note with [Kubernetes Release Notes Generator](https://github.com/kubernetes/release/blob/master/cmd/release-notes/README.md). See the following `Release note creation` section for the details.
|
||||||
6. An approver creates a release branch in the form `release-X.Y`
|
1. An approver creates [new release in GitHub](https://github.com/kubernetes-sigs/kubespray/releases/new) using a version and tag name like `vX.Y.Z` and attaching the release notes
|
||||||
7. The corresponding version of [quay.io/kubespray/kubespray:vX.Y.Z](https://quay.io/repository/kubespray/kubespray) and [quay.io/kubespray/vagrant:vX.Y.Z](https://quay.io/repository/kubespray/vagrant) docker images are built and tagged
|
1. (Only for major releases) An approver creates a release branch in the form `release-X.Y`
|
||||||
8. The `KUBESPRAY_VERSION` variable is updated in `.gitlab-ci.yml`
|
1. (For major releases) On the `master` branch: bump the version in `galaxy.yml` to the next expected major release (X.y.0 with y = Y + 1), make a Pull Request.
|
||||||
9. The release issue is closed
|
1. (For minor releases) On the `release-X.Y` branch: bump the version in `galaxy.yml` to the next expected minor release (X.Y.z with z = Z + 1), make a Pull Request.
|
||||||
10. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] Kubespray $VERSION is released`
|
1. The corresponding version of [quay.io/kubespray/kubespray:vX.Y.Z](https://quay.io/repository/kubespray/kubespray) and [quay.io/kubespray/vagrant:vX.Y.Z](https://quay.io/repository/kubespray/vagrant) container images are built and tagged. See the following `Container image creation` section for the details.
|
||||||
11. The topic of the #kubespray channel is updated with `vX.Y.Z is released! | ...`
|
1. (Only for major releases) The `KUBESPRAY_VERSION` in `.gitlab-ci.yml` is upgraded to the version we just released # TODO clarify this, this variable is for testing upgrades.
|
||||||
|
1. The release issue is closed
|
||||||
|
1. An announcement email is sent to `dev@kubernetes.io` with the subject `[ANNOUNCE] Kubespray $VERSION is released`
|
||||||
|
1. The topic of the #kubespray channel is updated with `vX.Y.Z is released! | ...`
|
||||||
|
|
||||||
## Major/minor releases and milestones
|
## Major/minor releases and milestones
|
||||||
|
|
||||||
@ -46,3 +49,37 @@ The Kubespray Project is released on an as-needed basis. The process is as follo
|
|||||||
then Kubespray v2.1.0 may be bound to only minor changes to `kube_version`, like v1.5.1
|
then Kubespray v2.1.0 may be bound to only minor changes to `kube_version`, like v1.5.1
|
||||||
and *any* changes to other components, like etcd v4, or calico 1.2.3.
|
and *any* changes to other components, like etcd v4, or calico 1.2.3.
|
||||||
And Kubespray v3.x.x shall be bound to `kube_version: 2.x.x` respectively.
|
And Kubespray v3.x.x shall be bound to `kube_version: 2.x.x` respectively.
|
||||||
|
|
||||||
|
## Release note creation
|
||||||
|
|
||||||
|
You can create a release note with:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
export GITHUB_TOKEN=<your-github-token>
|
||||||
|
export ORG=kubernetes-sigs
|
||||||
|
export REPO=kubespray
|
||||||
|
release-notes --start-sha <The start commit-id> --end-sha <The end commit-id> --dependencies=false --output=/tmp/kubespray-release-note --required-author=""
|
||||||
|
```
|
||||||
|
|
||||||
|
If the release note file(/tmp/kubespray-release-note) contains "### Uncategorized" pull requests, those pull requests don't have a valid kind label(`kind/feature`, etc.).
|
||||||
|
It is necessary to put a valid label on each pull request and run the above release-notes command again to get a better release note
|
||||||
|
|
||||||
|
## Container image creation
|
||||||
|
|
||||||
|
The container image `quay.io/kubespray/kubespray:vX.Y.Z` can be created from Dockerfile of the kubespray root directory:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd kubespray/
|
||||||
|
nerdctl build -t quay.io/kubespray/kubespray:vX.Y.Z .
|
||||||
|
nerdctl push quay.io/kubespray/kubespray:vX.Y.Z
|
||||||
|
```
|
||||||
|
|
||||||
|
The container image `quay.io/kubespray/vagrant:vX.Y.Z` can be created from build.sh of test-infra/vagrant-docker/:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd kubespray/test-infra/vagrant-docker/
|
||||||
|
./build vX.Y.Z
|
||||||
|
```
|
||||||
|
|
||||||
|
Please note that the above operation requires the permission to push container images into quay.io/kubespray/.
|
||||||
|
If you don't have the permission, please ask it on the #kubespray-dev channel.
|
||||||
|
@ -9,5 +9,7 @@
|
|||||||
#
|
#
|
||||||
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
|
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
|
||||||
# INSTRUCTIONS AT https://kubernetes.io/security/
|
# INSTRUCTIONS AT https://kubernetes.io/security/
|
||||||
atoms
|
|
||||||
mattymo
|
mattymo
|
||||||
|
floryut
|
||||||
|
oomichi
|
||||||
|
cristicalin
|
||||||
|
110
Vagrantfile
vendored
110
Vagrantfile
vendored
@ -19,21 +19,27 @@ SUPPORTED_OS = {
|
|||||||
"flatcar-beta" => {box: "flatcar-beta", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["beta"]},
|
"flatcar-beta" => {box: "flatcar-beta", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["beta"]},
|
||||||
"flatcar-alpha" => {box: "flatcar-alpha", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["alpha"]},
|
"flatcar-alpha" => {box: "flatcar-alpha", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["alpha"]},
|
||||||
"flatcar-edge" => {box: "flatcar-edge", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["edge"]},
|
"flatcar-edge" => {box: "flatcar-edge", user: "core", box_url: FLATCAR_URL_TEMPLATE % ["edge"]},
|
||||||
"ubuntu1604" => {box: "generic/ubuntu1604", user: "vagrant"},
|
|
||||||
"ubuntu1804" => {box: "generic/ubuntu1804", user: "vagrant"},
|
|
||||||
"ubuntu2004" => {box: "generic/ubuntu2004", user: "vagrant"},
|
"ubuntu2004" => {box: "generic/ubuntu2004", user: "vagrant"},
|
||||||
|
"ubuntu2204" => {box: "generic/ubuntu2204", user: "vagrant"},
|
||||||
|
"ubuntu2404" => {box: "bento/ubuntu-24.04", user: "vagrant"},
|
||||||
"centos" => {box: "centos/7", user: "vagrant"},
|
"centos" => {box: "centos/7", user: "vagrant"},
|
||||||
"centos-bento" => {box: "bento/centos-7.6", user: "vagrant"},
|
"centos-bento" => {box: "bento/centos-7.6", user: "vagrant"},
|
||||||
"centos8" => {box: "centos/8", user: "vagrant"},
|
"centos8" => {box: "centos/8", user: "vagrant"},
|
||||||
"centos8-bento" => {box: "bento/centos-8", user: "vagrant"},
|
"centos8-bento" => {box: "bento/centos-8", user: "vagrant"},
|
||||||
"fedora32" => {box: "fedora/32-cloud-base", user: "vagrant"},
|
"almalinux8" => {box: "almalinux/8", user: "vagrant"},
|
||||||
"fedora33" => {box: "fedora/33-cloud-base", user: "vagrant"},
|
"almalinux8-bento" => {box: "bento/almalinux-8", user: "vagrant"},
|
||||||
"opensuse" => {box: "bento/opensuse-leap-15.1", user: "vagrant"},
|
"rockylinux8" => {box: "rockylinux/8", user: "vagrant"},
|
||||||
|
"rockylinux9" => {box: "rockylinux/9", user: "vagrant"},
|
||||||
|
"fedora37" => {box: "fedora/37-cloud-base", user: "vagrant"},
|
||||||
|
"fedora38" => {box: "fedora/38-cloud-base", user: "vagrant"},
|
||||||
|
"opensuse" => {box: "opensuse/Leap-15.4.x86_64", user: "vagrant"},
|
||||||
"opensuse-tumbleweed" => {box: "opensuse/Tumbleweed.x86_64", user: "vagrant"},
|
"opensuse-tumbleweed" => {box: "opensuse/Tumbleweed.x86_64", user: "vagrant"},
|
||||||
"oraclelinux" => {box: "generic/oracle7", user: "vagrant"},
|
"oraclelinux" => {box: "generic/oracle7", user: "vagrant"},
|
||||||
"oraclelinux8" => {box: "generic/oracle8", user: "vagrant"},
|
"oraclelinux8" => {box: "generic/oracle8", user: "vagrant"},
|
||||||
"rhel7" => {box: "generic/rhel7", user: "vagrant"},
|
"rhel7" => {box: "generic/rhel7", user: "vagrant"},
|
||||||
"rhel8" => {box: "generic/rhel8", user: "vagrant"},
|
"rhel8" => {box: "generic/rhel8", user: "vagrant"},
|
||||||
|
"debian11" => {box: "debian/bullseye64", user: "vagrant"},
|
||||||
|
"debian12" => {box: "debian/bookworm64", user: "vagrant"},
|
||||||
}
|
}
|
||||||
|
|
||||||
if File.exist?(CONFIG)
|
if File.exist?(CONFIG)
|
||||||
@ -49,16 +55,17 @@ $vm_cpus ||= 2
|
|||||||
$shared_folders ||= {}
|
$shared_folders ||= {}
|
||||||
$forwarded_ports ||= {}
|
$forwarded_ports ||= {}
|
||||||
$subnet ||= "172.18.8"
|
$subnet ||= "172.18.8"
|
||||||
$os ||= "ubuntu1804"
|
$subnet_ipv6 ||= "fd3c:b398:0698:0756"
|
||||||
|
$os ||= "ubuntu2004"
|
||||||
$network_plugin ||= "flannel"
|
$network_plugin ||= "flannel"
|
||||||
# Setting multi_networking to true will install Multus: https://github.com/intel/multus-cni
|
# Setting multi_networking to true will install Multus: https://github.com/k8snetworkplumbingwg/multus-cni
|
||||||
$multi_networking ||= false
|
$multi_networking ||= "False"
|
||||||
$download_run_once ||= "True"
|
$download_run_once ||= "True"
|
||||||
$download_force_cache ||= "True"
|
$download_force_cache ||= "False"
|
||||||
# The first three nodes are etcd servers
|
# The first three nodes are etcd servers
|
||||||
$etcd_instances ||= $num_instances
|
$etcd_instances ||= [$num_instances, 3].min
|
||||||
# The first two nodes are kube masters
|
# The first two nodes are kube masters
|
||||||
$kube_master_instances ||= $num_instances == 1 ? $num_instances : ($num_instances - 1)
|
$kube_master_instances ||= [$num_instances, 2].min
|
||||||
# All nodes are kube nodes
|
# All nodes are kube nodes
|
||||||
$kube_node_instances ||= $num_instances
|
$kube_node_instances ||= $num_instances
|
||||||
# The following only works when using the libvirt provider
|
# The following only works when using the libvirt provider
|
||||||
@ -67,14 +74,27 @@ $kube_node_instances_with_disks_size ||= "20G"
|
|||||||
$kube_node_instances_with_disks_number ||= 2
|
$kube_node_instances_with_disks_number ||= 2
|
||||||
$override_disk_size ||= false
|
$override_disk_size ||= false
|
||||||
$disk_size ||= "20GB"
|
$disk_size ||= "20GB"
|
||||||
$local_path_provisioner_enabled ||= false
|
$local_path_provisioner_enabled ||= "False"
|
||||||
$local_path_provisioner_claim_root ||= "/opt/local-path-provisioner/"
|
$local_path_provisioner_claim_root ||= "/opt/local-path-provisioner/"
|
||||||
$libvirt_nested ||= false
|
$libvirt_nested ||= false
|
||||||
|
# boolean or string (e.g. "-vvv")
|
||||||
|
$ansible_verbosity ||= false
|
||||||
|
$ansible_tags ||= ENV['VAGRANT_ANSIBLE_TAGS'] || ""
|
||||||
|
|
||||||
|
$vagrant_dir ||= File.join(File.dirname(__FILE__), ".vagrant")
|
||||||
|
|
||||||
$playbook ||= "cluster.yml"
|
$playbook ||= "cluster.yml"
|
||||||
|
$extra_vars ||= {}
|
||||||
|
|
||||||
host_vars = {}
|
host_vars = {}
|
||||||
|
|
||||||
|
# throw error if os is not supported
|
||||||
|
if ! SUPPORTED_OS.key?($os)
|
||||||
|
puts "Unsupported OS: #{$os}"
|
||||||
|
puts "Supported OS are: #{SUPPORTED_OS.keys.join(', ')}"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
$box = SUPPORTED_OS[$os][:box]
|
$box = SUPPORTED_OS[$os][:box]
|
||||||
# if $inventory is not set, try to use example
|
# if $inventory is not set, try to use example
|
||||||
$inventory = "inventory/sample" if ! $inventory
|
$inventory = "inventory/sample" if ! $inventory
|
||||||
@ -83,11 +103,11 @@ $inventory = File.absolute_path($inventory, File.dirname(__FILE__))
|
|||||||
# if $inventory has a hosts.ini file use it, otherwise copy over
|
# if $inventory has a hosts.ini file use it, otherwise copy over
|
||||||
# vars etc to where vagrant expects dynamic inventory to be
|
# vars etc to where vagrant expects dynamic inventory to be
|
||||||
if ! File.exist?(File.join(File.dirname($inventory), "hosts.ini"))
|
if ! File.exist?(File.join(File.dirname($inventory), "hosts.ini"))
|
||||||
$vagrant_ansible = File.join(File.dirname(__FILE__), ".vagrant", "provisioners", "ansible")
|
$vagrant_ansible = File.join(File.absolute_path($vagrant_dir), "provisioners", "ansible")
|
||||||
FileUtils.mkdir_p($vagrant_ansible) if ! File.exist?($vagrant_ansible)
|
FileUtils.mkdir_p($vagrant_ansible) if ! File.exist?($vagrant_ansible)
|
||||||
if ! File.exist?(File.join($vagrant_ansible,"inventory"))
|
$vagrant_inventory = File.join($vagrant_ansible,"inventory")
|
||||||
FileUtils.ln_s($inventory, File.join($vagrant_ansible,"inventory"))
|
FileUtils.rm_f($vagrant_inventory)
|
||||||
end
|
FileUtils.ln_s($inventory, $vagrant_inventory)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Vagrant.has_plugin?("vagrant-proxyconf")
|
if Vagrant.has_plugin?("vagrant-proxyconf")
|
||||||
@ -166,7 +186,15 @@ Vagrant.configure("2") do |config|
|
|||||||
# always make /dev/sd{a/b/c} so that CI can ensure that
|
# always make /dev/sd{a/b/c} so that CI can ensure that
|
||||||
# virtualbox and libvirt will have the same devices to use for OSDs
|
# virtualbox and libvirt will have the same devices to use for OSDs
|
||||||
(1..$kube_node_instances_with_disks_number).each do |d|
|
(1..$kube_node_instances_with_disks_number).each do |d|
|
||||||
lv.storage :file, :device => "hd#{driverletters[d]}", :path => "disk-#{i}-#{d}-#{DISK_UUID}.disk", :size => $kube_node_instances_with_disks_size, :bus => "ide"
|
lv.storage :file, :device => "hd#{driverletters[d]}", :path => "disk-#{i}-#{d}-#{DISK_UUID}.disk", :size => $kube_node_instances_with_disks_size, :bus => "scsi"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
node.vm.provider :virtualbox do |vb|
|
||||||
|
# always make /dev/sd{a/b/c} so that CI can ensure that
|
||||||
|
# virtualbox and libvirt will have the same devices to use for OSDs
|
||||||
|
(1..$kube_node_instances_with_disks_number).each do |d|
|
||||||
|
vb.customize ['createhd', '--filename', "disk-#{i}-#{driverletters[d]}-#{DISK_UUID}.disk", '--size', $kube_node_instances_with_disks_size] # 10GB disk
|
||||||
|
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', d, '--device', 0, '--type', 'hdd', '--medium', "disk-#{i}-#{driverletters[d]}-#{DISK_UUID}.disk", '--nonrotational', 'on', '--mtype', 'normal']
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -194,13 +222,40 @@ Vagrant.configure("2") do |config|
|
|||||||
end
|
end
|
||||||
|
|
||||||
ip = "#{$subnet}.#{i+100}"
|
ip = "#{$subnet}.#{i+100}"
|
||||||
node.vm.network :private_network, ip: ip
|
node.vm.network :private_network,
|
||||||
|
:ip => ip,
|
||||||
|
:libvirt__guest_ipv6 => 'yes',
|
||||||
|
:libvirt__ipv6_address => "#{$subnet_ipv6}::#{i+100}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__forward_mode => "none",
|
||||||
|
:libvirt__dhcp_enabled => false
|
||||||
|
|
||||||
# Disable swap for each vm
|
# Disable swap for each vm
|
||||||
node.vm.provision "shell", inline: "swapoff -a"
|
node.vm.provision "shell", inline: "swapoff -a"
|
||||||
|
|
||||||
|
# ubuntu2004 and ubuntu2204 have IPv6 explicitly disabled. This undoes that.
|
||||||
|
if ["ubuntu2004", "ubuntu2204"].include? $os
|
||||||
|
node.vm.provision "shell", inline: "rm -f /etc/modprobe.d/local.conf"
|
||||||
|
node.vm.provision "shell", inline: "sed -i '/net.ipv6.conf.all.disable_ipv6/d' /etc/sysctl.d/99-sysctl.conf /etc/sysctl.conf"
|
||||||
|
end
|
||||||
|
# Hack for fedora37/38 to get the IP address of the second interface
|
||||||
|
if ["fedora37", "fedora38"].include? $os
|
||||||
|
config.vm.provision "shell", inline: <<-SHELL
|
||||||
|
nmcli conn modify 'Wired connection 2' ipv4.addresses $(cat /etc/sysconfig/network-scripts/ifcfg-eth1 | grep IPADDR | cut -d "=" -f2)
|
||||||
|
nmcli conn modify 'Wired connection 2' ipv4.method manual
|
||||||
|
service NetworkManager restart
|
||||||
|
SHELL
|
||||||
|
end
|
||||||
|
|
||||||
|
# Rockylinux boxes needs UEFI
|
||||||
|
if ["rockylinux8", "rockylinux9"].include? $os
|
||||||
|
config.vm.provider "libvirt" do |domain|
|
||||||
|
domain.loader = "/usr/share/OVMF/x64/OVMF_CODE.fd"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Disable firewalld on oraclelinux/redhat vms
|
# Disable firewalld on oraclelinux/redhat vms
|
||||||
if ["oraclelinux","oraclelinux8","rhel7","rhel8"].include? $os
|
if ["oraclelinux","oraclelinux8","rhel7","rhel8","rockylinux8"].include? $os
|
||||||
node.vm.provision "shell", inline: "systemctl stop firewalld; systemctl disable firewalld"
|
node.vm.provision "shell", inline: "systemctl stop firewalld; systemctl disable firewalld"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -222,13 +277,17 @@ Vagrant.configure("2") do |config|
|
|||||||
"kubectl_localhost": "True",
|
"kubectl_localhost": "True",
|
||||||
"local_path_provisioner_enabled": "#{$local_path_provisioner_enabled}",
|
"local_path_provisioner_enabled": "#{$local_path_provisioner_enabled}",
|
||||||
"local_path_provisioner_claim_root": "#{$local_path_provisioner_claim_root}",
|
"local_path_provisioner_claim_root": "#{$local_path_provisioner_claim_root}",
|
||||||
"ansible_ssh_user": SUPPORTED_OS[$os][:user]
|
"ansible_ssh_user": SUPPORTED_OS[$os][:user],
|
||||||
|
"unsafe_show_logs": "True"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only execute the Ansible provisioner once, when all the machines are up and ready.
|
# Only execute the Ansible provisioner once, when all the machines are up and ready.
|
||||||
|
# And limit the action to gathering facts, the full playbook is going to be ran by testcases_run.sh
|
||||||
if i == $num_instances
|
if i == $num_instances
|
||||||
node.vm.provision "ansible" do |ansible|
|
node.vm.provision "ansible" do |ansible|
|
||||||
ansible.playbook = $playbook
|
ansible.playbook = $playbook
|
||||||
|
ansible.compatibility_mode = "2.0"
|
||||||
|
ansible.verbose = $ansible_verbosity
|
||||||
$ansible_inventory_path = File.join( $inventory, "hosts.ini")
|
$ansible_inventory_path = File.join( $inventory, "hosts.ini")
|
||||||
if File.exist?($ansible_inventory_path)
|
if File.exist?($ansible_inventory_path)
|
||||||
ansible.inventory_path = $ansible_inventory_path
|
ansible.inventory_path = $ansible_inventory_path
|
||||||
@ -238,12 +297,15 @@ Vagrant.configure("2") do |config|
|
|||||||
ansible.host_key_checking = false
|
ansible.host_key_checking = false
|
||||||
ansible.raw_arguments = ["--forks=#{$num_instances}", "--flush-cache", "-e ansible_become_pass=vagrant"]
|
ansible.raw_arguments = ["--forks=#{$num_instances}", "--flush-cache", "-e ansible_become_pass=vagrant"]
|
||||||
ansible.host_vars = host_vars
|
ansible.host_vars = host_vars
|
||||||
#ansible.tags = ['download']
|
ansible.extra_vars = $extra_vars
|
||||||
|
if $ansible_tags != ""
|
||||||
|
ansible.tags = [$ansible_tags]
|
||||||
|
end
|
||||||
ansible.groups = {
|
ansible.groups = {
|
||||||
"etcd" => ["#{$instance_name_prefix}-[1:#{$etcd_instances}]"],
|
"etcd" => ["#{$instance_name_prefix}-[1:#{$etcd_instances}]"],
|
||||||
"kube-master" => ["#{$instance_name_prefix}-[1:#{$kube_master_instances}]"],
|
"kube_control_plane" => ["#{$instance_name_prefix}-[1:#{$kube_master_instances}]"],
|
||||||
"kube-node" => ["#{$instance_name_prefix}-[1:#{$kube_node_instances}]"],
|
"kube_node" => ["#{$instance_name_prefix}-[1:#{$kube_node_instances}]"],
|
||||||
"k8s-cluster:children" => ["kube-master", "kube-node"],
|
"k8s_cluster:children" => ["kube_control_plane", "kube_node"],
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -3,7 +3,6 @@ pipelining=True
|
|||||||
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
|
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
|
||||||
#control_path = ~/.ssh/ansible-%%r@%%h:%%p
|
#control_path = ~/.ssh/ansible-%%r@%%h:%%p
|
||||||
[defaults]
|
[defaults]
|
||||||
strategy_plugins = plugins/mitogen/ansible_mitogen/plugins/strategy
|
|
||||||
# https://github.com/ansible/ansible/issues/56930 (to ignore group names with - and .)
|
# https://github.com/ansible/ansible/issues/56930 (to ignore group names with - and .)
|
||||||
force_valid_group_names = ignore
|
force_valid_group_names = ignore
|
||||||
|
|
||||||
@ -11,11 +10,11 @@ host_key_checking=False
|
|||||||
gathering = smart
|
gathering = smart
|
||||||
fact_caching = jsonfile
|
fact_caching = jsonfile
|
||||||
fact_caching_connection = /tmp
|
fact_caching_connection = /tmp
|
||||||
fact_caching_timeout = 7200
|
fact_caching_timeout = 86400
|
||||||
stdout_callback = default
|
stdout_callback = default
|
||||||
display_skipped_hosts = no
|
display_skipped_hosts = no
|
||||||
library = ./library
|
library = ./library
|
||||||
callback_whitelist = profile_tasks
|
callbacks_enabled = profile_tasks,ara_default
|
||||||
roles_path = roles:$VIRTUAL_ENV/usr/local/share/kubespray/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:/usr/share/kubespray/roles
|
roles_path = roles:$VIRTUAL_ENV/usr/local/share/kubespray/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:/usr/share/kubespray/roles
|
||||||
deprecation_warnings=False
|
deprecation_warnings=False
|
||||||
inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo, .creds, .gpg
|
inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo, .creds, .gpg
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
gather_facts: false
|
|
||||||
become: no
|
|
||||||
vars:
|
|
||||||
minimal_ansible_version: 2.9.0
|
|
||||||
maximal_ansible_version: 2.10.0
|
|
||||||
ansible_connection: local
|
|
||||||
tasks:
|
|
||||||
- name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
|
|
||||||
assert:
|
|
||||||
msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }}"
|
|
||||||
that:
|
|
||||||
- ansible_version.string is version(minimal_ansible_version, ">=")
|
|
||||||
- ansible_version.string is version(maximal_ansible_version, "<")
|
|
||||||
tags:
|
|
||||||
- check
|
|
120
cluster.yml
120
cluster.yml
@ -1,119 +1,3 @@
|
|||||||
---
|
---
|
||||||
- name: Check ansible version
|
- name: Install Kubernetes
|
||||||
import_playbook: ansible_version.yml
|
ansible.builtin.import_playbook: playbooks/cluster.yml
|
||||||
|
|
||||||
- hosts: bastion[0]
|
|
||||||
gather_facts: False
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: bastion-ssh-config, tags: ["localhost", "bastion"] }
|
|
||||||
|
|
||||||
- hosts: k8s-cluster:etcd
|
|
||||||
strategy: linear
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
gather_facts: false
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: bootstrap-os, tags: bootstrap-os}
|
|
||||||
|
|
||||||
- name: Gather facts
|
|
||||||
tags: always
|
|
||||||
import_playbook: facts.yml
|
|
||||||
|
|
||||||
- hosts: k8s-cluster:etcd
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: kubernetes/preinstall, tags: preinstall }
|
|
||||||
- { role: "container-engine", tags: "container-engine", when: deploy_container_engine|default(true) }
|
|
||||||
- { role: download, tags: download, when: "not skip_downloads" }
|
|
||||||
|
|
||||||
- hosts: etcd
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- role: etcd
|
|
||||||
tags: etcd
|
|
||||||
vars:
|
|
||||||
etcd_cluster_setup: true
|
|
||||||
etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}"
|
|
||||||
when: not etcd_kubeadm_enabled| default(false)
|
|
||||||
|
|
||||||
- hosts: k8s-cluster
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- role: etcd
|
|
||||||
tags: etcd
|
|
||||||
vars:
|
|
||||||
etcd_cluster_setup: false
|
|
||||||
etcd_events_cluster_setup: false
|
|
||||||
when: not etcd_kubeadm_enabled| default(false)
|
|
||||||
|
|
||||||
- hosts: k8s-cluster
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: kubernetes/node, tags: node }
|
|
||||||
|
|
||||||
- hosts: kube-master
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: kubernetes/master, tags: master }
|
|
||||||
- { role: kubernetes/client, tags: client }
|
|
||||||
- { role: kubernetes-apps/cluster_roles, tags: cluster-roles }
|
|
||||||
|
|
||||||
- hosts: k8s-cluster
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: kubernetes/kubeadm, tags: kubeadm}
|
|
||||||
- { role: network_plugin, tags: network }
|
|
||||||
- { role: kubernetes/node-label, tags: node-label }
|
|
||||||
|
|
||||||
- hosts: calico-rr
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: network_plugin/calico/rr, tags: ['network', 'calico_rr'] }
|
|
||||||
|
|
||||||
- hosts: kube-master[0]
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: kubernetes-apps/rotate_tokens, tags: rotate_tokens, when: "secret_changed|default(false)" }
|
|
||||||
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] }
|
|
||||||
|
|
||||||
- hosts: kube-master
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: kubernetes-apps/external_cloud_controller, tags: external-cloud-controller }
|
|
||||||
- { role: kubernetes-apps/network_plugin, tags: network }
|
|
||||||
- { role: kubernetes-apps/policy_controller, tags: policy-controller }
|
|
||||||
- { role: kubernetes-apps/ingress_controller, tags: ingress-controller }
|
|
||||||
- { role: kubernetes-apps/external_provisioner, tags: external-provisioner }
|
|
||||||
|
|
||||||
- hosts: kube-master
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: kubernetes-apps, tags: apps }
|
|
||||||
|
|
||||||
- hosts: k8s-cluster
|
|
||||||
gather_facts: False
|
|
||||||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- { role: kubespray-defaults }
|
|
||||||
- { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true }
|
|
||||||
|
@ -35,11 +35,11 @@ class SearchEC2Tags(object):
|
|||||||
hosts['_meta'] = { 'hostvars': {} }
|
hosts['_meta'] = { 'hostvars': {} }
|
||||||
|
|
||||||
##Search ec2 three times to find nodes of each group type. Relies on kubespray-role key/value.
|
##Search ec2 three times to find nodes of each group type. Relies on kubespray-role key/value.
|
||||||
for group in ["kube-master", "kube-node", "etcd"]:
|
for group in ["kube_control_plane", "kube_node", "etcd"]:
|
||||||
hosts[group] = []
|
hosts[group] = []
|
||||||
tag_key = "kubespray-role"
|
tag_key = "kubespray-role"
|
||||||
tag_value = ["*"+group+"*"]
|
tag_value = ["*"+group+"*"]
|
||||||
region = os.environ['REGION']
|
region = os.environ['AWS_REGION']
|
||||||
|
|
||||||
ec2 = boto3.resource('ec2', region)
|
ec2 = boto3.resource('ec2', region)
|
||||||
filters = [{'Name': 'tag:'+tag_key, 'Values': tag_value}, {'Name': 'instance-state-name', 'Values': ['running']}]
|
filters = [{'Name': 'tag:'+tag_key, 'Values': tag_value}, {'Name': 'instance-state-name', 'Values': ['running']}]
|
||||||
@ -67,10 +67,15 @@ class SearchEC2Tags(object):
|
|||||||
if node_labels_tag:
|
if node_labels_tag:
|
||||||
ansible_host['node_labels'] = dict([ label.strip().split('=') for label in node_labels_tag[0]['Value'].split(',') ])
|
ansible_host['node_labels'] = dict([ label.strip().split('=') for label in node_labels_tag[0]['Value'].split(',') ])
|
||||||
|
|
||||||
|
##Set when instance actually has node_taints
|
||||||
|
node_taints_tag = list(filter(lambda t: t['Key'] == 'kubespray-node-taints', instance.tags))
|
||||||
|
if node_taints_tag:
|
||||||
|
ansible_host['node_taints'] = list([ taint.strip() for taint in node_taints_tag[0]['Value'].split(',') ])
|
||||||
|
|
||||||
hosts[group].append(dns_name)
|
hosts[group].append(dns_name)
|
||||||
hosts['_meta']['hostvars'][dns_name] = ansible_host
|
hosts['_meta']['hostvars'][dns_name] = ansible_host
|
||||||
|
|
||||||
hosts['k8s-cluster'] = {'children':['kube-master', 'kube-node']}
|
hosts['k8s_cluster'] = {'children':['kube_control_plane', 'kube_node']}
|
||||||
print(json.dumps(hosts, sort_keys=True, indent=2))
|
print(json.dumps(hosts, sort_keys=True, indent=2))
|
||||||
|
|
||||||
SearchEC2Tags()
|
SearchEC2Tags()
|
||||||
|
@ -1 +1 @@
|
|||||||
boto3 # Apache-2.0
|
boto3 # Apache-2.0
|
||||||
|
2
contrib/azurerm/.gitignore
vendored
2
contrib/azurerm/.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
.generated
|
.generated
|
||||||
/inventory
|
/inventory
|
||||||
|
@ -47,6 +47,10 @@ If you need to delete all resources from a resource group, simply call:
|
|||||||
|
|
||||||
**WARNING** this really deletes everything from your resource group, including everything that was later created by you!
|
**WARNING** this really deletes everything from your resource group, including everything that was later created by you!
|
||||||
|
|
||||||
|
## Installing Ansible and the dependencies
|
||||||
|
|
||||||
|
Install Ansible according to [Ansible installation guide](/docs/ansible/ansible.md#installing-ansible)
|
||||||
|
|
||||||
## Generating an inventory for kubespray
|
## Generating an inventory for kubespray
|
||||||
|
|
||||||
After you have applied the templates, you can generate an inventory with this call:
|
After you have applied the templates, you can generate an inventory with this call:
|
||||||
@ -59,6 +63,5 @@ It will create the file ./inventory which can then be used with kubespray, e.g.:
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd kubespray-root-dir
|
cd kubespray-root-dir
|
||||||
sudo pip3 install -r requirements.txt
|
|
||||||
ansible-playbook -i contrib/azurerm/inventory -u devops --become -e "@inventory/sample/group_vars/all/all.yml" cluster.yml
|
ansible-playbook -i contrib/azurerm/inventory -u devops --become -e "@inventory/sample/group_vars/all/all.yml" cluster.yml
|
||||||
```
|
```
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- name: Generate Azure inventory
|
||||||
|
hosts: localhost
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
roles:
|
roles:
|
||||||
- generate-inventory
|
- generate-inventory
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- name: Generate Azure inventory
|
||||||
|
hosts: localhost
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
roles:
|
roles:
|
||||||
- generate-inventory_2
|
- generate-inventory_2
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- name: Generate Azure templates
|
||||||
|
hosts: localhost
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
roles:
|
roles:
|
||||||
- generate-templates
|
- generate-templates
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Query Azure VMs # noqa 301
|
- name: Query Azure VMs
|
||||||
command: azure vm list-ip-address --json {{ azure_resource_group }}
|
command: azure vm list-ip-address --json {{ azure_resource_group }}
|
||||||
register: vm_list_cmd
|
register: vm_list_cmd
|
||||||
|
|
||||||
@ -12,3 +12,4 @@
|
|||||||
template:
|
template:
|
||||||
src: inventory.j2
|
src: inventory.j2
|
||||||
dest: "{{ playbook_dir }}/inventory"
|
dest: "{{ playbook_dir }}/inventory"
|
||||||
|
mode: 0644
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
[kube-master]
|
[kube_control_plane]
|
||||||
{% for vm in vm_list %}
|
{% for vm in vm_list %}
|
||||||
{% if 'kube-master' in vm.tags.roles %}
|
{% if 'kube_control_plane' in vm.tags.roles %}
|
||||||
{{ vm.name }}
|
{{ vm.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -21,13 +21,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
[kube-node]
|
[kube_node]
|
||||||
{% for vm in vm_list %}
|
{% for vm in vm_list %}
|
||||||
{% if 'kube-node' in vm.tags.roles %}
|
{% if 'kube_node' in vm.tags.roles %}
|
||||||
{{ vm.name }}
|
{{ vm.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
[k8s-cluster:children]
|
[k8s_cluster:children]
|
||||||
kube-node
|
kube_node
|
||||||
kube-master
|
kube_control_plane
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Query Azure VMs IPs # noqa 301
|
- name: Query Azure VMs IPs
|
||||||
command: az vm list-ip-addresses -o json --resource-group {{ azure_resource_group }}
|
command: az vm list-ip-addresses -o json --resource-group {{ azure_resource_group }}
|
||||||
register: vm_ip_list_cmd
|
register: vm_ip_list_cmd
|
||||||
|
|
||||||
- name: Query Azure VMs Roles # noqa 301
|
- name: Query Azure VMs Roles
|
||||||
command: az vm list -o json --resource-group {{ azure_resource_group }}
|
command: az vm list -o json --resource-group {{ azure_resource_group }}
|
||||||
register: vm_list_cmd
|
register: vm_list_cmd
|
||||||
|
|
||||||
- name: Query Azure Load Balancer Public IP # noqa 301
|
- name: Query Azure Load Balancer Public IP
|
||||||
command: az network public-ip show -o json -g {{ azure_resource_group }} -n kubernetes-api-pubip
|
command: az network public-ip show -o json -g {{ azure_resource_group }} -n kubernetes-api-pubip
|
||||||
register: lb_pubip_cmd
|
register: lb_pubip_cmd
|
||||||
|
|
||||||
@ -22,8 +22,10 @@
|
|||||||
template:
|
template:
|
||||||
src: inventory.j2
|
src: inventory.j2
|
||||||
dest: "{{ playbook_dir }}/inventory"
|
dest: "{{ playbook_dir }}/inventory"
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
- name: Generate Load Balancer variables
|
- name: Generate Load Balancer variables
|
||||||
template:
|
template:
|
||||||
src: loadbalancer_vars.j2
|
src: loadbalancer_vars.j2
|
||||||
dest: "{{ playbook_dir }}/loadbalancer_vars.yml"
|
dest: "{{ playbook_dir }}/loadbalancer_vars.yml"
|
||||||
|
mode: 0644
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
[kube-master]
|
[kube_control_plane]
|
||||||
{% for vm in vm_roles_list %}
|
{% for vm in vm_roles_list %}
|
||||||
{% if 'kube-master' in vm.tags.roles %}
|
{% if 'kube_control_plane' in vm.tags.roles %}
|
||||||
{{ vm.name }}
|
{{ vm.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -21,14 +21,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
[kube-node]
|
[kube_node]
|
||||||
{% for vm in vm_roles_list %}
|
{% for vm in vm_roles_list %}
|
||||||
{% if 'kube-node' in vm.tags.roles %}
|
{% if 'kube_node' in vm.tags.roles %}
|
||||||
{{ vm.name }}
|
{{ vm.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
[k8s-cluster:children]
|
[k8s_cluster:children]
|
||||||
kube-node
|
kube_node
|
||||||
kube-master
|
kube_control_plane
|
||||||
|
|
||||||
|
@ -24,14 +24,14 @@ bastionIPAddressName: bastion-pubip
|
|||||||
|
|
||||||
disablePasswordAuthentication: true
|
disablePasswordAuthentication: true
|
||||||
|
|
||||||
sshKeyPath: "/home/{{admin_username}}/.ssh/authorized_keys"
|
sshKeyPath: "/home/{{ admin_username }}/.ssh/authorized_keys"
|
||||||
|
|
||||||
imageReference:
|
imageReference:
|
||||||
publisher: "OpenLogic"
|
publisher: "OpenLogic"
|
||||||
offer: "CentOS"
|
offer: "CentOS"
|
||||||
sku: "7.5"
|
sku: "7.5"
|
||||||
version: "latest"
|
version: "latest"
|
||||||
imageReferenceJson: "{{imageReference|to_json}}"
|
imageReferenceJson: "{{ imageReference | to_json }}"
|
||||||
|
|
||||||
storageAccountName: "sa{{nameSuffix | replace('-', '')}}"
|
storageAccountName: "sa{{ nameSuffix | replace('-', '') }}"
|
||||||
storageAccountType: "{{ azure_storage_account_type | default('Standard_LRS') }}"
|
storageAccountType: "{{ azure_storage_account_type | default('Standard_LRS') }}"
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
path: "{{ base_dir }}"
|
path: "{{ base_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
recurse: true
|
recurse: true
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Store json files in base_dir
|
- name: Store json files in base_dir
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "{{ base_dir }}/{{ item }}"
|
dest: "{{ base_dir }}/{{ item }}"
|
||||||
|
mode: 0644
|
||||||
with_items:
|
with_items:
|
||||||
- network.json
|
- network.json
|
||||||
- storage.json
|
- storage.json
|
||||||
|
@ -27,4 +27,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -103,4 +103,4 @@
|
|||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
"variables": {},
|
"variables": {},
|
||||||
"resources": [],
|
"resources": [],
|
||||||
"outputs": {}
|
"outputs": {}
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@
|
|||||||
"[concat('Microsoft.Network/networkInterfaces/', 'master-{{i}}-nic')]"
|
"[concat('Microsoft.Network/networkInterfaces/', 'master-{{i}}-nic')]"
|
||||||
],
|
],
|
||||||
"tags": {
|
"tags": {
|
||||||
"roles": "kube-master,etcd"
|
"roles": "kube_control_plane,etcd"
|
||||||
},
|
},
|
||||||
"apiVersion": "{{apiVersion}}",
|
"apiVersion": "{{apiVersion}}",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
"[concat('Microsoft.Network/networkInterfaces/', 'minion-{{i}}-nic')]"
|
"[concat('Microsoft.Network/networkInterfaces/', 'minion-{{i}}-nic')]"
|
||||||
],
|
],
|
||||||
"tags": {
|
"tags": {
|
||||||
"roles": "kube-node"
|
"roles": "kube_node"
|
||||||
},
|
},
|
||||||
"apiVersion": "{{apiVersion}}",
|
"apiVersion": "{{apiVersion}}",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -112,4 +112,4 @@
|
|||||||
} {% if not loop.last %},{% endif %}
|
} {% if not loop.last %},{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -16,4 +16,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- name: Create nodes as docker containers
|
||||||
|
hosts: localhost
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
roles:
|
roles:
|
||||||
- { role: dind-host }
|
- { role: dind-host }
|
||||||
|
|
||||||
- hosts: containers
|
- name: Customize each node containers
|
||||||
|
hosts: containers
|
||||||
roles:
|
roles:
|
||||||
- { role: dind-cluster }
|
- { role: dind-cluster }
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
- name: set_fact distro_setup
|
- name: Set_fact distro_setup
|
||||||
set_fact:
|
set_fact:
|
||||||
distro_setup: "{{ distro_settings[node_distro] }}"
|
distro_setup: "{{ distro_settings[node_distro] }}"
|
||||||
|
|
||||||
- name: set_fact other distro settings
|
- name: Set_fact other distro settings
|
||||||
set_fact:
|
set_fact:
|
||||||
distro_user: "{{ distro_setup['user'] }}"
|
distro_user: "{{ distro_setup['user'] }}"
|
||||||
distro_ssh_service: "{{ distro_setup['ssh_service'] }}"
|
distro_ssh_service: "{{ distro_setup['ssh_service'] }}"
|
||||||
@ -35,6 +35,7 @@
|
|||||||
path-exclude=/usr/share/doc/*
|
path-exclude=/usr/share/doc/*
|
||||||
path-include=/usr/share/doc/*/copyright
|
path-include=/usr/share/doc/*/copyright
|
||||||
dest: /etc/dpkg/dpkg.cfg.d/01_nodoc
|
dest: /etc/dpkg/dpkg.cfg.d/01_nodoc
|
||||||
|
mode: 0644
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
|
|
||||||
@ -42,7 +43,7 @@
|
|||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ distro_extra_packages }} + [ 'rsyslog', 'openssh-server' ]"
|
with_items: "{{ distro_extra_packages + ['rsyslog', 'openssh-server'] }}"
|
||||||
|
|
||||||
- name: Start needed services
|
- name: Start needed services
|
||||||
service:
|
service:
|
||||||
@ -63,9 +64,10 @@
|
|||||||
copy:
|
copy:
|
||||||
content: "{{ distro_user }} ALL=(ALL) NOPASSWD:ALL"
|
content: "{{ distro_user }} ALL=(ALL) NOPASSWD:ALL"
|
||||||
dest: "/etc/sudoers.d/{{ distro_user }}"
|
dest: "/etc/sudoers.d/{{ distro_user }}"
|
||||||
|
mode: 0640
|
||||||
|
|
||||||
- name: Add my pubkey to "{{ distro_user }}" user authorized keys
|
- name: "Add my pubkey to {{ distro_user }} user authorized keys"
|
||||||
authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: "{{ distro_user }}"
|
user: "{{ distro_user }}"
|
||||||
state: present
|
state: present
|
||||||
key: "{{ lookup('file', lookup('env','HOME') + '/.ssh/id_rsa.pub') }}"
|
key: "{{ lookup('file', lookup('env', 'HOME') + '/.ssh/id_rsa.pub') }}"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
- name: set_fact distro_setup
|
- name: Set_fact distro_setup
|
||||||
set_fact:
|
set_fact:
|
||||||
distro_setup: "{{ distro_settings[node_distro] }}"
|
distro_setup: "{{ distro_settings[node_distro] }}"
|
||||||
|
|
||||||
- name: set_fact other distro settings
|
- name: Set_fact other distro settings
|
||||||
set_fact:
|
set_fact:
|
||||||
distro_image: "{{ distro_setup['image'] }}"
|
distro_image: "{{ distro_setup['image'] }}"
|
||||||
distro_init: "{{ distro_setup['init'] }}"
|
distro_init: "{{ distro_setup['init'] }}"
|
||||||
@ -13,7 +13,7 @@
|
|||||||
distro_agetty_svc: "{{ distro_setup['agetty_svc'] }}"
|
distro_agetty_svc: "{{ distro_setup['agetty_svc'] }}"
|
||||||
|
|
||||||
- name: Create dind node containers from "containers" inventory section
|
- name: Create dind node containers from "containers" inventory section
|
||||||
docker_container:
|
community.docker.docker_container:
|
||||||
image: "{{ distro_image }}"
|
image: "{{ distro_image }}"
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: started
|
state: started
|
||||||
@ -53,7 +53,7 @@
|
|||||||
{{ distro_raw_setup_done }} && echo SKIPPED && exit 0
|
{{ distro_raw_setup_done }} && echo SKIPPED && exit 0
|
||||||
until [ "$(readlink /proc/1/exe)" = "{{ distro_pid1_exe }}" ] ; do sleep 1; done
|
until [ "$(readlink /proc/1/exe)" = "{{ distro_pid1_exe }}" ] ; do sleep 1; done
|
||||||
{{ distro_raw_setup }}
|
{{ distro_raw_setup }}
|
||||||
delegate_to: "{{ item._ansible_item_label|default(item.item) }}"
|
delegate_to: "{{ item._ansible_item_label | default(item.item) }}"
|
||||||
with_items: "{{ containers.results }}"
|
with_items: "{{ containers.results }}"
|
||||||
register: result
|
register: result
|
||||||
changed_when: result.stdout.find("SKIPPED") < 0
|
changed_when: result.stdout.find("SKIPPED") < 0
|
||||||
@ -63,26 +63,25 @@
|
|||||||
until test -S /var/run/dbus/system_bus_socket; do sleep 1; done
|
until test -S /var/run/dbus/system_bus_socket; do sleep 1; done
|
||||||
systemctl disable {{ distro_agetty_svc }}
|
systemctl disable {{ distro_agetty_svc }}
|
||||||
systemctl stop {{ distro_agetty_svc }}
|
systemctl stop {{ distro_agetty_svc }}
|
||||||
delegate_to: "{{ item._ansible_item_label|default(item.item) }}"
|
delegate_to: "{{ item._ansible_item_label | default(item.item) }}"
|
||||||
with_items: "{{ containers.results }}"
|
with_items: "{{ containers.results }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
# Running systemd-machine-id-setup doesn't create a unique id for each node container on Debian,
|
# Running systemd-machine-id-setup doesn't create a unique id for each node container on Debian,
|
||||||
# handle manually
|
# handle manually
|
||||||
- name: Re-create unique machine-id (as we may just get what comes in the docker image), needed by some CNIs for mac address seeding (notably weave) # noqa 301
|
- name: Re-create unique machine-id (as we may just get what comes in the docker image), needed by some CNIs for mac address seeding (notably weave)
|
||||||
raw: |
|
raw: |
|
||||||
echo {{ item | hash('sha1') }} > /etc/machine-id.new
|
echo {{ item | hash('sha1') }} > /etc/machine-id.new
|
||||||
mv -b /etc/machine-id.new /etc/machine-id
|
mv -b /etc/machine-id.new /etc/machine-id
|
||||||
cmp /etc/machine-id /etc/machine-id~ || true
|
cmp /etc/machine-id /etc/machine-id~ || true
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
delegate_to: "{{ item._ansible_item_label|default(item.item) }}"
|
delegate_to: "{{ item._ansible_item_label | default(item.item) }}"
|
||||||
with_items: "{{ containers.results }}"
|
with_items: "{{ containers.results }}"
|
||||||
|
|
||||||
- name: Early hack image install to adapt for DIND
|
- name: Early hack image install to adapt for DIND
|
||||||
# noqa 302 - this task uses the raw module intentionally
|
|
||||||
raw: |
|
raw: |
|
||||||
rm -fv /usr/bin/udevadm /usr/sbin/udevadm
|
rm -fv /usr/bin/udevadm /usr/sbin/udevadm
|
||||||
delegate_to: "{{ item._ansible_item_label|default(item.item) }}"
|
delegate_to: "{{ item._ansible_item_label | default(item.item) }}"
|
||||||
with_items: "{{ containers.results }}"
|
with_items: "{{ containers.results }}"
|
||||||
register: result
|
register: result
|
||||||
changed_when: result.stdout.find("removed") >= 0
|
changed_when: result.stdout.find("removed") >= 0
|
||||||
|
@ -17,7 +17,7 @@ pass_or_fail() {
|
|||||||
test_distro() {
|
test_distro() {
|
||||||
local distro=${1:?};shift
|
local distro=${1:?};shift
|
||||||
local extra="${*:-}"
|
local extra="${*:-}"
|
||||||
local prefix="$distro[${extra}]}"
|
local prefix="${distro[${extra}]}"
|
||||||
ansible-playbook -i hosts dind-cluster.yaml -e node_distro=$distro
|
ansible-playbook -i hosts dind-cluster.yaml -e node_distro=$distro
|
||||||
pass_or_fail "$prefix: dind-nodes" || return 1
|
pass_or_fail "$prefix: dind-nodes" || return 1
|
||||||
(cd ../..
|
(cd ../..
|
||||||
@ -46,7 +46,7 @@ test_distro() {
|
|||||||
pass_or_fail "$prefix: netcheck" || return 1
|
pass_or_fail "$prefix: netcheck" || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
NODES=($(egrep ^kube-node hosts))
|
NODES=($(egrep ^kube_node hosts))
|
||||||
NETCHECKER_HOST=localhost
|
NETCHECKER_HOST=localhost
|
||||||
|
|
||||||
: ${OUTPUT_DIR:=./out}
|
: ${OUTPUT_DIR:=./out}
|
||||||
@ -71,15 +71,15 @@ for spec in ${SPECS}; do
|
|||||||
echo "Loading file=${spec} ..."
|
echo "Loading file=${spec} ..."
|
||||||
. ${spec} || continue
|
. ${spec} || continue
|
||||||
: ${DISTROS:?} || continue
|
: ${DISTROS:?} || continue
|
||||||
echo "DISTROS=${DISTROS[@]}"
|
echo "DISTROS:" "${DISTROS[@]}"
|
||||||
echo "EXTRAS->"
|
echo "EXTRAS->"
|
||||||
printf " %s\n" "${EXTRAS[@]}"
|
printf " %s\n" "${EXTRAS[@]}"
|
||||||
let n=1
|
let n=1
|
||||||
for distro in ${DISTROS[@]}; do
|
for distro in "${DISTROS[@]}"; do
|
||||||
for extra in "${EXTRAS[@]:-NULL}"; do
|
for extra in "${EXTRAS[@]:-NULL}"; do
|
||||||
# Magic value to let this for run once:
|
# Magic value to let this for run once:
|
||||||
[[ ${extra} == NULL ]] && unset extra
|
[[ ${extra} == NULL ]] && unset extra
|
||||||
docker rm -f ${NODES[@]}
|
docker rm -f "${NODES[@]}"
|
||||||
printf -v file_out "%s/%s-%02d.out" ${OUTPUT_DIR} ${spec} $((n++))
|
printf -v file_out "%s/%s-%02d.out" ${OUTPUT_DIR} ${spec} $((n++))
|
||||||
{
|
{
|
||||||
info "${distro}[${extra}] START: file_out=${file_out}"
|
info "${distro}[${extra}] START: file_out=${file_out}"
|
||||||
|
@ -44,11 +44,11 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
ROLES = ['all', 'kube-master', 'kube-node', 'etcd', 'k8s-cluster',
|
ROLES = ['all', 'kube_control_plane', 'kube_node', 'etcd', 'k8s_cluster',
|
||||||
'calico-rr']
|
'calico_rr']
|
||||||
PROTECTED_NAMES = ROLES
|
PROTECTED_NAMES = ROLES
|
||||||
AVAILABLE_COMMANDS = ['help', 'print_cfg', 'print_ips', 'print_hostnames',
|
AVAILABLE_COMMANDS = ['help', 'print_cfg', 'print_ips', 'print_hostnames',
|
||||||
'load']
|
'load', 'add']
|
||||||
_boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
|
_boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
|
||||||
'0': False, 'no': False, 'false': False, 'off': False}
|
'0': False, 'no': False, 'false': False, 'off': False}
|
||||||
yaml = YAML()
|
yaml = YAML()
|
||||||
@ -63,7 +63,9 @@ def get_var_as_bool(name, default):
|
|||||||
|
|
||||||
|
|
||||||
CONFIG_FILE = os.environ.get("CONFIG_FILE", "./inventory/sample/hosts.yaml")
|
CONFIG_FILE = os.environ.get("CONFIG_FILE", "./inventory/sample/hosts.yaml")
|
||||||
KUBE_MASTERS = int(os.environ.get("KUBE_MASTERS", 2))
|
# Remove the reference of KUBE_MASTERS after some deprecation cycles.
|
||||||
|
KUBE_CONTROL_HOSTS = int(os.environ.get("KUBE_CONTROL_HOSTS",
|
||||||
|
os.environ.get("KUBE_MASTERS", 2)))
|
||||||
# Reconfigures cluster distribution at scale
|
# Reconfigures cluster distribution at scale
|
||||||
SCALE_THRESHOLD = int(os.environ.get("SCALE_THRESHOLD", 50))
|
SCALE_THRESHOLD = int(os.environ.get("SCALE_THRESHOLD", 50))
|
||||||
MASSIVE_SCALE_THRESHOLD = int(os.environ.get("MASSIVE_SCALE_THRESHOLD", 200))
|
MASSIVE_SCALE_THRESHOLD = int(os.environ.get("MASSIVE_SCALE_THRESHOLD", 200))
|
||||||
@ -80,32 +82,54 @@ class KubesprayInventory(object):
|
|||||||
def __init__(self, changed_hosts=None, config_file=None):
|
def __init__(self, changed_hosts=None, config_file=None):
|
||||||
self.config_file = config_file
|
self.config_file = config_file
|
||||||
self.yaml_config = {}
|
self.yaml_config = {}
|
||||||
if self.config_file:
|
loadPreviousConfig = False
|
||||||
|
printHostnames = False
|
||||||
|
# See whether there are any commands to process
|
||||||
|
if changed_hosts and changed_hosts[0] in AVAILABLE_COMMANDS:
|
||||||
|
if changed_hosts[0] == "add":
|
||||||
|
loadPreviousConfig = True
|
||||||
|
changed_hosts = changed_hosts[1:]
|
||||||
|
elif changed_hosts[0] == "print_hostnames":
|
||||||
|
loadPreviousConfig = True
|
||||||
|
printHostnames = True
|
||||||
|
else:
|
||||||
|
self.parse_command(changed_hosts[0], changed_hosts[1:])
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
# If the user wants to remove a node, we need to load the config anyway
|
||||||
|
if changed_hosts and changed_hosts[0][0] == "-":
|
||||||
|
loadPreviousConfig = True
|
||||||
|
|
||||||
|
if self.config_file and loadPreviousConfig: # Load previous YAML file
|
||||||
try:
|
try:
|
||||||
self.hosts_file = open(config_file, 'r')
|
self.hosts_file = open(config_file, 'r')
|
||||||
self.yaml_config = yaml.load_all(self.hosts_file)
|
self.yaml_config = yaml.load(self.hosts_file)
|
||||||
except OSError:
|
except OSError as e:
|
||||||
pass
|
# I am assuming we are catching "cannot open file" exceptions
|
||||||
|
print(e)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if changed_hosts and changed_hosts[0] in AVAILABLE_COMMANDS:
|
if printHostnames:
|
||||||
self.parse_command(changed_hosts[0], changed_hosts[1:])
|
self.print_hostnames()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
self.ensure_required_groups(ROLES)
|
self.ensure_required_groups(ROLES)
|
||||||
|
|
||||||
if changed_hosts:
|
if changed_hosts:
|
||||||
changed_hosts = self.range2ips(changed_hosts)
|
changed_hosts = self.range2ips(changed_hosts)
|
||||||
self.hosts = self.build_hostnames(changed_hosts)
|
self.hosts = self.build_hostnames(changed_hosts,
|
||||||
|
loadPreviousConfig)
|
||||||
self.purge_invalid_hosts(self.hosts.keys(), PROTECTED_NAMES)
|
self.purge_invalid_hosts(self.hosts.keys(), PROTECTED_NAMES)
|
||||||
self.set_all(self.hosts)
|
self.set_all(self.hosts)
|
||||||
self.set_k8s_cluster()
|
self.set_k8s_cluster()
|
||||||
etcd_hosts_count = 3 if len(self.hosts.keys()) >= 3 else 1
|
etcd_hosts_count = 3 if len(self.hosts.keys()) >= 3 else 1
|
||||||
self.set_etcd(list(self.hosts.keys())[:etcd_hosts_count])
|
self.set_etcd(list(self.hosts.keys())[:etcd_hosts_count])
|
||||||
if len(self.hosts) >= SCALE_THRESHOLD:
|
if len(self.hosts) >= SCALE_THRESHOLD:
|
||||||
self.set_kube_master(list(self.hosts.keys())[
|
self.set_kube_control_plane(list(self.hosts.keys())[
|
||||||
etcd_hosts_count:(etcd_hosts_count + KUBE_MASTERS)])
|
etcd_hosts_count:(etcd_hosts_count + KUBE_CONTROL_HOSTS)])
|
||||||
else:
|
else:
|
||||||
self.set_kube_master(list(self.hosts.keys())[:KUBE_MASTERS])
|
self.set_kube_control_plane(
|
||||||
|
list(self.hosts.keys())[:KUBE_CONTROL_HOSTS])
|
||||||
self.set_kube_node(self.hosts.keys())
|
self.set_kube_node(self.hosts.keys())
|
||||||
if len(self.hosts) >= SCALE_THRESHOLD:
|
if len(self.hosts) >= SCALE_THRESHOLD:
|
||||||
self.set_calico_rr(list(self.hosts.keys())[:etcd_hosts_count])
|
self.set_calico_rr(list(self.hosts.keys())[:etcd_hosts_count])
|
||||||
@ -155,17 +179,29 @@ class KubesprayInventory(object):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
raise ValueError("Host name must end in an integer")
|
raise ValueError("Host name must end in an integer")
|
||||||
|
|
||||||
def build_hostnames(self, changed_hosts):
|
# Keeps already specified hosts,
|
||||||
|
# and adds or removes the hosts provided as an argument
|
||||||
|
def build_hostnames(self, changed_hosts, loadPreviousConfig=False):
|
||||||
existing_hosts = OrderedDict()
|
existing_hosts = OrderedDict()
|
||||||
highest_host_id = 0
|
highest_host_id = 0
|
||||||
try:
|
# Load already existing hosts from the YAML
|
||||||
for host in self.yaml_config['all']['hosts']:
|
if loadPreviousConfig:
|
||||||
existing_hosts[host] = self.yaml_config['all']['hosts'][host]
|
try:
|
||||||
host_id = self.get_host_id(host)
|
for host in self.yaml_config['all']['hosts']:
|
||||||
if host_id > highest_host_id:
|
# Read configuration of an existing host
|
||||||
highest_host_id = host_id
|
hostConfig = self.yaml_config['all']['hosts'][host]
|
||||||
except Exception:
|
existing_hosts[host] = hostConfig
|
||||||
pass
|
# If the existing host seems
|
||||||
|
# to have been created automatically, detect its ID
|
||||||
|
if host.startswith(HOST_PREFIX):
|
||||||
|
host_id = self.get_host_id(host)
|
||||||
|
if host_id > highest_host_id:
|
||||||
|
highest_host_id = host_id
|
||||||
|
except Exception as e:
|
||||||
|
# I am assuming we are catching automatically
|
||||||
|
# created hosts without IDs
|
||||||
|
print(e)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# FIXME(mattymo): Fix condition where delete then add reuses highest id
|
# FIXME(mattymo): Fix condition where delete then add reuses highest id
|
||||||
next_host_id = highest_host_id + 1
|
next_host_id = highest_host_id + 1
|
||||||
@ -173,6 +209,7 @@ class KubesprayInventory(object):
|
|||||||
|
|
||||||
all_hosts = existing_hosts.copy()
|
all_hosts = existing_hosts.copy()
|
||||||
for host in changed_hosts:
|
for host in changed_hosts:
|
||||||
|
# Delete the host from config the hostname/IP has a "-" prefix
|
||||||
if host[0] == "-":
|
if host[0] == "-":
|
||||||
realhost = host[1:]
|
realhost = host[1:]
|
||||||
if self.exists_hostname(all_hosts, realhost):
|
if self.exists_hostname(all_hosts, realhost):
|
||||||
@ -181,6 +218,8 @@ class KubesprayInventory(object):
|
|||||||
elif self.exists_ip(all_hosts, realhost):
|
elif self.exists_ip(all_hosts, realhost):
|
||||||
self.debug("Marked {0} for deletion.".format(realhost))
|
self.debug("Marked {0} for deletion.".format(realhost))
|
||||||
self.delete_host_by_ip(all_hosts, realhost)
|
self.delete_host_by_ip(all_hosts, realhost)
|
||||||
|
# Host/Argument starts with a digit,
|
||||||
|
# then we assume its an IP address
|
||||||
elif host[0].isdigit():
|
elif host[0].isdigit():
|
||||||
if ',' in host:
|
if ',' in host:
|
||||||
ip, access_ip = host.split(',')
|
ip, access_ip = host.split(',')
|
||||||
@ -200,11 +239,15 @@ class KubesprayInventory(object):
|
|||||||
next_host = subprocess.check_output(cmd, shell=True)
|
next_host = subprocess.check_output(cmd, shell=True)
|
||||||
next_host = next_host.strip().decode('ascii')
|
next_host = next_host.strip().decode('ascii')
|
||||||
else:
|
else:
|
||||||
|
# Generates a hostname because we have only an IP address
|
||||||
next_host = "{0}{1}".format(HOST_PREFIX, next_host_id)
|
next_host = "{0}{1}".format(HOST_PREFIX, next_host_id)
|
||||||
next_host_id += 1
|
next_host_id += 1
|
||||||
|
# Uses automatically generated node name
|
||||||
|
# in case we dont provide it.
|
||||||
all_hosts[next_host] = {'ansible_host': access_ip,
|
all_hosts[next_host] = {'ansible_host': access_ip,
|
||||||
'ip': ip,
|
'ip': ip,
|
||||||
'access_ip': access_ip}
|
'access_ip': access_ip}
|
||||||
|
# Host/Argument starts with a letter, then we assume its a hostname
|
||||||
elif host[0].isalpha():
|
elif host[0].isalpha():
|
||||||
if ',' in host:
|
if ',' in host:
|
||||||
try:
|
try:
|
||||||
@ -223,6 +266,7 @@ class KubesprayInventory(object):
|
|||||||
'access_ip': access_ip}
|
'access_ip': access_ip}
|
||||||
return all_hosts
|
return all_hosts
|
||||||
|
|
||||||
|
# Expand IP ranges into individual addresses
|
||||||
def range2ips(self, hosts):
|
def range2ips(self, hosts):
|
||||||
reworked_hosts = []
|
reworked_hosts = []
|
||||||
|
|
||||||
@ -266,7 +310,7 @@ class KubesprayInventory(object):
|
|||||||
|
|
||||||
def purge_invalid_hosts(self, hostnames, protected_names=[]):
|
def purge_invalid_hosts(self, hostnames, protected_names=[]):
|
||||||
for role in self.yaml_config['all']['children']:
|
for role in self.yaml_config['all']['children']:
|
||||||
if role != 'k8s-cluster' and self.yaml_config['all']['children'][role]['hosts']: # noqa
|
if role != 'k8s_cluster' and self.yaml_config['all']['children'][role]['hosts']: # noqa
|
||||||
all_hosts = self.yaml_config['all']['children'][role]['hosts'].copy() # noqa
|
all_hosts = self.yaml_config['all']['children'][role]['hosts'].copy() # noqa
|
||||||
for host in all_hosts.keys():
|
for host in all_hosts.keys():
|
||||||
if host not in hostnames and host not in protected_names:
|
if host not in hostnames and host not in protected_names:
|
||||||
@ -287,52 +331,54 @@ class KubesprayInventory(object):
|
|||||||
if self.yaml_config['all']['hosts'] is None:
|
if self.yaml_config['all']['hosts'] is None:
|
||||||
self.yaml_config['all']['hosts'] = {host: None}
|
self.yaml_config['all']['hosts'] = {host: None}
|
||||||
self.yaml_config['all']['hosts'][host] = opts
|
self.yaml_config['all']['hosts'][host] = opts
|
||||||
elif group != 'k8s-cluster:children':
|
elif group != 'k8s_cluster:children':
|
||||||
if self.yaml_config['all']['children'][group]['hosts'] is None:
|
if self.yaml_config['all']['children'][group]['hosts'] is None:
|
||||||
self.yaml_config['all']['children'][group]['hosts'] = {
|
self.yaml_config['all']['children'][group]['hosts'] = {
|
||||||
host: None}
|
host: None}
|
||||||
else:
|
else:
|
||||||
self.yaml_config['all']['children'][group]['hosts'][host] = None # noqa
|
self.yaml_config['all']['children'][group]['hosts'][host] = None # noqa
|
||||||
|
|
||||||
def set_kube_master(self, hosts):
|
def set_kube_control_plane(self, hosts):
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
self.add_host_to_group('kube-master', host)
|
self.add_host_to_group('kube_control_plane', host)
|
||||||
|
|
||||||
def set_all(self, hosts):
|
def set_all(self, hosts):
|
||||||
for host, opts in hosts.items():
|
for host, opts in hosts.items():
|
||||||
self.add_host_to_group('all', host, opts)
|
self.add_host_to_group('all', host, opts)
|
||||||
|
|
||||||
def set_k8s_cluster(self):
|
def set_k8s_cluster(self):
|
||||||
k8s_cluster = {'children': {'kube-master': None, 'kube-node': None}}
|
k8s_cluster = {'children': {'kube_control_plane': None,
|
||||||
self.yaml_config['all']['children']['k8s-cluster'] = k8s_cluster
|
'kube_node': None}}
|
||||||
|
self.yaml_config['all']['children']['k8s_cluster'] = k8s_cluster
|
||||||
|
|
||||||
def set_calico_rr(self, hosts):
|
def set_calico_rr(self, hosts):
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
if host in self.yaml_config['all']['children']['kube-master']:
|
if host in self.yaml_config['all']['children']['kube_control_plane']: # noqa
|
||||||
self.debug("Not adding {0} to calico-rr group because it "
|
self.debug("Not adding {0} to calico_rr group because it "
|
||||||
"conflicts with kube-master group".format(host))
|
"conflicts with kube_control_plane "
|
||||||
|
"group".format(host))
|
||||||
continue
|
continue
|
||||||
if host in self.yaml_config['all']['children']['kube-node']:
|
if host in self.yaml_config['all']['children']['kube_node']:
|
||||||
self.debug("Not adding {0} to calico-rr group because it "
|
self.debug("Not adding {0} to calico_rr group because it "
|
||||||
"conflicts with kube-node group".format(host))
|
"conflicts with kube_node group".format(host))
|
||||||
continue
|
continue
|
||||||
self.add_host_to_group('calico-rr', host)
|
self.add_host_to_group('calico_rr', host)
|
||||||
|
|
||||||
def set_kube_node(self, hosts):
|
def set_kube_node(self, hosts):
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
if len(self.yaml_config['all']['hosts']) >= SCALE_THRESHOLD:
|
if len(self.yaml_config['all']['hosts']) >= SCALE_THRESHOLD:
|
||||||
if host in self.yaml_config['all']['children']['etcd']['hosts']: # noqa
|
if host in self.yaml_config['all']['children']['etcd']['hosts']: # noqa
|
||||||
self.debug("Not adding {0} to kube-node group because of "
|
self.debug("Not adding {0} to kube_node group because of "
|
||||||
"scale deployment and host is in etcd "
|
"scale deployment and host is in etcd "
|
||||||
"group.".format(host))
|
"group.".format(host))
|
||||||
continue
|
continue
|
||||||
if len(self.yaml_config['all']['hosts']) >= MASSIVE_SCALE_THRESHOLD: # noqa
|
if len(self.yaml_config['all']['hosts']) >= MASSIVE_SCALE_THRESHOLD: # noqa
|
||||||
if host in self.yaml_config['all']['children']['kube-master']['hosts']: # noqa
|
if host in self.yaml_config['all']['children']['kube_control_plane']['hosts']: # noqa
|
||||||
self.debug("Not adding {0} to kube-node group because of "
|
self.debug("Not adding {0} to kube_node group because of "
|
||||||
"scale deployment and host is in kube-master "
|
"scale deployment and host is in "
|
||||||
"group.".format(host))
|
"kube_control_plane group.".format(host))
|
||||||
continue
|
continue
|
||||||
self.add_host_to_group('kube-node', host)
|
self.add_host_to_group('kube_node', host)
|
||||||
|
|
||||||
def set_etcd(self, hosts):
|
def set_etcd(self, hosts):
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
@ -389,9 +435,11 @@ help - Display this message
|
|||||||
print_cfg - Write inventory file to stdout
|
print_cfg - Write inventory file to stdout
|
||||||
print_ips - Write a space-delimited list of IPs from "all" group
|
print_ips - Write a space-delimited list of IPs from "all" group
|
||||||
print_hostnames - Write a space-delimited list of Hostnames from "all" group
|
print_hostnames - Write a space-delimited list of Hostnames from "all" group
|
||||||
|
add - Adds specified hosts into an already existing inventory
|
||||||
|
|
||||||
Advanced usage:
|
Advanced usage:
|
||||||
Add another host after initial creation: inventory.py 10.10.1.5
|
Create new or overwrite old inventory file: inventory.py 10.10.1.5
|
||||||
|
Add another host after initial creation: inventory.py add 10.10.1.6
|
||||||
Add range of hosts: inventory.py 10.10.1.3-10.10.1.5
|
Add range of hosts: inventory.py 10.10.1.3-10.10.1.5
|
||||||
Add hosts with different ip and access ip: inventory.py 10.0.0.1,192.168.10.1 10.0.0.2,192.168.10.2 10.0.0.3,192.168.10.3
|
Add hosts with different ip and access ip: inventory.py 10.0.0.1,192.168.10.1 10.0.0.2,192.168.10.2 10.0.0.3,192.168.10.3
|
||||||
Add hosts with a specific hostname, ip, and optional access ip: first,10.0.0.1,192.168.10.1 second,10.0.0.2 last,10.0.0.3
|
Add hosts with a specific hostname, ip, and optional access ip: first,10.0.0.1,192.168.10.1 second,10.0.0.2 last,10.0.0.3
|
||||||
@ -402,9 +450,9 @@ Configurable env vars:
|
|||||||
DEBUG Enable debug printing. Default: True
|
DEBUG Enable debug printing. Default: True
|
||||||
CONFIG_FILE File to write config to Default: ./inventory/sample/hosts.yaml
|
CONFIG_FILE File to write config to Default: ./inventory/sample/hosts.yaml
|
||||||
HOST_PREFIX Host prefix for generated hosts. Default: node
|
HOST_PREFIX Host prefix for generated hosts. Default: node
|
||||||
KUBE_MASTERS Set the number of kube-masters. Default: 2
|
KUBE_CONTROL_HOSTS Set the number of kube-control-planes. Default: 2
|
||||||
SCALE_THRESHOLD Separate ETCD role if # of nodes >= 50
|
SCALE_THRESHOLD Separate ETCD role if # of nodes >= 50
|
||||||
MASSIVE_SCALE_THRESHOLD Separate K8s master and ETCD if # of nodes >= 200
|
MASSIVE_SCALE_THRESHOLD Separate K8s control-plane and ETCD if # of nodes >= 200
|
||||||
''' # noqa
|
''' # noqa
|
||||||
print(help_text)
|
print(help_text)
|
||||||
|
|
||||||
@ -425,6 +473,7 @@ def main(argv=None):
|
|||||||
if not argv:
|
if not argv:
|
||||||
argv = sys.argv[1:]
|
argv = sys.argv[1:]
|
||||||
KubesprayInventory(argv, CONFIG_FILE)
|
KubesprayInventory(argv, CONFIG_FILE)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
configparser>=3.3.0
|
configparser>=3.3.0
|
||||||
ruamel.yaml>=0.15.88
|
|
||||||
ipaddress
|
ipaddress
|
||||||
|
ruamel.yaml>=0.15.88
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
hacking>=0.10.2
|
hacking>=0.10.2
|
||||||
pytest>=2.8.0
|
|
||||||
mock>=1.3.0
|
mock>=1.3.0
|
||||||
|
pytest>=2.8.0
|
||||||
|
@ -13,8 +13,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import inventory
|
import inventory
|
||||||
import mock
|
from io import StringIO
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import sys
|
import sys
|
||||||
@ -26,6 +27,28 @@ if path not in sys.path:
|
|||||||
import inventory # noqa
|
import inventory # noqa
|
||||||
|
|
||||||
|
|
||||||
|
class TestInventoryPrintHostnames(unittest.TestCase):
|
||||||
|
|
||||||
|
@mock.patch('ruamel.yaml.YAML.load')
|
||||||
|
def test_print_hostnames(self, load_mock):
|
||||||
|
mock_io = mock.mock_open(read_data='')
|
||||||
|
load_mock.return_value = OrderedDict({'all': {'hosts': {
|
||||||
|
'node1': {'ansible_host': '10.90.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '10.90.0.2'},
|
||||||
|
'node2': {'ansible_host': '10.90.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '10.90.0.3'}}}})
|
||||||
|
with mock.patch('builtins.open', mock_io):
|
||||||
|
with self.assertRaises(SystemExit) as cm:
|
||||||
|
with mock.patch('sys.stdout', new_callable=StringIO) as stdout:
|
||||||
|
inventory.KubesprayInventory(
|
||||||
|
changed_hosts=["print_hostnames"],
|
||||||
|
config_file="file")
|
||||||
|
self.assertEqual("node1 node2\n", stdout.getvalue())
|
||||||
|
self.assertEqual(cm.exception.code, 0)
|
||||||
|
|
||||||
|
|
||||||
class TestInventory(unittest.TestCase):
|
class TestInventory(unittest.TestCase):
|
||||||
@mock.patch('inventory.sys')
|
@mock.patch('inventory.sys')
|
||||||
def setUp(self, sys_mock):
|
def setUp(self, sys_mock):
|
||||||
@ -67,23 +90,14 @@ class TestInventory(unittest.TestCase):
|
|||||||
self.assertRaisesRegex(ValueError, "Host name must end in an",
|
self.assertRaisesRegex(ValueError, "Host name must end in an",
|
||||||
self.inv.get_host_id, hostname)
|
self.inv.get_host_id, hostname)
|
||||||
|
|
||||||
def test_build_hostnames_add_one(self):
|
|
||||||
changed_hosts = ['10.90.0.2']
|
|
||||||
expected = OrderedDict([('node1',
|
|
||||||
{'ansible_host': '10.90.0.2',
|
|
||||||
'ip': '10.90.0.2',
|
|
||||||
'access_ip': '10.90.0.2'})])
|
|
||||||
result = self.inv.build_hostnames(changed_hosts)
|
|
||||||
self.assertEqual(expected, result)
|
|
||||||
|
|
||||||
def test_build_hostnames_add_duplicate(self):
|
def test_build_hostnames_add_duplicate(self):
|
||||||
changed_hosts = ['10.90.0.2']
|
changed_hosts = ['10.90.0.2']
|
||||||
expected = OrderedDict([('node1',
|
expected = OrderedDict([('node3',
|
||||||
{'ansible_host': '10.90.0.2',
|
{'ansible_host': '10.90.0.2',
|
||||||
'ip': '10.90.0.2',
|
'ip': '10.90.0.2',
|
||||||
'access_ip': '10.90.0.2'})])
|
'access_ip': '10.90.0.2'})])
|
||||||
self.inv.yaml_config['all']['hosts'] = expected
|
self.inv.yaml_config['all']['hosts'] = expected
|
||||||
result = self.inv.build_hostnames(changed_hosts)
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_build_hostnames_add_two(self):
|
def test_build_hostnames_add_two(self):
|
||||||
@ -99,6 +113,30 @@ class TestInventory(unittest.TestCase):
|
|||||||
result = self.inv.build_hostnames(changed_hosts)
|
result = self.inv.build_hostnames(changed_hosts)
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_add_three(self):
|
||||||
|
changed_hosts = ['10.90.0.2', '10.90.0.3', '10.90.0.4']
|
||||||
|
expected = OrderedDict([
|
||||||
|
('node1', {'ansible_host': '10.90.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '10.90.0.2'}),
|
||||||
|
('node2', {'ansible_host': '10.90.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '10.90.0.3'}),
|
||||||
|
('node3', {'ansible_host': '10.90.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '10.90.0.4'})])
|
||||||
|
result = self.inv.build_hostnames(changed_hosts)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_add_one(self):
|
||||||
|
changed_hosts = ['10.90.0.2']
|
||||||
|
expected = OrderedDict([('node1',
|
||||||
|
{'ansible_host': '10.90.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '10.90.0.2'})])
|
||||||
|
result = self.inv.build_hostnames(changed_hosts)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_build_hostnames_delete_first(self):
|
def test_build_hostnames_delete_first(self):
|
||||||
changed_hosts = ['-10.90.0.2']
|
changed_hosts = ['-10.90.0.2']
|
||||||
existing_hosts = OrderedDict([
|
existing_hosts = OrderedDict([
|
||||||
@ -113,7 +151,24 @@ class TestInventory(unittest.TestCase):
|
|||||||
('node2', {'ansible_host': '10.90.0.3',
|
('node2', {'ansible_host': '10.90.0.3',
|
||||||
'ip': '10.90.0.3',
|
'ip': '10.90.0.3',
|
||||||
'access_ip': '10.90.0.3'})])
|
'access_ip': '10.90.0.3'})])
|
||||||
result = self.inv.build_hostnames(changed_hosts)
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_delete_by_hostname(self):
|
||||||
|
changed_hosts = ['-node1']
|
||||||
|
existing_hosts = OrderedDict([
|
||||||
|
('node1', {'ansible_host': '10.90.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '10.90.0.2'}),
|
||||||
|
('node2', {'ansible_host': '10.90.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '10.90.0.3'})])
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing_hosts
|
||||||
|
expected = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '10.90.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '10.90.0.3'})])
|
||||||
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_exists_hostname_positive(self):
|
def test_exists_hostname_positive(self):
|
||||||
@ -222,11 +277,11 @@ class TestInventory(unittest.TestCase):
|
|||||||
self.inv.yaml_config['all']['children'][group]['hosts'].get(host),
|
self.inv.yaml_config['all']['children'][group]['hosts'].get(host),
|
||||||
None)
|
None)
|
||||||
|
|
||||||
def test_set_kube_master(self):
|
def test_set_kube_control_plane(self):
|
||||||
group = 'kube-master'
|
group = 'kube_control_plane'
|
||||||
host = 'node1'
|
host = 'node1'
|
||||||
|
|
||||||
self.inv.set_kube_master([host])
|
self.inv.set_kube_control_plane([host])
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
host, self.inv.yaml_config['all']['children'][group]['hosts'])
|
host, self.inv.yaml_config['all']['children'][group]['hosts'])
|
||||||
|
|
||||||
@ -241,8 +296,8 @@ class TestInventory(unittest.TestCase):
|
|||||||
self.inv.yaml_config['all']['hosts'].get(host), opt)
|
self.inv.yaml_config['all']['hosts'].get(host), opt)
|
||||||
|
|
||||||
def test_set_k8s_cluster(self):
|
def test_set_k8s_cluster(self):
|
||||||
group = 'k8s-cluster'
|
group = 'k8s_cluster'
|
||||||
expected_hosts = ['kube-node', 'kube-master']
|
expected_hosts = ['kube_node', 'kube_control_plane']
|
||||||
|
|
||||||
self.inv.set_k8s_cluster()
|
self.inv.set_k8s_cluster()
|
||||||
for host in expected_hosts:
|
for host in expected_hosts:
|
||||||
@ -251,7 +306,7 @@ class TestInventory(unittest.TestCase):
|
|||||||
self.inv.yaml_config['all']['children'][group]['children'])
|
self.inv.yaml_config['all']['children'][group]['children'])
|
||||||
|
|
||||||
def test_set_kube_node(self):
|
def test_set_kube_node(self):
|
||||||
group = 'kube-node'
|
group = 'kube_node'
|
||||||
host = 'node1'
|
host = 'node1'
|
||||||
|
|
||||||
self.inv.set_kube_node([host])
|
self.inv.set_kube_node([host])
|
||||||
@ -275,12 +330,12 @@ class TestInventory(unittest.TestCase):
|
|||||||
|
|
||||||
self.inv.set_all(hosts)
|
self.inv.set_all(hosts)
|
||||||
self.inv.set_etcd(list(hosts.keys())[0:3])
|
self.inv.set_etcd(list(hosts.keys())[0:3])
|
||||||
self.inv.set_kube_master(list(hosts.keys())[0:2])
|
self.inv.set_kube_control_plane(list(hosts.keys())[0:2])
|
||||||
self.inv.set_kube_node(hosts.keys())
|
self.inv.set_kube_node(hosts.keys())
|
||||||
for h in range(3):
|
for h in range(3):
|
||||||
self.assertFalse(
|
self.assertFalse(
|
||||||
list(hosts.keys())[h] in
|
list(hosts.keys())[h] in
|
||||||
self.inv.yaml_config['all']['children']['kube-node']['hosts'])
|
self.inv.yaml_config['all']['children']['kube_node']['hosts'])
|
||||||
|
|
||||||
def test_scale_scenario_two(self):
|
def test_scale_scenario_two(self):
|
||||||
num_nodes = 500
|
num_nodes = 500
|
||||||
@ -291,12 +346,12 @@ class TestInventory(unittest.TestCase):
|
|||||||
|
|
||||||
self.inv.set_all(hosts)
|
self.inv.set_all(hosts)
|
||||||
self.inv.set_etcd(list(hosts.keys())[0:3])
|
self.inv.set_etcd(list(hosts.keys())[0:3])
|
||||||
self.inv.set_kube_master(list(hosts.keys())[3:5])
|
self.inv.set_kube_control_plane(list(hosts.keys())[3:5])
|
||||||
self.inv.set_kube_node(hosts.keys())
|
self.inv.set_kube_node(hosts.keys())
|
||||||
for h in range(5):
|
for h in range(5):
|
||||||
self.assertFalse(
|
self.assertFalse(
|
||||||
list(hosts.keys())[h] in
|
list(hosts.keys())[h] in
|
||||||
self.inv.yaml_config['all']['children']['kube-node']['hosts'])
|
self.inv.yaml_config['all']['children']['kube_node']['hosts'])
|
||||||
|
|
||||||
def test_range2ips_range(self):
|
def test_range2ips_range(self):
|
||||||
changed_hosts = ['10.90.0.2', '10.90.0.4-10.90.0.6', '10.90.0.8']
|
changed_hosts = ['10.90.0.2', '10.90.0.4-10.90.0.6', '10.90.0.8']
|
||||||
@ -313,7 +368,7 @@ class TestInventory(unittest.TestCase):
|
|||||||
self.assertRaisesRegex(Exception, "Range of ip_addresses isn't valid",
|
self.assertRaisesRegex(Exception, "Range of ip_addresses isn't valid",
|
||||||
self.inv.range2ips, host_range)
|
self.inv.range2ips, host_range)
|
||||||
|
|
||||||
def test_build_hostnames_different_ips_add_one(self):
|
def test_build_hostnames_create_with_one_different_ips(self):
|
||||||
changed_hosts = ['10.90.0.2,192.168.0.2']
|
changed_hosts = ['10.90.0.2,192.168.0.2']
|
||||||
expected = OrderedDict([('node1',
|
expected = OrderedDict([('node1',
|
||||||
{'ansible_host': '192.168.0.2',
|
{'ansible_host': '192.168.0.2',
|
||||||
@ -322,17 +377,7 @@ class TestInventory(unittest.TestCase):
|
|||||||
result = self.inv.build_hostnames(changed_hosts)
|
result = self.inv.build_hostnames(changed_hosts)
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_build_hostnames_different_ips_add_duplicate(self):
|
def test_build_hostnames_create_with_two_different_ips(self):
|
||||||
changed_hosts = ['10.90.0.2,192.168.0.2']
|
|
||||||
expected = OrderedDict([('node1',
|
|
||||||
{'ansible_host': '192.168.0.2',
|
|
||||||
'ip': '10.90.0.2',
|
|
||||||
'access_ip': '192.168.0.2'})])
|
|
||||||
self.inv.yaml_config['all']['hosts'] = expected
|
|
||||||
result = self.inv.build_hostnames(changed_hosts)
|
|
||||||
self.assertEqual(expected, result)
|
|
||||||
|
|
||||||
def test_build_hostnames_different_ips_add_two(self):
|
|
||||||
changed_hosts = ['10.90.0.2,192.168.0.2', '10.90.0.3,192.168.0.3']
|
changed_hosts = ['10.90.0.2,192.168.0.2', '10.90.0.3,192.168.0.3']
|
||||||
expected = OrderedDict([
|
expected = OrderedDict([
|
||||||
('node1', {'ansible_host': '192.168.0.2',
|
('node1', {'ansible_host': '192.168.0.2',
|
||||||
@ -341,6 +386,210 @@ class TestInventory(unittest.TestCase):
|
|||||||
('node2', {'ansible_host': '192.168.0.3',
|
('node2', {'ansible_host': '192.168.0.3',
|
||||||
'ip': '10.90.0.3',
|
'ip': '10.90.0.3',
|
||||||
'access_ip': '192.168.0.3'})])
|
'access_ip': '192.168.0.3'})])
|
||||||
self.inv.yaml_config['all']['hosts'] = OrderedDict()
|
|
||||||
result = self.inv.build_hostnames(changed_hosts)
|
result = self.inv.build_hostnames(changed_hosts)
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_create_with_three_different_ips(self):
|
||||||
|
changed_hosts = ['10.90.0.2,192.168.0.2',
|
||||||
|
'10.90.0.3,192.168.0.3',
|
||||||
|
'10.90.0.4,192.168.0.4']
|
||||||
|
expected = OrderedDict([
|
||||||
|
('node1', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node2', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'})])
|
||||||
|
result = self.inv.build_hostnames(changed_hosts)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_overwrite_one_with_different_ips(self):
|
||||||
|
changed_hosts = ['10.90.0.2,192.168.0.2']
|
||||||
|
expected = OrderedDict([('node1',
|
||||||
|
{'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'})])
|
||||||
|
existing = OrderedDict([('node5',
|
||||||
|
{'ansible_host': '192.168.0.5',
|
||||||
|
'ip': '10.90.0.5',
|
||||||
|
'access_ip': '192.168.0.5'})])
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing
|
||||||
|
result = self.inv.build_hostnames(changed_hosts)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_overwrite_three_with_different_ips(self):
|
||||||
|
changed_hosts = ['10.90.0.2,192.168.0.2']
|
||||||
|
expected = OrderedDict([('node1',
|
||||||
|
{'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'})])
|
||||||
|
existing = OrderedDict([
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'}),
|
||||||
|
('node5', {'ansible_host': '192.168.0.5',
|
||||||
|
'ip': '10.90.0.5',
|
||||||
|
'access_ip': '192.168.0.5'})])
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing
|
||||||
|
result = self.inv.build_hostnames(changed_hosts)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_different_ips_add_duplicate(self):
|
||||||
|
changed_hosts = ['10.90.0.2,192.168.0.2']
|
||||||
|
expected = OrderedDict([('node3',
|
||||||
|
{'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'})])
|
||||||
|
existing = expected
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing
|
||||||
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_add_two_different_ips_into_one_existing(self):
|
||||||
|
changed_hosts = ['10.90.0.3,192.168.0.3', '10.90.0.4,192.168.0.4']
|
||||||
|
expected = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'})])
|
||||||
|
|
||||||
|
existing = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'})])
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing
|
||||||
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_add_two_different_ips_into_two_existing(self):
|
||||||
|
changed_hosts = ['10.90.0.4,192.168.0.4', '10.90.0.5,192.168.0.5']
|
||||||
|
expected = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'}),
|
||||||
|
('node5', {'ansible_host': '192.168.0.5',
|
||||||
|
'ip': '10.90.0.5',
|
||||||
|
'access_ip': '192.168.0.5'})])
|
||||||
|
|
||||||
|
existing = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'})])
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing
|
||||||
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
def test_build_hostnames_add_two_different_ips_into_three_existing(self):
|
||||||
|
changed_hosts = ['10.90.0.5,192.168.0.5', '10.90.0.6,192.168.0.6']
|
||||||
|
expected = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'}),
|
||||||
|
('node5', {'ansible_host': '192.168.0.5',
|
||||||
|
'ip': '10.90.0.5',
|
||||||
|
'access_ip': '192.168.0.5'}),
|
||||||
|
('node6', {'ansible_host': '192.168.0.6',
|
||||||
|
'ip': '10.90.0.6',
|
||||||
|
'access_ip': '192.168.0.6'})])
|
||||||
|
|
||||||
|
existing = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'})])
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing
|
||||||
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
# Add two IP addresses into a config that has
|
||||||
|
# three already defined IP addresses. One of the IP addresses
|
||||||
|
# is a duplicate.
|
||||||
|
def test_build_hostnames_add_two_duplicate_one_overlap(self):
|
||||||
|
changed_hosts = ['10.90.0.4,192.168.0.4', '10.90.0.5,192.168.0.5']
|
||||||
|
expected = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'}),
|
||||||
|
('node5', {'ansible_host': '192.168.0.5',
|
||||||
|
'ip': '10.90.0.5',
|
||||||
|
'access_ip': '192.168.0.5'})])
|
||||||
|
|
||||||
|
existing = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'})])
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing
|
||||||
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
# Add two duplicate IP addresses into a config that has
|
||||||
|
# three already defined IP addresses
|
||||||
|
def test_build_hostnames_add_two_duplicate_two_overlap(self):
|
||||||
|
changed_hosts = ['10.90.0.3,192.168.0.3', '10.90.0.4,192.168.0.4']
|
||||||
|
expected = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'})])
|
||||||
|
|
||||||
|
existing = OrderedDict([
|
||||||
|
('node2', {'ansible_host': '192.168.0.2',
|
||||||
|
'ip': '10.90.0.2',
|
||||||
|
'access_ip': '192.168.0.2'}),
|
||||||
|
('node3', {'ansible_host': '192.168.0.3',
|
||||||
|
'ip': '10.90.0.3',
|
||||||
|
'access_ip': '192.168.0.3'}),
|
||||||
|
('node4', {'ansible_host': '192.168.0.4',
|
||||||
|
'ip': '10.90.0.4',
|
||||||
|
'access_ip': '192.168.0.4'})])
|
||||||
|
self.inv.yaml_config['all']['hosts'] = existing
|
||||||
|
result = self.inv.build_hostnames(changed_hosts, True)
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
@ -1,21 +1,27 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = pep8, py33
|
envlist = pep8
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = py.test
|
allowlist_externals = py.test
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
passenv =
|
||||||
|
http_proxy
|
||||||
|
HTTP_PROXY
|
||||||
|
https_proxy
|
||||||
|
HTTPS_PROXY
|
||||||
|
no_proxy
|
||||||
|
NO_PROXY
|
||||||
commands = pytest -vv #{posargs:./tests}
|
commands = pytest -vv #{posargs:./tests}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
whitelist_externals = bash
|
allowlist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
bash -c "find {toxinidir}/* -type f -name '*.py' -print0 | xargs -0 flake8"
|
bash -c "find {toxinidir}/* -type f -name '*.py' -print0 | xargs -0 flake8"
|
||||||
|
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
#k8s_deployment_user: kubespray
|
#k8s_deployment_user: kubespray
|
||||||
#k8s_deployment_user_pkey_path: /tmp/ssh_rsa
|
#k8s_deployment_user_pkey_path: /tmp/ssh_rsa
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- name: Prepare Hypervisor to later install kubespray VMs
|
||||||
|
hosts: localhost
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
become: yes
|
become: yes
|
||||||
vars:
|
vars:
|
||||||
- bootstrap_os: none
|
bootstrap_os: none
|
||||||
roles:
|
roles:
|
||||||
- kvm-setup
|
- { role: kvm-setup }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
yum:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
@ -22,9 +22,9 @@
|
|||||||
- ntp
|
- ntp
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
# Create deployment user if required
|
- name: Create deployment user if required
|
||||||
- include: user.yml
|
include_tasks: user.yml
|
||||||
when: k8s_deployment_user is defined
|
when: k8s_deployment_user is defined
|
||||||
|
|
||||||
# Set proper sysctl values
|
- name: Set proper sysctl values
|
||||||
- include: sysctl.yml
|
import_tasks: sysctl.yml
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Load br_netfilter module
|
- name: Load br_netfilter module
|
||||||
modprobe:
|
community.general.modprobe:
|
||||||
name: br_netfilter
|
name: br_netfilter
|
||||||
state: present
|
state: present
|
||||||
register: br_netfilter
|
register: br_netfilter
|
||||||
@ -25,19 +25,19 @@
|
|||||||
|
|
||||||
|
|
||||||
- name: Enable net.ipv4.ip_forward in sysctl
|
- name: Enable net.ipv4.ip_forward in sysctl
|
||||||
sysctl:
|
ansible.posix.sysctl:
|
||||||
name: net.ipv4.ip_forward
|
name: net.ipv4.ip_forward
|
||||||
value: 1
|
value: 1
|
||||||
sysctl_file: /etc/sysctl.d/ipv4-ip_forward.conf
|
sysctl_file: "{{ sysctl_file_path }}"
|
||||||
state: present
|
state: present
|
||||||
reload: yes
|
reload: yes
|
||||||
|
|
||||||
- name: Set bridge-nf-call-{arptables,iptables} to 0
|
- name: Set bridge-nf-call-{arptables,iptables} to 0
|
||||||
sysctl:
|
ansible.posix.sysctl:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
value: 0
|
value: 0
|
||||||
sysctl_file: /etc/sysctl.d/bridge-nf-call.conf
|
sysctl_file: "{{ sysctl_file_path }}"
|
||||||
reload: yes
|
reload: yes
|
||||||
with_items:
|
with_items:
|
||||||
- net.bridge.bridge-nf-call-arptables
|
- net.bridge.bridge-nf-call-arptables
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
state: directory
|
state: directory
|
||||||
owner: "{{ k8s_deployment_user }}"
|
owner: "{{ k8s_deployment_user }}"
|
||||||
group: "{{ k8s_deployment_user }}"
|
group: "{{ k8s_deployment_user }}"
|
||||||
|
mode: 0700
|
||||||
|
|
||||||
- name: Configure sudo for deployment user
|
- name: Configure sudo for deployment user
|
||||||
copy:
|
copy:
|
||||||
|
51
contrib/mitogen/mitogen.yml
Normal file
51
contrib/mitogen/mitogen.yml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
- name: Check ansible version
|
||||||
|
import_playbook: kubernetes_sigs.kubespray.ansible_version
|
||||||
|
|
||||||
|
- name: Install mitogen
|
||||||
|
hosts: localhost
|
||||||
|
strategy: linear
|
||||||
|
vars:
|
||||||
|
mitogen_version: 0.3.2
|
||||||
|
mitogen_url: https://github.com/mitogen-hq/mitogen/archive/refs/tags/v{{ mitogen_version }}.tar.gz
|
||||||
|
ansible_connection: local
|
||||||
|
tasks:
|
||||||
|
- name: Create mitogen plugin dir
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
become: false
|
||||||
|
loop:
|
||||||
|
- "{{ playbook_dir }}/plugins/mitogen"
|
||||||
|
- "{{ playbook_dir }}/dist"
|
||||||
|
|
||||||
|
- name: Download mitogen release
|
||||||
|
get_url:
|
||||||
|
url: "{{ mitogen_url }}"
|
||||||
|
dest: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
|
||||||
|
validate_certs: true
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Extract archive
|
||||||
|
unarchive:
|
||||||
|
src: "{{ playbook_dir }}/dist/mitogen_{{ mitogen_version }}.tar.gz"
|
||||||
|
dest: "{{ playbook_dir }}/dist/"
|
||||||
|
|
||||||
|
- name: Copy plugin
|
||||||
|
ansible.posix.synchronize:
|
||||||
|
src: "{{ playbook_dir }}/dist/mitogen-{{ mitogen_version }}/"
|
||||||
|
dest: "{{ playbook_dir }}/plugins/mitogen"
|
||||||
|
|
||||||
|
- name: Add strategy to ansible.cfg
|
||||||
|
community.general.ini_file:
|
||||||
|
path: ansible.cfg
|
||||||
|
mode: 0644
|
||||||
|
section: "{{ item.section | d('defaults') }}"
|
||||||
|
option: "{{ item.option }}"
|
||||||
|
value: "{{ item.value }}"
|
||||||
|
with_items:
|
||||||
|
- option: strategy
|
||||||
|
value: mitogen_linear
|
||||||
|
- option: strategy_plugins
|
||||||
|
value: plugins/mitogen/ansible_mitogen/plugins/strategy
|
@ -1,24 +1,29 @@
|
|||||||
---
|
---
|
||||||
- hosts: gfs-cluster
|
- name: Bootstrap hosts
|
||||||
|
hosts: gfs-cluster
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
vars:
|
vars:
|
||||||
ansible_ssh_pipelining: false
|
ansible_ssh_pipelining: false
|
||||||
roles:
|
roles:
|
||||||
- { role: bootstrap-os, tags: bootstrap-os}
|
- { role: bootstrap-os, tags: bootstrap-os}
|
||||||
|
|
||||||
- hosts: all
|
- name: Gather facts
|
||||||
|
hosts: all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
|
||||||
- hosts: gfs-cluster
|
- name: Install glusterfs server
|
||||||
|
hosts: gfs-cluster
|
||||||
vars:
|
vars:
|
||||||
ansible_ssh_pipelining: true
|
ansible_ssh_pipelining: true
|
||||||
roles:
|
roles:
|
||||||
- { role: glusterfs/server }
|
- { role: glusterfs/server }
|
||||||
|
|
||||||
- hosts: k8s-cluster
|
- name: Install glusterfs servers
|
||||||
|
hosts: k8s_cluster
|
||||||
roles:
|
roles:
|
||||||
- { role: glusterfs/client }
|
- { role: glusterfs/client }
|
||||||
|
|
||||||
- hosts: kube-master[0]
|
- name: Configure Kubernetes to use glusterfs
|
||||||
|
hosts: kube_control_plane[0]
|
||||||
roles:
|
roles:
|
||||||
- { role: kubernetes-pv }
|
- { role: kubernetes-pv }
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
# ## Set disk_volume_device_1 to desired device for gluster brick, if different to /dev/vdb (default).
|
# ## Set disk_volume_device_1 to desired device for gluster brick, if different to /dev/vdb (default).
|
||||||
# ## As in the previous case, you can set ip to give direct communication on internal IPs
|
# ## As in the previous case, you can set ip to give direct communication on internal IPs
|
||||||
# gfs_node1 ansible_ssh_host=95.54.0.18 # disk_volume_device_1=/dev/vdc ip=10.3.0.7
|
# gfs_node1 ansible_ssh_host=95.54.0.18 # disk_volume_device_1=/dev/vdc ip=10.3.0.7
|
||||||
# gfs_node2 ansible_ssh_host=95.54.0.19 # disk_volume_device_1=/dev/vdc ip=10.3.0.8
|
# gfs_node2 ansible_ssh_host=95.54.0.19 # disk_volume_device_1=/dev/vdc ip=10.3.0.8
|
||||||
# gfs_node3 ansible_ssh_host=95.54.0.20 # disk_volume_device_1=/dev/vdc ip=10.3.0.9
|
# gfs_node3 ansible_ssh_host=95.54.0.20 # disk_volume_device_1=/dev/vdc ip=10.3.0.9
|
||||||
|
|
||||||
# [kube-master]
|
# [kube_control_plane]
|
||||||
# node1
|
# node1
|
||||||
# node2
|
# node2
|
||||||
|
|
||||||
@ -23,16 +23,16 @@
|
|||||||
# node2
|
# node2
|
||||||
# node3
|
# node3
|
||||||
|
|
||||||
# [kube-node]
|
# [kube_node]
|
||||||
# node2
|
# node2
|
||||||
# node3
|
# node3
|
||||||
# node4
|
# node4
|
||||||
# node5
|
# node5
|
||||||
# node6
|
# node6
|
||||||
|
|
||||||
# [k8s-cluster:children]
|
# [k8s_cluster:children]
|
||||||
# kube-node
|
# kube_node
|
||||||
# kube-master
|
# kube_control_plane
|
||||||
|
|
||||||
# [gfs-cluster]
|
# [gfs-cluster]
|
||||||
# gfs_node1
|
# gfs_node1
|
||||||
@ -41,4 +41,3 @@
|
|||||||
|
|
||||||
# [network-storage:children]
|
# [network-storage:children]
|
||||||
# gfs-cluster
|
# gfs-cluster
|
||||||
|
|
||||||
|
@ -8,18 +8,22 @@ Installs and configures GlusterFS on Linux.
|
|||||||
|
|
||||||
For GlusterFS to connect between servers, TCP ports `24007`, `24008`, and `24009`/`49152`+ (that port, plus an additional incremented port for each additional server in the cluster; the latter if GlusterFS is version 3.4+), and TCP/UDP port `111` must be open. You can open these using whatever firewall you wish (this can easily be configured using the `geerlingguy.firewall` role).
|
For GlusterFS to connect between servers, TCP ports `24007`, `24008`, and `24009`/`49152`+ (that port, plus an additional incremented port for each additional server in the cluster; the latter if GlusterFS is version 3.4+), and TCP/UDP port `111` must be open. You can open these using whatever firewall you wish (this can easily be configured using the `geerlingguy.firewall` role).
|
||||||
|
|
||||||
This role performs basic installation and setup of Gluster, but it does not configure or mount bricks (volumes), since that step is easier to do in a series of plays in your own playbook. Ansible 1.9+ includes the [`gluster_volume`](https://docs.ansible.com/gluster_volume_module.html) module to ease the management of Gluster volumes.
|
This role performs basic installation and setup of Gluster, but it does not configure or mount bricks (volumes), since that step is easier to do in a series of plays in your own playbook. Ansible 1.9+ includes the [`gluster_volume`](https://docs.ansible.com/ansible/latest/collections/gluster/gluster/gluster_volume_module.html) module to ease the management of Gluster volumes.
|
||||||
|
|
||||||
## Role Variables
|
## Role Variables
|
||||||
|
|
||||||
Available variables are listed below, along with default values (see `defaults/main.yml`):
|
Available variables are listed below, along with default values (see `defaults/main.yml`):
|
||||||
|
|
||||||
glusterfs_default_release: ""
|
```yaml
|
||||||
|
glusterfs_default_release: ""
|
||||||
|
```
|
||||||
|
|
||||||
You can specify a `default_release` for apt on Debian/Ubuntu by overriding this variable. This is helpful if you need a different package or version for the main GlusterFS packages (e.g. GlusterFS 3.5.x instead of 3.2.x with the `wheezy-backports` default release on Debian Wheezy).
|
You can specify a `default_release` for apt on Debian/Ubuntu by overriding this variable. This is helpful if you need a different package or version for the main GlusterFS packages (e.g. GlusterFS 3.5.x instead of 3.2.x with the `wheezy-backports` default release on Debian Wheezy).
|
||||||
|
|
||||||
glusterfs_ppa_use: yes
|
```yaml
|
||||||
glusterfs_ppa_version: "3.5"
|
glusterfs_ppa_use: yes
|
||||||
|
glusterfs_ppa_version: "3.5"
|
||||||
|
```
|
||||||
|
|
||||||
For Ubuntu, specify whether to use the official Gluster PPA, and which version of the PPA to use. See Gluster's [Getting Started Guide](https://docs.gluster.org/en/latest/Quick-Start-Guide/Quickstart/) for more info.
|
For Ubuntu, specify whether to use the official Gluster PPA, and which version of the PPA to use. See Gluster's [Getting Started Guide](https://docs.gluster.org/en/latest/Quick-Start-Guide/Quickstart/) for more info.
|
||||||
|
|
||||||
@ -29,9 +33,11 @@ None.
|
|||||||
|
|
||||||
## Example Playbook
|
## Example Playbook
|
||||||
|
|
||||||
|
```yaml
|
||||||
- hosts: server
|
- hosts: server
|
||||||
roles:
|
roles:
|
||||||
- geerlingguy.glusterfs
|
- geerlingguy.glusterfs
|
||||||
|
```
|
||||||
|
|
||||||
For a real-world use example, read through [Simple GlusterFS Setup with Ansible](http://www.jeffgeerling.com/blog/simple-glusterfs-setup-ansible), a blog post by this role's author, which is included in Chapter 8 of [Ansible for DevOps](https://www.ansiblefordevops.com/).
|
For a real-world use example, read through [Simple GlusterFS Setup with Ansible](http://www.jeffgeerling.com/blog/simple-glusterfs-setup-ansible), a blog post by this role's author, which is included in Chapter 8 of [Ansible for DevOps](https://www.ansiblefordevops.com/).
|
||||||
|
|
||||||
|
@ -6,12 +6,12 @@ galaxy_info:
|
|||||||
description: GlusterFS installation for Linux.
|
description: GlusterFS installation for Linux.
|
||||||
company: "Midwestern Mac, LLC"
|
company: "Midwestern Mac, LLC"
|
||||||
license: "license (BSD, MIT)"
|
license: "license (BSD, MIT)"
|
||||||
min_ansible_version: 2.0
|
min_ansible_version: "2.0"
|
||||||
platforms:
|
platforms:
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 6
|
- "6"
|
||||||
- 7
|
- "7"
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- precise
|
- precise
|
||||||
|
@ -3,14 +3,19 @@
|
|||||||
# hyperkube and needs to be installed as part of the system.
|
# hyperkube and needs to be installed as part of the system.
|
||||||
|
|
||||||
# Setup/install tasks.
|
# Setup/install tasks.
|
||||||
- include: setup-RedHat.yml
|
- name: Setup RedHat distros for glusterfs
|
||||||
|
include_tasks: setup-RedHat.yml
|
||||||
when: ansible_os_family == 'RedHat' and groups['gfs-cluster'] is defined
|
when: ansible_os_family == 'RedHat' and groups['gfs-cluster'] is defined
|
||||||
|
|
||||||
- include: setup-Debian.yml
|
- name: Setup Debian distros for glusterfs
|
||||||
|
include_tasks: setup-Debian.yml
|
||||||
when: ansible_os_family == 'Debian' and groups['gfs-cluster'] is defined
|
when: ansible_os_family == 'Debian' and groups['gfs-cluster'] is defined
|
||||||
|
|
||||||
- name: Ensure Gluster mount directories exist.
|
- name: Ensure Gluster mount directories exist.
|
||||||
file: "path={{ item }} state=directory mode=0775"
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: 0775
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ gluster_mount_dir }}"
|
- "{{ gluster_mount_dir }}"
|
||||||
when: ansible_os_family in ["Debian","RedHat"] and groups['gfs-cluster'] is defined
|
when: ansible_os_family in ["Debian","RedHat"] and groups['gfs-cluster'] is defined
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
register: glusterfs_ppa_added
|
register: glusterfs_ppa_added
|
||||||
when: glusterfs_ppa_use
|
when: glusterfs_ppa_use
|
||||||
|
|
||||||
- name: Ensure GlusterFS client will reinstall if the PPA was just added. # noqa 503
|
- name: Ensure GlusterFS client will reinstall if the PPA was just added. # noqa no-handler
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
---
|
---
|
||||||
- name: Install Prerequisites
|
- name: Install Prerequisites
|
||||||
yum: name={{ item }} state=present
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "centos-release-gluster{{ glusterfs_default_release }}"
|
- "centos-release-gluster{{ glusterfs_default_release }}"
|
||||||
|
|
||||||
- name: Install Packages
|
- name: Install Packages
|
||||||
yum: name={{ item }} state=present
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- glusterfs-client
|
- glusterfs-client
|
||||||
|
@ -6,12 +6,12 @@ galaxy_info:
|
|||||||
description: GlusterFS installation for Linux.
|
description: GlusterFS installation for Linux.
|
||||||
company: "Midwestern Mac, LLC"
|
company: "Midwestern Mac, LLC"
|
||||||
license: "license (BSD, MIT)"
|
license: "license (BSD, MIT)"
|
||||||
min_ansible_version: 2.0
|
min_ansible_version: "2.0"
|
||||||
platforms:
|
platforms:
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 6
|
- "6"
|
||||||
- 7
|
- "7"
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- precise
|
- precise
|
||||||
|
@ -4,90 +4,110 @@
|
|||||||
include_vars: "{{ ansible_os_family }}.yml"
|
include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
# Install xfs package
|
# Install xfs package
|
||||||
- name: install xfs Debian
|
- name: Install xfs Debian
|
||||||
apt: name=xfsprogs state=present
|
apt:
|
||||||
|
name: xfsprogs
|
||||||
|
state: present
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: install xfs RedHat
|
- name: Install xfs RedHat
|
||||||
yum: name=xfsprogs state=present
|
package:
|
||||||
|
name: xfsprogs
|
||||||
|
state: present
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
# Format external volumes in xfs
|
# Format external volumes in xfs
|
||||||
- name: Format volumes in xfs
|
- name: Format volumes in xfs
|
||||||
filesystem: "fstype=xfs dev={{ disk_volume_device_1 }}"
|
community.general.filesystem:
|
||||||
|
fstype: xfs
|
||||||
|
dev: "{{ disk_volume_device_1 }}"
|
||||||
|
|
||||||
# Mount external volumes
|
# Mount external volumes
|
||||||
- name: mounting new xfs filesystem
|
- name: Mounting new xfs filesystem
|
||||||
mount: "name={{ gluster_volume_node_mount_dir }} src={{ disk_volume_device_1 }} fstype=xfs state=mounted"
|
ansible.posix.mount:
|
||||||
|
name: "{{ gluster_volume_node_mount_dir }}"
|
||||||
|
src: "{{ disk_volume_device_1 }}"
|
||||||
|
fstype: xfs
|
||||||
|
state: mounted
|
||||||
|
|
||||||
# Setup/install tasks.
|
# Setup/install tasks.
|
||||||
- include: setup-RedHat.yml
|
- name: Setup RedHat distros for glusterfs
|
||||||
|
include_tasks: setup-RedHat.yml
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- include: setup-Debian.yml
|
- name: Setup Debian distros for glusterfs
|
||||||
|
include_tasks: setup-Debian.yml
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Ensure GlusterFS is started and enabled at boot.
|
- name: Ensure GlusterFS is started and enabled at boot.
|
||||||
service: "name={{ glusterfs_daemon }} state=started enabled=yes"
|
service:
|
||||||
|
name: "{{ glusterfs_daemon }}"
|
||||||
|
state: started
|
||||||
|
enabled: yes
|
||||||
|
|
||||||
- name: Ensure Gluster brick and mount directories exist.
|
- name: Ensure Gluster brick and mount directories exist.
|
||||||
file: "path={{ item }} state=directory mode=0775"
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: 0775
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ gluster_brick_dir }}"
|
- "{{ gluster_brick_dir }}"
|
||||||
- "{{ gluster_mount_dir }}"
|
- "{{ gluster_mount_dir }}"
|
||||||
|
|
||||||
- name: Configure Gluster volume with replicas
|
- name: Configure Gluster volume with replicas
|
||||||
gluster_volume:
|
gluster.gluster.gluster_volume:
|
||||||
state: present
|
state: present
|
||||||
name: "{{ gluster_brick_name }}"
|
name: "{{ gluster_brick_name }}"
|
||||||
brick: "{{ gluster_brick_dir }}"
|
brick: "{{ gluster_brick_dir }}"
|
||||||
replicas: "{{ groups['gfs-cluster'] | length }}"
|
replicas: "{{ groups['gfs-cluster'] | length }}"
|
||||||
cluster: "{% for item in groups['gfs-cluster'] -%}{{ hostvars[item]['ip']|default(hostvars[item].ansible_default_ipv4['address']) }}{% if not loop.last %},{% endif %}{%- endfor %}"
|
cluster: "{% for item in groups['gfs-cluster'] -%}{{ hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4['address']) }}{% if not loop.last %},{% endif %}{%- endfor %}"
|
||||||
host: "{{ inventory_hostname }}"
|
host: "{{ inventory_hostname }}"
|
||||||
force: yes
|
force: yes
|
||||||
run_once: true
|
run_once: true
|
||||||
when: groups['gfs-cluster']|length > 1
|
when: groups['gfs-cluster'] | length > 1
|
||||||
|
|
||||||
- name: Configure Gluster volume without replicas
|
- name: Configure Gluster volume without replicas
|
||||||
gluster_volume:
|
gluster.gluster.gluster_volume:
|
||||||
state: present
|
state: present
|
||||||
name: "{{ gluster_brick_name }}"
|
name: "{{ gluster_brick_name }}"
|
||||||
brick: "{{ gluster_brick_dir }}"
|
brick: "{{ gluster_brick_dir }}"
|
||||||
cluster: "{% for item in groups['gfs-cluster'] -%}{{ hostvars[item]['ip']|default(hostvars[item].ansible_default_ipv4['address']) }}{% if not loop.last %},{% endif %}{%- endfor %}"
|
cluster: "{% for item in groups['gfs-cluster'] -%}{{ hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4['address']) }}{% if not loop.last %},{% endif %}{%- endfor %}"
|
||||||
host: "{{ inventory_hostname }}"
|
host: "{{ inventory_hostname }}"
|
||||||
force: yes
|
force: yes
|
||||||
run_once: true
|
run_once: true
|
||||||
when: groups['gfs-cluster']|length <= 1
|
when: groups['gfs-cluster'] | length <= 1
|
||||||
|
|
||||||
- name: Mount glusterfs to retrieve disk size
|
- name: Mount glusterfs to retrieve disk size
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
name: "{{ gluster_mount_dir }}"
|
name: "{{ gluster_mount_dir }}"
|
||||||
src: "{{ ip|default(ansible_default_ipv4['address']) }}:/gluster"
|
src: "{{ ip | default(ansible_default_ipv4['address']) }}:/gluster"
|
||||||
fstype: glusterfs
|
fstype: glusterfs
|
||||||
opts: "defaults,_netdev"
|
opts: "defaults,_netdev"
|
||||||
state: mounted
|
state: mounted
|
||||||
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
||||||
|
|
||||||
- name: Get Gluster disk size
|
- name: Get Gluster disk size
|
||||||
setup: filter=ansible_mounts
|
setup:
|
||||||
|
filter: ansible_mounts
|
||||||
register: mounts_data
|
register: mounts_data
|
||||||
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
||||||
|
|
||||||
- name: Set Gluster disk size to variable
|
- name: Set Gluster disk size to variable
|
||||||
set_fact:
|
set_fact:
|
||||||
gluster_disk_size_gb: "{{ (mounts_data.ansible_facts.ansible_mounts | selectattr('mount', 'equalto', gluster_mount_dir) | map(attribute='size_total') | first | int / (1024*1024*1024)) | int }}"
|
gluster_disk_size_gb: "{{ (mounts_data.ansible_facts.ansible_mounts | selectattr('mount', 'equalto', gluster_mount_dir) | map(attribute='size_total') | first | int / (1024 * 1024 * 1024)) | int }}"
|
||||||
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
||||||
|
|
||||||
- name: Create file on GlusterFS
|
- name: Create file on GlusterFS
|
||||||
template:
|
template:
|
||||||
dest: "{{ gluster_mount_dir }}/.test-file.txt"
|
dest: "{{ gluster_mount_dir }}/.test-file.txt"
|
||||||
src: test-file.txt
|
src: test-file.txt
|
||||||
|
mode: 0644
|
||||||
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
||||||
|
|
||||||
- name: Unmount glusterfs
|
- name: Unmount glusterfs
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
name: "{{ gluster_mount_dir }}"
|
name: "{{ gluster_mount_dir }}"
|
||||||
fstype: glusterfs
|
fstype: glusterfs
|
||||||
src: "{{ ip|default(ansible_default_ipv4['address']) }}:/gluster"
|
src: "{{ ip | default(ansible_default_ipv4['address']) }}:/gluster"
|
||||||
state: unmounted
|
state: unmounted
|
||||||
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
when: groups['gfs-cluster'] is defined and inventory_hostname == groups['gfs-cluster'][0]
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
register: glusterfs_ppa_added
|
register: glusterfs_ppa_added
|
||||||
when: glusterfs_ppa_use
|
when: glusterfs_ppa_use
|
||||||
|
|
||||||
- name: Ensure GlusterFS will reinstall if the PPA was just added. # noqa 503
|
- name: Ensure GlusterFS will reinstall if the PPA was just added. # noqa no-handler
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: Install Prerequisites
|
- name: Install Prerequisites
|
||||||
yum: name={{ item }} state=present
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "centos-release-gluster{{ glusterfs_default_release }}"
|
- "centos-release-gluster{{ glusterfs_default_release }}"
|
||||||
|
|
||||||
- name: Install Packages
|
- name: Install Packages
|
||||||
yum: name={{ item }} state=present
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- glusterfs-server
|
- glusterfs-server
|
||||||
- glusterfs-client
|
- glusterfs-client
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: all
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- role_under_test
|
|
@ -3,12 +3,13 @@
|
|||||||
template:
|
template:
|
||||||
src: "{{ item.file }}"
|
src: "{{ item.file }}"
|
||||||
dest: "{{ kube_config_dir }}/{{ item.dest }}"
|
dest: "{{ kube_config_dir }}/{{ item.dest }}"
|
||||||
|
mode: 0644
|
||||||
with_items:
|
with_items:
|
||||||
- { file: glusterfs-kubernetes-endpoint.json.j2, type: ep, dest: glusterfs-kubernetes-endpoint.json}
|
- { file: glusterfs-kubernetes-endpoint.json.j2, type: ep, dest: glusterfs-kubernetes-endpoint.json}
|
||||||
- { file: glusterfs-kubernetes-pv.yml.j2, type: pv, dest: glusterfs-kubernetes-pv.yml}
|
- { file: glusterfs-kubernetes-pv.yml.j2, type: pv, dest: glusterfs-kubernetes-pv.yml}
|
||||||
- { file: glusterfs-kubernetes-endpoint-svc.json.j2, type: svc, dest: glusterfs-kubernetes-endpoint-svc.json}
|
- { file: glusterfs-kubernetes-endpoint-svc.json.j2, type: svc, dest: glusterfs-kubernetes-endpoint-svc.json}
|
||||||
register: gluster_pv
|
register: gluster_pv
|
||||||
when: inventory_hostname == groups['kube-master'][0] and groups['gfs-cluster'] is defined and hostvars[groups['gfs-cluster'][0]].gluster_disk_size_gb is defined
|
when: inventory_hostname == groups['kube_control_plane'][0] and groups['gfs-cluster'] is defined and hostvars[groups['gfs-cluster'][0]].gluster_disk_size_gb is defined
|
||||||
|
|
||||||
- name: Kubernetes Apps | Set GlusterFS endpoint and PV
|
- name: Kubernetes Apps | Set GlusterFS endpoint and PV
|
||||||
kube:
|
kube:
|
||||||
@ -17,6 +18,6 @@
|
|||||||
kubectl: "{{ bin_dir }}/kubectl"
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
resource: "{{ item.item.type }}"
|
resource: "{{ item.item.type }}"
|
||||||
filename: "{{ kube_config_dir }}/{{ item.item.dest }}"
|
filename: "{{ kube_config_dir }}/{{ item.item.dest }}"
|
||||||
state: "{{ item.changed | ternary('latest','present') }}"
|
state: "{{ item.changed | ternary('latest', 'present') }}"
|
||||||
with_items: "{{ gluster_pv.results }}"
|
with_items: "{{ gluster_pv.results }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0] and groups['gfs-cluster'] is defined
|
when: inventory_hostname == groups['kube_control_plane'][0] and groups['gfs-cluster'] is defined
|
||||||
|
@ -21,4 +21,3 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
---
|
---
|
||||||
- hosts: kube-master[0]
|
- name: Tear down heketi
|
||||||
|
hosts: kube_control_plane[0]
|
||||||
roles:
|
roles:
|
||||||
- { role: tear-down }
|
- { role: tear-down }
|
||||||
|
|
||||||
- hosts: heketi-node
|
- name: Teardown disks in heketi
|
||||||
|
hosts: heketi-node
|
||||||
become: yes
|
become: yes
|
||||||
roles:
|
roles:
|
||||||
- { role: tear-down-disks }
|
- { role: tear-down-disks }
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
---
|
---
|
||||||
- hosts: heketi-node
|
- name: Prepare heketi install
|
||||||
|
hosts: heketi-node
|
||||||
roles:
|
roles:
|
||||||
- { role: prepare }
|
- { role: prepare }
|
||||||
|
|
||||||
- hosts: kube-master[0]
|
- name: Provision heketi
|
||||||
|
hosts: kube_control_plane[0]
|
||||||
tags:
|
tags:
|
||||||
- "provision"
|
- "provision"
|
||||||
roles:
|
roles:
|
||||||
|
@ -2,18 +2,25 @@ all:
|
|||||||
vars:
|
vars:
|
||||||
heketi_admin_key: "11elfeinhundertundelf"
|
heketi_admin_key: "11elfeinhundertundelf"
|
||||||
heketi_user_key: "!!einseinseins"
|
heketi_user_key: "!!einseinseins"
|
||||||
|
glusterfs_daemonset:
|
||||||
|
readiness_probe:
|
||||||
|
timeout_seconds: 3
|
||||||
|
initial_delay_seconds: 3
|
||||||
|
liveness_probe:
|
||||||
|
timeout_seconds: 3
|
||||||
|
initial_delay_seconds: 10
|
||||||
children:
|
children:
|
||||||
k8s-cluster:
|
k8s_cluster:
|
||||||
vars:
|
vars:
|
||||||
kubelet_fail_swap_on: false
|
kubelet_fail_swap_on: false
|
||||||
children:
|
children:
|
||||||
kube-master:
|
kube_control_plane:
|
||||||
hosts:
|
hosts:
|
||||||
node1:
|
node1:
|
||||||
etcd:
|
etcd:
|
||||||
hosts:
|
hosts:
|
||||||
node2:
|
node2:
|
||||||
kube-node:
|
kube_node:
|
||||||
hosts: &kube_nodes
|
hosts: &kube_nodes
|
||||||
node1:
|
node1:
|
||||||
node2:
|
node2:
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
- "dm_snapshot"
|
- "dm_snapshot"
|
||||||
- "dm_mirror"
|
- "dm_mirror"
|
||||||
- "dm_thin_pool"
|
- "dm_thin_pool"
|
||||||
modprobe:
|
community.general.modprobe:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
|
||||||
- name: "Install glusterfs mount utils (RedHat)"
|
- name: "Install glusterfs mount utils (RedHat)"
|
||||||
become: true
|
become: true
|
||||||
yum:
|
package:
|
||||||
name: "glusterfs-fuse"
|
name: "glusterfs-fuse"
|
||||||
state: "present"
|
state: "present"
|
||||||
when: "ansible_os_family == 'RedHat'"
|
when: "ansible_os_family == 'RedHat'"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- name: "stop port forwarding"
|
- name: "Stop port forwarding"
|
||||||
command: "killall "
|
command: "killall "
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
- name: "Bootstrap heketi."
|
- name: "Bootstrap heketi."
|
||||||
when:
|
when:
|
||||||
- "(initial_heketi_state.stdout|from_json|json_query(\"items[?kind=='Service']\"))|length == 0"
|
- "(initial_heketi_state.stdout | from_json | json_query(\"items[?kind=='Service']\")) | length == 0"
|
||||||
- "(initial_heketi_state.stdout|from_json|json_query(\"items[?kind=='Deployment']\"))|length == 0"
|
- "(initial_heketi_state.stdout | from_json | json_query(\"items[?kind=='Deployment']\")) | length == 0"
|
||||||
- "(initial_heketi_state.stdout|from_json|json_query(\"items[?kind=='Pod']\"))|length == 0"
|
- "(initial_heketi_state.stdout | from_json | json_query(\"items[?kind=='Pod']\")) | length == 0"
|
||||||
include_tasks: "bootstrap/deploy.yml"
|
include_tasks: "bootstrap/deploy.yml"
|
||||||
|
|
||||||
# Prepare heketi topology
|
# Prepare heketi topology
|
||||||
@ -20,11 +20,11 @@
|
|||||||
|
|
||||||
- name: "Ensure heketi bootstrap pod is up."
|
- name: "Ensure heketi bootstrap pod is up."
|
||||||
assert:
|
assert:
|
||||||
that: "(initial_heketi_pod.stdout|from_json|json_query('items[*]'))|length == 1"
|
that: "(initial_heketi_pod.stdout | from_json | json_query('items[*]')) | length == 1"
|
||||||
|
|
||||||
- name: Store the initial heketi pod name
|
- name: Store the initial heketi pod name
|
||||||
set_fact:
|
set_fact:
|
||||||
initial_heketi_pod_name: "{{ initial_heketi_pod.stdout|from_json|json_query(\"items[*].metadata.name|[0]\") }}"
|
initial_heketi_pod_name: "{{ initial_heketi_pod.stdout | from_json | json_query(\"items[*].metadata.name | [0]\") }}"
|
||||||
|
|
||||||
- name: "Test heketi topology."
|
- name: "Test heketi topology."
|
||||||
changed_when: false
|
changed_when: false
|
||||||
@ -32,7 +32,7 @@
|
|||||||
command: "{{ bin_dir }}/kubectl exec {{ initial_heketi_pod_name }} -- heketi-cli --user admin --secret {{ heketi_admin_key }} topology info --json"
|
command: "{{ bin_dir }}/kubectl exec {{ initial_heketi_pod_name }} -- heketi-cli --user admin --secret {{ heketi_admin_key }} topology info --json"
|
||||||
|
|
||||||
- name: "Load heketi topology."
|
- name: "Load heketi topology."
|
||||||
when: "heketi_topology.stdout|from_json|json_query(\"clusters[*].nodes[*]\")|flatten|length == 0"
|
when: "heketi_topology.stdout | from_json | json_query(\"clusters[*].nodes[*]\") | flatten | length == 0"
|
||||||
include_tasks: "bootstrap/topology.yml"
|
include_tasks: "bootstrap/topology.yml"
|
||||||
|
|
||||||
# Provision heketi database volume
|
# Provision heketi database volume
|
||||||
@ -58,7 +58,7 @@
|
|||||||
service_query: "items[?metadata.name=='heketi-storage-endpoints' && kind=='Service']"
|
service_query: "items[?metadata.name=='heketi-storage-endpoints' && kind=='Service']"
|
||||||
job_query: "items[?metadata.name=='heketi-storage-copy-job' && kind=='Job']"
|
job_query: "items[?metadata.name=='heketi-storage-copy-job' && kind=='Job']"
|
||||||
when:
|
when:
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(secret_query)|length == 0"
|
- "heketi_storage_state.stdout | from_json | json_query(secret_query) | length == 0"
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(endpoints_query)|length == 0"
|
- "heketi_storage_state.stdout | from_json | json_query(endpoints_query) | length == 0"
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(service_query)|length == 0"
|
- "heketi_storage_state.stdout | from_json | json_query(service_query) | length == 0"
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(job_query)|length == 0"
|
- "heketi_storage_state.stdout | from_json | json_query(job_query) | length == 0"
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: "Kubernetes Apps | Lay Down Heketi Bootstrap"
|
- name: "Kubernetes Apps | Lay Down Heketi Bootstrap"
|
||||||
become: true
|
become: true
|
||||||
template: { src: "heketi-bootstrap.json.j2", dest: "{{ kube_config_dir }}/heketi-bootstrap.json" }
|
template:
|
||||||
|
src: "heketi-bootstrap.json.j2"
|
||||||
|
dest: "{{ kube_config_dir }}/heketi-bootstrap.json"
|
||||||
|
mode: 0640
|
||||||
register: "rendering"
|
register: "rendering"
|
||||||
- name: "Kubernetes Apps | Install and configure Heketi Bootstrap"
|
- name: "Kubernetes Apps | Install and configure Heketi Bootstrap"
|
||||||
kube:
|
kube:
|
||||||
@ -14,11 +17,11 @@
|
|||||||
register: "initial_heketi_state"
|
register: "initial_heketi_state"
|
||||||
vars:
|
vars:
|
||||||
initial_heketi_state: { stdout: "{}" }
|
initial_heketi_state: { stdout: "{}" }
|
||||||
pods_query: "items[?kind=='Pod'].status.conditions|[0][?type=='Ready'].status|[0]"
|
pods_query: "items[?kind=='Pod'].status.conditions | [0][?type=='Ready'].status | [0]"
|
||||||
deployments_query: "items[?kind=='Deployment'].status.conditions|[0][?type=='Available'].status|[0]"
|
deployments_query: "items[?kind=='Deployment'].status.conditions | [0][?type=='Available'].status | [0]"
|
||||||
command: "{{ bin_dir }}/kubectl get services,deployments,pods --selector=deploy-heketi --output=json"
|
command: "{{ bin_dir }}/kubectl get services,deployments,pods --selector=deploy-heketi --output=json"
|
||||||
until:
|
until:
|
||||||
- "initial_heketi_state.stdout|from_json|json_query(pods_query) == 'True'"
|
- "initial_heketi_state.stdout | from_json | json_query(pods_query) == 'True'"
|
||||||
- "initial_heketi_state.stdout|from_json|json_query(deployments_query) == 'True'"
|
- "initial_heketi_state.stdout | from_json | json_query(deployments_query) == 'True'"
|
||||||
retries: 60
|
retries: 60
|
||||||
delay: 5
|
delay: 5
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
service_query: "items[?metadata.name=='heketi-storage-endpoints' && kind=='Service']"
|
service_query: "items[?metadata.name=='heketi-storage-endpoints' && kind=='Service']"
|
||||||
job_query: "items[?metadata.name=='heketi-storage-copy-job' && kind=='Job']"
|
job_query: "items[?metadata.name=='heketi-storage-copy-job' && kind=='Job']"
|
||||||
when:
|
when:
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(secret_query)|length == 0"
|
- "heketi_storage_state.stdout | from_json | json_query(secret_query) | length == 0"
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(endpoints_query)|length == 0"
|
- "heketi_storage_state.stdout | from_json | json_query(endpoints_query) | length == 0"
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(service_query)|length == 0"
|
- "heketi_storage_state.stdout | from_json | json_query(service_query) | length == 0"
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(job_query)|length == 0"
|
- "heketi_storage_state.stdout | from_json | json_query(job_query) | length == 0"
|
||||||
register: "heketi_storage_result"
|
register: "heketi_storage_result"
|
||||||
- name: "Get state of heketi database copy job."
|
- name: "Get state of heketi database copy job."
|
||||||
command: "{{ bin_dir }}/kubectl get jobs --output=json"
|
command: "{{ bin_dir }}/kubectl get jobs --output=json"
|
||||||
@ -28,6 +28,6 @@
|
|||||||
heketi_storage_state: { stdout: "{}" }
|
heketi_storage_state: { stdout: "{}" }
|
||||||
job_query: "items[?metadata.name=='heketi-storage-copy-job' && kind=='Job' && status.succeeded==1]"
|
job_query: "items[?metadata.name=='heketi-storage-copy-job' && kind=='Job' && status.succeeded==1]"
|
||||||
until:
|
until:
|
||||||
- "heketi_storage_state.stdout|from_json|json_query(job_query)|length == 1"
|
- "heketi_storage_state.stdout | from_json | json_query(job_query) | length == 1"
|
||||||
retries: 60
|
retries: 60
|
||||||
delay: 5
|
delay: 5
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
- name: "Delete bootstrap Heketi."
|
- name: "Delete bootstrap Heketi."
|
||||||
command: "{{ bin_dir }}/kubectl delete all,service,jobs,deployment,secret --selector=\"deploy-heketi\""
|
command: "{{ bin_dir }}/kubectl delete all,service,jobs,deployment,secret --selector=\"deploy-heketi\""
|
||||||
when: "heketi_resources.stdout|from_json|json_query('items[*]')|length > 0"
|
when: "heketi_resources.stdout | from_json | json_query('items[*]') | length > 0"
|
||||||
- name: "Ensure there is nothing left over." # noqa 301
|
- name: "Ensure there is nothing left over."
|
||||||
command: "{{ bin_dir }}/kubectl get all,service,jobs,deployment,secret --selector=\"deploy-heketi\" -o=json"
|
command: "{{ bin_dir }}/kubectl get all,service,jobs,deployment,secret --selector=\"deploy-heketi\" -o=json"
|
||||||
register: "heketi_result"
|
register: "heketi_result"
|
||||||
until: "heketi_result.stdout|from_json|json_query('items[*]')|length == 0"
|
until: "heketi_result.stdout | from_json | json_query('items[*]') | length == 0"
|
||||||
retries: 60
|
retries: 60
|
||||||
delay: 5
|
delay: 5
|
||||||
|
@ -10,10 +10,11 @@
|
|||||||
template:
|
template:
|
||||||
src: "topology.json.j2"
|
src: "topology.json.j2"
|
||||||
dest: "{{ kube_config_dir }}/topology.json"
|
dest: "{{ kube_config_dir }}/topology.json"
|
||||||
|
mode: 0644
|
||||||
- name: "Copy topology configuration into container."
|
- name: "Copy topology configuration into container."
|
||||||
changed_when: false
|
changed_when: false
|
||||||
command: "{{ bin_dir }}/kubectl cp {{ kube_config_dir }}/topology.json {{ initial_heketi_pod_name }}:/tmp/topology.json"
|
command: "{{ bin_dir }}/kubectl cp {{ kube_config_dir }}/topology.json {{ initial_heketi_pod_name }}:/tmp/topology.json"
|
||||||
- name: "Load heketi topology." # noqa 503
|
- name: "Load heketi topology." # noqa no-handler
|
||||||
when: "render.changed"
|
when: "render.changed"
|
||||||
command: "{{ bin_dir }}/kubectl exec {{ initial_heketi_pod_name }} -- heketi-cli --user admin --secret {{ heketi_admin_key }} topology load --json=/tmp/topology.json"
|
command: "{{ bin_dir }}/kubectl exec {{ initial_heketi_pod_name }} -- heketi-cli --user admin --secret {{ heketi_admin_key }} topology load --json=/tmp/topology.json"
|
||||||
register: "load_heketi"
|
register: "load_heketi"
|
||||||
@ -21,6 +22,6 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
register: "heketi_topology"
|
register: "heketi_topology"
|
||||||
command: "{{ bin_dir }}/kubectl exec {{ initial_heketi_pod_name }} -- heketi-cli --user admin --secret {{ heketi_admin_key }} topology info --json"
|
command: "{{ bin_dir }}/kubectl exec {{ initial_heketi_pod_name }} -- heketi-cli --user admin --secret {{ heketi_admin_key }} topology info --json"
|
||||||
until: "heketi_topology.stdout|from_json|json_query(\"clusters[*].nodes[*].devices[?state=='online'].id\")|flatten|length == groups['heketi-node']|length"
|
until: "heketi_topology.stdout | from_json | json_query(\"clusters[*].nodes[*].devices[?state=='online'].id\") | flatten | length == groups['heketi-node'] | length"
|
||||||
retries: 60
|
retries: 60
|
||||||
delay: 5
|
delay: 5
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user