mirror of
https://github.com/balena-io/open-balena.git
synced 2025-06-24 18:25:16 +00:00
Compare commits
770 Commits
Author | SHA1 | Date | |
---|---|---|---|
993c2025e9 | |||
a58766fe9f | |||
e7d5579ae8 | |||
dfd288d499 | |||
16254d268f | |||
cf5b3ded85 | |||
c1f2007638 | |||
dc19c186b8 | |||
e1477b0aa3 | |||
26f7332cfa | |||
47c008cd61 | |||
293393c5af | |||
21c4a97638 | |||
e0c7c763e7 | |||
636b9dabce | |||
1d125782ab | |||
96aa4ea863 | |||
0e6edc5eac | |||
f45fd6a8fb | |||
e1b29c358d | |||
df17a97b3d | |||
2ceca202aa | |||
d103f92757 | |||
476734a9b8 | |||
d856762d29 | |||
e5544da0bc | |||
e980ae0eef | |||
c1cdc58098 | |||
0c0bcda04c | |||
06bfec5deb | |||
53cc1ed147 | |||
6d845df3d3 | |||
77f3281182 | |||
1ce48964c8 | |||
9375376060 | |||
17ab772b60 | |||
f267b9a7d5 | |||
370dbecefb | |||
90fbfae6db | |||
03df777f8c | |||
fd4407117e | |||
212f69ae76 | |||
e716c121b0 | |||
777caa01d2 | |||
0b738382fd | |||
0122cac805 | |||
9cd9da6b54 | |||
75fe45bec9 | |||
599e956311 | |||
d311d3c57c | |||
1a174031b9 | |||
0fca13c1f6 | |||
a4f21cb5f8 | |||
ba22c09827 | |||
0e3c1aa975 | |||
fb2d5b6a25 | |||
d420b6240d | |||
1731bedc9a | |||
d6915a8abb | |||
722c323f86 | |||
e50938926d | |||
9c2d73c9a1 | |||
9554fec1fc | |||
1a1d0bb7d7 | |||
dae8642211 | |||
6067bd4b2a | |||
ac5a5123e8 | |||
f4e1f862af | |||
6a614456e0 | |||
e23043e2f6 | |||
76c1e3c341 | |||
39a1ac1223 | |||
d9dfa55cb5 | |||
b9de68ae58 | |||
f0b0862b22 | |||
de55178c84 | |||
28abe7facb | |||
9a9ffd5351 | |||
a89b59bde0 | |||
48d3495582 | |||
a26a7f51c9 | |||
144aba6588 | |||
02c11901bf | |||
8b19ca189c | |||
ba06f5b991 | |||
ddbc2ec9b2 | |||
e853ae64c7 | |||
32a57211b7 | |||
ba4374055d | |||
d04d22547a | |||
0e77a02eea | |||
8f160d0a99 | |||
8c61a23fac | |||
11bd3976ff | |||
e3a1df78c8 | |||
ec337f62e5 | |||
1cb2d3f821 | |||
b770555e24 | |||
fe854dd9ff | |||
c86f28caf6 | |||
3599f1a517 | |||
a9ee630764 | |||
681a09cb6e | |||
435fec2c6a | |||
a7e3f9906b | |||
3c2d84a610 | |||
2b1a2e4024 | |||
c84956e083 | |||
ea82455164 | |||
e18539672b | |||
2cdc0113a4 | |||
e160fc089f | |||
1e5aa80e73 | |||
9e1dd4cb3e | |||
fad2cc1e3d | |||
badb539c8b | |||
6b4bced30c | |||
a22875dd81 | |||
8922f35927 | |||
17f13f4541 | |||
9d9594630a | |||
997b881329 | |||
2efaafe8af | |||
174c2b204f | |||
cedc6969ec | |||
d15a7bfe82 | |||
fe9d388031 | |||
3809132a13 | |||
3ec0dfdb17 | |||
c7fa8454e9 | |||
f6fe13af87 | |||
f3b03e4a5b | |||
d6b7287102 | |||
cf5afea537 | |||
d28d4323e2 | |||
373c65b4fc | |||
b18cd839dc | |||
1773225626 | |||
44d6ec3413 | |||
571c2d8645 | |||
5db4021633 | |||
927f3062e9 | |||
97373798c1 | |||
ef10b45fe4 | |||
85de3e832a | |||
b42bc3e00b | |||
8d34b2404c | |||
9361e0fc02 | |||
2f5e6f1578 | |||
aa2c4823ad | |||
04ba7afb9f | |||
49afe19d74 | |||
deba1661cb | |||
99d47cb431 | |||
24db7d17b8 | |||
2036ad5833 | |||
9b43dd201b | |||
083972ec04 | |||
e38cb8d655 | |||
7acf599938 | |||
e28e13a6dd | |||
1f0b3b8b4e | |||
f3767cbd3e | |||
6c0c15c9e9 | |||
d1b3baa927 | |||
44e1f717da | |||
7783ca543b | |||
98a1db9dc4 | |||
cfac50981b | |||
3c67fd0b43 | |||
983cf45ad7 | |||
491783b7f7 | |||
13e8d1ff18 | |||
65b618a170 | |||
2c9f7d1880 | |||
dc434d1a84 | |||
4f476950e5 | |||
7f6988d71b | |||
460b794d7b | |||
15bfdc51ff | |||
2e8f531cb6 | |||
c4b86494cc | |||
2b08ede070 | |||
c840723bf8 | |||
fc194fdc9a | |||
66228c4d8d | |||
fa19dfd589 | |||
b01855815d | |||
564b01dd61 | |||
32895d0a13 | |||
208fc20fa7 | |||
e27cbed569 | |||
65e0417c55 | |||
3e41974927 | |||
bce7f32462 | |||
c54dcf483f | |||
47a06f7e6a | |||
a1546cd39b | |||
8de04839b6 | |||
8ba6fbb251 | |||
90e78b9313 | |||
61ad8d84fa | |||
6054180bfe | |||
709e2e5f35 | |||
fe04689fde | |||
67b3825043 | |||
89649c1998 | |||
b65d6d1e02 | |||
2e4ec3bc78 | |||
c5082dc0af | |||
8cde728acf | |||
047f625b85 | |||
fda6256ed9 | |||
26b9f7a288 | |||
23866541ad | |||
81ec364a76 | |||
338940019a | |||
53633f2304 | |||
f4bfb5eb32 | |||
ef888c27ff | |||
0f6f789695 | |||
a4b54471c4 | |||
b2ecfa8f56 | |||
d3220cf16a | |||
0f138c2abf | |||
77136a347c | |||
dff914b555 | |||
2d5cd4040f | |||
e3da80bf42 | |||
9ed0b9164b | |||
5fe76cae23 | |||
3382d72f29 | |||
fdce9651ea | |||
cf0f56d3d7 | |||
2394d9da63 | |||
8a8abe8974 | |||
35a0eda110 | |||
6377ac4f07 | |||
08cd7bcbb6 | |||
3829209724 | |||
4639bbe598 | |||
e9ea176775 | |||
3a81367358 | |||
499d696c41 | |||
2b09337f5d | |||
c0d0ad7340 | |||
ca1b6aa689 | |||
76faeec221 | |||
fa705a90b0 | |||
d9259d79c3 | |||
1faf0013d0 | |||
017285e6ac | |||
3f7815039c | |||
e717a4926e | |||
278b377074 | |||
d9ffa8a692 | |||
46ebce8aea | |||
d958c294f4 | |||
68412a8ec8 | |||
198814e3c4 | |||
ced9e839ad | |||
64f1503686 | |||
818b64adfe | |||
88236a83c2 | |||
8e40f92ea1 | |||
c656d82897 | |||
275bbd7e4b | |||
fe171eb8c1 | |||
66a1119967 | |||
1a40d39ad9 | |||
0edc2e75f3 | |||
0674310a1e | |||
63b806dfff | |||
912140d30a | |||
018c87ffff | |||
de8173f92a | |||
460a877621 | |||
2703752244 | |||
abb7bb2e59 | |||
7e4ae61911 | |||
e56250f7f4 | |||
85e9703460 | |||
7fadaa4efa | |||
cbf02b83f3 | |||
78b91eab22 | |||
b0f6dbcbd4 | |||
70e8333940 | |||
007b450292 | |||
ad81fd8ae5 | |||
f8c1933a82 | |||
6aeab7e9cf | |||
d671569a65 | |||
295ff90c56 | |||
90a3a5f396 | |||
8a10b604d8 | |||
1b9ca425dd | |||
b949ffb15f | |||
9952f38e20 | |||
edd493048e | |||
5ef6a6f2d8 | |||
911353ff6f | |||
203794a5d7 | |||
69a192535a | |||
c1791bfa16 | |||
ec167b6b5c | |||
b838cdf690 | |||
096b664258 | |||
f1edde395b | |||
f6b24e2672 | |||
c76b15ef82 | |||
1bec8bcd2c | |||
521ed41eff | |||
7d2dff7d1e | |||
9f752254e1 | |||
448dfc6b07 | |||
2b955ad77e | |||
364edf3df8 | |||
8fb1fe1be3 | |||
d1a14d09c2 | |||
7307d07132 | |||
22a4ad9cb1 | |||
f65c638465 | |||
05f52779d3 | |||
8e251fee39 | |||
7a9b169f22 | |||
753ab4bb05 | |||
15f6650c0d | |||
550ff388e7 | |||
d5305638ec | |||
0a2196eb4f | |||
07d4b61787 | |||
e25e590f0a | |||
e5c1359d74 | |||
82607535a0 | |||
408f352698 | |||
247258f853 | |||
b9af2ec9ad | |||
75e09b536b | |||
a9a2441494 | |||
1401185fab | |||
b3becb980f | |||
4c698c19b3 | |||
78e8600e27 | |||
916ec9e662 | |||
0d19351eb0 | |||
d774243c56 | |||
62206c95ed | |||
e4da142ee9 | |||
685448763a | |||
6156504365 | |||
7e36675e79 | |||
0c6b84b233 | |||
aa16012afb | |||
36092eb582 | |||
0c7aea3d7c | |||
1ead7e5c45 | |||
be3de75160 | |||
2c12a9941c | |||
6879730fc6 | |||
6e053b1db7 | |||
53166d63ed | |||
8e9b680bdb | |||
f82b997491 | |||
2e86b31cec | |||
62030dd494 | |||
e63f0f0f6b | |||
002dc4402f | |||
681e400747 | |||
2ec7207993 | |||
2dc4dd100f | |||
0848fb5ce5 | |||
9b15f950ab | |||
bef86ceaf2 | |||
a0540831ba | |||
4985538309 | |||
65ddff7706 | |||
b3ac36c749 | |||
5b36a03d30 | |||
d3ed267ff8 | |||
79f2eea85a | |||
301216fb62 | |||
6b4e4bd24a | |||
c0f7efb350 | |||
704c84bdd6 | |||
55253878ed | |||
b798c7f931 | |||
be18ea6a53 | |||
7dc7629c2a | |||
35cfa61f89 | |||
3fc51cb9c0 | |||
4b03d8aa44 | |||
8bcd527a1e | |||
bda5063cb1 | |||
72efc4bae4 | |||
aac14956fc | |||
423418f116 | |||
3b1f2c7e3f | |||
c605143194 | |||
7210ea0ad8 | |||
3b476128a3 | |||
366249a439 | |||
539adade50 | |||
977feac1af | |||
8c7e939c25 | |||
6361744956 | |||
afb14283d3 | |||
e518f94554 | |||
12add96fb1 | |||
7b800de7e0 | |||
cff01bc4a6 | |||
42b9edb346 | |||
94cc717f86 | |||
80fe9bb225 | |||
cc24c2e60f | |||
e0a03ac8d4 | |||
758c52b7ba | |||
24d2b2c646 | |||
0103c32090 | |||
b414f262c0 | |||
39863afeff | |||
9ed5bb247a | |||
2f141a4e4e | |||
a0861307d0 | |||
a26cdd8e9b | |||
b4efd63454 | |||
afcced837a | |||
bec1d9ff1b | |||
b8717d5fbe | |||
e64c731d33 | |||
a613edce65 | |||
bafc9c02ab | |||
abc6225c16 | |||
ef47b2928e | |||
24925320f8 | |||
27f0a7894e | |||
b733a23035 | |||
6b4682ece6 | |||
a520ec228a | |||
02f9d1a67f | |||
b3d0f53bdb | |||
e3cb369bc0 | |||
927e41a9e5 | |||
d3694bbd6e | |||
b65c8301d8 | |||
60d8c5b393 | |||
bb47956aa6 | |||
65bb9aa00b | |||
7d6b0aed3c | |||
2ba2d6aadd | |||
561dccbe13 | |||
69e246efd6 | |||
6742366dbb | |||
0d3e5f9eb8 | |||
8912b7c216 | |||
b122b301fd | |||
a9abd83c60 | |||
29ba2f2475 | |||
a068dafe1c | |||
90a1a791b4 | |||
09e0ffd199 | |||
eceb7deb86 | |||
1378d26adc | |||
0196d6f275 | |||
7dcbd0ea01 | |||
f8c71f7fb2 | |||
5ce87e1894 | |||
aec392953f | |||
bc47611d0b | |||
1bfbe7e671 | |||
9e7dca1e77 | |||
0016a812d6 | |||
19473db450 | |||
d796f9c7a9 | |||
cb5784534a | |||
74defe3e37 | |||
e2dd1d1e7c | |||
1210e3657b | |||
c738ed5018 | |||
777aecb83c | |||
3d685adafa | |||
21f1e90f67 | |||
8e416c235b | |||
f5c4ab1166 | |||
36df27a0a5 | |||
33cce523a0 | |||
7c7ab49b0f | |||
affcbc5c92 | |||
c20c3c9b47 | |||
ecaf1c7e1d | |||
900907f07e | |||
e308b28fe8 | |||
c2e8424ad8 | |||
5248f2bc16 | |||
f353fbbbc2 | |||
e6eb50b64a | |||
6f60eb41aa | |||
11f7a27d3e | |||
74cfc75e4b | |||
7ec3dbcbc0 | |||
62c653d7fe | |||
aacb88a4f6 | |||
c54f82e81e | |||
373af1b08b | |||
1cd7f13ad8 | |||
6b00c0bf43 | |||
e3f9ce631f | |||
5a5d8f4974 | |||
71a6518db0 | |||
d00a7c95df | |||
c1a16744b2 | |||
eeedce9219 | |||
f32815c05d | |||
154f2eeb6f | |||
2f79c6e233 | |||
0d88815b20 | |||
2111c694a1 | |||
db40007f15 | |||
b8e98e5246 | |||
3655a59c29 | |||
daec2b7709 | |||
1c28d800cf | |||
3f8ecb9b6e | |||
d61ab65d60 | |||
be6af919b1 | |||
7aab53f4a1 | |||
ad6f491e56 | |||
7879d34af9 | |||
1d12982256 | |||
90c1f5fa8e | |||
688f0a5e02 | |||
6a4182b26e | |||
124e28352c | |||
06bd4b6561 | |||
19b85a87bb | |||
b488898517 | |||
44b6e5a4c1 | |||
20a88db22a | |||
bb78665e39 | |||
7924ee920a | |||
ff6c7b5a75 | |||
b1c0bafec7 | |||
b3c8709b24 | |||
81749928ee | |||
3d5b0fb071 | |||
24ff058819 | |||
e396706d4d | |||
e077e8811d | |||
2a0edead1d | |||
c7440999a2 | |||
a2b1a247bc | |||
b0f79a0d84 | |||
5468ef100b | |||
ab3eb4c2b9 | |||
d4683c028a | |||
2c30ef662a | |||
551c4a77e0 | |||
dc7fd065f9 | |||
96c34c8b19 | |||
0b43bc00f1 | |||
cfb35f9d39 | |||
13ebf060e3 | |||
df38e7491c | |||
b023d3a470 | |||
3674d61bc6 | |||
2c11632dfa | |||
7fd045814c | |||
0e4a5aca3b | |||
68021551f3 | |||
7ddb50c19f | |||
3ffd7d863b | |||
376a318db3 | |||
0328960ecc | |||
acd642ab57 | |||
722cba49eb | |||
3e29f30697 | |||
5f1d1f4a01 | |||
9fde727b80 | |||
88e2ee6cf0 | |||
96d5617889 | |||
297fff91c1 | |||
8d2d09146d | |||
52d0eb6c4d | |||
4c6d1ea812 | |||
add319430d | |||
5c790da01d | |||
268cb73c96 | |||
c1b7d2cf2d | |||
e54aae2846 | |||
80b7981239 | |||
8a38747f30 | |||
6e4aae7a82 | |||
8a81ef33a6 | |||
a15b049f54 | |||
5a3e2f1ac8 | |||
7f9d14b452 | |||
900e87ac98 | |||
331c952a1f | |||
cb52c0224c | |||
10e2908b4e | |||
85fd15d7b3 | |||
7ee348c449 | |||
b11566ea60 | |||
538bcfe959 | |||
563bababb9 | |||
b416ec376a | |||
422a34218c | |||
3183c8a6c9 | |||
9a4bb5317e | |||
51cee3df4f | |||
65cc3e6ecc | |||
a2b62a6495 | |||
a23f11f345 | |||
0ba199be9d | |||
fe3bc20a30 | |||
e58bf5a4c0 | |||
437c26fe47 | |||
9a172b03f7 | |||
96868c1787 | |||
0f86f5638a | |||
173a99d363 | |||
9c013c9b44 | |||
049cbcaf9b | |||
aefe256e81 | |||
6cf045aea9 | |||
0848e06003 | |||
c4d94801f6 | |||
33eb988eef | |||
91ea4936bf | |||
0e28278a37 | |||
f3091b5b2e | |||
ee4bf0218c | |||
be879e9fd9 | |||
1aa73874a2 | |||
afb9865b52 | |||
a49e96d84f | |||
dce88ff01b | |||
cde52c24da | |||
cd4c361b8c | |||
78da3c5a1a | |||
41d6129911 | |||
da4647515e | |||
e67e435971 | |||
ced0fe4b17 | |||
6c8786f4f9 | |||
1a9d7fa230 | |||
f69dba08f7 | |||
e742df4e89 | |||
742d19dd6c | |||
4bcf8c5ace | |||
252398e130 | |||
008a06fb96 | |||
3a42e20809 | |||
25e2346f2d | |||
aad05c96de | |||
2510c1644f | |||
6dd753b744 | |||
bd504f6019 | |||
9955e7e4fc | |||
b87f2662f9 | |||
ca72e711d3 | |||
4e2ecb653f | |||
15e93fecc7 | |||
47ed0ce133 | |||
bb9ed97688 | |||
217473e54a | |||
6e7dae2cc9 | |||
f4f12d2d1a | |||
ca910f88d1 | |||
9ffdce4e9b | |||
4038e45a3d | |||
6474a7a8b5 | |||
f095a2c596 | |||
459cca7449 | |||
8090670ae6 | |||
a88a0cb89d | |||
4ee327b84a | |||
12d9370d6f | |||
f201cce2a6 | |||
1fbf042d0a | |||
9345f75b3b | |||
506e046140 | |||
9b19d1e3fb | |||
1d34d468b4 | |||
a939d907d5 | |||
2fbf7895ef | |||
c448be555b | |||
03f3f9134b | |||
3db1233154 | |||
f6bdc3ea65 | |||
73be11fd0f | |||
6162e15f91 | |||
6c49a9ef98 | |||
7ab210b2f9 | |||
f97b471d97 | |||
16d1bbc25b | |||
36c6055b63 | |||
9d138c22e8 | |||
e89f6c069b | |||
bf5e5d9caf | |||
1382e77e07 | |||
3f69ce0ca0 | |||
6ef5c59820 | |||
0159b929a6 | |||
c7b07b9f02 | |||
bd7eb1889c | |||
2cc0eb72c1 | |||
7f71b83f62 | |||
f91bb909ef | |||
19f2691112 | |||
fb3b2211c1 | |||
c2369950b0 | |||
6ec137bf17 | |||
b37c476f58 | |||
39c3fed5df | |||
32d123b3f9 | |||
cf5e4d226b | |||
80b6bb67d6 | |||
a420a3edef | |||
4e1e10501d | |||
57a8d218c4 | |||
67fb253ff5 | |||
7625d40d80 | |||
c97b87918b | |||
76cae37cdb | |||
e741155b4b | |||
6cf973527a | |||
560557b095 | |||
d205982207 | |||
bf0b843624 | |||
6d92d50c1c | |||
8af31148c1 | |||
6e69b42963 | |||
e6764e2919 | |||
54d3cd3c1c | |||
4a2b04b18f | |||
14b7daea72 | |||
4f8413e564 | |||
fdbe6df36a | |||
ceb81db652 | |||
76cb7ef4ea | |||
d9b8b8f2b4 | |||
72088ac8eb | |||
b4af363152 | |||
dc83f0b095 | |||
6f7c7a54f4 | |||
07e01297aa | |||
7a36fe1f76 | |||
7a63a52dea | |||
af2ce80fd9 | |||
3cdeed6b3f | |||
06c6c0b93f | |||
496a1d75ec | |||
ea7f30ed94 | |||
dce23ab8b2 | |||
5b835f3a8e | |||
af3e7612b3 | |||
d170f74eea | |||
dfe88d90d5 | |||
231d6f0000 | |||
538ed220e5 | |||
661ff99321 | |||
d348c4870b | |||
e6103a3c1c | |||
79f0609b6b | |||
db0e6315ea | |||
dea3d8a244 | |||
1ea77d38ca | |||
992dc8fea6 | |||
da5f3a4a2d | |||
1c3b8dd38f |
8
.github/actionlint.yaml
vendored
Normal file
8
.github/actionlint.yaml
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
self-hosted-runner:
|
||||||
|
# Labels of self-hosted runner in array of strings.
|
||||||
|
labels:
|
||||||
|
- "distro:jammy"
|
||||||
|
# Configuration variables in array of strings defined in your repository or
|
||||||
|
# organization. `null` means disabling configuration variables check.
|
||||||
|
# Empty array means no configuration variable is allowed.
|
||||||
|
config-variables: null
|
14
.github/workflows/flowzone.yml
vendored
14
.github/workflows/flowzone.yml
vendored
@ -25,15 +25,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
jobs_timeout_minutes: 60
|
jobs_timeout_minutes: 60
|
||||||
cloudflare_website: open-balena
|
cloudflare_website: open-balena
|
||||||
custom_runs_on: |
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"self-hosted",
|
|
||||||
"Linux",
|
|
||||||
"X64"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
balena_slugs: |
|
balena_slugs: |
|
||||||
balena/open-balena
|
balena/open-balena
|
||||||
|
|
||||||
@ -50,8 +41,3 @@ jobs:
|
|||||||
github.event_name == 'pull_request_target'
|
github.event_name == 'pull_request_target'
|
||||||
)) && github.event.action != 'closed'
|
)) && github.event.action != 'closed'
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
|
||||||
environment: balena-cloud.com
|
|
||||||
fleet: balena/open-balena
|
|
||||||
# https://dash.cloudflare.com/001b3ed2352612aaa068aca1b0022736/balena-devices.com/dns
|
|
||||||
dns_tld: balena-devices.com
|
|
||||||
|
15
.github/workflows/renovate.json
vendored
Normal file
15
.github/workflows/renovate.json
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"customManagers": [
|
||||||
|
{
|
||||||
|
"customType": "regex",
|
||||||
|
"fileMatch": [
|
||||||
|
".*"
|
||||||
|
],
|
||||||
|
"matchStrings": [
|
||||||
|
".*amiFilter=(?<packageName>.*?)\n(.*currentImageName=(?<currentDigest>.*?)\n)?(.*\n)?.*?(?<depName>[a-zA-Z0-9-_:]*)[ ]*?[:|=][ ]*?[\"|']?(?<currentValue>ami-[a-z0-9]{17})[\"|']?.*"
|
||||||
|
],
|
||||||
|
"datasourceTemplate": "aws-machine-image",
|
||||||
|
"versioningTemplate": "aws-machine-image"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
826
.github/workflows/tests.yml
vendored
826
.github/workflows/tests.yml
vendored
File diff suppressed because it is too large
Load Diff
15
.pre-commit-config.yaml
Normal file
15
.pre-commit-config.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v3.2.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
|
||||||
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
|
rev: v0.10.0.1
|
||||||
|
hooks:
|
||||||
|
- id: shellcheck
|
File diff suppressed because it is too large
Load Diff
1256
CHANGELOG.md
1256
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
54
Makefile
54
Makefile
@ -3,15 +3,17 @@ SHELL := bash
|
|||||||
# export all variables to child processes by default
|
# export all variables to child processes by default
|
||||||
export
|
export
|
||||||
|
|
||||||
# Include the .env file
|
# include the .env file if it exists
|
||||||
include .env
|
-include .env
|
||||||
|
|
||||||
|
BALENARC_NO_ANALYTICS ?= 1
|
||||||
DNS_TLD ?= $(error DNS_TLD not set)
|
DNS_TLD ?= $(error DNS_TLD not set)
|
||||||
TMPKI := $(shell mktemp)
|
|
||||||
STAGING_PKI ?= /usr/local/share/ca-certificates
|
|
||||||
PRODUCTION_MODE ?= true
|
|
||||||
ORG_UNIT ?= openBalena
|
ORG_UNIT ?= openBalena
|
||||||
|
PRODUCTION_MODE ?= true
|
||||||
|
STAGING_PKI ?= /usr/local/share/ca-certificates
|
||||||
SUPERUSER_EMAIL ?= admin@$(DNS_TLD)
|
SUPERUSER_EMAIL ?= admin@$(DNS_TLD)
|
||||||
|
TMPKI := $(shell mktemp)
|
||||||
|
VERBOSE ?= false
|
||||||
|
|
||||||
.NOTPARALLEL: $(DOCKERCOMPOSE)
|
.NOTPARALLEL: $(DOCKERCOMPOSE)
|
||||||
|
|
||||||
@ -39,23 +41,45 @@ ifneq ($(GANDI_API_TOKEN),)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@rm -f .env
|
@rm -f .env
|
||||||
|
@echo "BALENARC_NO_ANALYTICS=$(BALENARC_NO_ANALYTICS)" > .env
|
||||||
@echo "DNS_TLD=$(DNS_TLD)" >> .env
|
@echo "DNS_TLD=$(DNS_TLD)" >> .env
|
||||||
@echo "ORG_UNIT=$(ORG_UNIT)" >> .env
|
@echo "ORG_UNIT=$(ORG_UNIT)" >> .env
|
||||||
@echo "SUPERUSER_EMAIL=$(SUPERUSER_EMAIL)" >> .env
|
|
||||||
@echo "PRODUCTION_MODE=$(PRODUCTION_MODE)" >> .env
|
@echo "PRODUCTION_MODE=$(PRODUCTION_MODE)" >> .env
|
||||||
@echo "GANDI_API_TOKEN=$(GANDI_API_TOKEN)" >> .env
|
@echo "SUPERUSER_EMAIL=$(SUPERUSER_EMAIL)" >> .env
|
||||||
@echo "CLOUDFLARE_API_TOKEN=$(CLOUDFLARE_API_TOKEN)" >> .env
|
@echo "VERBOSE=$(VERBOSE)" >> .env
|
||||||
|
ifneq ($(ACME_EMAIL),)
|
||||||
@echo "ACME_EMAIL=$(ACME_EMAIL)" >> .env
|
@echo "ACME_EMAIL=$(ACME_EMAIL)" >> .env
|
||||||
|
endif
|
||||||
|
ifneq ($(CLOUDFLARE_API_TOKEN),)
|
||||||
|
@echo "CLOUDFLARE_API_TOKEN=$(CLOUDFLARE_API_TOKEN)" >> .env
|
||||||
|
endif
|
||||||
|
ifneq ($(GANDI_API_TOKEN),)
|
||||||
|
@echo "GANDI_API_TOKEN=$(GANDI_API_TOKEN)" >> .env
|
||||||
|
endif
|
||||||
|
ifneq ($(HAPROXY_CRT),)
|
||||||
@echo "HAPROXY_CRT=$(HAPROXY_CRT)" >> .env
|
@echo "HAPROXY_CRT=$(HAPROXY_CRT)" >> .env
|
||||||
|
endif
|
||||||
|
ifneq ($(HAPROXY_KEY),)
|
||||||
@echo "HAPROXY_KEY=$(HAPROXY_KEY)" >> .env
|
@echo "HAPROXY_KEY=$(HAPROXY_KEY)" >> .env
|
||||||
|
endif
|
||||||
|
ifneq ($(ROOT_CA),)
|
||||||
@echo "ROOT_CA=$(ROOT_CA)" >> .env
|
@echo "ROOT_CA=$(ROOT_CA)" >> .env
|
||||||
|
endif
|
||||||
@$(MAKE) showenv
|
@$(MAKE) showenv
|
||||||
|
|
||||||
|
.PHONY: wait
|
||||||
|
wait: ## Wait for service
|
||||||
|
@until [[ $$(docker compose ps $(SERVICE) --format json | jq -r '.Health') =~ ^healthy$$ ]]; do printf '.'; sleep 3; done
|
||||||
|
@printf '\n'
|
||||||
|
|
||||||
|
.PHONY: waitlog
|
||||||
|
waitlog: ## Wait for log line
|
||||||
|
@until docker compose logs $(SERVICE) | grep -Eq "$(LOG_STRING)"; do printf '.'; sleep 3; done
|
||||||
|
|
||||||
.PHONY: up
|
.PHONY: up
|
||||||
up: config ## Start all services
|
up: config ## Start all services
|
||||||
@docker compose up --build -d
|
@docker compose up --build -d
|
||||||
@until [[ $$(docker compose ps api --format json | jq -r '.Health') =~ healthy ]]; do printf '.'; sleep 3; done
|
@$(MAKE) wait SERVICE=api
|
||||||
@printf '\n'
|
|
||||||
@$(MAKE) showenv
|
@$(MAKE) showenv
|
||||||
@$(MAKE) showpass
|
@$(MAKE) showpass
|
||||||
|
|
||||||
@ -83,6 +107,7 @@ stop: down ## Alias for 'make down'
|
|||||||
.PHONY: restart
|
.PHONY: restart
|
||||||
restart: ## Restart all services
|
restart: ## Restart all services
|
||||||
@docker compose restart
|
@docker compose restart
|
||||||
|
@$(MAKE) wait SERVICE=api
|
||||||
|
|
||||||
.PHONY: update
|
.PHONY: update
|
||||||
update: # Pull and deploy latest changes from git
|
update: # Pull and deploy latest changes from git
|
||||||
@ -118,11 +143,10 @@ self-signed: ## Install self-signed CA certificates
|
|||||||
auto-pki: config # Start all services using LetsEncrypt and ACME
|
auto-pki: config # Start all services using LetsEncrypt and ACME
|
||||||
@docker compose exec cert-manager rm -f /certs/export/chain.pem
|
@docker compose exec cert-manager rm -f /certs/export/chain.pem
|
||||||
@docker compose up -d
|
@docker compose up -d
|
||||||
@until docker compose logs cert-manager | grep -Eq "/certs/export/chain.pem Certificate will not expire in [0-9] days"; do printf '.'; sleep 3; done
|
@$(MAKE) waitlog SERVICE=cert-manager LOG_STRING="/certs/export/chain.pem Certificate will not expire in [0-9] days"
|
||||||
@until docker compose logs cert-manager | grep -q "subject=CN = ${DNS_TLD}"; do printf '.'; sleep 3; done
|
@$(MAKE) waitlog SERVICE=cert-manager LOG_STRING="subject=CN = ${DNS_TLD}"
|
||||||
@until docker compose logs cert-manager | grep -q "issuer=C = US, O = Let's Encrypt, CN = R3"; do printf '.'; sleep 3; done
|
@$(MAKE) waitlog SERVICE=cert-manager LOG_STRING="issuer=C = US, O = Let's Encrypt, CN = .*"
|
||||||
@until [[ $$(docker compose ps haproxy --format json | jq -r '.Health') =~ healthy ]]; do printf '.'; sleep 3; done
|
@$(MAKE) wait SERVICE=haproxy
|
||||||
@printf '\n'
|
|
||||||
@$(MAKE) showenv
|
@$(MAKE) showenv
|
||||||
@$(MAKE) showpass
|
@$(MAKE) showpass
|
||||||
|
|
||||||
|
19
README.md
19
README.md
@ -16,6 +16,23 @@ images to your devices.
|
|||||||
|
|
||||||
To learn more about openBalena, visit [balena.io/open][open-balena-website].
|
To learn more about openBalena, visit [balena.io/open][open-balena-website].
|
||||||
|
|
||||||
|
- [Features](#features)
|
||||||
|
- [Getting Started](#getting-started)
|
||||||
|
- [Compatibility](#compatibility)
|
||||||
|
- [Documentation](#documentation)
|
||||||
|
- [Getting Help](#getting-help)
|
||||||
|
- [Contributing](#contributing)
|
||||||
|
- [Roadmap](#roadmap)
|
||||||
|
- [Differences between openBalena and balenaCloud](#differences-between-openbalena-and-balenacloud)
|
||||||
|
- [License](#license)
|
||||||
|
- [FAQ](#faq)
|
||||||
|
- [How do you ensure continuity of openBalena? Are there security patches on openBalena?](#how-do-you-ensure-continuity-of-openbalena-are-there-security-patches-on-openbalena)
|
||||||
|
- [How do you ensure the "Join" command actually works between openBalena and](#how-do-you-ensure-the-join-command-actually-works-between-openbalena-and)
|
||||||
|
- [Is it "production ready"?](#is-it-production-ready)
|
||||||
|
- [Can a new device type be added to openBalena?](#can-a-new-device-type-be-added-to-openbalena)
|
||||||
|
- [Are there open-source UI dashboards from the community for openBalena?](#are-there-open-source-ui-dashboards-from-the-community-for-openbalena)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@ -159,7 +176,7 @@ While we actually have some rather large fleets using openBalena, we consider it
|
|||||||
perpetually in "beta". This means potentially introducing breaking changes between
|
perpetually in "beta". This means potentially introducing breaking changes between
|
||||||
releases.
|
releases.
|
||||||
|
|
||||||
### Can new device type be added to openBalena?
|
### Can a new device type be added to openBalena?
|
||||||
openBalena imports the following public [device-types] "out of the box". You can specify
|
openBalena imports the following public [device-types] "out of the box". You can specify
|
||||||
your own contracts repository by overriding `CONTRACTS_PUBLIC_REPO_NAME`,
|
your own contracts repository by overriding `CONTRACTS_PUBLIC_REPO_NAME`,
|
||||||
`CONTRACTS_PUBLIC_REPO_OWNER` and `IMAGE_STORAGE_BUCKET` environment variables on the API
|
`CONTRACTS_PUBLIC_REPO_OWNER` and `IMAGE_STORAGE_BUCKET` environment variables on the API
|
||||||
|
@ -23,4 +23,4 @@ data:
|
|||||||
- generic-amd64
|
- generic-amd64
|
||||||
- genericx86-64-ext
|
- genericx86-64-ext
|
||||||
- intel-nuc
|
- intel-nuc
|
||||||
version: 4.0.6
|
version: 4.1.199
|
||||||
|
@ -64,11 +64,11 @@ x-network-privileges-trait: &with-network-privileges
|
|||||||
- SYS_RESOURCE
|
- SYS_RESOURCE
|
||||||
|
|
||||||
x-base-service-definition: &base-service
|
x-base-service-definition: &base-service
|
||||||
restart: unless-stopped
|
restart: 'unless-stopped'
|
||||||
# for docker-compose only, no effect on balenaCloud
|
# for docker-compose only, no effect on balenaCloud
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
tty: 'true' # send syastemd logs from containers to stdout
|
tty: true # send syastemd logs from containers to stdout
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# https://github.com/balena-io/open-balena-api
|
# https://github.com/balena-io/open-balena-api
|
||||||
@ -79,7 +79,7 @@ services:
|
|||||||
*with-default-privileges,
|
*with-default-privileges,
|
||||||
*with-default-volumes,
|
*with-default-volumes,
|
||||||
]
|
]
|
||||||
image: balena/open-balena-api:v22.2.3
|
image: balena/open-balena-api:v30.2.4
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
@ -110,7 +110,7 @@ services:
|
|||||||
TRUST_PROXY: 172.16.0.0/12
|
TRUST_PROXY: 172.16.0.0/12
|
||||||
VPN_PORT: 443
|
VPN_PORT: 443
|
||||||
WEBRESOURCES_S3_BUCKET: web-resources
|
WEBRESOURCES_S3_BUCKET: web-resources
|
||||||
WEBRESOURCES_S3_REGION: "us-east-1" # this is required for minio
|
WEBRESOURCES_S3_REGION: 'us-east-1' # this is required for minio
|
||||||
|
|
||||||
# https://github.com/balena-io/open-balena-registry
|
# https://github.com/balena-io/open-balena-registry
|
||||||
registry:
|
registry:
|
||||||
@ -119,7 +119,7 @@ services:
|
|||||||
*with-default-healthcheck,
|
*with-default-healthcheck,
|
||||||
*with-default-privileges,
|
*with-default-privileges,
|
||||||
]
|
]
|
||||||
image: balena/open-balena-registry:v2.39.56
|
image: balena/open-balena-registry:v2.41.11
|
||||||
volumes:
|
volumes:
|
||||||
- certs-data:/certs
|
- certs-data:/certs
|
||||||
- resin-data:/balena
|
- resin-data:/balena
|
||||||
@ -146,7 +146,7 @@ services:
|
|||||||
*with-network-privileges,
|
*with-network-privileges,
|
||||||
*with-default-privileges,
|
*with-default-privileges,
|
||||||
]
|
]
|
||||||
image: balena/open-balena-vpn:v11.30.9
|
image: balena/open-balena-vpn:v11.30.56
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
environment:
|
environment:
|
||||||
@ -175,7 +175,7 @@ services:
|
|||||||
*with-default-healthcheck,
|
*with-default-healthcheck,
|
||||||
*with-default-privileges,
|
*with-default-privileges,
|
||||||
]
|
]
|
||||||
image: balena/open-balena-s3:v2.28.43
|
image: balena/open-balena-s3:v2.28.58
|
||||||
volumes:
|
volumes:
|
||||||
- s3-data:/export
|
- s3-data:/export
|
||||||
- certs-data:/certs
|
- certs-data:/certs
|
||||||
@ -189,7 +189,7 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
<<: *base-service
|
<<: *base-service
|
||||||
# https://redis.io/blog/what-redis-license-change-means-for-our-managed-service-providers/
|
# https://redis.io/blog/what-redis-license-change-means-for-our-managed-service-providers/
|
||||||
image: redis:7.2-alpine
|
image: redis:7.4-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- redis-data:/data
|
- redis-data:/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -212,11 +212,11 @@ services:
|
|||||||
test: true | openssl s_client -connect localhost:443
|
test: true | openssl s_client -connect localhost:443
|
||||||
ports:
|
ports:
|
||||||
# haproxy/http
|
# haproxy/http
|
||||||
- "80:80/tcp"
|
- '80:80/tcp'
|
||||||
# haproxy/tcp-router
|
# haproxy/tcp-router
|
||||||
- "443:443/tcp"
|
- '443:443/tcp'
|
||||||
# haproxy/stats
|
# haproxy/stats
|
||||||
- "1936:1936/tcp"
|
- '1936:1936/tcp'
|
||||||
environment:
|
environment:
|
||||||
LOGLEVEL: info
|
LOGLEVEL: info
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ services:
|
|||||||
# only relevant when running in AWS/EC2
|
# only relevant when running in AWS/EC2
|
||||||
tag-sidecar:
|
tag-sidecar:
|
||||||
build: src/tag-sidecar
|
build: src/tag-sidecar
|
||||||
restart: no
|
restart: 'no'
|
||||||
environment:
|
environment:
|
||||||
ENABLED: 'true'
|
ENABLED: 'true'
|
||||||
labels:
|
labels:
|
||||||
@ -308,7 +308,7 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
io.balena.features.balena-api: 1
|
io.balena.features.balena-api: 1
|
||||||
io.balena.features.supervisor-api: 1
|
io.balena.features.supervisor-api: 1
|
||||||
restart: no
|
restart: 'no'
|
||||||
|
|
||||||
# virtual Device Under Test (DUT)
|
# virtual Device Under Test (DUT)
|
||||||
dut:
|
dut:
|
||||||
@ -333,7 +333,7 @@ services:
|
|||||||
- resin-data:/balena
|
- resin-data:/balena
|
||||||
devices:
|
devices:
|
||||||
- /dev/net/tun
|
- /dev/net/tun
|
||||||
restart: no
|
restart: 'no'
|
||||||
|
|
||||||
# https://hub.docker.com/_/docker
|
# https://hub.docker.com/_/docker
|
||||||
# pseudo(builder) service for balena-tests
|
# pseudo(builder) service for balena-tests
|
||||||
@ -344,11 +344,23 @@ services:
|
|||||||
*with-network-privileges,
|
*with-network-privileges,
|
||||||
]
|
]
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
|
entrypoint:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
command:
|
||||||
|
- |
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cp /certs/root-ca.pem /certs/server-ca.pem /usr/local/share/ca-certificates/ \
|
||||||
|
&& update-ca-certificates
|
||||||
|
|
||||||
|
exec /usr/local/bin/dockerd-entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
- builder-data:/var/lib/docker
|
- /sys:/sys
|
||||||
- builder-certs-ca:/docker-pki/ca
|
- builder-certs-ca:/docker-pki/ca
|
||||||
- builder-certs-client:/docker-pki/client
|
- builder-certs-client:/docker-pki/client
|
||||||
- /sys:/sys
|
- builder-data:/var/lib/docker
|
||||||
|
- certs-data:/certs
|
||||||
environment:
|
environment:
|
||||||
DOCKER_TLS_CERTDIR: /docker-pki
|
DOCKER_TLS_CERTDIR: /docker-pki
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
@ -82,7 +82,7 @@ name and configure records.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo useradd -s /bin/bash -m -G docker,sudo balena
|
sudo useradd -s /bin/bash -m -G docker,sudo balena
|
||||||
echo 'balena ALL=(ALL) NOPASSWD: ALL' | tee >/etc/sudoers.d/balena
|
echo 'balena ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/balena
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Switch user:
|
6. Switch user:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=balena-io/balena-cli
|
# renovate: datasource=github-releases depName=balena-io/balena-cli
|
||||||
ARG BALENA_CLI_VERSION=v18.2.2
|
ARG BALENA_CLI_VERSION=v19.14.0
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
bash \
|
bash \
|
||||||
|
@ -1,23 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC2154,SC2034,SC1090
|
# shellcheck disable=SC2034,SC1090
|
||||||
set -ae
|
set -aeu
|
||||||
|
|
||||||
curl_opts="--retry 3 --fail"
|
read -ra curl_opts <<<'--retry 3 --fail'
|
||||||
if [[ $VERBOSE =~ on|On|Yes|yes|true|True ]]; then
|
if [[ $VERBOSE =~ on|On|Yes|yes|true|True ]]; then
|
||||||
set -x
|
set -x
|
||||||
curl_opts="${curl_opts} --verbose"
|
curl_opts+=('--verbose')
|
||||||
else
|
else
|
||||||
curl_opts="${curl_opts} --silent"
|
curl_opts+=('--silent')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source /usr/sbin/functions
|
source /usr/sbin/functions
|
||||||
|
|
||||||
function remove_test_assets() {
|
function remove_test_assets() {
|
||||||
rm -rf /balena/config.json \
|
rm -rf /balena/config.json \
|
||||||
"${GUEST_IMAGE}" \
|
"${GUEST_IMAGE}" \
|
||||||
"${GUEST_IMAGE%.*}.ready" \
|
"${GUEST_IMAGE%.*}.ready" \
|
||||||
"${tmpbuild}" \
|
"${tmpbuild:-}" \
|
||||||
/tmp/*.img
|
/tmp/*.img
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,18 +40,20 @@ function shutdown_dut() {
|
|||||||
local balena_device_uuid
|
local balena_device_uuid
|
||||||
balena_device_uuid="$(cat </balena/config.json | jq -r .uuid)"
|
balena_device_uuid="$(cat </balena/config.json | jq -r .uuid)"
|
||||||
|
|
||||||
if [[ -n $balena_device_uuid ]]; then
|
if [[ -n "${balena_device_uuid:-}" ]]; then
|
||||||
with_backoff balena device "${balena_device_uuid}"
|
with_backoff balena device "${balena_device_uuid}"
|
||||||
balena device shutdown -f "${balena_device_uuid}" || true
|
if ! with_backoff balena device shutdown -f "${balena_device_uuid}"; then
|
||||||
|
echo 'DUT failed to shutdown properly'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_update_lock {
|
function set_update_lock {
|
||||||
if [[ -n "$BALENA_SUPERVISOR_ADDRESS" ]] && [[ -n "$BALENA_SUPERVISOR_API_KEY" ]]; then
|
if [[ -n "${BALENA_SUPERVISOR_ADDRESS:-}" ]] && [[ -n "${BALENA_SUPERVISOR_API_KEY:-}" ]]; then
|
||||||
while [[ $(curl ${curl_opts} "${BALENA_SUPERVISOR_ADDRESS}/v1/device?apikey=${BALENA_SUPERVISOR_API_KEY}" \
|
while [[ $(curl "${curl_opts[@]}" "${BALENA_SUPERVISOR_ADDRESS}/v1/device?apikey=${BALENA_SUPERVISOR_API_KEY}" \
|
||||||
-H "Content-Type: application/json" | jq -r '.update_pending') == 'true' ]]; do
|
-H "Content-Type: application/json" | jq -r '.update_pending') == 'true' ]]; do
|
||||||
|
|
||||||
curl ${curl_opts} "${BALENA_SUPERVISOR_ADDRESS}/v1/device?apikey=${BALENA_SUPERVISOR_API_KEY}" \
|
curl "${curl_opts[@]}" "${BALENA_SUPERVISOR_ADDRESS}/v1/device?apikey=${BALENA_SUPERVISOR_API_KEY}" \
|
||||||
-H "Content-Type: application/json" | jq -r
|
-H "Content-Type: application/json" | jq -r
|
||||||
|
|
||||||
sleep "$(( (RANDOM % 3) + 3 ))s"
|
sleep "$(( (RANDOM % 3) + 3 ))s"
|
||||||
@ -87,7 +90,8 @@ function update_ca_certificates() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wait_for_api() {
|
function wait_for_api() {
|
||||||
while ! curl ${curl_opts} "https://api.${DNS_TLD}/ping"; do
|
while ! curl "${curl_opts[@]}" "https://api.${DNS_TLD}/ping"; do
|
||||||
|
echo 'waiting for API...'
|
||||||
sleep "$(( (RANDOM % 5) + 5 ))s"
|
sleep "$(( (RANDOM % 5) + 5 ))s"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -96,6 +100,7 @@ function open_balena_login() {
|
|||||||
while ! balena login --credentials \
|
while ! balena login --credentials \
|
||||||
--email "${SUPERUSER_EMAIL}" \
|
--email "${SUPERUSER_EMAIL}" \
|
||||||
--password "${SUPERUSER_PASSWORD}"; do
|
--password "${SUPERUSER_PASSWORD}"; do
|
||||||
|
echo 'waiting for auth...'
|
||||||
sleep "$(( (RANDOM % 5) + 5 ))s"
|
sleep "$(( (RANDOM % 5) + 5 ))s"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -104,6 +109,7 @@ function create_fleet() {
|
|||||||
if ! balena fleet "${TEST_FLEET}"; then
|
if ! balena fleet "${TEST_FLEET}"; then
|
||||||
# wait for API to load DT contracts
|
# wait for API to load DT contracts
|
||||||
while ! balena fleet create "${TEST_FLEET}" --type "${DEVICE_TYPE}"; do
|
while ! balena fleet create "${TEST_FLEET}" --type "${DEVICE_TYPE}"; do
|
||||||
|
echo 'waiting for device types...'
|
||||||
sleep "$(( (RANDOM % 5) + 5 ))s"
|
sleep "$(( (RANDOM % 5) + 5 ))s"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -175,9 +181,10 @@ function wait_for_device() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function registry_auth() {
|
function registry_auth() {
|
||||||
if [[ -n $REGISTRY_USER ]] && [[ -n $REGISTRY_PASS ]]; then
|
if [[ -n "${REGISTRY_USER:-}" ]] && [[ -n "${REGISTRY_PASS:-}" ]]; then
|
||||||
with_backoff docker login -u "${REGISTRY_USER}" -p "${REGISTRY_PASS}"
|
with_backoff docker login -u "${REGISTRY_USER}" -p "${REGISTRY_PASS}"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2016
|
||||||
printf '{"https://index.docker.io/v1/": {"username":"%s", "password":"$s"}}' \
|
printf '{"https://index.docker.io/v1/": {"username":"%s", "password":"$s"}}' \
|
||||||
"${REGISTRY_USER}" "${REGISTRY_PASS}" | jq -r > ~/.balena/secrets.json
|
"${REGISTRY_USER}" "${REGISTRY_PASS}" | jq -r > ~/.balena/secrets.json
|
||||||
fi
|
fi
|
||||||
@ -205,7 +212,7 @@ function get_releases() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_release_commit() {
|
function get_release_commit() {
|
||||||
echo "$(get_releases)" | jq -re \
|
get_releases | jq -re \
|
||||||
'select((.[].status=="success")
|
'select((.[].status=="success")
|
||||||
and (.[].is_invalidated==false)
|
and (.[].is_invalidated==false)
|
||||||
and (.[].is_final==true)
|
and (.[].is_final==true)
|
||||||
@ -213,7 +220,7 @@ function get_release_commit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_release_id() {
|
function get_release_id() {
|
||||||
echo "$(get_releases)" | jq -re \
|
get_releases | jq -re \
|
||||||
'select((.[].status=="success")
|
'select((.[].status=="success")
|
||||||
and (.[].is_invalidated==false)
|
and (.[].is_invalidated==false)
|
||||||
and (.[].is_final==true)
|
and (.[].is_final==true)
|
||||||
@ -224,8 +231,8 @@ function supervisor_update_target_state() {
|
|||||||
local balena_device_uuid
|
local balena_device_uuid
|
||||||
balena_device_uuid="$(cat </balena/config.json | jq -r .uuid)"
|
balena_device_uuid="$(cat </balena/config.json | jq -r .uuid)"
|
||||||
|
|
||||||
if [[ -n $balena_device_uuid ]]; then
|
if [[ -n "${balena_device_uuid:-}" ]]; then
|
||||||
while ! curl ${curl_opts} "https://api.${DNS_TLD}/supervisor/v1/update" \
|
while ! curl "${curl_opts[@]}" "https://api.${DNS_TLD}/supervisor/v1/update" \
|
||||||
--header "Content-Type: application/json" \
|
--header "Content-Type: application/json" \
|
||||||
--header "Authorization: Bearer $(cat <~/.balena/token)" \
|
--header "Authorization: Bearer $(cat <~/.balena/token)" \
|
||||||
--data "{\"uuid\": \"${balena_device_uuid}\", \"data\": {\"force\": true}}"; do
|
--data "{\"uuid\": \"${balena_device_uuid}\", \"data\": {\"force\": true}}"; do
|
||||||
@ -241,14 +248,14 @@ function check_running_release() {
|
|||||||
|
|
||||||
local should_be_running_release
|
local should_be_running_release
|
||||||
should_be_running_release="$(get_release_commit)"
|
should_be_running_release="$(get_release_commit)"
|
||||||
[[ -z $should_be_running_release ]] && false
|
[[ -z "$should_be_running_release" ]] && false
|
||||||
|
|
||||||
if [[ -n $balena_device_uuid ]]; then
|
if [[ -n "${balena_device_uuid:-}" ]]; then
|
||||||
while ! [[ $(balena device "${balena_device_uuid}" | grep -E ^COMMIT | awk '{print $2}') =~ ${should_be_running_release} ]]; do
|
while ! [[ $(balena device "${balena_device_uuid}" | grep -E ^COMMIT | awk '{print $2}') =~ ${should_be_running_release} ]]; do
|
||||||
running_release_id="$(balena device "${balena_device_uuid}" | grep -E ^COMMIT | awk '{print $2}')"
|
running_release_id="$(balena device "${balena_device_uuid}" | grep -E ^COMMIT | awk '{print $2}')"
|
||||||
printf 'please wait, device %s should be running %s, but is still running %s...\n' \
|
printf 'please wait, device %s should be running %s, but is still running %s...\n' \
|
||||||
"${balena_device_uuid}" \
|
"${balena_device_uuid}" \
|
||||||
"${1}" \
|
"${should_be_running_release}" \
|
||||||
"${running_release_id}"
|
"${running_release_id}"
|
||||||
|
|
||||||
sleep "$(( (RANDOM % 5) + 5 ))s"
|
sleep "$(( (RANDOM % 5) + 5 ))s"
|
||||||
@ -258,7 +265,7 @@ function check_running_release() {
|
|||||||
|
|
||||||
function get_os_version() {
|
function get_os_version() {
|
||||||
local BALENARC_BALENA_URL
|
local BALENARC_BALENA_URL
|
||||||
BALENARC_BALENA_URL="$(echo "${BALENA_API_URL}" | sed 's#https://api\.##g')"
|
BALENARC_BALENA_URL="${BALENA_API_URL//https:\/\/api\./}"
|
||||||
|
|
||||||
local os_version
|
local os_version
|
||||||
os_version=${OS_VERSION:-$(with_backoff balena os versions "${DEVICE_TYPE}" | head -n 1)}
|
os_version=${OS_VERSION:-$(with_backoff balena os versions "${DEVICE_TYPE}" | head -n 1)}
|
||||||
@ -266,27 +273,27 @@ function get_os_version() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function upload_release_asset() {
|
function upload_release_asset() {
|
||||||
if [[ "$RELEASE_ASSETS_TEST" =~ true ]]; then
|
if [[ "${RELEASE_ASSETS_T:-}" =~ true ]]; then
|
||||||
local release_id
|
local release_id
|
||||||
release_id=${1:-1}
|
release_id=${1:-1}
|
||||||
release_asset="$(find / -type f -name '*.png' | head -n 1)"
|
release_asset="$(find / -type f -name '*.png' | head -n 1)"
|
||||||
|
|
||||||
curl ${curl_opts} "https://api.${DNS_TLD}/resin/release_asset" \
|
curl "${curl_opts[@]}" "https://api.${DNS_TLD}/resin/release_asset" \
|
||||||
--header "Authorization: Bearer $(cat <~/.balena/token)" \
|
--header "Authorization: Bearer $(cat <~/.balena/token)" \
|
||||||
--form "asset=@${release_asset}" \
|
--form "asset=@${release_asset}" \
|
||||||
--form "release=${release_id}" \
|
--form "release=${release_id}" \
|
||||||
--form "asset_key=$((RANDOM))-$(basename ${release_asset})" \
|
--form "asset_key=$((RANDOM))-$(basename "${release_asset}")" \
|
||||||
| jq -re .asset.href \
|
| jq -re .asset.href \
|
||||||
| xargs curl ${curl_opts} -o "/tmp/$((RANDOM))-$(basename ${release_asset})"
|
| xargs curl "${curl_opts[@]}" -o "/tmp/$((RANDOM))-$(basename "${release_asset}")"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- main
|
# --- main
|
||||||
if [[ "$PRODUCTION_MODE" =~ true ]]; then
|
if [[ "${PRODUCTION_MODE:-}" =~ true ]]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${BALENA_DEVICE_UUID}" ]]; then
|
if [[ -n "${BALENA_DEVICE_UUID:-}" ]]; then
|
||||||
# prepend the device UUID if running on balenaOS
|
# prepend the device UUID if running on balenaOS
|
||||||
TLD="${BALENA_DEVICE_UUID}.${DNS_TLD}"
|
TLD="${BALENA_DEVICE_UUID}.${DNS_TLD}"
|
||||||
else
|
else
|
||||||
@ -303,7 +310,19 @@ GUEST_IMAGE=${GUEST_IMAGE:-/balena/balena.img}
|
|||||||
OS_VERSION="$(get_os_version)"
|
OS_VERSION="$(get_os_version)"
|
||||||
TEST_FLEET=${TEST_FLEET:-test-fleet}
|
TEST_FLEET=${TEST_FLEET:-test-fleet}
|
||||||
|
|
||||||
[[ -f "$CONF" ]] && source "${CONF}"
|
# wait here until global config is ready
|
||||||
|
until [[ -s "$CONF" ]]; do
|
||||||
|
echo 'waiting for config...'
|
||||||
|
sleep "$(( (RANDOM % 5) + 5 ))s"
|
||||||
|
done
|
||||||
|
source "${CONF}"
|
||||||
|
|
||||||
|
# wait her until we have valid login credentials
|
||||||
|
until [[ -n "${SUPERUSER_EMAIL:-}" ]] && [[ -n "${SUPERUSER_PASSWORD:-}" ]]; do
|
||||||
|
echo 'waiting for credentials...'
|
||||||
|
sleep "$(( (RANDOM % 5) + 5 ))s"
|
||||||
|
source "${CONF}"
|
||||||
|
done
|
||||||
|
|
||||||
update_ca_certificates # ensure self-signed root CA certificate(s) trust
|
update_ca_certificates # ensure self-signed root CA certificate(s) trust
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# https://hub.docker.com/r/qemux/qemu-docker
|
# https://hub.docker.com/r/qemux/qemu-docker
|
||||||
# https://github.com/qemus/qemu-docker
|
# https://github.com/qemus/qemu-docker
|
||||||
FROM qemux/qemu-docker:4.24
|
FROM qemux/qemu-docker:6.06
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
minicom \
|
minicom \
|
||||||
|
Reference in New Issue
Block a user