mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
Compare commits
447 Commits
4abe94ca0b
...
v4.0.2-rc.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81a336ea41 | ||
|
|
0c9d242f34 | ||
|
|
db2932e20c | ||
|
|
2d4a3da562 | ||
|
|
0cbdf68df3 | ||
|
|
28bbdd3061 | ||
|
|
8c20fb7e3d | ||
|
|
5904eaf042 | ||
|
|
378177ad2f | ||
|
|
86a6a816af | ||
|
|
a321c89e5f | ||
|
|
dd76886d51 | ||
|
|
29809ce265 | ||
|
|
eb33cdbe4a | ||
|
|
cfde0396c3 | ||
|
|
a640fb3d60 | ||
|
|
f1f66fbed1 | ||
|
|
35649ce641 | ||
|
|
0ff02020e7 | ||
|
|
e1e91c0248 | ||
|
|
f9c73f53c3 | ||
|
|
7bd4869998 | ||
|
|
97becd57ba | ||
|
|
399bfcb2e2 | ||
|
|
3eba59982c | ||
|
|
5e50483cbc | ||
|
|
317497d6c2 | ||
|
|
e7dee4e9a0 | ||
|
|
2a82c99942 | ||
|
|
35b17d1d7c | ||
|
|
518f81ba69 | ||
|
|
8fb0236de5 | ||
|
|
c1cd91e01c | ||
|
|
27500ca14e | ||
|
|
ec0d44e1bc | ||
|
|
0137096ba8 | ||
|
|
6c66130f16 | ||
|
|
cb155ebcbb | ||
|
|
89c836518b | ||
|
|
62ab0616ff | ||
|
|
572d83f146 | ||
|
|
e2bd696ac6 | ||
|
|
faeb5685be | ||
|
|
49088da817 | ||
|
|
dd5dc038cd | ||
|
|
b8e70e1142 | ||
|
|
29dc02f484 | ||
|
|
4dd9e26225 | ||
|
|
17882cca3f | ||
|
|
d0383ff1ab | ||
|
|
3293def16a | ||
|
|
e20f46f7ed | ||
|
|
a8e8641c75 | ||
|
|
2085d9dfa5 | ||
|
|
2c45df0895 | ||
|
|
5a15d84685 | ||
|
|
3e49aac8f6 | ||
|
|
09b5ecbce0 | ||
|
|
8554c93b0f | ||
|
|
6b6147777c | ||
|
|
ddcd72716c | ||
|
|
67d743296d | ||
|
|
4fbe43192d | ||
|
|
16f15ac0fc | ||
|
|
eca000b52e | ||
|
|
3a2ab9e73d | ||
|
|
7a5a2c549a | ||
|
|
9ac509e55b | ||
|
|
4ca1fbfda5 | ||
|
|
80287d6b4d | ||
|
|
7015962121 | ||
|
|
1a87bb18c9 | ||
|
|
af85cca1d6 | ||
|
|
8d9740f149 | ||
|
|
2dd1d6fc26 | ||
|
|
ce338f180a | ||
|
|
6869eca040 | ||
|
|
4666b00bda | ||
|
|
154673e6a3 | ||
|
|
0cd633046f | ||
|
|
f0980d7817 | ||
|
|
2b0a7ac265 | ||
|
|
79166f9aaa | ||
|
|
0ec78aaa8a | ||
|
|
8622137834 | ||
|
|
4a7b6af08a | ||
|
|
41ba24f4b5 | ||
|
|
11dc0d46a2 | ||
|
|
fbdf305ff5 | ||
|
|
2d30cb862f | ||
|
|
c712a848a5 | ||
|
|
01c97c0df6 | ||
|
|
c3f9b88faa | ||
|
|
a49e7437bd | ||
|
|
491cde2257 | ||
|
|
b28bdf43e4 | ||
|
|
4afbf46da1 | ||
|
|
6a0c361ea3 | ||
|
|
80b5a7c04a | ||
|
|
729a523260 | ||
|
|
3e7c73677e | ||
|
|
f12c22e7b6 | ||
|
|
2fee1b6aea | ||
|
|
32d4820a63 | ||
|
|
15c7a825bf | ||
|
|
985995c684 | ||
|
|
52f2d801c1 | ||
|
|
a0f9484770 | ||
|
|
19b0997ab6 | ||
|
|
6274e21053 | ||
|
|
3ba6c1b3ff | ||
|
|
9099f682fb | ||
|
|
a0d28c214f | ||
|
|
fccf389a53 | ||
|
|
8a68f5d7d4 | ||
|
|
51fddda1bd | ||
|
|
65e0f4414e | ||
|
|
c33dc74019 | ||
|
|
705fe7a5d9 | ||
|
|
91617dc81b | ||
|
|
f668f496dc | ||
|
|
69831485a3 | ||
|
|
8d4595be87 | ||
|
|
fcb72e304b | ||
|
|
30b7deb9f5 | ||
|
|
a191da0a77 | ||
|
|
dfbd89c9db | ||
|
|
f53caeb6d1 | ||
|
|
bf4f1755c8 | ||
|
|
9bb6e3eb1b | ||
|
|
33938c6c01 | ||
|
|
4f1bb2a871 | ||
|
|
7abcd04f16 | ||
|
|
2cae726280 | ||
|
|
16aa081789 | ||
|
|
45de538d15 | ||
|
|
a05b793b81 | ||
|
|
7df775f07c | ||
|
|
ec3c9f3a20 | ||
|
|
e2e79cd7cc | ||
|
|
68675541ff | ||
|
|
9ee0e83747 | ||
|
|
4068843773 | ||
|
|
c4b719628b | ||
|
|
66afa2f141 | ||
|
|
51bdf0c655 | ||
|
|
5fc5c5b330 | ||
|
|
1c61483bc1 | ||
|
|
79c45568c7 | ||
|
|
002b37f6a1 | ||
|
|
6a18b70168 | ||
|
|
bbf0991bb3 | ||
|
|
1052eb4451 | ||
|
|
07ce88c828 | ||
|
|
29585a8af6 | ||
|
|
06258859d8 | ||
|
|
2bbd1f792c | ||
|
|
56b41893ec | ||
|
|
cb0729f672 | ||
|
|
e6ec61cab1 | ||
|
|
35e34f019a | ||
|
|
b352d0cc92 | ||
|
|
56e938ee2e | ||
|
|
a9649db617 | ||
|
|
b1ef423c2a | ||
|
|
8da753833d | ||
|
|
16b3d220f4 | ||
|
|
dc5884b361 | ||
|
|
77c471322a | ||
|
|
584b3291cd | ||
|
|
f5a6465629 | ||
|
|
de05e8cc4a | ||
|
|
a839607802 | ||
|
|
6251e28e52 | ||
|
|
3591e9a15f | ||
|
|
84e8b83aab | ||
|
|
cd3190d80f | ||
|
|
b60346b97f | ||
|
|
d3c64b8054 | ||
|
|
914c1a1971 | ||
|
|
13ce2252ce | ||
|
|
3bdfb00850 | ||
|
|
bc7cc1ad07 | ||
|
|
dd7602e628 | ||
|
|
7fe4ac72fe | ||
|
|
55e586121d | ||
|
|
144ee48cec | ||
|
|
b3a3d170e2 | ||
|
|
ebdcabe330 | ||
|
|
e504d0d4e3 | ||
|
|
00ee68c716 | ||
|
|
c6bf60722b | ||
|
|
8e6e30d57f | ||
|
|
1f31c00819 | ||
|
|
a704ab1cea | ||
|
|
b90abee236 | ||
|
|
ee471da787 | ||
|
|
4e1d8f2a98 | ||
|
|
65492d196c | ||
|
|
af73e7e93a | ||
|
|
59089c6792 | ||
|
|
9a19621da0 | ||
|
|
85ad508d83 | ||
|
|
e67f8392a7 | ||
|
|
c9ece3e7de | ||
|
|
b6329b5c23 | ||
|
|
b7a3ed9e27 | ||
|
|
d591b7991b | ||
|
|
e05112b3f6 | ||
|
|
bef839cc7b | ||
|
|
6c7bb1a1b1 | ||
|
|
efe0d135b2 | ||
|
|
185332fa28 | ||
|
|
64fa9f1675 | ||
|
|
60a57b1e1b | ||
|
|
8ac435af8e | ||
|
|
c436fde002 | ||
|
|
f4bcb7ffdf | ||
|
|
38d1d0f766 | ||
|
|
f8001de546 | ||
|
|
bd731ca958 | ||
|
|
6c4a1a3628 | ||
|
|
5387fc03f8 | ||
|
|
37c3db52b9 | ||
|
|
976f0f0bf4 | ||
|
|
f446f86e9f | ||
|
|
4428791397 | ||
|
|
314fb8f08e | ||
|
|
331231ce1a | ||
|
|
a8e4ecfa5a | ||
|
|
51bec5644e | ||
|
|
092a0c2239 | ||
|
|
82bfb4cea1 | ||
|
|
e35ca851a7 | ||
|
|
aba6378177 | ||
|
|
abda8b0400 | ||
|
|
606112ea44 | ||
|
|
aca997796d | ||
|
|
df7d2d3d80 | ||
|
|
42fb3e1327 | ||
|
|
031e54b81e | ||
|
|
f990fe0ba3 | ||
|
|
28dff24e44 | ||
|
|
932e12ae87 | ||
|
|
7e60f49d4a | ||
|
|
cbe77a29e2 | ||
|
|
9ea05affbf | ||
|
|
56825a3cd9 | ||
|
|
0e04ce4371 | ||
|
|
fe36e13dc7 | ||
|
|
fdf9195e8c | ||
|
|
f72104ce60 | ||
|
|
73ddbd4048 | ||
|
|
2f474ff911 | ||
|
|
3edd8dd65b | ||
|
|
cbf4310cab | ||
|
|
f2d77ad487 | ||
|
|
f491efc498 | ||
|
|
bd719d99c0 | ||
|
|
9f037c1baf | ||
|
|
9b6a13037c | ||
|
|
3b6949fe78 | ||
|
|
023309c1cf | ||
|
|
7bfdae3c45 | ||
|
|
6ea9447a92 | ||
|
|
cef3b9effb | ||
|
|
e30d669d19 | ||
|
|
38872edae2 | ||
|
|
cff38d74ec | ||
|
|
f1f01ea823 | ||
|
|
66587b4e52 | ||
|
|
206a4b5b19 | ||
|
|
90f479bafc | ||
|
|
1df9c11501 | ||
|
|
79561cd8ef | ||
|
|
435344ee1d | ||
|
|
15d079f966 | ||
|
|
90aef7ef0c | ||
|
|
390feec8ec | ||
|
|
911694c9fe | ||
|
|
73199002c3 | ||
|
|
0dc21f1b69 | ||
|
|
f593f7f660 | ||
|
|
046a6ac6cb | ||
|
|
7733907f9b | ||
|
|
b43953fc29 | ||
|
|
5f708fe816 | ||
|
|
69056db01a | ||
|
|
d48bab9ddd | ||
|
|
d10a322aec | ||
|
|
f694fead2e | ||
|
|
d4b04f3f2e | ||
|
|
6d633b5647 | ||
|
|
b7870e0453 | ||
|
|
4eb90fc442 | ||
|
|
35093fb7a7 | ||
|
|
9a3871014e | ||
|
|
b4e3d17178 | ||
|
|
4fa4cadb69 | ||
|
|
d0ec6885d6 | ||
|
|
634bdf7b90 | ||
|
|
117efad40d | ||
|
|
35aaafc09f | ||
|
|
421a3e9e87 | ||
|
|
fbefeae06f | ||
|
|
ef04ac2dac | ||
|
|
52d54cfc00 | ||
|
|
33936c937c | ||
|
|
3b2632fb26 | ||
|
|
412413c2f5 | ||
|
|
0970725598 | ||
|
|
1012991176 | ||
|
|
120725c311 | ||
|
|
ea88b81f3f | ||
|
|
c26ad31c8d | ||
|
|
4b0f3b4dd1 | ||
|
|
5a3bc2acb6 | ||
|
|
4080c2ddfb | ||
|
|
10a2c41d37 | ||
|
|
a196b19b0c | ||
|
|
50519e9099 | ||
|
|
44c487eeb1 | ||
|
|
1a7327c244 | ||
|
|
f5839b560e | ||
|
|
3e0231ae31 | ||
|
|
003de57c91 | ||
|
|
ddb64eaf2e | ||
|
|
8248bcd67e | ||
|
|
39a3918bb8 | ||
|
|
47d9f2f434 | ||
|
|
5bdf4d1d30 | ||
|
|
3e5e6e175c | ||
|
|
42e58b4996 | ||
|
|
a071cd2287 | ||
|
|
66748dbfcd | ||
|
|
d27c9be330 | ||
|
|
ea8f6c8221 | ||
|
|
c6f84dfa94 | ||
|
|
382c2bc6cd | ||
|
|
598f68a7e9 | ||
|
|
967d52f874 | ||
|
|
d1dcfc9ed3 | ||
|
|
ebd7298d0d | ||
|
|
992c5f498e | ||
|
|
570b371290 | ||
|
|
0b6a23e2fb | ||
|
|
da501a34d8 | ||
|
|
34fd2c5ca4 | ||
|
|
afe4afe095 | ||
|
|
9121720e21 | ||
|
|
b527b1ad6b | ||
|
|
bdcbc15cf5 | ||
|
|
397f165d37 | ||
|
|
f29a1d8567 | ||
|
|
47a9fa3505 | ||
|
|
7df2a43d22 | ||
|
|
826f4df8f7 | ||
|
|
7cee63907b | ||
|
|
0e50049ab1 | ||
|
|
975f4ed864 | ||
|
|
5643619a7c | ||
|
|
3e35ea56df | ||
|
|
1ba251f053 | ||
|
|
25d1b699c9 | ||
|
|
19143c134a | ||
|
|
27a8e098d6 | ||
|
|
cb12c9fe1c | ||
|
|
fc2603ce4d | ||
|
|
d9c5d5657e | ||
|
|
b6b5c6041b | ||
|
|
c1345560bb | ||
|
|
8448395003 | ||
|
|
5058f02538 | ||
|
|
31b766a7d6 | ||
|
|
650acf4ea9 | ||
|
|
1322a21445 | ||
|
|
fb26af0566 | ||
|
|
af0559ac35 | ||
|
|
72f68dd541 | ||
|
|
ae09aa3c82 | ||
|
|
b677cef407 | ||
|
|
9ae9879c56 | ||
|
|
2f8c719f03 | ||
|
|
712059cedb | ||
|
|
4bbc651732 | ||
|
|
24e525926b | ||
|
|
119140fe93 | ||
|
|
1b45c3d174 | ||
|
|
9675f1d4e4 | ||
|
|
e7e13552d9 | ||
|
|
91ad8f038e | ||
|
|
c5e70ed1aa | ||
|
|
cdd46c490d | ||
|
|
1d69a15372 | ||
|
|
5237beb197 | ||
|
|
ffdf7a3a6e | ||
|
|
c835c87afc | ||
|
|
58e2ea41af | ||
|
|
addbe7f9ea | ||
|
|
618722bc16 | ||
|
|
fd0c96e6f9 | ||
|
|
5a17a9e37b | ||
|
|
44ed13473a | ||
|
|
d8b00188a0 | ||
|
|
0b61ca0432 | ||
|
|
b9a9151555 | ||
|
|
17db7be134 | ||
|
|
892431d5b9 | ||
|
|
3d36c293e5 | ||
|
|
3ff50f0d11 | ||
|
|
6144325daf | ||
|
|
bf3b83870c | ||
|
|
62b7eea828 | ||
|
|
4e07811e2f | ||
|
|
f819e021b3 | ||
|
|
3224eac821 | ||
|
|
a1fce125da | ||
|
|
aa0a6b58d3 | ||
|
|
0c9a44e279 | ||
|
|
4dd92825a8 | ||
|
|
30a319fe5e | ||
|
|
faf35a6879 | ||
|
|
4520b54a5b | ||
|
|
fa53aea075 | ||
|
|
36b5532b04 | ||
|
|
01ab43941e | ||
|
|
249569be9f | ||
|
|
db0b275772 | ||
|
|
e6bb86c934 | ||
|
|
c53f707089 | ||
|
|
ef36176130 | ||
|
|
edd11ea1cd | ||
|
|
4ad7d635bc | ||
|
|
18604b46b1 | ||
|
|
4609c543c9 | ||
|
|
779559dbdc | ||
|
|
27c6c82b82 | ||
|
|
fa99905bf6 | ||
|
|
608e4edb4e | ||
|
|
43c646b537 | ||
|
|
ad798d7bbe | ||
|
|
238458066a | ||
|
|
90a8b10401 | ||
|
|
46195f72ee | ||
|
|
05829a225a | ||
|
|
f0858ce4d2 | ||
|
|
cc3477415d |
@@ -7,7 +7,7 @@ jobs:
|
||||
requires:
|
||||
- check
|
||||
docker:
|
||||
- image: yunion/centos-build:go-1.21.10-0
|
||||
- image: yunion/alpine-build:3.22.0-go-1.24.6-1
|
||||
environment:
|
||||
ONECLOUD_CI_BUILD: "1"
|
||||
|
||||
|
||||
4
.github/workflows/ci-pr-build-test.yml
vendored
4
.github/workflows/ci-pr-build-test.yml
vendored
@@ -13,13 +13,13 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Install check tools
|
||||
shell: bash
|
||||
run: |
|
||||
set -o xtrace
|
||||
git clone --branch yun --depth 4 https://github.com/yousong/tools && cd tools
|
||||
git clone --branch master --depth 4 https://github.com/yunionio/tools && cd tools
|
||||
go build ./cmd/goimports && sudo cp goimports /usr/bin/ && cd .. && rm -rf tools
|
||||
git clone --depth 4 https://github.com/yousong/y18n && cd y18n
|
||||
go build . && sudo cp y18n /usr/bin && cd .. && rm -rf y18n
|
||||
|
||||
2
.github/workflows/docker_apigateway.yml
vendored
2
.github/workflows/docker_apigateway.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_climc.yml
vendored
2
.github/workflows/docker_climc.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_cloudmon.yml
vendored
2
.github/workflows/docker_cloudmon.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_esxi_agent.yml
vendored
2
.github/workflows/docker_esxi_agent.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_glance.yml
vendored
2
.github/workflows/docker_glance.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_host.yml
vendored
2
.github/workflows/docker_host.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_keystone.yml
vendored
2
.github/workflows/docker_keystone.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_logger.yml
vendored
2
.github/workflows/docker_logger.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_notify.yml
vendored
2
.github/workflows/docker_notify.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_region.yml
vendored
2
.github/workflows/docker_region.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_scheduler.yml
vendored
2
.github/workflows/docker_scheduler.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
2
.github/workflows/docker_webconsole.yml
vendored
2
.github/workflows/docker_webconsole.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
35
Makefile
35
Makefile
@@ -84,9 +84,6 @@ vet:
|
||||
# cmd/esxi-agent: prepare_dir
|
||||
# CGO_ENABLED=0 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
|
||||
|
||||
cmd/host: prepare_dir
|
||||
CGO_ENABLED=1 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
|
||||
|
||||
cmd/%: prepare_dir
|
||||
CGO_ENABLED=0 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
|
||||
|
||||
@@ -99,21 +96,6 @@ deb/%: cmd/%
|
||||
pkg/%: prepare_dir
|
||||
$(GO_INSTALL) $(REPO_PREFIX)/$@
|
||||
|
||||
rpm/fetcherfs: cmd/fetcherfs
|
||||
docker run --rm \
|
||||
--name docker-centos-build-fetcherfs \
|
||||
-v $(CURDIR):/data \
|
||||
registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 \
|
||||
/bin/bash -c "VERSION=3.6 /data/build/build.sh fetcherfs /opt/yunion/fetchclient/bin"
|
||||
|
||||
deb/fetcherfs: rpm/fetcherfs
|
||||
#VERSION=3.6 $(DEB_BUILD_SCRIPT) fetcherfs /opt/yunion/fetchclient/bin
|
||||
docker run --rm \
|
||||
--name docker-debian-build-fetcherfs \
|
||||
-v $(CURDIR):/data \
|
||||
registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0 \
|
||||
/data/build/convert_rpm2deb.sh
|
||||
|
||||
build:
|
||||
$(MAKE) $(cmdTargets)
|
||||
|
||||
@@ -184,7 +166,8 @@ goimports-check:
|
||||
echo "$@: working tree modified (possibly by goimports)" >&2 ; \
|
||||
echo "$@: " >&2 ; \
|
||||
echo "$@: import spec should be grouped in order: std, 3rd-party, yunion.io/x, yunion.io/x/onecloud" >&2 ; \
|
||||
echo "$@: see \"yun\" branch at https://github.com/yousong/tools" >&2 ; \
|
||||
echo "$@: goimports should be installed by: \
|
||||
echo "$@: git clone --depth 4 https://github.com/yunionio/tools && cd tools && go install ./cmd/goimports ; \
|
||||
false ; \
|
||||
fi
|
||||
.PHONY: goimports-check
|
||||
@@ -253,7 +236,7 @@ hostdeployer-grpc-gen:
|
||||
|
||||
check: fmt-check
|
||||
check: gendocgo-check
|
||||
check: goimports-check
|
||||
#check: goimports-check
|
||||
#check: vet-check
|
||||
#check: y18n-check
|
||||
.PHONY: check
|
||||
@@ -277,22 +260,18 @@ dep:
|
||||
@echo "$$depDeprecated"
|
||||
@$(MAKE) mod
|
||||
|
||||
RELEASE_BRANCH:=master
|
||||
RELEASE_BRANCH:=release/4.0.2
|
||||
GOPROXY ?= direct
|
||||
|
||||
mod:
|
||||
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go get -d yunion.io/x/cloudmux@$(RELEASE_BRANCH)
|
||||
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go get -d $(patsubst %,%@master,$(shell GO111MODULE=on go mod edit -print | sed -n -e 's|.*\(yunion.io/x/[a-z].*\) v.*|\1|p' | grep -v '/cloudmux$$'))
|
||||
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go get yunion.io/x/cloudmux@$(RELEASE_BRANCH)
|
||||
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go get $(patsubst %,%@master,$(shell GO111MODULE=on go mod edit -print | sed -n -e 's|.*\(yunion.io/x/[a-z].*\) v.*|\1|p' | grep -v '/cloudmux$$'))
|
||||
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go mod tidy
|
||||
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go mod vendor -v
|
||||
|
||||
define helpText
|
||||
Build with docker
|
||||
|
||||
make docker-centos-build F='-j4'
|
||||
make docker-centos-build F='-j4 cmd/region cmd/climc'
|
||||
make docker-centos-build-stop
|
||||
|
||||
make docker-alpine-build F='-j4'
|
||||
make docker-alpine-build F='-j4 cmd/host cmd/host-deployer'
|
||||
make docker-alpine-build-stop
|
||||
@@ -344,7 +323,7 @@ image:
|
||||
.PHONY: image
|
||||
|
||||
image-telegraf-raid-plugin:
|
||||
VERSION=release-1.6.5 ARCH=all make image telegraf-raid-plugin
|
||||
VERSION=v4.0-20260115.0 GOOS=linux ARCH=all make image telegraf-raid-plugin
|
||||
|
||||
%:
|
||||
@:
|
||||
|
||||
@@ -8,8 +8,7 @@ endif
|
||||
ModBaseName:=$(notdir $(ModName))
|
||||
|
||||
DockerImageRegistry?=registry.cn-beijing.aliyuncs.com
|
||||
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.19.0-go-1.21.10-0
|
||||
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:go-1.21.10-0
|
||||
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.2-go-1.24.9-0
|
||||
|
||||
EnvIf=$(if $($(1)),$(1)=$($(1)))
|
||||
|
||||
@@ -29,27 +28,6 @@ endef
|
||||
|
||||
tmpName=$(ModBaseName)-$(shell date +"%Y%m%d.%H%M%S%3N")
|
||||
|
||||
docker-centos-build: export dockerCentOSBuildCmd:=$(call dockerCentOSBuildCmd,$(F))
|
||||
docker-centos-build:
|
||||
docker rm --force docker-centos-build-$(tmpName) &>/dev/null || true
|
||||
docker run \
|
||||
--rm \
|
||||
--name docker-centos-build-$(tmpName) \
|
||||
-v $(CURDIR):/root/go/src/yunion.io/x/$(ModBaseName) \
|
||||
-v $(CURDIR)/_output/centos-build:/root/go/src/yunion.io/x/$(ModBaseName)/_output \
|
||||
-v $(CURDIR)/_output/centos-build/_cache:/root/.cache \
|
||||
$(DockerImageCentOSBuild) \
|
||||
/bin/bash -c "$$dockerCentOSBuildCmd"
|
||||
ls -lh _output/centos-build/bin
|
||||
|
||||
# NOTE we need a way to stop and remove the container started by docker-build.
|
||||
# No --tty, --stop-signal won't work
|
||||
docker-centos-build-stop:
|
||||
docker stop --time 0 docker-centos-build-$(tmpName) || true
|
||||
|
||||
.PHONY: docker-centos-build
|
||||
.PHONY: docker-centos-build-stop
|
||||
|
||||
|
||||
define dockerAlpineBuildCmd
|
||||
set -o xtrace
|
||||
|
||||
@@ -36,6 +36,12 @@ fi
|
||||
. $ROOT/vars
|
||||
|
||||
BUILDROOT=$(mktemp -d 2>/dev/null || mktemp -d -t 'yunion')
|
||||
function cleanup {
|
||||
rm -rf "$BUILDROOT"
|
||||
echo "Deleted temp working directory $BUILDROOT"
|
||||
}
|
||||
# register the cleanup function to be called on the EXIT signal
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "Build root ${BUILDROOT}"
|
||||
|
||||
@@ -104,41 +110,87 @@ if [ -d $ROOT/root ]; then
|
||||
rsync -a $ROOT/root/ \$RPM_BUILD_ROOT
|
||||
fi
|
||||
|
||||
%pre
|
||||
%pre" > $SPEC_FILE
|
||||
|
||||
if [ -f $ROOT/preinst ]; then
|
||||
cat $ROOT/preinst >> $SPEC_FILE
|
||||
else
|
||||
echo "
|
||||
%if %{use_systemd}
|
||||
getent group %{owner} >/dev/null || /usr/sbin/groupadd -r %{owner}
|
||||
getent passwd %{owner} >/dev/null || /usr/sbin/useradd -r -s /sbin/nologin -d %{homedir} -M -g %{owner} %{owner}
|
||||
%endif
|
||||
" >> $SPEC_FILE
|
||||
fi
|
||||
|
||||
%post
|
||||
echo "
|
||||
%post" >> $SPEC_FILE
|
||||
|
||||
if [ -f $ROOT/postinst ]; then
|
||||
cat $ROOT/postinst >> $SPEC_FILE
|
||||
else
|
||||
echo "
|
||||
%if %{use_systemd}
|
||||
mkdir -p /var/run/%{owner}
|
||||
chown -R %{owner}:%{owner} /var/run/%{owner}
|
||||
/usr/bin/systemctl preset %{pkgname}.service >/dev/null 2>&1 ||:
|
||||
%endif
|
||||
" >> $SPEC_FILE
|
||||
fi
|
||||
|
||||
%preun
|
||||
echo "
|
||||
%preun" >> $SPEC_FILE
|
||||
|
||||
if [ -f $ROOT/prerm ]; then
|
||||
cat $ROOT/prerm >> $SPEC_FILE
|
||||
else
|
||||
echo "
|
||||
%if %{use_systemd}
|
||||
/usr/bin/systemctl --no-reload disable %{pkgname}.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl stop %{pkgname}.service >/dev/null 2>&1 ||:
|
||||
%endif
|
||||
" >> $SPEC_FILE
|
||||
fi
|
||||
|
||||
%postun
|
||||
echo "
|
||||
%postun" >> $SPEC_FILE
|
||||
|
||||
if [ -f $ROOT/postrm ]; then
|
||||
cat $ROOT/postrm >> $SPEC_FILE
|
||||
else
|
||||
echo "
|
||||
%if %{use_systemd}
|
||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 ||:
|
||||
%endif
|
||||
" >> $SPEC_FILE
|
||||
fi
|
||||
|
||||
echo -n "
|
||||
%files
|
||||
%doc
|
||||
$BIN_PATH/$PKG
|
||||
$(for b in $EXTRA_BINS; do echo $BIN_PATH/$b; done)
|
||||
" > $SPEC_FILE
|
||||
" >> $SPEC_FILE
|
||||
|
||||
for b in $EXTRA_BINS; do
|
||||
echo $BIN_PATH/$b >> $SPEC_FILE
|
||||
done
|
||||
|
||||
if [ -d $ROOT/root/ ]; then
|
||||
find $ROOT/root/ -type f | sed -e "s:$ROOT/root::g" >> $SPEC_FILE
|
||||
fi
|
||||
|
||||
rpmbuild --define "_topdir $BUILDROOT" -bb $SPEC_FILE
|
||||
TARGET=
|
||||
case "$GOARCH" in
|
||||
"arm64" | "aarch64" | "arm")
|
||||
TARGET="--target aarch64-redhat-linux"
|
||||
;;
|
||||
"amd64" | "x86" | "i686" | "i386" | "x86_64")
|
||||
TARGET="--target x86_64-redhat-linux"
|
||||
;;
|
||||
"riscv64")
|
||||
TARGET="--target riscv64-linux"
|
||||
;;
|
||||
esac
|
||||
|
||||
rpmbuild --define "_topdir $BUILDROOT" -bb $SPEC_FILE $TARGET
|
||||
|
||||
find $RPM_DIR -type f | while read f; do
|
||||
d="$(dirname "$f")"
|
||||
@@ -146,5 +198,3 @@ find $RPM_DIR -type f | while read f; do
|
||||
mkdir -p "$d"
|
||||
cp $f $d
|
||||
done
|
||||
|
||||
rm -fr $BUILDROOT
|
||||
|
||||
@@ -35,14 +35,48 @@ fi
|
||||
|
||||
. $ROOT/vars
|
||||
|
||||
case $(uname -m) in
|
||||
x86_64)
|
||||
CURRENT_ARCH=amd64
|
||||
;;
|
||||
aarch64)
|
||||
CURRENT_ARCH=arm64
|
||||
;;
|
||||
riscv64)
|
||||
CURRENT_ARCH=riscv64
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -n "$GOARCH" ]]; then
|
||||
case "$GOARCH" in
|
||||
"arm64" | "arm" | "aarch64")
|
||||
CURRENT_ARCH="arm64"
|
||||
;;
|
||||
"x86" | "x86_64" | "i686" | "i386" | "amd64")
|
||||
CURRENT_ARCH="amd64"
|
||||
;;
|
||||
"riscv64")
|
||||
CURRENT_ARCH="riscv64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
TAG=$(git describe --abbrev=0 --tags || echo 000000)
|
||||
VERSION=${TAG/\//-}
|
||||
VERSION=${VERSION/v/}
|
||||
VERSION=${VERSION/master-/}
|
||||
fi
|
||||
RELEASE=`date +"%y%m%d%H"`
|
||||
FULL_VERSION=$VERSION-$RELEASE
|
||||
BUILDROOT=$OUTPUT_DIR/yunion-$1-$FULL_VERSION
|
||||
BUILDROOT=$OUTPUT_DIR/yunion-${PKG}-${FULL_VERSION}_${CURRENT_ARCH}
|
||||
function cleanup {
|
||||
rm -rf "$BUILDROOT"
|
||||
echo "Deleted temp working directory $BUILDROOT"
|
||||
}
|
||||
# register the cleanup function to be called on the EXIT signal
|
||||
trap cleanup EXIT
|
||||
|
||||
rm -rf $BUILDROOT
|
||||
mkdir -p $BUILDROOT/DEBIAN
|
||||
mkdir -p $BUILDROOT/$BIN_PATH
|
||||
@@ -52,27 +86,90 @@ if [ -d $ROOT/root ]; then
|
||||
cp -rf $ROOT/root/* $BUILDROOT/
|
||||
fi
|
||||
|
||||
|
||||
echo "Build root ${BUILDROOT}"
|
||||
|
||||
case $(uname -m) in
|
||||
x86_64)
|
||||
CURRENT_ARCH=amd64
|
||||
;;
|
||||
aarch64)
|
||||
CURRENT_ARCH=arm64
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Package: yunion-$1
|
||||
echo "Package: yunion-$PKG
|
||||
Version: $FULL_VERSION
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: $CURRENT_ARCH
|
||||
Maintainer: wanyaoqi@yunionyun.com
|
||||
Description: Yunion $1
|
||||
" > $BUILDROOT/DEBIAN/control
|
||||
Description: $DESCRIPTION" > $BUILDROOT/DEBIAN/control
|
||||
if [ ${#REQUIRES[@]} -gt 0 ]; then
|
||||
DEPS=$(IFS=, ; echo "${REQUIRES[*]}")
|
||||
echo "Depends: $DEPS" >> $BUILDROOT/DEBIAN/control
|
||||
fi
|
||||
chmod 0755 $BUILDROOT/DEBIAN/control
|
||||
|
||||
cat $BUILDROOT/DEBIAN/control
|
||||
|
||||
dpkg-deb --build $BUILDROOT
|
||||
echo "#!/bin/bash
|
||||
" > $BUILDROOT/DEBIAN/preinst
|
||||
if [ -f $ROOT/preinst ]; then
|
||||
cat $ROOT/preinst >> $BUILDROOT/DEBIAN/preinst
|
||||
else
|
||||
if [ "$SERVICE" == "yes" ] && [ -n "$OWNER" ]; then
|
||||
echo "
|
||||
getent group ${OWNER} >/dev/null || /usr/sbin/groupadd -r ${OWNER}
|
||||
getent passwd ${OWNER} >/dev/null || /usr/sbin/useradd -r -s /sbin/nologin -d /home/${OWNER} -M -g ${OWNER} ${OWNER}
|
||||
" >> $BUILDROOT/DEBIAN/preinst
|
||||
fi
|
||||
fi
|
||||
chmod 0755 $BUILDROOT/DEBIAN/preinst
|
||||
|
||||
echo "#!/bin/bash
|
||||
" > $BUILDROOT/DEBIAN/postinst
|
||||
if [ -f $ROOT/postinst ]; then
|
||||
cat $ROOT/postinst >> $BUILDROOT/DEBIAN/postinst
|
||||
else
|
||||
if [ "$SERVICE" == "yes" ]; then
|
||||
echo "
|
||||
/usr/bin/systemctl preset yunion-${PKG}.service >/dev/null 2>&1 ||:
|
||||
" >> $BUILDROOT/DEBIAN/postinst
|
||||
fi
|
||||
fi
|
||||
chmod 0755 $BUILDROOT/DEBIAN/postinst
|
||||
|
||||
echo "#!/bin/bash
|
||||
" > $BUILDROOT/DEBIAN/prerm
|
||||
if [ -f $ROOT/prerm ]; then
|
||||
cat $ROOT/prerm >> $BUILDROOT/DEBIAN/prerm
|
||||
else
|
||||
if [ "$SERVICE" == "yes" ]; then
|
||||
echo "
|
||||
/usr/bin/systemctl --no-reload disable yunion-${PKG}.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl stop yunion-${PKG}.service >/dev/null 2>&1 ||:
|
||||
" >> $BUILDROOT/DEBIAN/prerm
|
||||
fi
|
||||
fi
|
||||
chmod 0755 $BUILDROOT/DEBIAN/prerm
|
||||
|
||||
echo "#!/bin/bash
|
||||
" > $BUILDROOT/DEBIAN/postrm
|
||||
if [ -f $ROOT/postrm ]; then
|
||||
cat $ROOT/postrm >> $BUILDROOT/DEBIAN/postrm
|
||||
else
|
||||
if [ "$SERVICE" == "yes" ]; then
|
||||
echo "
|
||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 ||:
|
||||
" >> $BUILDROOT/DEBIAN/postrm
|
||||
fi
|
||||
fi
|
||||
chmod 0755 $BUILDROOT/DEBIAN/postrm
|
||||
|
||||
dpkg-deb --build $BUILDROOT
|
||||
|
||||
case "$CURRENT_ARCH" in
|
||||
"amd64")
|
||||
DSTARCH="x86_64"
|
||||
;;
|
||||
"arm64")
|
||||
DSTARCH="aarch64"
|
||||
;;
|
||||
"riscv64")
|
||||
DSTARCH="riscv64"
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p ${OUTPUT_DIR}/${DSTARCH}
|
||||
mv ${BUILDROOT}.deb ${OUTPUT_DIR}/${DSTARCH}/
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.1.3
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:3.22.2-0
|
||||
|
||||
# https://github.com/yunionio/telegraf/blob/yn-release-1.36/Makefile.yn#L28
|
||||
# install playbook and telegraf install pkg
|
||||
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.4 /opt/yunion/playbook /opt/yunion/playbook
|
||||
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.4 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
|
||||
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/playbook /opt/yunion/playbook
|
||||
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
|
||||
|
||||
ADD ./_output/alpine-build/bin/ansibleserver /opt/yunion/bin/ansibleserver
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.15.4-0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"
|
||||
LABEL maintainer="Yousong Zhou <zhouyousong@yunionyun.com>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
@@ -13,6 +13,7 @@ RUN set -x \
|
||||
&& apk add openssh-client \
|
||||
&& apk add sshpass \
|
||||
&& apk add py3-pip \
|
||||
&& apk add py3-paramiko \
|
||||
&& apk add tzdata git ca-certificates
|
||||
|
||||
RUN apk add --no-cache openssh openssl curl rsync pv mariadb-client
|
||||
@@ -21,8 +22,10 @@ RUN apk add --no-cache --virtual .build-dependencies \
|
||||
|
||||
# ansible should be installed
|
||||
# after setuptools and wheel
|
||||
RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
RUN pip3 install -U pip setuptools wheel \
|
||||
&& pip3 install paramiko mysqlclient pywinrm \
|
||||
&& pip3 install mysqlclient pywinrm \
|
||||
&& pip3 install 'ansible<=9.0.0' \
|
||||
&& apk del --no-network .build-dependencies \
|
||||
&& rm -rf /root/.cache /root/.cargo /var/cache/apk/*
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/apigateway /opt/yunion/bin/apigateway
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/apimap /opt/yunion/bin/apimap
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.9-20231219.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.9-20251215.0
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
ADD ./_output/alpine-build/bin/baremetal-agent /opt/yunion/bin/baremetal-agent
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#FROM --platform=linux/amd64 registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
|
||||
#RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
|
||||
#RUN yum install -y http://192.168.23.50:8083/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v3.10.8-20231215.0 as yunionos
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v4.0.0-20251201.0 as yunionos
|
||||
|
||||
FROM centos:8 as grub-stage
|
||||
|
||||
@@ -28,9 +27,9 @@ RUN cp /root/grub_arm64.efi /tftp
|
||||
RUN cp -rf /usr/lib/grub/arm64-efi /tftp/grub
|
||||
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3-3.13.5
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
|
||||
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
@@ -70,6 +69,8 @@ COPY --from=yunionos /yunionos/x86_64/kernel /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/initramfs /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/aarch64/kernel /opt/cloud/yunion/baremetal/kernel_aarch64
|
||||
COPY --from=yunionos /yunionos/aarch64/initramfs /opt/cloud/yunion/baremetal/initramfs_aarch64
|
||||
COPY --from=yunionos /yunionos/riscv64/kernel /opt/cloud/yunion/baremetal/kernel_riscv64
|
||||
COPY --from=yunionos /yunionos/riscv64/initramfs /opt/cloud/yunion/baremetal/initramfs_riscv64
|
||||
|
||||
# TODO: syslinux firmwares should removed in future
|
||||
COPY --from=yunionos /yunionos/x86_64/isolinux.bin /opt/cloud/yunion/baremetal
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:20230731.5
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:3.22.2-2
|
||||
|
||||
ADD ./build/climc/root/opt /opt
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETARCH
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV TZ="Asia/Shanghai"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
|
||||
24
build/docker/Dockerfile.climc-base-3-22-2
Normal file
24
build/docker/Dockerfile.climc-base-3-22-2
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETARCH
|
||||
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ="Asia/Shanghai"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
|
||||
|
||||
RUN apk add --no-cache bash bash-completion tzdata ca-certificates vim ipmitool ceph-common dropbear shadow && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
RUN usermod --shell /bin/bash root
|
||||
|
||||
RUN curl -L https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl
|
||||
|
||||
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/cloudevent /opt/yunion/bin/cloudevent
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
COPY ./build/cloudid/root/opt/ /opt/
|
||||
ADD ./_output/alpine-build/bin/cloudid /opt/yunion/bin/cloudid
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
RUN mkdir -p /etc/yunion/data/
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/cloudnet /opt/yunion/bin/cloudnet
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/cloudproxy /opt/yunion/bin/cloudproxy
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0
|
||||
|
||||
FROM debian:10
|
||||
FROM debian:trixie
|
||||
|
||||
RUN apt update && apt install -y alien
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/devtool /opt/yunion/bin/devtool
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/dhcprelay /opt/yunion/bin/dhcprelay
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/esxi-agent /opt/yunion/bin/esxi-agent
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.0 AS file-repo
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
|
||||
|
||||
LABEL maintainer="Rain Zheng <zhengyu@yunion.com>"
|
||||
|
||||
# openssh-client, for ansible ssh connection
|
||||
# git, ca-certificates, for fetching ansible roles
|
||||
RUN set -x \
|
||||
&& apk update \
|
||||
&& apk add git \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
# install default playbook and install pkg
|
||||
RUN mkdir -p /opt/yunion/ansible-install-pkg
|
||||
# file repo base image from https://github.com/yunionio/telegraf/blob/612b918a28a93cf8e354b8d59544753b021b824a/Makefile.yn#L24
|
||||
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.rpm /opt/yunion/ansible-install-pkg
|
||||
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.deb /opt/yunion/ansible-install-pkg
|
||||
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.zip /opt/yunion/ansible-install-pkg
|
||||
|
||||
RUN mkdir -p /opt/yunion/playbook
|
||||
RUN mkdir /opt/yunion/playbook/monitor-agent
|
||||
RUN git clone https://github.com/yunionio/monitor-agent.git /opt/yunion/playbook/monitor-agent --recurse-submodules
|
||||
@@ -1,5 +1,5 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/glance-base:v0.0.1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/glance-base:3.22.2-0
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/glance /opt/yunion/bin/glance
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:20210815.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
RUN apk add --no-cache s3fs-fuse --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN apk add --no-cache s3fs-fuse
|
||||
|
||||
@@ -22,44 +22,25 @@
|
||||
#
|
||||
|
||||
# The Alpine Linux image that should be used as the basis for the guacd image
|
||||
ARG ALPINE_BASE_IMAGE=latest
|
||||
FROM alpine:${ALPINE_BASE_IMAGE} AS builder
|
||||
ARG ALPINE_BASE_IMAGE=3.22.2
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
# The target architecture of the build. Valid values are "ARM" and "X86". By
|
||||
# default, this is detected automatically.
|
||||
ARG BUILD_ARCHITECTURE
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
# The number of processes that may run simultaneously during the build. By
|
||||
# default, this is detected automatically.
|
||||
ARG BUILD_JOBS
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
build-base \
|
||||
cairo-dev \
|
||||
cmake \
|
||||
cunit-dev \
|
||||
git \
|
||||
grep \
|
||||
libjpeg-turbo-dev \
|
||||
libpng-dev \
|
||||
libtool \
|
||||
libwebp-dev \
|
||||
make \
|
||||
openssl1.1-compat-dev \
|
||||
pango-dev \
|
||||
pulseaudio-dev \
|
||||
util-linux-dev
|
||||
|
||||
# Copy source to container for sake of build
|
||||
# The directory that will house the guacamole-server source during the build
|
||||
ARG BUILD_DIR=/tmp/guacamole-server
|
||||
ARG GUAC_VER=1.5.3
|
||||
RUN git clone --branch=${GUAC_VER} https://github.com/apache/guacamole-server.git /tmp/guacamole-server
|
||||
|
||||
#
|
||||
# Base directory for installed build artifacts.
|
||||
#
|
||||
# NOTE: Due to limitations of the Docker image build process, this value is
|
||||
# duplicated in an ARG in the second stage of the build.
|
||||
#
|
||||
# FreeRDP version (default to version 2)
|
||||
ARG FREERDP_VERSION=2
|
||||
|
||||
# The final install location for guacamole-server and all dependencies. NOTE:
|
||||
# This value is hard-coded in the entrypoint. Any change to this value must be
|
||||
# propagated there.
|
||||
ARG PREFIX_DIR=/opt/guacamole
|
||||
|
||||
#
|
||||
@@ -67,11 +48,12 @@ ARG PREFIX_DIR=/opt/guacamole
|
||||
# library (these can be overridden at build time if a specific version is
|
||||
# needed)
|
||||
#
|
||||
ARG WITH_FREERDP='2(\.\d+)+'
|
||||
ARG WITH_FREERDP="${FREERDP_VERSION}(\.\d+)+"
|
||||
ARG WITH_LIBSSH2='libssh2-\d+(\.\d+)+'
|
||||
ARG WITH_LIBTELNET='\d+(\.\d+)+'
|
||||
ARG WITH_LIBVNCCLIENT='LibVNCServer-\d+(\.\d+)+'
|
||||
ARG WITH_LIBWEBSOCKETS='v\d+(\.\d+)+'
|
||||
ARG WITH_GUACAMOLE_SERVER='\d+(\.\d+)+'
|
||||
|
||||
#
|
||||
# Default build options for each core protocol support library, as well as
|
||||
@@ -79,6 +61,8 @@ ARG WITH_LIBWEBSOCKETS='v\d+(\.\d+)+'
|
||||
# options are needed)
|
||||
#
|
||||
|
||||
ARG FREERDP_ARM_OPTS=""
|
||||
|
||||
ARG FREERDP_OPTS="\
|
||||
-DBUILTIN_CHANNELS=OFF \
|
||||
-DCHANNEL_URBDRC=OFF \
|
||||
@@ -89,22 +73,25 @@ ARG FREERDP_OPTS="\
|
||||
-DWITH_CUPS=OFF \
|
||||
-DWITH_DIRECTFB=OFF \
|
||||
-DWITH_FFMPEG=OFF \
|
||||
-DWITH_FUSE=OFF \
|
||||
-DWITH_GSM=OFF \
|
||||
-DWITH_GSSAPI=OFF \
|
||||
-DWITH_IPP=OFF \
|
||||
-DWITH_JPEG=ON \
|
||||
-DWITH_KRB5=ON \
|
||||
-DWITH_LIBSYSTEMD=OFF \
|
||||
-DWITH_MANPAGES=OFF \
|
||||
-DWITH_OPENH264=OFF \
|
||||
-DWITH_OPENSSL=ON \
|
||||
-DWITH_OSS=OFF \
|
||||
-DWITH_PCSC=OFF \
|
||||
-DWITH_PKCS11=OFF \
|
||||
-DWITH_PULSE=OFF \
|
||||
-DWITH_SERVER=OFF \
|
||||
-DWITH_SERVER_INTERFACE=OFF \
|
||||
-DWITH_SHADOW_MAC=OFF \
|
||||
-DWITH_SHADOW_X11=OFF \
|
||||
-DWITH_SSE2=ON \
|
||||
-DWITH_SWSCALE=OFF \
|
||||
-DWITH_WAYLAND=OFF \
|
||||
-DWITH_X11=OFF \
|
||||
-DWITH_X264=OFF \
|
||||
@@ -116,21 +103,47 @@ ARG FREERDP_OPTS="\
|
||||
-DWITH_XRENDER=OFF \
|
||||
-DWITH_XTEST=OFF \
|
||||
-DWITH_XV=OFF \
|
||||
-DWITH_ZLIB=ON"
|
||||
-DCMAKE_CXX_FLAGS=-Wno-incompatible-pointer-types \
|
||||
-DCMAKE_C_FLAGS=-Wno-incompatible-pointer-types \
|
||||
-DWITH_ZLIB=ON"
|
||||
|
||||
|
||||
ARG FREERDP_X86_OPTS=""
|
||||
|
||||
ARG GUACAMOLE_SERVER_ARM_OPTS=""
|
||||
|
||||
ARG GUACAMOLE_SERVER_OPTS="\
|
||||
--disable-guaclog"
|
||||
--disable-guaclog \
|
||||
CPPFLAGS=-Wno-error=deprecated-declarations"
|
||||
|
||||
ARG GUACAMOLE_SERVER_X86_OPTS=""
|
||||
ARG GUACAMOLE_SERVER_UNKNOWN_OPTS=""
|
||||
|
||||
ARG LIBSSH2_ARM_OPTS=""
|
||||
|
||||
|
||||
ARG LIBSSH2_OPTS="\
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON"
|
||||
|
||||
ARG LIBSSH2_X86_OPTS=""
|
||||
|
||||
ARG LIBTELNET_ARM_OPTS=""
|
||||
|
||||
ARG LIBTELNET_OPTS="\
|
||||
--disable-static \
|
||||
--disable-util"
|
||||
|
||||
ARG LIBTELNET_X86_OPTS=""
|
||||
|
||||
ARG LIBVNCCLIENT_ARM_OPTS=""
|
||||
|
||||
ARG LIBVNCCLIENT_OPTS=""
|
||||
|
||||
ARG LIBVNCCLIENT_X86_OPTS=""
|
||||
|
||||
ARG LIBWEBSOCKETS_ARM_OPTS=""
|
||||
|
||||
ARG LIBWEBSOCKETS_OPTS="\
|
||||
-DDISABLE_WERROR=ON \
|
||||
-DLWS_WITHOUT_SERVER=ON \
|
||||
@@ -141,45 +154,179 @@ ARG LIBWEBSOCKETS_OPTS="\
|
||||
-DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
|
||||
-DLWS_WITH_STATIC=OFF"
|
||||
|
||||
# Build guacamole-server and its core protocol library dependencies
|
||||
RUN echo "$TARGETPLATFORM"
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; \
|
||||
then FREERDP_OPTS="${FREERDP_OPTS} -DWITH_SSE2=ON" && echo "SSE2 active"; \
|
||||
else FREERDP_OPTS="${FREERDP_OPTS} -DWITH_SSE2=OFF" && echo "SSE2 disabled"; \
|
||||
fi && ${BUILD_DIR}/src/guacd-docker/bin/build-all.sh
|
||||
ARG LIBWEBSOCKETS_X86_OPTS=""
|
||||
|
||||
#
|
||||
# Base builder image that will be used by subsequent build stages, including
|
||||
# for building dependencies of guacamole-server.
|
||||
#
|
||||
|
||||
FROM alpine:${ALPINE_BASE_IMAGE} AS builder
|
||||
ARG BUILD_DIR
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add \
|
||||
autoconf \
|
||||
automake \
|
||||
build-base \
|
||||
cairo-dev \
|
||||
cjson-dev \
|
||||
cmake \
|
||||
cunit-dev \
|
||||
git \
|
||||
grep \
|
||||
krb5-dev \
|
||||
libjpeg-turbo-dev \
|
||||
libpng-dev \
|
||||
libtool \
|
||||
libwebp-dev \
|
||||
make \
|
||||
openssl-dev \
|
||||
pango-dev \
|
||||
pulseaudio-dev \
|
||||
sdl2-dev \
|
||||
sdl2_ttf-dev \
|
||||
util-linux-dev
|
||||
|
||||
ARG GUAC_VER=1.6.0
|
||||
RUN git clone --branch=${GUAC_VER} https://github.com/apache/guacamole-server.git ${BUILD_DIR}
|
||||
|
||||
|
||||
#
|
||||
# Build dependency: libssh2
|
||||
#
|
||||
|
||||
FROM builder AS libssh2
|
||||
ARG BUILD_DIR
|
||||
ARG LIBSSH2_ARM_OPTS
|
||||
ARG LIBSSH2_OPTS
|
||||
ARG LIBSSH2_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_LIBSSH2
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBSSH2" \
|
||||
"https://github.com/libssh2/libssh2"
|
||||
|
||||
#
|
||||
# Build dependency: libtelnet
|
||||
#
|
||||
|
||||
FROM builder AS libtelnet
|
||||
ARG BUILD_DIR
|
||||
ARG LIBTELNET_ARM_OPTS
|
||||
ARG LIBTELNET_OPTS
|
||||
ARG LIBTELNET_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_LIBTELNET
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBTELNET" \
|
||||
"https://github.com/seanmiddleditch/libtelnet"
|
||||
|
||||
#
|
||||
# Build dependency: libvncclient
|
||||
#
|
||||
|
||||
FROM builder AS libvncclient
|
||||
ARG BUILD_DIR
|
||||
ARG LIBVNCCLIENT_ARM_OPTS
|
||||
ARG LIBVNCCLIENT_OPTS
|
||||
ARG LIBVNCCLIENT_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_LIBVNCCLIENT
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBVNCCLIENT" \
|
||||
"https://github.com/LibVNC/libvncserver"
|
||||
|
||||
#
|
||||
# Build dependency: libwebsockets
|
||||
#
|
||||
|
||||
FROM builder AS libwebsockets
|
||||
ARG BUILD_DIR
|
||||
ARG LIBWEBSOCKETS_ARM_OPTS
|
||||
ARG LIBWEBSOCKETS_OPTS
|
||||
ARG LIBWEBSOCKETS_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_LIBWEBSOCKETS
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBWEBSOCKETS" \
|
||||
"https://github.com/warmcat/libwebsockets"
|
||||
|
||||
#
|
||||
# Build dependency: FreeRDP
|
||||
#
|
||||
|
||||
FROM builder AS freerdp
|
||||
ARG BUILD_DIR
|
||||
ARG FREERDP_ARM_OPTS
|
||||
ARG FREERDP_OPTS
|
||||
ARG FREERDP_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_FREERDP
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "FREERDP" \
|
||||
"https://github.com/FreeRDP/FreeRDP"
|
||||
|
||||
#
|
||||
# STAGE 7: Collect dependencies built by previous stages and build
|
||||
# guacamole-server.
|
||||
#
|
||||
|
||||
FROM builder AS guacamole-server
|
||||
ARG BUILD_DIR
|
||||
ARG FREERDP_VERSION
|
||||
ARG GUACAMOLE_SERVER_ARM_OPTS
|
||||
ARG GUACAMOLE_SERVER_UNKNOWN_OPTS
|
||||
ARG GUACAMOLE_SERVER_OPTS
|
||||
ARG GUACAMOLE_SERVER_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_GUACAMOLE_SERVER
|
||||
|
||||
# Copy dependencies built in previous stages
|
||||
COPY --from=freerdp ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=libssh2 ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=libtelnet ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=libvncclient ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=libwebsockets ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
|
||||
# Use guacamole-server source from build context
|
||||
|
||||
COPY --from=builder ${BUILD_DIR} ${BUILD_DIR}
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "GUACAMOLE_SERVER" "${BUILD_DIR}"
|
||||
|
||||
# Determine location of the FREERDP library based on the version.
|
||||
ARG FREERDP_LIB_PATH=${PREFIX_DIR}/lib/freerdp${FREERDP_VERSION}
|
||||
|
||||
# Record the packages of all runtime library dependencies
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/list-dependencies.sh \
|
||||
${PREFIX_DIR}/sbin/guacd \
|
||||
${PREFIX_DIR}/lib/libguac-client-*.so \
|
||||
${PREFIX_DIR}/lib/freerdp2/*guac*.so \
|
||||
${FREERDP_LIB_PATH}/*guac*.so \
|
||||
> ${PREFIX_DIR}/DEPENDENCIES
|
||||
|
||||
#
|
||||
# STAGE 8: Final, runtime image.
|
||||
#
|
||||
|
||||
# Use same Alpine version as the base for the runtime image
|
||||
FROM alpine:${ALPINE_BASE_IMAGE}
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
#
|
||||
# Base directory for installed build artifacts. See also the
|
||||
# CMD directive at the end of this build stage.
|
||||
#
|
||||
# NOTE: Due to limitations of the Docker image build process, this value is
|
||||
# duplicated in an ARG in the first stage of the build.
|
||||
#
|
||||
ARG PREFIX_DIR=/opt/guacamole
|
||||
|
||||
# Runtime environment
|
||||
ENV LC_ALL=C.UTF-8
|
||||
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib
|
||||
ENV GUACD_LOG_LEVEL=info
|
||||
FROM alpine:${ALPINE_BASE_IMAGE} AS runtime
|
||||
ARG PREFIX_DIR
|
||||
ARG BUILD_DIR
|
||||
|
||||
# Copy build artifacts into this stage
|
||||
COPY --from=builder ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=guacamole-server ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN cat ${PREFIX_DIR}/DEPENDENCIES
|
||||
|
||||
# Bring runtime environment up to date and install runtime dependencies
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates \
|
||||
font-noto-cjk \
|
||||
ghostscript \
|
||||
netcat-openbsd \
|
||||
shadow \
|
||||
@@ -189,6 +336,10 @@ RUN apk add --no-cache \
|
||||
util-linux-login && \
|
||||
xargs apk add --no-cache < ${PREFIX_DIR}/DEPENDENCIES
|
||||
|
||||
# Runtime environment
|
||||
ENV LC_ALL=C.UTF-8
|
||||
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib
|
||||
|
||||
# Checks the operating status every 5 minutes with a timeout of 5 seconds
|
||||
HEALTHCHECK --interval=5m --timeout=5s CMD nc -z 127.0.0.1 4822 || exit 1
|
||||
|
||||
@@ -197,8 +348,6 @@ ARG UID=1000
|
||||
ARG GID=1000
|
||||
RUN groupadd --gid $GID guacd
|
||||
RUN useradd --system --create-home --shell /sbin/nologin --uid $UID --gid $GID guacd
|
||||
RUN mkdir -p /opt/cloudpods
|
||||
RUN chown -R guacd:guacd /opt/cloudpods
|
||||
|
||||
# Run with user guacd
|
||||
USER guacd
|
||||
@@ -206,9 +355,6 @@ USER guacd
|
||||
# Expose the default listener port
|
||||
EXPOSE 4822
|
||||
|
||||
# Start guacd, listening on port 0.0.0.0:4822
|
||||
#
|
||||
# Note the path here MUST correspond to the value specified in the
|
||||
# PREFIX_DIR build argument.
|
||||
#
|
||||
CMD /opt/guacamole/sbin/guacd -b 0.0.0.0 -L $GUACD_LOG_LEVEL -f
|
||||
COPY --from=guacamole-server ${BUILD_DIR}/src/guacd-docker/bin/entrypoint.sh /opt/guacamole/
|
||||
#COPY
|
||||
ENTRYPOINT [ "/opt/guacamole/entrypoint.sh" ]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.7.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.9.0
|
||||
|
||||
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/host /opt/yunion/bin/host
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.4.9
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.5.3
|
||||
|
||||
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
ADD ./_output/centos-build/bin/host-deployer /opt/yunion/bin/host-deployer
|
||||
ADD ./_output/alpine-build/bin/host-deployer /opt/yunion/bin/host-deployer
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/host-health /opt/yunion/bin/host-health
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/host-image /opt/yunion/bin/host-image
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/keystone /opt/yunion/bin/keystone
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.19
|
||||
FROM alpine:3.22.2
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
@@ -6,4 +6,4 @@ ARG TARGETARCH
|
||||
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
|
||||
RUN apk update && apk add curl android-tools && rm -rf /var/cache/apk/*
|
||||
RUN curl https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl
|
||||
RUN curl -L https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/lbagent-base:v0.0.4
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/lbagent-base:v0.0.5
|
||||
|
||||
MAINTAINER "Yousong Zhou <zhouyousong@yunion.cn>"
|
||||
LABEL maintainer="Yousong Zhou <zhouyousong@yunion.cn>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/lbagent /opt/yunion/bin/lbagent
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-2
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-5
|
||||
|
||||
MAINTAINER "Jian QIU <qiujian@yunion.cn>"
|
||||
LABEL maintainer="Jian QIU <qiujian@yunion.cn>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
ENV GOPATH=/root/go
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
RUN sed -i 's!v3.20/!v3.22/!g' /etc/apk/repositories
|
||||
|
||||
RUN set -x \
|
||||
&& apk update \
|
||||
|
||||
3
build/docker/Dockerfile.llm
Normal file
3
build/docker/Dockerfile.llm
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/llm /opt/yunion/bin/llm
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/logger /opt/yunion/bin/logger
|
||||
|
||||
3
build/docker/Dockerfile.mcp-server
Normal file
3
build/docker/Dockerfile.mcp-server
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/mcp-server /opt/yunion/bin/mcp-server
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
COPY ./build/monitor/root/opt/ /opt/
|
||||
ADD ./_output/alpine-build/bin/monitor /opt/yunion/bin/monitor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
COPY ./build/notify/root/opt/ /opt/
|
||||
ADD ./_output/alpine-build/bin/notify /opt/yunion/bin/notify
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# TODO: use 3.14 will lead 'apk add qemu-img fail on arm64'
|
||||
FROM alpine:3.13.5
|
||||
FROM alpine:3.22.1
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM alpine:3.15.4
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
|
||||
13
build/docker/Dockerfile.onecloud-base-3-22-2
Normal file
13
build/docker/Dockerfile.onecloud-base-3-22-2
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM alpine:3.22.2
|
||||
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache tzdata curl busybox-extras tcpdump strace ca-certificates && \
|
||||
rm -rf /var/cache/apk/*
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
COPY ./build/region/root/opt/ /opt/
|
||||
ADD ./_output/alpine-build/bin/region /opt/yunion/bin/region
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/region-dns /opt/yunion/bin/region-dns
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/s3gateway /opt/yunion/bin/s3gateway
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/scheduledtask /opt/yunion/bin/scheduledtask
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/scheduler /opt/yunion/bin/scheduler
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunion-rootfs:v1.1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunion-rootfs:v4.0.0-20251112.0
|
||||
|
||||
ADD ./_output/centos-build/bin/telegraf-raid-plugin /opt/yunion/bin/telegraf-raid-plugin
|
||||
ADD ./_output/alpine-build/bin/telegraf-raid-plugin /opt/yunion/bin/telegraf-raid-plugin
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
# HACK: use v3.14 alpine mirror to upgrade qemu-img
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
|
||||
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache qemu-img && \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.10.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-5
|
||||
|
||||
MAINTAINER "Yousong Zhou <zhouyousong@yunion.cn>"
|
||||
LABEL maintainer="Yousong Zhou <zhouyousong@yunion.cn>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/vpcagent /opt/yunion/bin/vpcagent
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20230731.2
|
||||
# FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20240514.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20240909.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:3.22.2-1
|
||||
|
||||
ADD ./_output/alpine-build/bin/webconsole /opt/yunion/bin/webconsole
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/kubectl:1.22.9
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/kubectl:3.22.2-1
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/yunionconf /opt/yunion/bin/yunionconf
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
REGISTRY ?= "registry.cn-beijing.aliyuncs.com/yunionio"
|
||||
DOCKER_BUILD = docker build -t $(REGISTRY)
|
||||
DOCKER_BUILDX = docker buildx build --platform linux/arm64,linux/amd64 --push -t $(REGISTRY)
|
||||
DOCKER_BUILDX = docker buildx build --platform linux/arm64,linux/amd64,linux/riscv64 --push -t $(REGISTRY)
|
||||
|
||||
|
||||
debian10-base:
|
||||
@@ -9,50 +9,67 @@ debian10-base:
|
||||
|
||||
ONECLOUD_BASE_VERSION = v0.3-3.13.5
|
||||
ONECLOUD_BASE_VERSION_3-15-4 = v3.15.4-0
|
||||
ONECLOUD_BASE_VERSION_3-22-2 = 3.22.2-0
|
||||
|
||||
onecloud-base:
|
||||
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION) -f ./Dockerfile.onecloud-base .
|
||||
onecloud-base-3-15-4:
|
||||
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION_3-15-4) -f ./Dockerfile.onecloud-base-3-15-4 .
|
||||
onecloud-base-3-22-2:
|
||||
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION_3-22-2) -f ./Dockerfile.onecloud-base-3-22-2 .
|
||||
|
||||
ANSIBLESERVER_BASE = v1.1.3
|
||||
ANSIBLESERVER_BASE = 3.22.2-0
|
||||
|
||||
ansibleserver-base:
|
||||
$(DOCKER_BUILDX)/ansibleserver-base:$(ANSIBLESERVER_BASE) -f ./Dockerfile.ansibleserver-base .
|
||||
|
||||
CLIMC_BASE_VERSION = 20230731.5
|
||||
CLIMC_BASE_VERSION_3-22-2 = 3.22.2-2
|
||||
|
||||
climc-base:
|
||||
docker buildx build --platform linux/arm64,linux/amd64 --push \
|
||||
-t registry.cn-beijing.aliyuncs.com/yunionio/climc-base:$(CLIMC_BASE_VERSION) -f ./Dockerfile.climc-base .
|
||||
$(DOCKER_BUILDX)/climc-base:$(CLIMC_BASE_VERSION) -f ./Dockerfile.climc-base .
|
||||
|
||||
KUBECTL_VERSION = 1.22.9
|
||||
climc-base-3-22-2:
|
||||
$(DOCKER_BUILDX)/climc-base:$(CLIMC_BASE_VERSION_3-22-2) -f ./Dockerfile.climc-base-3-22-2 .
|
||||
|
||||
KUBECTL_VERSION_3-22-2 = 3.22.2-1
|
||||
kubectl:
|
||||
docker buildx build --platform linux/arm64,linux/amd64 --push \
|
||||
-t registry.cn-beijing.aliyuncs.com/yunionio/kubectl:$(KUBECTL_VERSION) -f ./Dockerfile.kubectl .
|
||||
$(DOCKER_BUILDX)/kubectl:$(KUBECTL_VERSION_3-22-2) -f ./Dockerfile.kubectl .
|
||||
|
||||
WEBCONSOLE_BASE_VERSION = 20240909.0
|
||||
WEBCONSOLE_BASE_VERSION_3-22-2 = 3.22.2-1
|
||||
webconsole-base:
|
||||
$(DOCKER_BUILDX)/webconsole-base:$(WEBCONSOLE_BASE_VERSION) -f ./Dockerfile.webconsole-base .
|
||||
$(DOCKER_BUILDX)/webconsole-base:$(WEBCONSOLE_BASE_VERSION_3-22-2) -f ./Dockerfile.webconsole-base .
|
||||
|
||||
BAREMETAL_BASE_VERSION = v0.3.9-20231219.1
|
||||
BAREMETAL_BASE_VERSION = v0.3.9-20251112.1
|
||||
|
||||
FEDORA_RISCV64_VERSION = 42
|
||||
fedora-riscv64-base:
|
||||
wget -q https://dl.fedoraproject.org/pub/alt/risc-v/release/$(FEDORA_RISCV64_VERSION)/Container/riscv64/images/Fedora-Container-Base-Generic-$(FEDORA_RISCV64_VERSION).20250414-8635a3a5bfcd.riscv64.oci.tar.xz && \
|
||||
xz -d Fedora-Container-Base-Generic-$(FEDORA_RISCV64_VERSION).20250414-8635a3a5bfcd.riscv64.oci.tar.xz && \
|
||||
skopeo copy oci-archive:Fedora-Container-Base-Generic-$(FEDORA_RISCV64_VERSION).20250414-8635a3a5bfcd.riscv64.oci.tar docker-daemon:fedora-riscv64:$(FEDORA_RISCV64_VERSION) && \
|
||||
rm -f Fedora-Container-Base-Generic-$(FEDORA_RISCV64_VERSION).20250414-8635a3a5bfcd.riscv64.oci.tar
|
||||
|
||||
baremetal-base-riscv: fedora-riscv64-base
|
||||
$(DOCKER_BUILDX)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base-riscv .
|
||||
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
|
||||
|
||||
baremetal-base:
|
||||
$(DOCKER_BUILDX)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base .
|
||||
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
|
||||
|
||||
TORRENT_VERSION = 20210815.0
|
||||
TORRENT_VERSION_3-22-2 = 3.22.2-0
|
||||
torrent:
|
||||
$(DOCKER_BUILDX)/torrent:$(TORRENT_VERSION) -f ./Dockerfile.torrent .
|
||||
|
||||
GLANCE_BASE_VERSION = v0.0.1
|
||||
GLANCE_BASE_VERSION_3-22-2 = 3.22.2-0
|
||||
glance-base:
|
||||
$(DOCKER_BUILDX)/glance-base:$(GLANCE_BASE_VERSION) -f ./Dockerfile.glance-base .
|
||||
|
||||
FILE_REPO_VERSION = v0.5.4
|
||||
glance-base-3-22-2:
|
||||
$(DOCKER_BUILDX)/glance-base:$(GLANCE_BASE_VERSION_3-22-2) -f ./Dockerfile.glance-base .
|
||||
|
||||
file-repo:
|
||||
$(DOCKER_BUILDX)/file-repo:$(FILE_REPO_VERSION) -f ./Dockerfile.file-repo . --no-cache
|
||||
|
||||
HOST_IMAGE_VERSION ?= v1.0.2
|
||||
HOST_IMAGE_NAME = $(REGISTRY)/host-image:$(HOST_IMAGE_VERSION)
|
||||
@@ -66,16 +83,11 @@ host-image:
|
||||
docker manifest annotate $(HOST_IMAGE_NAME) $(HOST_IMAGE_NAME)-arm64 --arch arm64
|
||||
docker manifest push $(HOST_IMAGE_NAME)
|
||||
|
||||
LBAGENT_BASE_VERSION = v0.0.3
|
||||
LBAGENT_BASE_VERSION = v0.0.5
|
||||
lbagent-base:
|
||||
$(DOCKER_BUILDX)/lbagent-base:$(LBAGENT_BASE_VERSION) -f ./Dockerfile.lbagent-base .
|
||||
|
||||
GUACD_VERSION=1.5.3
|
||||
GUACD_VERSION=1.6.0
|
||||
guacd:
|
||||
docker buildx build --platform linux/arm64 --push \
|
||||
-t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-arm64 -f ./Dockerfile.guacd .
|
||||
docker buildx build --platform linux/amd64 --push \
|
||||
-t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-amd64 -f ./Dockerfile.guacd .
|
||||
docker buildx imagetools create -t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION) \
|
||||
registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-amd64 \
|
||||
registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-arm64
|
||||
$(DOCKER_BUILDX)/guacd:$(GUACD_VERSION) -f ./Dockerfile.guacd .
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.19.0-go-1.21.10-0 as build
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.22.2-go-1.24.9-0 AS build
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
RUN mkdir -p /root/go/src/yunion.io/x/onecloud
|
||||
@@ -7,11 +7,11 @@ COPY . /root/go/src/yunion.io/x/onecloud
|
||||
WORKDIR /root/go/src/yunion.io/x/onecloud
|
||||
RUN make cmd/host
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.7.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.9.0
|
||||
|
||||
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
COPY --from=build /root/go/src/yunion.io/x/onecloud/_output/bin/host /opt/yunion/bin/host
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:1.0-5 as build
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.22.2-go-1.24.9-0 AS build
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
|
||||
@@ -6,13 +6,11 @@ RUN mkdir -p /root/go/src/yunion.io/x/onecloud
|
||||
COPY . /root/go/src/yunion.io/x/onecloud
|
||||
RUN cd /root/go/src/yunion.io/x/onecloud && make cmd/torrent
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
|
||||
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
# HACK: use v3.14 alpine mirror to upgrade qemu-img
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache qemu-img && \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
DESCRIPTION="Yunion Cloud Image Service"
|
||||
|
||||
REQUIRES=(
|
||||
yunion-qemu-2.12.1
|
||||
yunion-qemu-4.2.0
|
||||
)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{{.title}}
|
||||
策略名称: {{.name}}
|
||||
触发时间: {{.start_time}}
|
||||
报警级别: {{.level}}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{{.title}}
|
||||
AlertName: {{.name}}
|
||||
Time: {{.start_time}}
|
||||
Level: {{.level}}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{{.title}}
|
||||
{{monitorTitle .}}
|
||||
@@ -1 +1 @@
|
||||
{{.title}}
|
||||
{{monitorTitle .}}
|
||||
@@ -1 +1 @@
|
||||
{{.title}}
|
||||
{{monitorTitle .}}
|
||||
@@ -1 +1 @@
|
||||
{{.title}}
|
||||
{{monitorTitle .}}
|
||||
@@ -30,6 +30,7 @@ import (
|
||||
_ "yunion.io/x/onecloud/cmd/climc/shell/identity"
|
||||
_ "yunion.io/x/onecloud/cmd/climc/shell/image"
|
||||
_ "yunion.io/x/onecloud/cmd/climc/shell/k8s"
|
||||
_ "yunion.io/x/onecloud/cmd/climc/shell/llm"
|
||||
_ "yunion.io/x/onecloud/cmd/climc/shell/logger"
|
||||
_ "yunion.io/x/onecloud/cmd/climc/shell/misc"
|
||||
_ "yunion.io/x/onecloud/cmd/climc/shell/monitor"
|
||||
|
||||
31
cmd/climc/shell/compute/ai_gateways.go
Normal file
31
cmd/climc/shell/compute/ai_gateways.go
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package compute
|
||||
|
||||
import (
|
||||
"yunion.io/x/onecloud/cmd/climc/shell"
|
||||
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/options"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd := shell.NewResourceCmd(&modules.AiGateways).WithKeyword("ai-gateway")
|
||||
cmd.List(&compute.AiGatewayListOptions{})
|
||||
cmd.Delete(&options.BaseIdOptions{})
|
||||
cmd.Create(&compute.AiGatewayCreateOptions{})
|
||||
cmd.Perform("syncstatus", &options.BaseIdOptions{})
|
||||
cmd.Perform("change-config", &compute.AiGatewayChangeConfigOptions{})
|
||||
}
|
||||
@@ -15,6 +15,11 @@
|
||||
package compute
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/cmd/climc/shell"
|
||||
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/options"
|
||||
@@ -39,6 +44,16 @@ func init() {
|
||||
dbCmd.Create(&compute.DiskBackupCreateOptions{})
|
||||
dbCmd.Perform("recovery", &compute.DiskBackupRecoveryOptions{})
|
||||
dbCmd.Perform("syncstatus", &compute.DiskBackupSyncstatusOptions{})
|
||||
dbCmd.GetWithCustomOptionShow("export-info", func(info jsonutils.JSONObject, opts shell.IGetOpt) {
|
||||
args := opts.(*compute.DiskBackupExportOptions)
|
||||
if args.Output != "" {
|
||||
os.WriteFile(args.Output, []byte(info.String()), 0644)
|
||||
fmt.Printf("Exported to %s\n", args.Output)
|
||||
} else {
|
||||
printObject(info)
|
||||
}
|
||||
}, &compute.DiskBackupExportOptions{})
|
||||
dbCmd.PerformClass("import", &compute.DiskBackupImportOptions{})
|
||||
|
||||
ibCmd := shell.NewResourceCmd(&modules.InstanceBackups)
|
||||
ibCmd.List(&compute.InstanceBackupListOptions{})
|
||||
|
||||
@@ -19,178 +19,71 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"yunion.io/x/cloudmux/pkg/multicloud/objectstore"
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/pkg/util/fileutils"
|
||||
"yunion.io/x/pkg/util/printutils"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/cmd/climc/shell"
|
||||
"yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/mcclient"
|
||||
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/options"
|
||||
computeoptions "yunion.io/x/onecloud/pkg/mcclient/options/compute"
|
||||
)
|
||||
|
||||
func init() {
|
||||
type BucketListOptions struct {
|
||||
options.BaseListOptions
|
||||
DistinctField string `help:"query specified distinct field"`
|
||||
}
|
||||
R(&BucketListOptions{}, "bucket-list", "List all buckets", func(s *mcclient.ClientSession, args *BucketListOptions) error {
|
||||
params, err := options.ListStructToParams(args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(args.DistinctField) > 0 {
|
||||
params.Add(jsonutils.NewString(args.DistinctField), "extra_field")
|
||||
result, err := modules.Buckets.Get(s, "distinct-field", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println(result)
|
||||
return nil
|
||||
}
|
||||
result, err := modules.Buckets.List(s, params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printList(result, modules.Buckets.GetColumns(s))
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketIdOptions struct {
|
||||
ID string `help:"ID or name of bucket"`
|
||||
}
|
||||
R(&BucketIdOptions{}, "bucket-show", "Id details of bucket", func(s *mcclient.ClientSession, args *BucketIdOptions) error {
|
||||
result, err := modules.Buckets.Get(s, args.ID, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&BucketIdOptions{}, "bucket-syncstatus", "Sync bucket statust", func(s *mcclient.ClientSession, args *BucketIdOptions) error {
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "syncstatus", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketUpdateOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
Name string `help:"new name of bucket" json:"name"`
|
||||
Desc string `help:"Description of bucket" json:"description" token:"desc"`
|
||||
}
|
||||
R(&BucketUpdateOptions{}, "bucket-update", "update bucket", func(s *mcclient.ClientSession, args *BucketUpdateOptions) error {
|
||||
params := jsonutils.Marshal(args)
|
||||
result, err := modules.Buckets.Update(s, args.ID, params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketDeleteOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
}
|
||||
R(&BucketDeleteOptions{}, "bucket-delete", "delete bucket", func(s *mcclient.ClientSession, args *BucketDeleteOptions) error {
|
||||
result, err := modules.Buckets.Delete(s, args.ID, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketCreateOptions struct {
|
||||
NAME string `help:"name of bucket" json:"name"`
|
||||
CLOUDREGION string `help:"location of bucket" json:"cloudregion"`
|
||||
MANAGER string `help:"cloud provider" json:"manager"`
|
||||
|
||||
StorageClass string `help:"bucket storage class"`
|
||||
Acl string `help:"bucket ACL"`
|
||||
}
|
||||
R(&BucketCreateOptions{}, "bucket-create", "Create a bucket", func(s *mcclient.ClientSession, args *BucketCreateOptions) error {
|
||||
params, err := options.StructToParams(args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Buckets.Create(s, params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketListObjectsOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
Prefix string `help:"List objects with prefix"`
|
||||
Recursive bool `help:"List objects recursively"`
|
||||
Limit int `help:"maximal items per request"`
|
||||
PagingMarker string `help:"paging marker"`
|
||||
}
|
||||
R(&BucketListObjectsOptions{}, "bucket-object-list", "List objects in a bucket", func(s *mcclient.ClientSession, args *BucketListObjectsOptions) error {
|
||||
params, err := options.StructToParams(args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Buckets.GetSpecific(s, args.ID, "objects", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cmd := shell.NewResourceCmd(&modules.Buckets)
|
||||
cmd.List(&computeoptions.BucketListOptions{})
|
||||
cmd.GetProperty(&computeoptions.BucketGetPropertyOptions{})
|
||||
cmd.Show(&computeoptions.BucketIdOptions{})
|
||||
cmd.Perform("syncstatus", &computeoptions.BucketIdOptions{})
|
||||
cmd.Update(&computeoptions.BucketUpdateOptions{})
|
||||
cmd.Delete(&computeoptions.BucketIdOptions{})
|
||||
cmd.Create(&computeoptions.BucketCreateOptions{})
|
||||
cmd.GetWithCustomOptionShow("objects", func(data jsonutils.JSONObject, args shell.IGetOpt) {
|
||||
listResult := printutils.ListResult{}
|
||||
err = result.Unmarshal(&listResult)
|
||||
err := data.Unmarshal(&listResult)
|
||||
if err != nil {
|
||||
return err
|
||||
return
|
||||
}
|
||||
printList(&listResult, []string{})
|
||||
return nil
|
||||
})
|
||||
}, &computeoptions.BucketListObjectsOptions{})
|
||||
cmd.Perform("delete", &computeoptions.BucketDeleteObjectsOptions{})
|
||||
cmd.Perform("makedir", &computeoptions.BucketMakeDirOptions{})
|
||||
cmd.Perform("temp-url", &computeoptions.BucketPresignObjectsOptions{})
|
||||
cmd.Perform("acl", &computeoptions.BucketSetAclOptions{})
|
||||
cmd.GetWithCustomOptionShow("acl", func(data jsonutils.JSONObject, args shell.IGetOpt) {
|
||||
printObject(data)
|
||||
}, &computeoptions.BucketAclOptions{})
|
||||
cmd.Perform("sync", &computeoptions.BucketSyncOptions{})
|
||||
cmd.Perform("limit", &computeoptions.BucketLimitOptions{})
|
||||
cmd.GetWithCustomOptionShow("access-info", func(data jsonutils.JSONObject, args shell.IGetOpt) {
|
||||
printObject(data)
|
||||
}, &computeoptions.BucketAccessInfoOptions{})
|
||||
cmd.Perform("metadata", &computeoptions.BucketSetMetadataOptions{})
|
||||
cmd.Perform("set-website", &computeoptions.BucketSetWebsiteOption{})
|
||||
cmd.GetWithCustomOptionShow("website", func(data jsonutils.JSONObject, args shell.IGetOpt) {
|
||||
printObject(data)
|
||||
}, &computeoptions.BucketGetWebsiteConfOption{})
|
||||
cmd.Perform("delete-website", &computeoptions.BucketDeleteWebsiteConfOption{})
|
||||
cmd.Perform("set-cors", &computeoptions.BucketSetCorsOption{})
|
||||
cmd.GetWithCustomOptionShow("cors", func(data jsonutils.JSONObject, args shell.IGetOpt) {
|
||||
printObject(data)
|
||||
}, &computeoptions.BucketGetCorsOption{})
|
||||
cmd.Perform("delete-cors", &computeoptions.BucketDeleteCorsOption{})
|
||||
cmd.Perform("set-referer", &computeoptions.BucketSetRefererOption{})
|
||||
cmd.GetWithCustomOptionShow("referer", func(data jsonutils.JSONObject, args shell.IGetOpt) {
|
||||
printObject(data)
|
||||
}, &computeoptions.BucketGetRefererOption{})
|
||||
cmd.GetWithCustomOptionShow("cdn-domain", func(data jsonutils.JSONObject, args shell.IGetOpt) {
|
||||
printObject(data)
|
||||
}, &computeoptions.BucketGetCdnDomainOption{})
|
||||
cmd.GetWithCustomOptionShow("policy", func(data jsonutils.JSONObject, args shell.IGetOpt) {
|
||||
printObject(data)
|
||||
}, &computeoptions.BucketGetPolicyOption{})
|
||||
cmd.Perform("set-policy", &computeoptions.BucketSetPolicyOption{})
|
||||
cmd.Perform("delete-policy", &computeoptions.BucketDeletePolicyOption{})
|
||||
|
||||
type BucketDeleteObjectsOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
KEYS []string `help:"List of objects to delete"`
|
||||
}
|
||||
R(&BucketDeleteObjectsOptions{}, "bucket-object-delete", "Delete objects in a bucket", func(s *mcclient.ClientSession, args *BucketDeleteObjectsOptions) error {
|
||||
params := jsonutils.Marshal(args)
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "delete", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketMakeDirOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
KEY string `help:"DIR key to create"`
|
||||
}
|
||||
R(&BucketMakeDirOptions{}, "bucket-mkdir", "Mkdir in a bucket", func(s *mcclient.ClientSession, args *BucketMakeDirOptions) error {
|
||||
params := jsonutils.Marshal(args)
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "makedir", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketUploadObjectsOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
KEY string `help:"Key of object to upload"`
|
||||
Path string `help:"Path to file to upload" required:"true"`
|
||||
|
||||
ContentLength int64 `help:"Content lenght (bytes)" default:"-1"`
|
||||
StorageClass string `help:"storage CLass"`
|
||||
Acl string `help:"object acl." choices:"private|public-read|public-read-write"`
|
||||
|
||||
objectstore.ObjectHeaderOptions
|
||||
}
|
||||
R(&BucketUploadObjectsOptions{}, "bucket-object-upload", "Upload an object into a bucket", func(s *mcclient.ClientSession, args *BucketUploadObjectsOptions) error {
|
||||
R(&computeoptions.BucketUploadObjectsOptions{}, "bucket-object-upload", "Upload an object into a bucket", func(s *mcclient.ClientSession, args *computeoptions.BucketUploadObjectsOptions) error {
|
||||
var body io.Reader
|
||||
if len(args.Path) > 0 {
|
||||
file, err := os.Open(args.Path)
|
||||
@@ -223,332 +116,36 @@ func init() {
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketPresignObjectsOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
KEY string `help:"Key of object to upload"`
|
||||
Method string `help:"Request method" choices:"GET|PUT|DELETE"`
|
||||
ExpireSeconds int `help:"expire in seconds" default:"60"`
|
||||
}
|
||||
R(&BucketPresignObjectsOptions{}, "bucket-object-tempurl", "Get temporal URL for an object in a bucket", func(s *mcclient.ClientSession, args *BucketPresignObjectsOptions) error {
|
||||
params, err := options.StructToParams(args)
|
||||
R(&computeoptions.BucketPerfMonOptions{}, "bucket-perf-mon", "Bucket performance monitor", func(s *mcclient.ClientSession, args *computeoptions.BucketPerfMonOptions) error {
|
||||
result, err := modules.Buckets.Get(s, args.ID, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "temp-url", params)
|
||||
bucketDetails := compute.BucketDetails{}
|
||||
err = result.Unmarshal(&bucketDetails)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketSetAclOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
ACL string `help:"ACL to set" choices:"default|private|public-read|public-read-write" json:"acl"`
|
||||
Key []string `help:"Optional object key" json:"key"`
|
||||
}
|
||||
R(&BucketSetAclOptions{}, "bucket-set-acl", "Set ACL of bucket or object", func(s *mcclient.ClientSession, args *BucketSetAclOptions) error {
|
||||
params := jsonutils.Marshal(args)
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "acl", params)
|
||||
bucket, err := modules.GetIBucket(s.GetContext(), s, &bucketDetails)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketAclOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
Key string `help:"Optional object key"`
|
||||
}
|
||||
R(&BucketAclOptions{}, "bucket-acl", "Get ACL of bucket or object", func(s *mcclient.ClientSession, args *BucketAclOptions) error {
|
||||
params, err := options.StructToParams(args)
|
||||
payload, err := fileutils.GetSizeBytes(args.Payload, 1024)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Buckets.GetSpecific(s, args.ID, "acl", params)
|
||||
|
||||
stats, err := modules.ProbeBucketStats(s.GetContext(), bucket, "test", int64(payload))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketSyncOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
StatsOnly bool `help:"sync statistics only"`
|
||||
}
|
||||
R(&BucketSyncOptions{}, "bucket-sync", "Sync bucket", func(s *mcclient.ClientSession, args *BucketSyncOptions) error {
|
||||
params, err := options.StructToParams(args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "sync", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
fmt.Printf("Upload delay %f ms throughput %f MB/s\n", stats.UploadDelayMs(), stats.UploadThroughputMbps(payload/1024/1024))
|
||||
fmt.Printf("Download delay %f ms throughput %f MB/s\n", stats.DownloadDelayMs(), stats.DownloadThroughputMbps(payload/1024/1024))
|
||||
fmt.Printf("Delete delay %f ms\n", stats.DeleteDelayMs())
|
||||
|
||||
type BucketLimitOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
SizeBytes int64 `help:"size limit in bytes"`
|
||||
ObjectCount int64 `help:"object count limit"`
|
||||
}
|
||||
R(&BucketLimitOptions{}, "bucket-limit", "Set limit of bucket", func(s *mcclient.ClientSession, args *BucketLimitOptions) error {
|
||||
limit := jsonutils.Marshal(args)
|
||||
params := jsonutils.NewDict()
|
||||
params.Set("limit", limit)
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "limit", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketAccessInfoOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
}
|
||||
R(&BucketAccessInfoOptions{}, "bucket-access-info", "Show backend access info of a bucket", func(s *mcclient.ClientSession, args *BucketAccessInfoOptions) error {
|
||||
result, err := modules.Buckets.GetSpecific(s, args.ID, "access-info", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketSetMetadataOptions struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
|
||||
Key []string `help:"Optional object key" json:"key"`
|
||||
|
||||
objectstore.ObjectHeaderOptions
|
||||
}
|
||||
R(&BucketSetMetadataOptions{}, "bucket-set-metadata", "Set metadata of object", func(s *mcclient.ClientSession, args *BucketSetMetadataOptions) error {
|
||||
input := api.BucketMetadataInput{}
|
||||
input.Key = args.Key
|
||||
input.Metadata = args.ObjectHeaderOptions.Options2Header()
|
||||
err := input.Validate()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "metadata", jsonutils.Marshal(input))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketSetWebsiteOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
// 主页
|
||||
Index string `help:"main page"`
|
||||
// 错误时返回的文档
|
||||
ErrorDocument string `help:"error return"`
|
||||
// http或https
|
||||
Protocol string `help:"force https" choices:"http|https"`
|
||||
}
|
||||
R(&BucketSetWebsiteOption{}, "bucket-set-website", "Set bucket website", func(s *mcclient.ClientSession, args *BucketSetWebsiteOption) error {
|
||||
conf := api.BucketWebsiteConf{
|
||||
Index: args.Index,
|
||||
ErrorDocument: args.ErrorDocument,
|
||||
Protocol: args.Protocol,
|
||||
}
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "set-website", jsonutils.Marshal(conf))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketGetWebsiteConfOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
}
|
||||
R(&BucketGetWebsiteConfOption{}, "bucket-get-website", "Get bucket website", func(s *mcclient.ClientSession, args *BucketGetWebsiteConfOption) error {
|
||||
result, err := modules.Buckets.GetSpecific(s, args.ID, "website", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketDeleteWebsiteConfOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
}
|
||||
R(&BucketDeleteWebsiteConfOption{}, "bucket-delete-website", "Delete bucket website", func(s *mcclient.ClientSession, args *BucketDeleteWebsiteConfOption) error {
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-website", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketSetCorsOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
AllowedMethods []string `help:"allowed http method" choices:"PUT|GET|POST|DELETE|HEAD"`
|
||||
// 允许的源站,可以设为*
|
||||
AllowedOrigins []string
|
||||
AllowedHeaders []string
|
||||
MaxAgeSeconds int
|
||||
ExposeHeaders []string
|
||||
RuleId string
|
||||
}
|
||||
R(&BucketSetCorsOption{}, "bucket-set-cors", "Set bucket cors", func(s *mcclient.ClientSession, args *BucketSetCorsOption) error {
|
||||
|
||||
rule := api.BucketCORSRule{
|
||||
AllowedOrigins: args.AllowedOrigins,
|
||||
AllowedMethods: args.AllowedMethods,
|
||||
AllowedHeaders: args.AllowedHeaders,
|
||||
MaxAgeSeconds: args.MaxAgeSeconds,
|
||||
ExposeHeaders: args.ExposeHeaders,
|
||||
Id: args.RuleId,
|
||||
}
|
||||
rules := api.BucketCORSRules{Data: []api.BucketCORSRule{rule}}
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "set-cors", jsonutils.Marshal(rules))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketGetCorsOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
}
|
||||
R(&BucketGetCorsOption{}, "bucket-get-cors", "Get bucket cors", func(s *mcclient.ClientSession, args *BucketGetCorsOption) error {
|
||||
result, err := modules.Buckets.GetSpecific(s, args.ID, "cors", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketDeleteCorsOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
Id []string `"help:Id of rules to delete"`
|
||||
}
|
||||
R(&BucketDeleteCorsOption{}, "bucket-delete-cors", "Delete bucket cors", func(s *mcclient.ClientSession, args *BucketDeleteCorsOption) error {
|
||||
input := api.BucketCORSRuleDeleteInput{}
|
||||
input.Id = args.Id
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-cors", jsonutils.Marshal(input))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketSetRefererOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
// 域名列表
|
||||
DomainList []string
|
||||
// 是否允许空referer 访问
|
||||
AllowEmptyRefer bool `help:"all empty refer access"`
|
||||
Enabled bool
|
||||
RerererType string `help:"Referer type" choices:"Black-List|White-List"`
|
||||
}
|
||||
R(&BucketSetRefererOption{}, "bucket-set-referer", "Set bucket referer", func(s *mcclient.ClientSession, args *BucketSetRefererOption) error {
|
||||
conf := api.BucketRefererConf{
|
||||
Enabled: args.Enabled,
|
||||
AllowEmptyRefer: args.AllowEmptyRefer,
|
||||
RefererType: args.RerererType,
|
||||
DomainList: args.DomainList,
|
||||
}
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "set-referer", jsonutils.Marshal(conf))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketGetRefererOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
}
|
||||
R(&BucketGetRefererOption{}, "bucket-get-referer", "get bucket referer", func(s *mcclient.ClientSession, args *BucketGetRefererOption) error {
|
||||
result, err := modules.Buckets.GetSpecific(s, args.ID, "referer", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketGetCdnDomainOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
}
|
||||
R(&BucketGetRefererOption{}, "bucket-get-cdn-domain", "get bucket cdn domain", func(s *mcclient.ClientSession, args *BucketGetRefererOption) error {
|
||||
result, err := modules.Buckets.GetSpecific(s, args.ID, "cdn-domain", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketGetPolicyOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
}
|
||||
R(&BucketGetPolicyOption{}, "bucket-get-policy", "get bucket policy", func(s *mcclient.ClientSession, args *BucketGetPolicyOption) error {
|
||||
result, err := modules.Buckets.GetSpecific(s, args.ID, "policy", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketSetPolicyOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
// 格式主账号id:子账号id
|
||||
PrincipalId []string `help:"ext account id, accountId:subaccountId"`
|
||||
// Read|ReadWrite|FullControl
|
||||
CannedAction string `help:"authority action" choice:"Read|FullControl"`
|
||||
// Allow|Deny
|
||||
Effect string `help:"allow or deny" choice:"Allow|Deny"`
|
||||
// 被授权的资源地址
|
||||
ResourcePath []string
|
||||
// ip 条件
|
||||
IpEquals []string
|
||||
IpNotEquals []string
|
||||
}
|
||||
R(&BucketSetPolicyOption{}, "bucket-set-policy", "set bucket policy", func(s *mcclient.ClientSession, args *BucketSetPolicyOption) error {
|
||||
opts := api.BucketPolicyStatementInput{}
|
||||
opts.CannedAction = args.CannedAction
|
||||
opts.Effect = args.Effect
|
||||
opts.IpEquals = args.IpEquals
|
||||
opts.IpNotEquals = args.IpNotEquals
|
||||
opts.ResourcePath = args.ResourcePath
|
||||
opts.PrincipalId = args.PrincipalId
|
||||
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "set-policy", jsonutils.Marshal(opts))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
type BucketDeletePolicyOption struct {
|
||||
ID string `help:"ID or name of bucket" json:"-"`
|
||||
Id []string
|
||||
}
|
||||
R(&BucketDeletePolicyOption{}, "bucket-delete-policy", "delete bucket policy", func(s *mcclient.ClientSession, args *BucketDeletePolicyOption) error {
|
||||
input := api.BucketPolicyDeleteInput{}
|
||||
input.Id = args.Id
|
||||
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-policy", jsonutils.Marshal(input))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -28,4 +28,8 @@ func init() {
|
||||
cmd.Update(&compute.CDNDomainUpdateOptions{})
|
||||
cmd.Delete(&options.BaseIdOptions{})
|
||||
cmd.Create(&compute.CDNDomainCreateOptions{})
|
||||
cmd.Perform("clear-cache", &compute.CDNClearCacheOptions{})
|
||||
cmd.Perform("change-config", &compute.CDNChangeConfigOptions{})
|
||||
cmd.Perform("delete-custom-hostname", &compute.CDNDeleteCustomHostnameOptions{})
|
||||
cmd.Get("custom-hostnames", &compute.CDNCustomHostnameOptions{})
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ func init() {
|
||||
cmd.CreateWithKeyword("create-qingcloud", &options.SQingCloudCloudAccountCreateOptions{})
|
||||
cmd.CreateWithKeyword("create-oracle", &options.SOracleCloudAccountCreateOptions{})
|
||||
cmd.CreateWithKeyword("create-cephfs", &options.SCephFSCloudAccountCreateOptions{})
|
||||
cmd.CreateWithKeyword("create-cnware", &options.SCNwareCloudAccountCreateOptions{})
|
||||
cmd.CreateWithKeyword("create-oceanbase", &options.SOceanbaseCloudAccountCreateOptions{})
|
||||
|
||||
cmd.UpdateWithKeyword("update-vmware", &options.SVMwareCloudAccountUpdateOptions{})
|
||||
cmd.UpdateWithKeyword("update-aliyun", &options.SAliyunCloudAccountUpdateOptions{})
|
||||
@@ -88,6 +90,8 @@ func init() {
|
||||
cmd.UpdateWithKeyword("update-baidu", &options.SBaiduCloudAccountUpdateOptions{})
|
||||
cmd.UpdateWithKeyword("update-cucloud", &options.SCucloudCloudAccountUpdateOptions{})
|
||||
cmd.UpdateWithKeyword("update-qingcloud", &options.SQingCloudCloudAccountUpdateOptions{})
|
||||
cmd.UpdateWithKeyword("update-cnware", &options.SCNwareCloudAccountUpdateOptions{})
|
||||
cmd.UpdateWithKeyword("update-oceanbase", &options.SOceanbaseCloudAccountUpdateOptions{})
|
||||
|
||||
cmd.Perform("update-credential", &options.CloudaccountUpdateCredentialOptions{})
|
||||
|
||||
@@ -117,6 +121,7 @@ func init() {
|
||||
cmd.PerformWithKeyword("update-credential-baidu", "update-credential", &options.SBaiduCloudAccountUpdateCredentialOptions{})
|
||||
cmd.PerformWithKeyword("update-credential-cucloud", "update-credential", &options.SCucloudCloudAccountUpdateCredentialOptions{})
|
||||
cmd.PerformWithKeyword("update-credential-qingcloud", "update-credential", &options.SQingCloudCloudAccountUpdateCredentialOptions{})
|
||||
cmd.PerformWithKeyword("update-credential-cnware", "update-credential", &options.SCNwareCloudAccountUpdateCredentialOptions{})
|
||||
|
||||
cmd.PerformWithKeyword("test-connectivity-google", "test-connectivity", &options.SGoogleCloudAccountUpdateCredentialOptions{})
|
||||
cmd.PerformWithKeyword("test-connectivity-vmware", "test-connectivity", &options.SVMwareCloudAccountUpdateCredentialOptions{})
|
||||
@@ -133,6 +138,7 @@ func init() {
|
||||
cmd.PerformWithKeyword("test-connectivity-ctyun", "test-connectivity", &options.SCtyunCloudAccountUpdateCredentialOptions{})
|
||||
cmd.PerformWithKeyword("test-connectivity-jdcloud", "test-connectivity", &options.SJDcloudCloudAccountUpdateCredentialOptions{})
|
||||
cmd.PerformWithKeyword("test-connectivity-cloudpods", "test-connectivity", &options.SCloudpodsCloudAccountUpdateCredentialOptions{})
|
||||
cmd.PerformWithKeyword("test-connectivity-oceanbase", "test-connectivity", &options.SOceanbaseCloudAccountUpdateCredentialOptions{})
|
||||
|
||||
cmd.Perform("enable", &options.SCloudAccountIdOptions{})
|
||||
cmd.Perform("disable", &options.SCloudAccountIdOptions{})
|
||||
|
||||
@@ -43,6 +43,7 @@ func init() {
|
||||
cmd.BatchDelete(new(options.ContainerDeleteOptions))
|
||||
cmd.BatchPerform("stop", new(options.ContainerStopOptions))
|
||||
cmd.BatchPerform("start", new(options.ContainerStartOptions))
|
||||
cmd.BatchPerform("restart", new(options.ContainerRestartOptions))
|
||||
cmd.BatchPerform("syncstatus", new(options.ContainerIdsOptions))
|
||||
cmd.Perform("save-volume-mount-image", new(options.ContainerSaveVolumeMountImage))
|
||||
cmd.Perform("exec-sync", new(options.ContainerExecSyncOptions))
|
||||
|
||||
@@ -46,6 +46,8 @@ func init() {
|
||||
cmd.Perform("rebuild", &compute_options.DiskRebuildOptions{})
|
||||
cmd.Perform("migrate", &compute_options.DiskMigrateOptions{})
|
||||
cmd.Perform("reset-template", &compute_options.DiskResetTemplateOptions{})
|
||||
cmd.Perform("change-billing-type", new(compute_options.DiskChangeBillingTypeOptions))
|
||||
cmd.Perform("change-storage-type", &compute_options.DiskChangeStorageTypeOptions{})
|
||||
|
||||
type DiskDetailOptions struct {
|
||||
ID string `help:"ID or Name of disk"`
|
||||
|
||||
31
cmd/climc/shell/compute/hostfiles.go
Normal file
31
cmd/climc/shell/compute/hostfiles.go
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package compute
|
||||
|
||||
import (
|
||||
"yunion.io/x/onecloud/cmd/climc/shell"
|
||||
computemodules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd := shell.NewResourceCmd(&computemodules.HostFiles)
|
||||
cmd.List(&compute.HostFileListOptions{})
|
||||
cmd.Create(&compute.HostFileCreateOptions{})
|
||||
cmd.Show(&compute.HostFileShowOptions{})
|
||||
cmd.Update(&compute.HostFileUpdateOptions{})
|
||||
cmd.Edit(&compute.HostFileEditOptions{})
|
||||
cmd.Delete(&compute.HostFileDeleteOptions{})
|
||||
}
|
||||
@@ -55,8 +55,8 @@ func init() {
|
||||
cmd.Perform("class-metadata", &options.ResourceMetadataOptions{})
|
||||
cmd.Perform("set-class-metadata", &options.ResourceMetadataOptions{})
|
||||
cmd.PerformClass("validate-ipmi", &compute.HostValidateIPMI{})
|
||||
cmd.Perform("set-commit-bound", &compute.HostSetCommitBoundOptions{})
|
||||
|
||||
cmd.BatchPerform("set-commit-bound", &compute.HostSetCommitBoundOptions{})
|
||||
cmd.BatchPerform("enable", &options.BaseIdsOptions{})
|
||||
cmd.BatchPerform("disable", &options.BaseIdsOptions{})
|
||||
cmd.BatchPerform("syncstatus", &options.BaseIdsOptions{})
|
||||
@@ -67,10 +67,12 @@ func init() {
|
||||
cmd.BatchPerform("unreserve-cpus", &options.BaseIdsOptions{})
|
||||
cmd.BatchPerform("auto-migrate-on-host-down", &compute.HostAutoMigrateOnHostDownOptions{})
|
||||
cmd.BatchPerform("restart-host-agent", &options.BaseIdsOptions{})
|
||||
cmd.BatchPerform("set-host-files", &compute.HostSetHostFilesOptions{})
|
||||
|
||||
cmd.Get("ipmi", &options.BaseIdOptions{})
|
||||
cmd.Get("vnc", &options.BaseIdOptions{})
|
||||
cmd.Get("app-options", &options.BaseIdOptions{})
|
||||
cmd.Get("isolated-device-numa-stats", &compute.HostIsolatedDeviceNumaStatsOptions{})
|
||||
cmd.GetWithCustomShow("worker-stats", func(data jsonutils.JSONObject) {
|
||||
stats, _ := data.GetArray("workers")
|
||||
printList(&printutils.ListResult{Data: stats}, nil)
|
||||
@@ -93,6 +95,9 @@ func init() {
|
||||
fmt.Println("error", err)
|
||||
}
|
||||
}, &options.BaseIdOptions{})
|
||||
cmd.GetWithCustomShow("host-files", func(data jsonutils.JSONObject) {
|
||||
printObject(data)
|
||||
}, &options.BaseIdOptions{})
|
||||
|
||||
R(&compute.HostShowOptions{}, "host-show", "Show details of a host", func(s *mcclient.ClientSession, args *compute.HostShowOptions) error {
|
||||
params, err := args.Params()
|
||||
@@ -259,6 +264,7 @@ func init() {
|
||||
INDEX int64 `help:"nic index"`
|
||||
Type string `help:"Nic type" choices:"admin|ipmi"`
|
||||
IpAddr string `help:"IP address"`
|
||||
Ip6Addr string `help:"IPv6 address"`
|
||||
Bridge string `help:"Bridge of hostwire"`
|
||||
Interface string `help:"Interface name, eg:eth0, en0"`
|
||||
}
|
||||
@@ -274,6 +280,9 @@ func init() {
|
||||
if len(args.IpAddr) > 0 {
|
||||
params.Add(jsonutils.NewString(args.IpAddr), "ip_addr")
|
||||
}
|
||||
if len(args.Ip6Addr) > 0 {
|
||||
params.Add(jsonutils.NewString(args.Ip6Addr), "ip6_addr")
|
||||
}
|
||||
if len(args.Bridge) > 0 {
|
||||
params.Add(jsonutils.NewString(args.Bridge), "bridge")
|
||||
}
|
||||
@@ -306,7 +315,8 @@ func init() {
|
||||
type HostEnableNetIfOptions struct {
|
||||
ID string `help:"ID or Name of host"`
|
||||
MAC string `help:"MAC of NIC to enable"`
|
||||
Ip string `help:"IP address"`
|
||||
Ip string `help:"IPv4 address"`
|
||||
Ip6 string `help:"IPv6 address"`
|
||||
Network string `help:"network to connect"`
|
||||
Reserved bool `help:"fetch IP from reserved pool"`
|
||||
}
|
||||
@@ -315,6 +325,11 @@ func init() {
|
||||
params.Add(jsonutils.NewString(args.MAC), "mac")
|
||||
if len(args.Ip) > 0 {
|
||||
params.Add(jsonutils.NewString(args.Ip), "ip_addr")
|
||||
}
|
||||
if len(args.Ip6) > 0 {
|
||||
params.Add(jsonutils.NewString(args.Ip6), "ip6_addr")
|
||||
}
|
||||
if len(args.Ip) > 0 || len(args.Ip6) > 0 {
|
||||
if args.Reserved {
|
||||
params.Add(jsonutils.JSONTrue, "reserve")
|
||||
}
|
||||
|
||||
31
cmd/climc/shell/compute/loadbalancer_health_check.go
Normal file
31
cmd/climc/shell/compute/loadbalancer_health_check.go
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright 2019 Yunion
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package compute
|
||||
|
||||
import (
|
||||
"yunion.io/x/onecloud/cmd/climc/shell"
|
||||
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
|
||||
options "yunion.io/x/onecloud/pkg/mcclient/options/compute"
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd := shell.NewResourceCmd(&modules.LoadbalancerHealthChecks).WithKeyword("lb-health-check")
|
||||
cmd.List(&options.LoadbalancerHealthCheckListOptions{})
|
||||
cmd.Show(&options.LoadbalancerHealthCheckIdOptions{})
|
||||
cmd.Create(&options.LoadbalancerHealthCheckCreateOptions{})
|
||||
cmd.Delete(&options.LoadbalancerHealthCheckIdOptions{})
|
||||
cmd.Update(&options.LoadbalancerHealthCheckUpdateOptions{})
|
||||
cmd.Perform("syncstatus", &options.LoadbalancerHealthCheckIdOptions{})
|
||||
}
|
||||
@@ -234,7 +234,7 @@ func init() {
|
||||
|
||||
fmt.Println("[Slave Addresses]")
|
||||
for _, addr := range netIf.GetSlaveAddresses() {
|
||||
fmt.Printf("%s/%s\n", addr[0], addr[1])
|
||||
fmt.Printf("%s/%d\n", addr.Addr, addr.MaskLen)
|
||||
}
|
||||
fmt.Println("[Routes]")
|
||||
for _, r := range netIf.GetRouteSpecs() {
|
||||
|
||||
@@ -32,6 +32,7 @@ func init() {
|
||||
cmd.Perform("syncstatus", &options.SecgroupIdOptions{})
|
||||
cmd.Perform("private", &options.SecgroupIdOptions{})
|
||||
cmd.Perform("add-rule", &options.SecgroupsAddRuleOptions{})
|
||||
cmd.Perform("clone", &options.SecgroupCloneOptions{})
|
||||
cmd.Perform("change-owner", &options.SecgroupChangeOwnerOptions{})
|
||||
cmd.Perform("import-rules", &options.SecgroupImportRulesOptions{})
|
||||
cmd.PerformClass("clean", &options.SecgroupCleanOptions{})
|
||||
|
||||
@@ -165,8 +165,9 @@ func init() {
|
||||
})
|
||||
|
||||
type ServerAttachNetworkOptions struct {
|
||||
SERVER string `help:"ID or Name of server"`
|
||||
NETDESC []string `help:"Network description"`
|
||||
SERVER string `help:"ID or Name of server"`
|
||||
DisableSyncConfig bool `help:"Disable sync config"`
|
||||
NETDESC []string `help:"Network description"`
|
||||
}
|
||||
R(&ServerAttachNetworkOptions{}, "server-attach-network", "Attach a server to a virtual network", func(s *mcclient.ClientSession, args *ServerAttachNetworkOptions) error {
|
||||
input := compute.AttachNetworkInput{}
|
||||
@@ -177,6 +178,7 @@ func init() {
|
||||
}
|
||||
input.Nets = append(input.Nets, conf)
|
||||
}
|
||||
input.DisableSyncConfig = &args.DisableSyncConfig
|
||||
params := jsonutils.Marshal(input)
|
||||
srv, err := modules.Servers.PerformAction(s, args.SERVER, "attachnetwork", params)
|
||||
if err != nil {
|
||||
|
||||
@@ -124,12 +124,14 @@ func init() {
|
||||
cmd.Perform("set-nic-traffic-limit", &options.ServerNicTrafficLimitOptions{})
|
||||
cmd.Perform("add-sub-ips", &options.ServerAddSubIpsOptions{})
|
||||
cmd.Perform("update-sub-ips", &options.ServerUpdateSubIpsOptions{})
|
||||
cmd.BatchPerform("restore-virtual-isolated-devices", &options.ServerIdsOptions{})
|
||||
cmd.BatchPerform("set-os-info", &options.ServerSetOSInfoOptions{})
|
||||
cmd.BatchPerform("start-rescue", &options.ServerStartOptions{})
|
||||
cmd.BatchPerform("stop-rescue", &options.ServerStartOptions{})
|
||||
cmd.BatchPerform("sync-os-info", &options.ServerIdsOptions{})
|
||||
cmd.BatchPerform("set-root-disk-matcher", &options.ServerSetRootDiskMatcher{})
|
||||
|
||||
cmd.Perform("disable-auto-merge-snapshot", &options.ServerDisableAutoMergeSnapshot{})
|
||||
cmd.BatchPerform("set-tpm", &options.ServerSetTpmOptions{})
|
||||
cmd.Get("vnc", new(options.ServerVncOptions))
|
||||
cmd.Get("desc", new(options.ServerIdOptions))
|
||||
cmd.Get("status", new(options.ServerIdOptions))
|
||||
@@ -143,6 +145,9 @@ func init() {
|
||||
cmd.Get("sshport", new(options.ServerIdOptions))
|
||||
cmd.Get("qemu-info", new(options.ServerIdOptions))
|
||||
cmd.Get("hardware-info", new(options.ServerIdOptions))
|
||||
cmd.Get("screen-dump-show", new(options.ServerScreenDumpOptions))
|
||||
cmd.Get("numa-info", new(options.ServerIdOptions))
|
||||
cmd.BatchPerform("screen-dump", new(options.ServerIdsOptions))
|
||||
|
||||
cmd.GetProperty(&options.ServerStatusStatisticsOptions{})
|
||||
cmd.GetProperty(&options.ServerProjectStatisticsOptions{})
|
||||
@@ -184,59 +189,6 @@ func init() {
|
||||
return nil
|
||||
})
|
||||
|
||||
/*R(&options.ServerBatchMetadataOptions{}, "server-batch-update-user-tag", "add tags for some server", func(s *mcclient.ClientSession, opts *options.ServerBatchMetadataOptions) error {
|
||||
params, err := opts.Params()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Servers.PerformClassAction(s, "batch-user-metadata", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&options.ServerBatchMetadataOptions{}, "server-batch-replace-user-tag", "Set tags for some server", func(s *mcclient.ClientSession, opts *options.ServerBatchMetadataOptions) error {
|
||||
params, err := opts.Params()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Servers.PerformClassAction(s, "batch-set-user-metadata", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&options.ResourceMetadataOptions{}, "server-update-user-tag", "Set tag of a server", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
|
||||
params, err := opts.Params()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Servers.PerformAction(s, opts.ID, "user-metadata", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&options.ResourceMetadataOptions{}, "server-update-user-tag", "Set tag of a server", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
|
||||
params, err := opts.Params()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
result, err := modules.Servers.PerformAction(s, opts.ID, "set-user-metadata", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
*/
|
||||
|
||||
R(&baseoptions.ResourceMetadataOptions{}, "server-set-metadata", "Set raw metadata of a server", func(s *mcclient.ClientSession, opts *baseoptions.ResourceMetadataOptions) error {
|
||||
params, err := opts.Params()
|
||||
if err != nil {
|
||||
|
||||
23
cmd/climc/shell/compute/serverscreendumps.go
Normal file
23
cmd/climc/shell/compute/serverscreendumps.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package compute
|
||||
|
||||
import (
|
||||
"yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/cmd/climc/shell"
|
||||
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/options"
|
||||
)
|
||||
|
||||
type ServerScreenDumpListOptions struct {
|
||||
options.BaseListOptions
|
||||
Server string `help:"Id or name of server"`
|
||||
}
|
||||
|
||||
func (o *ServerScreenDumpListOptions) Params() (jsonutils.JSONObject, error) {
|
||||
return jsonutils.Marshal(o), nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmd := shell.NewResourceCmd(&modules.ServerScreenDumps)
|
||||
cmd.List(new(ServerScreenDumpListOptions))
|
||||
}
|
||||
@@ -28,5 +28,7 @@ func init() {
|
||||
cmd.Create(&compute.SnapshotPolicyCreateOptions{})
|
||||
cmd.Perform("bind-disks", &compute.SnapshotPolicyDisksOptions{})
|
||||
cmd.Perform("unbind-disks", &compute.SnapshotPolicyDisksOptions{})
|
||||
cmd.Perform("bind-resources", &compute.SnapshotPolicyResourcesOptions{})
|
||||
cmd.Perform("unbind-resources", &compute.SnapshotPolicyResourcesOptions{})
|
||||
cmd.Perform("syncstatus", &options.BaseIdOptions{})
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ func init() {
|
||||
DiskType string `help:"Filter by disk type" choices:"sys|data"`
|
||||
Server string `help:"Filter by server" json:"server_id"`
|
||||
Unused bool
|
||||
StorageId string `help:"Filter by storage id"`
|
||||
|
||||
OrderByGuest string
|
||||
OrderByDiskName string
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
func init() {
|
||||
cmd := shell.NewResourceCmd(&modules.SslCerticicate).WithKeyword("ssl-certificate")
|
||||
cmd.List(&compute.SslCertificateListOptions{})
|
||||
cmd.Create(&compute.SslCertificateCreateOptions{})
|
||||
cmd.Show(&options.BaseShowOptions{})
|
||||
cmd.Delete(&options.BaseIdOptions{})
|
||||
}
|
||||
|
||||
@@ -74,12 +74,7 @@ func init() {
|
||||
if info.StorageType != "rbd" {
|
||||
return errors.Errorf("invalid storage_type %s", info.StorageType)
|
||||
}
|
||||
cli, err := cephutils.NewClient(
|
||||
info.StorageConf.MonHost,
|
||||
info.StorageConf.Key,
|
||||
info.StorageConf.Pool,
|
||||
info.StorageConf.EnableMessengerV2,
|
||||
)
|
||||
cli, err := cephutils.NewClient(info.StorageConf.MonHost, info.StorageConf.Key, info.StorageConf.Pool, info.StorageConf.EnableMessengerV2, 0, 0, 0)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "cephutils.NewClient")
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ import (
|
||||
)
|
||||
|
||||
type GeneralUsageOptions struct {
|
||||
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack|google|ctyun"`
|
||||
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun"`
|
||||
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun"`
|
||||
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack|google|ctyun|cnware"`
|
||||
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|CNWare"`
|
||||
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|CNWare"`
|
||||
Project string `help:"show usage of specified project"`
|
||||
|
||||
ProjectDomain string `help:"show usage of specified domain"`
|
||||
|
||||
@@ -29,4 +29,6 @@ func init() {
|
||||
cmd.Show(&options.BaseIdOptions{})
|
||||
cmd.Delete(&options.BaseIdOptions{})
|
||||
cmd.Perform("syncstatus", &options.BaseIdOptions{})
|
||||
cmd.Perform("enable", &options.BaseIdOptions{})
|
||||
cmd.Perform("disable", &options.BaseIdOptions{})
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
|
||||
func init() {
|
||||
type WorkerListOptions struct {
|
||||
ServiceType string `choices:"image|cloudid|cloudevent|devtool|ansible|identity|notify|log|compute|compute_v2|meter|suggestion|cloudmon|cloudproxy|dns|monitor|scheduler|vpcagent|webconsole|yunionconf|bastionhost|extdb|yunionapi"`
|
||||
ServiceType string `choices:"image|cloudid|cloudevent|devtool|ansible|identity|notify|log|compute|compute_v2|meter|suggestion|cloudmon|cloudproxy|dns|monitor|scheduler|vpcagent|webconsole|yunionconf|bastionhost|extdb|yunionapi|report"`
|
||||
}
|
||||
R(&WorkerListOptions{}, "worker-list", "List workers", func(s *mcclient.ClientSession, args *WorkerListOptions) error {
|
||||
result, err := modules.Workers.List(s, jsonutils.Marshal(args))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user