Compare commits
473
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
199267c13e | ||
|
|
90e4df62d4 | ||
|
|
ae3d9574b6 | ||
|
|
27e25f8943 | ||
|
|
ba3eb488e3 | ||
|
|
c09157861a | ||
|
|
027d5defd7 | ||
|
|
d13b8079c6 | ||
|
|
3bcb893ab9 | ||
|
|
1840e805bd | ||
|
|
163c5f6e84 | ||
|
|
cbc3ac5995 | ||
|
|
1afd3bb253 | ||
|
|
cbd90839c0 | ||
|
|
642a4c1f60 | ||
|
|
c8f9d7862e | ||
|
|
b5264b549e | ||
|
|
8a711e2d4c | ||
|
|
fc364cfe11 | ||
|
|
fa42ffaaf5 | ||
|
|
b9df1b4459 | ||
|
|
7cfbfcc69c | ||
|
|
8fff4dedf7 | ||
|
|
64ae76f1dc | ||
|
|
454a6dc745 | ||
|
|
8f764063c2 | ||
|
|
0c6478c935 | ||
|
|
8c79736d8a | ||
|
|
a102f8d192 | ||
|
|
8df98a0015 | ||
|
|
1bb8881f92 | ||
|
|
098e87d1e0 | ||
|
|
82bfca7a1f | ||
|
|
fdf519acde | ||
|
|
2c8e74eef7 | ||
|
|
5e38b944a3 | ||
|
|
5d3eb1d93c | ||
|
|
3dc32412b5 | ||
|
|
fe73c6a2aa | ||
|
|
7b9c01f37e | ||
|
|
e8ccd9f884 | ||
|
|
bfaa7a597a | ||
|
|
40584f19dc | ||
|
|
95e2b9f563 | ||
|
|
e1cc04c604 | ||
|
|
0a8f935e4b | ||
|
|
8d448a5229 | ||
|
|
7842037c4f | ||
|
|
796c94fb54 | ||
|
|
96015652a5 | ||
|
|
c2d59c07d2 | ||
|
|
828781cb10 | ||
|
|
558ec76aa1 | ||
|
|
d801724e13 | ||
|
|
6555142d36 | ||
|
|
0a579360e3 | ||
|
|
476aad0955 | ||
|
|
d7ceb28f90 | ||
|
|
1e3dbafbf1 | ||
|
|
e55cfd7379 | ||
|
|
c973a67450 | ||
|
|
25d196332a | ||
|
|
574e660311 | ||
|
|
cdbb001a53 | ||
|
|
a1379e380f | ||
|
|
0e11c36fe8 | ||
|
|
09d8166591 | ||
|
|
2408c286eb | ||
|
|
5d23475a47 | ||
|
|
0eba9a04b1 | ||
|
|
8dcc5f1a57 | ||
|
|
0154d6a4af | ||
|
|
8e454ef9af | ||
|
|
94f43d3e70 | ||
|
|
b443fd48ce | ||
|
|
d80c3faa5f | ||
|
|
9daef8c66c | ||
|
|
7eb24bc131 | ||
|
|
656197e69f | ||
|
|
c37787bdbf | ||
|
|
982ebdcbb4 | ||
|
|
5b8438dacc | ||
|
|
f00b60d129 | ||
|
|
ef928234bf | ||
|
|
51112d6918 | ||
|
|
245a06e79a | ||
|
|
cc4fb39e67 | ||
|
|
ad4c0e9c53 | ||
|
|
66981de2ca | ||
|
|
f0a06efc82 | ||
|
|
b46bccb307 | ||
|
|
2e61377d78 | ||
|
|
f71a00114e | ||
|
|
fb923078ae | ||
|
|
4d7df06b96 | ||
|
|
50e4c2cf6c | ||
|
|
2a7165020e | ||
|
|
e1b9dba1f7 | ||
|
|
b9c407e876 | ||
|
|
7245bf345d | ||
|
|
e12e2da8e0 | ||
|
|
a7ce0c8172 | ||
|
|
17bdf23102 | ||
|
|
242e6ba12e | ||
|
|
db6a3846ca | ||
|
|
933a5be874 | ||
|
|
201be45953 | ||
|
|
ceb5ede98b | ||
|
|
0f809b99fd | ||
|
|
2399501a88 | ||
|
|
3d1417959c | ||
|
|
9e5e4232e0 | ||
|
|
ca13c11bb6 | ||
|
|
9f1c2e4808 | ||
|
|
b2dce191f0 | ||
|
|
0a8c913699 | ||
|
|
bce5e6310c | ||
|
|
829657e8bb | ||
|
|
ddf51d226a | ||
|
|
ebcc8c6842 | ||
|
|
29efcbbe8d | ||
|
|
4b2a670e13 | ||
|
|
5a271d426b | ||
|
|
a467820a30 | ||
|
|
413d7761f5 | ||
|
|
1b508d41a4 | ||
|
|
aa4c13f04d | ||
|
|
dbc4550539 | ||
|
|
a1e6a152fd | ||
|
|
2bf8b02536 | ||
|
|
e1fbcf631b | ||
|
|
8455f8489d | ||
|
|
57f4953a48 | ||
|
|
577de3c0db | ||
|
|
dd0fec860f | ||
|
|
5785da6292 | ||
|
|
db8f9ae565 | ||
|
|
0a4f0d7ea4 | ||
|
|
79f8e7e65d | ||
|
|
a9bf1b32c5 | ||
|
|
9d40d05538 | ||
|
|
12c6358005 | ||
|
|
03a6b07424 | ||
|
|
a3460c7782 | ||
|
|
1ed15cd097 | ||
|
|
014ee934ee | ||
|
|
f880730bd0 | ||
|
|
7dbad9e05b | ||
|
|
876a6790fa | ||
|
|
e7777a504f | ||
|
|
80a4916b97 | ||
|
|
1c5e1ce36b | ||
|
|
6ea6c8f9f9 | ||
|
|
817994177e | ||
|
|
6bd3feb5f3 | ||
|
|
7c35044aed | ||
|
|
6509fd7d20 | ||
|
|
95a1046378 | ||
|
|
4a79f385c4 | ||
|
|
a26c8194ea | ||
|
|
340f92f687 | ||
|
|
4ae20f8c7f | ||
|
|
59179f4d73 | ||
|
|
549c0b212e | ||
|
|
8fb21df5e8 | ||
|
|
c32d348926 | ||
|
|
62ada72b42 | ||
|
|
de43c2b8d2 | ||
|
|
66e79332ae | ||
|
|
99c320e9f4 | ||
|
|
55b72af77d | ||
|
|
4a1a8110df | ||
|
|
8ff2c4d943 | ||
|
|
be18a661a6 | ||
|
|
42d0598920 | ||
|
|
2649661fbc | ||
|
|
8ab8790da1 | ||
|
|
17809a9276 | ||
|
|
0070b190e1 | ||
|
|
9c919a56eb | ||
|
|
fdfb14303e | ||
|
|
27f8225dde | ||
|
|
7785073115 | ||
|
|
fdf786fa51 | ||
|
|
b8a7e890bf | ||
|
|
049f178544 | ||
|
|
08a5198e3c | ||
|
|
4b3646ff4d | ||
|
|
13ef57e0b6 | ||
|
|
ff57cba5f7 | ||
|
|
2957194167 | ||
|
|
6a4726261b | ||
|
|
e8bc1358dd | ||
|
|
995a9d19bf | ||
|
|
7708335d55 | ||
|
|
da4ba6cb7e | ||
|
|
c88138239a | ||
|
|
d9f4f943d8 | ||
|
|
b0513e6a38 | ||
|
|
8f3962de88 | ||
|
|
60f43af3a9 | ||
|
|
484b1b94d5 | ||
|
|
ccd8b89d72 | ||
|
|
861e69d751 | ||
|
|
5a10cbc84d | ||
|
|
1b048da76a | ||
|
|
ded9a0186e | ||
|
|
353cd3c5df | ||
|
|
13227efd05 | ||
|
|
86e344c92c | ||
|
|
75e9506254 | ||
|
|
f10a948b54 | ||
|
|
aef9716dd0 | ||
|
|
8722bb6b42 | ||
|
|
96990291a3 | ||
|
|
09d466a1b4 | ||
|
|
83d5370a1c | ||
|
|
2c4727d79e | ||
|
|
70e8d4fe18 | ||
|
|
c1f9a99ac9 | ||
|
|
4aaafa8e38 | ||
|
|
b061e3ca9d | ||
|
|
75995aa50b | ||
|
|
0b75e25d74 | ||
|
|
b36390e017 | ||
|
|
67861acd73 | ||
|
|
6defe1bc0e | ||
|
|
d6ed9f3e60 | ||
|
|
d058d3579e | ||
|
|
ea11f701aa | ||
|
|
cef578008a | ||
|
|
872161b86f | ||
|
|
72d1915dd5 | ||
|
|
b864a22a99 | ||
|
|
65baac45d0 | ||
|
|
8fc1f44305 | ||
|
|
3bb27825ac | ||
|
|
4471778363 | ||
|
|
42340296c1 | ||
|
|
56dc31d166 | ||
|
|
9789772d19 | ||
|
|
5b915734b1 | ||
|
|
462f218456 | ||
|
|
7d468c0541 | ||
|
|
743bfc5a4d | ||
|
|
fb74cd49b5 | ||
|
|
cb719cf892 | ||
|
|
a5d4e7299b | ||
|
|
f448ad5554 | ||
|
|
27b7fec1ed | ||
|
|
93c4b3e8a2 | ||
|
|
76f879e857 | ||
|
|
7f853d6174 | ||
|
|
89f187c6fc | ||
|
|
56112b4893 | ||
|
|
56ef8499f1 | ||
|
|
d09a101d2c | ||
|
|
db3e7639ff | ||
|
|
0222eef07a | ||
|
|
1c1c5763b6 | ||
|
|
9553abff31 | ||
|
|
6588ec0e03 | ||
|
|
593de8e6be | ||
|
|
f791b03b68 | ||
|
|
e2647e6ecb | ||
|
|
787c2443dd | ||
|
|
e8308450c2 | ||
|
|
3659c8e5bf | ||
|
|
8a06a852fd | ||
|
|
46ef9bb496 | ||
|
|
2f9902abcb | ||
|
|
2933b52a59 | ||
|
|
f51aa12d4c | ||
|
|
576c4a70cd | ||
|
|
fe470629f3 | ||
|
|
caebff9d0f | ||
|
|
259a72a112 | ||
|
|
980956273e | ||
|
|
b16a713eb6 | ||
|
|
73bf6114e9 | ||
|
|
6be3f130e2 | ||
|
|
0e6087b785 | ||
|
|
74ff11e24e | ||
|
|
a2fe692423 | ||
|
|
9755d47bad | ||
|
|
19b63f1862 | ||
|
|
e67186696d | ||
|
|
933197376f | ||
|
|
a0a5515f3d | ||
|
|
22ae4bbda5 | ||
|
|
aa0de8704e | ||
|
|
2d27ce8a11 | ||
|
|
6ac99a35fb | ||
|
|
28b30f0617 | ||
|
|
f406553009 | ||
|
|
2e9d0973a7 | ||
|
|
2e61176365 | ||
|
|
bd47f19560 | ||
|
|
b4cb488597 | ||
|
|
90f30f88d8 | ||
|
|
bf1c342a1a | ||
|
|
d1892c9b3e | ||
|
|
284a9996df | ||
|
|
ea982deb24 | ||
|
|
f135c55acc | ||
|
|
65c2618628 | ||
|
|
85939e7ebb | ||
|
|
dbe9cbf318 | ||
|
|
18b6abf36c | ||
|
|
a849f1790b | ||
|
|
e26d2feae3 | ||
|
|
dd80ef62c9 | ||
|
|
475a0a11f1 | ||
|
|
5a6bb24ffb | ||
|
|
dbd879641b | ||
|
|
5141662547 | ||
|
|
6212f736c1 | ||
|
|
01da4ddf25 | ||
|
|
92ea44545f | ||
|
|
0fa1ad4110 | ||
|
|
1cc12b0dd5 | ||
|
|
6abc81dc81 | ||
|
|
ca9bbd0fa1 | ||
|
|
2a5a1aa7eb | ||
|
|
a7f5c98c26 | ||
|
|
c61bbd7783 | ||
|
|
c7310ae232 | ||
|
|
19fc24ab1a | ||
|
|
8f3c88e237 | ||
|
|
0dbae42a18 | ||
|
|
4c5d5578c1 | ||
|
|
ae8f49b794 | ||
|
|
4c9b283b88 | ||
|
|
6404d03a7e | ||
|
|
f9d67b687b | ||
|
|
76d77a9d6a | ||
|
|
b211f29ea0 | ||
|
|
183de69f67 | ||
|
|
05cbd4ac90 | ||
|
|
2990186fe5 | ||
|
|
4a52ca32ef | ||
|
|
eeb53b1ac0 | ||
|
|
2f4c5e3e77 | ||
|
|
80de0cd4a1 | ||
|
|
b769ebe804 | ||
|
|
aa46e716de | ||
|
|
7a91b6261a | ||
|
|
c4466850ce | ||
|
|
1d1510d266 | ||
|
|
6a5d4b52dd | ||
|
|
563efc51bb | ||
|
|
d2b2a25beb | ||
|
|
c2ac68c147 | ||
|
|
9175cd2bd5 | ||
|
|
9b39dfef62 | ||
|
|
75618cff2b | ||
|
|
7eb40ea209 | ||
|
|
ebd29e0f10 | ||
|
|
18ff7841c9 | ||
|
|
88c1ecd957 | ||
|
|
24eadda911 | ||
|
|
dae73796cc | ||
|
|
b39c3c3fca | ||
|
|
5204ecf869 | ||
|
|
6aeb3db009 | ||
|
|
dfc50c1d82 | ||
|
|
2f98b8347d | ||
|
|
6e13212de0 | ||
|
|
38049e596e | ||
|
|
f508451824 | ||
|
|
7f23ef555c | ||
|
|
1932fa3679 | ||
|
|
feca909860 | ||
|
|
a36fe7426e | ||
|
|
1ef3792906 | ||
|
|
29d8b1b981 | ||
|
|
b2cece2de8 | ||
|
|
9b779aabf8 | ||
|
|
5e5270eb17 | ||
|
|
69fe9d7a13 | ||
|
|
e99c3b33ac | ||
|
|
52b4367897 | ||
|
|
323ca3039e | ||
|
|
51337cc1bb | ||
|
|
959da5d988 | ||
|
|
bcd3b26db4 | ||
|
|
ee75f7bcef | ||
|
|
dd985d90b2 | ||
|
|
a1da513f74 | ||
|
|
98ea8d3a3f | ||
|
|
ce946b33b9 | ||
|
|
fd968220cc | ||
|
|
5a107cdfc6 | ||
|
|
eebf94fa8e | ||
|
|
59bea24b91 | ||
|
|
67a62dabdb | ||
|
|
f379b27026 | ||
|
|
fad1dd5cd0 | ||
|
|
dffe0296a7 | ||
|
|
1d9e862a48 | ||
|
|
d7848526c0 | ||
|
|
4cb105178b | ||
|
|
600629146f | ||
|
|
a8d7a6590b | ||
|
|
2f29c60ff1 | ||
|
|
27df2766c5 | ||
|
|
e1826f41cb | ||
|
|
b3ca52ec39 | ||
|
|
654a24d6d4 | ||
|
|
378af81d7c | ||
|
|
cb8e71f758 | ||
|
|
3f3d7470c5 | ||
|
|
b0d984c252 | ||
|
|
9df7c32675 | ||
|
|
0176d92184 | ||
|
|
f0c5ccaaa5 | ||
|
|
249746c631 | ||
|
|
78a02a96c0 | ||
|
|
1b8e04d945 | ||
|
|
4b24771233 | ||
|
|
3c5c0f5a0b | ||
|
|
6a1f71539c | ||
|
|
df9e021246 | ||
|
|
d296520369 | ||
|
|
17883be12a | ||
|
|
f2943d0a26 | ||
|
|
3c76a6a290 | ||
|
|
a5c034dddb | ||
|
|
852727cef0 | ||
|
|
77b6cd065e | ||
|
|
6cd1ebfcc5 | ||
|
|
e66555f11c | ||
|
|
a049d816b1 | ||
|
|
6ac0f969a4 | ||
|
|
f9efbd429e | ||
|
|
1f7d13cba7 | ||
|
|
1e03f72754 | ||
|
|
abf222e6c5 | ||
|
|
9687132afd | ||
|
|
41a8c7b6f4 | ||
|
|
22ef5b457c | ||
|
|
19d1d0ad40 | ||
|
|
f099fbd2ae | ||
|
|
a139cccecd | ||
|
|
3daa0ac5c1 | ||
|
|
4e575d422e | ||
|
|
eb755f1ee4 | ||
|
|
b16636c69d | ||
|
|
6117faabc7 | ||
|
|
cc5e5c40ea | ||
|
|
2daae9e273 | ||
|
|
774e4f9931 | ||
|
|
f9579c14ff | ||
|
|
f535da3b48 | ||
|
|
5ed1bc08a2 | ||
|
|
f249c59158 | ||
|
|
fe16ff6e73 | ||
|
|
454d29e7d8 | ||
|
|
e0f01a4971 | ||
|
|
bf6e8cc9c0 | ||
|
|
0698afea29 | ||
|
|
ed1ab2f3fb | ||
|
|
62aefa0f5c | ||
|
|
0e0499c1fb | ||
|
|
fb32128ab0 | ||
|
|
fd36f66099 | ||
|
|
506a821280 | ||
|
|
98b0fc8ae6 | ||
|
|
f584d12934 | ||
|
|
4dd08c9f7b | ||
|
|
68354d557b | ||
|
|
85b534833f | ||
|
|
7ae718f62b |
No files matched your search
@@ -4,5 +4,6 @@ exclude_paths:
|
||||
- changelog/**
|
||||
- docs/**
|
||||
- pkg/proto/**
|
||||
- tests/acceptance/features/bootstrap/*
|
||||
|
||||
...
|
||||
+447
-145
@@ -1,7 +1,65 @@
|
||||
config = {
|
||||
'apiTests': {
|
||||
'coreBranch': 'master',
|
||||
'coreCommit': '175ced019d71973b03afbefc6e79172a39ae9e28',
|
||||
'numberOfParts': 2
|
||||
},
|
||||
'uiTests': {
|
||||
'phoenixBranch': 'master',
|
||||
'phoenixCommit': 'abce2ae2384c814c74de4efb65adc2c92244e08d',
|
||||
'suites': {
|
||||
'phoenixWebUI1': [
|
||||
'webUICreateFilesFolders',
|
||||
'webUIDeleteFilesFolders',
|
||||
'webUIFavorites',
|
||||
'webUIFiles',
|
||||
'webUILogin',
|
||||
'webUINotifications',
|
||||
],
|
||||
'phoenixWebUI2': [
|
||||
'webUIPrivateLinks',
|
||||
'webUIRenameFiles',
|
||||
'webUIRenameFolders',
|
||||
'webUITrashbin',
|
||||
'webUIUpload',
|
||||
'webUIAccount',
|
||||
# All tests in the following suites are skipped currently
|
||||
# so they won't run now but when they are enabled they will run
|
||||
'webUIRestrictSharing',
|
||||
'webUISharingAutocompletion',
|
||||
'webUISharingInternalGroups',
|
||||
'webUISharingInternalUsers',
|
||||
'webUISharingPermissionsUsers',
|
||||
'webUISharingFilePermissionsGroups',
|
||||
'webUISharingFolderPermissionsGroups',
|
||||
'webUISharingFolderAdvancedPermissionsGroups',
|
||||
'webUIResharing',
|
||||
'webUISharingPublic',
|
||||
'webUISharingPublicDifferentRoles',
|
||||
'webUISharingAcceptShares',
|
||||
'webUISharingFilePermissionMultipleUsers',
|
||||
'webUISharingFolderPermissionMultipleUsers',
|
||||
'webUISharingFolderAdvancedPermissionMultipleUsers',
|
||||
'webUISharingNotifications',
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def getUITestSuiteNames():
|
||||
return config['uiTests']['suites'].keys()
|
||||
|
||||
def getUITestSuites():
|
||||
return config['uiTests']['suites']
|
||||
|
||||
def getCoreApiTestPipelineNames():
|
||||
names = []
|
||||
for runPart in range(1, config['apiTests']['numberOfParts'] + 1):
|
||||
names.append('coreApiTests-%s' % runPart)
|
||||
return names
|
||||
|
||||
def main(ctx):
|
||||
before = [
|
||||
testing(ctx),
|
||||
]
|
||||
before = testPipelines(ctx)
|
||||
|
||||
stages = [
|
||||
docker(ctx, 'amd64'),
|
||||
@@ -18,34 +76,36 @@ def main(ctx):
|
||||
readme(ctx),
|
||||
badges(ctx),
|
||||
website(ctx),
|
||||
updateDeployment(ctx)
|
||||
]
|
||||
|
||||
return before + stages + after
|
||||
|
||||
def testing(ctx):
|
||||
def testPipelines(ctx):
|
||||
|
||||
pipelines = [
|
||||
linting(ctx),
|
||||
unitTests(ctx),
|
||||
localApiTestsOcStorage(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'])
|
||||
]
|
||||
|
||||
for runPart in range(1, config['apiTests']['numberOfParts'] + 1):
|
||||
pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts']))
|
||||
|
||||
pipelines += uiTests(ctx, config['uiTests']['phoenixBranch'], config['uiTests']['phoenixCommit'])
|
||||
return pipelines
|
||||
|
||||
def linting(ctx):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'docker',
|
||||
'name': 'testing',
|
||||
'name': 'linting',
|
||||
'platform': {
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps': [
|
||||
{
|
||||
'name': 'generate',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'make generate',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
],
|
||||
},
|
||||
'steps':
|
||||
generate() + [
|
||||
{
|
||||
'name': 'vet',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
@@ -88,20 +148,28 @@ def testing(ctx):
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'build',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'make build',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
'refs/tags/**',
|
||||
'refs/pull/**',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def unitTests(ctx):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'docker',
|
||||
'name': 'unitTests',
|
||||
'platform': {
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps':
|
||||
generate() +
|
||||
build() + [
|
||||
{
|
||||
'name': 'test',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
@@ -126,81 +194,53 @@ def testing(ctx):
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
'refs/tags/**',
|
||||
'refs/pull/**',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def localApiTestsOcStorage(ctx, coreBranch = 'master', coreCommit = ''):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'docker',
|
||||
'name': 'localApiTestsOcStorage',
|
||||
'platform': {
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps':
|
||||
generate() +
|
||||
build() +
|
||||
ocisServer() +
|
||||
cloneCoreRepos(coreBranch, coreCommit) + [
|
||||
{
|
||||
'name': 'ocis-server',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'detach': True,
|
||||
'environment' : {
|
||||
'REVA_LDAP_HOSTNAME': 'ldap',
|
||||
'REVA_LDAP_PORT': 636,
|
||||
'REVA_LDAP_BIND_PASSWORD': 'admin',
|
||||
'REVA_LDAP_BIND_DN': 'cn=admin,dc=owncloud,dc=com',
|
||||
'REVA_LDAP_BASE_DN': 'dc=owncloud,dc=com',
|
||||
'REVA_STORAGE_HOME_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'REVA_STORAGE_LOCAL_ROOT': '/srv/app/tmp/reva/root',
|
||||
'REVA_STORAGE_OWNCLOUD_DATADIR': '/srv/app/tmp/reva/data',
|
||||
'REVA_STORAGE_OC_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'REVA_STORAGE_OWNCLOUD_REDIS_ADDR': 'redis:6379',
|
||||
},
|
||||
'commands': [
|
||||
'mkdir -p /srv/app/tmp/reva',
|
||||
'bin/ocis server'
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'acceptance-tests',
|
||||
'name': 'localApiTestsOcStorage',
|
||||
'image': 'owncloudci/php:7.2',
|
||||
'pull': 'always',
|
||||
'environment' : {
|
||||
'TEST_SERVER_URL': 'http://ocis-server:9140',
|
||||
'TEST_SERVER_URL': 'https://ocis-server:9200',
|
||||
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva/',
|
||||
'TEST_EXTERNAL_USER_BACKENDS':'true',
|
||||
'REVA_LDAP_HOSTNAME':'ldap',
|
||||
'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton',
|
||||
'TEST_OCIS':'true',
|
||||
'BEHAT_FILTER_TAGS': '~@skipOnOcis&&~@skipOnLDAP&&@TestAlsoOnExternalUserBackend&&~@local_storage',
|
||||
'BEHAT_FILTER_TAGS': '~@skipOnOcis-OC-Storage',
|
||||
'PATH_TO_CORE': '/srv/app/testrunner'
|
||||
},
|
||||
'commands': [
|
||||
'git clone -b master --depth=1 https://github.com/owncloud/core.git /srv/app/testrunner',
|
||||
'cd /srv/app/testrunner',
|
||||
'make test-acceptance-api',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
'services': [
|
||||
{
|
||||
'name': 'ldap',
|
||||
'image': 'osixia/openldap',
|
||||
'pull': 'always',
|
||||
'environment': {
|
||||
'LDAP_DOMAIN': 'owncloud.com',
|
||||
'LDAP_ORGANISATION': 'ownCloud',
|
||||
'LDAP_ADMIN_PASSWORD': 'admin',
|
||||
'LDAP_TLS_VERIFY_CLIENT': 'never',
|
||||
'HOSTNAME': 'ldap'
|
||||
},
|
||||
},
|
||||
{
|
||||
'name': 'redis',
|
||||
'image': 'webhippie/redis',
|
||||
'pull': 'always',
|
||||
'environment': {
|
||||
'REDIS_DATABASES': 1
|
||||
},
|
||||
'volumes': [{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
}]
|
||||
},
|
||||
],
|
||||
'services':
|
||||
redis(),
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
@@ -216,6 +256,142 @@ def testing(ctx):
|
||||
},
|
||||
}
|
||||
|
||||
def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, number_of_parts = 1):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'docker',
|
||||
'name': 'coreApiTests-%s' % (part_number),
|
||||
'platform': {
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps':
|
||||
generate() +
|
||||
build() +
|
||||
ocisServer() +
|
||||
cloneCoreRepos(coreBranch, coreCommit) + [
|
||||
{
|
||||
'name': 'oC10ApiTests-%s' % (part_number),
|
||||
'image': 'owncloudci/php:7.2',
|
||||
'pull': 'always',
|
||||
'environment' : {
|
||||
'TEST_SERVER_URL': 'https://ocis-server:9200',
|
||||
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva/',
|
||||
'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton',
|
||||
'TEST_OCIS':'true',
|
||||
'BEHAT_FILTER_TAGS': '~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@local_storage',
|
||||
'DIVIDE_INTO_NUM_PARTS': number_of_parts,
|
||||
'RUN_PART': part_number,
|
||||
'EXPECTED_FAILURES_FILE': '/drone/src/tests/acceptance/expected-failures-on-OC-storage.txt'
|
||||
},
|
||||
'commands': [
|
||||
'cd /srv/app/testrunner',
|
||||
'make test-acceptance-api',
|
||||
],
|
||||
'volumes': [{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
}]
|
||||
},
|
||||
],
|
||||
'services':
|
||||
redis(),
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'temp': {},
|
||||
},
|
||||
],
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
'refs/tags/**',
|
||||
'refs/pull/**',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def uiTests(ctx, phoenixBranch, phoenixCommit):
|
||||
suiteNames = getUITestSuiteNames()
|
||||
return [uiTestPipeline(suiteName, phoenixBranch, phoenixCommit) for suiteName in suiteNames]
|
||||
|
||||
def uiTestPipeline(suiteName, phoenixBranch = 'master', phoenixCommit = ''):
|
||||
suites = getUITestSuites()
|
||||
paths = ""
|
||||
for path in suites[suiteName]:
|
||||
paths = paths + "tests/acceptance/features/" + path + " "
|
||||
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'docker',
|
||||
'name': suiteName,
|
||||
'platform': {
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps':
|
||||
generate() +
|
||||
build() +
|
||||
ocisServer() + [
|
||||
{
|
||||
'name': 'webUITests',
|
||||
'image': 'owncloudci/nodejs:11',
|
||||
'pull': 'always',
|
||||
'environment': {
|
||||
'SERVER_HOST': 'https://ocis-server:9200',
|
||||
'BACKEND_HOST': 'https://ocis-server:9200',
|
||||
'RUN_ON_OCIS': 'true',
|
||||
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva',
|
||||
'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton',
|
||||
'PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
|
||||
'TEST_TAGS': 'not @skipOnOCIS and not @skip',
|
||||
'LOCAL_UPLOAD_DIR': '/uploads',
|
||||
'NODE_TLS_REJECT_UNAUTHORIZED': 0,
|
||||
'TEST_PATHS': paths,
|
||||
},
|
||||
'commands': [
|
||||
'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing',
|
||||
'git clone -b %s --single-branch --no-tags https://github.com/owncloud/phoenix.git /srv/app/phoenix' % (phoenixBranch),
|
||||
'cp -r /srv/app/phoenix/tests/acceptance/filesForUpload/* /uploads',
|
||||
'cd /srv/app/phoenix',
|
||||
] + ([
|
||||
'git checkout %s' % (phoenixCommit)
|
||||
] if phoenixCommit != '' else []) + [
|
||||
'yarn install-all',
|
||||
'yarn run acceptance-tests-drone'
|
||||
],
|
||||
'volumes': [{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
{
|
||||
'name': 'uploads',
|
||||
'path': '/uploads'
|
||||
}]
|
||||
},
|
||||
],
|
||||
'services':
|
||||
redis() +
|
||||
selenium(),
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'temp': {},
|
||||
},
|
||||
{
|
||||
'name': 'uploads',
|
||||
'temp': {}
|
||||
}
|
||||
],
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
'refs/tags/**',
|
||||
'refs/pull/**',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def docker(ctx, arch):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
@@ -225,35 +401,9 @@ def docker(ctx, arch):
|
||||
'os': 'linux',
|
||||
'arch': arch,
|
||||
},
|
||||
'steps': [
|
||||
{
|
||||
'name': 'generate',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'make generate',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'build',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'make build',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
],
|
||||
},
|
||||
'steps':
|
||||
generate() +
|
||||
build() + [
|
||||
{
|
||||
'name': 'dryrun',
|
||||
'image': 'plugins/docker:18.09',
|
||||
@@ -304,8 +454,10 @@ def docker(ctx, arch):
|
||||
},
|
||||
],
|
||||
'depends_on': [
|
||||
'testing',
|
||||
],
|
||||
'linting',
|
||||
'unitTests',
|
||||
'localApiTestsOcStorage',
|
||||
] + getCoreApiTestPipelineNames() + getUITestSuiteNames(),
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
@@ -363,21 +515,8 @@ def binary(ctx, name):
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps': [
|
||||
{
|
||||
'name': 'generate',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'make generate',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
],
|
||||
},
|
||||
'steps':
|
||||
generate() + [
|
||||
{
|
||||
'name': 'build',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
@@ -461,8 +600,10 @@ def binary(ctx, name):
|
||||
},
|
||||
],
|
||||
'depends_on': [
|
||||
'testing',
|
||||
],
|
||||
'linting',
|
||||
'unitTests',
|
||||
'localApiTestsOcStorage',
|
||||
] + getCoreApiTestPipelineNames() + getUITestSuiteNames(),
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
@@ -472,6 +613,46 @@ def binary(ctx, name):
|
||||
},
|
||||
}
|
||||
|
||||
def updateDeployment(ctx):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'docker',
|
||||
'name': 'updateDeployment',
|
||||
'platform': {
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps': [
|
||||
{
|
||||
'name': 'webhook',
|
||||
'image': 'plugins/webhook',
|
||||
'settings': {
|
||||
'username': {
|
||||
'from_secret': 'webhook_username',
|
||||
},
|
||||
'password': {
|
||||
'from_secret': 'webhook_password',
|
||||
},
|
||||
'method': 'GET',
|
||||
'urls': 'https://ocis.owncloud.works/hooks/update-ocis',
|
||||
}
|
||||
}
|
||||
],
|
||||
'depends_on': [
|
||||
'amd64',
|
||||
'arm64',
|
||||
'arm',
|
||||
'linux',
|
||||
'darwin',
|
||||
'windows',
|
||||
],
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
def manifest(ctx):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
@@ -770,3 +951,124 @@ def website(ctx):
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def generate():
|
||||
return [
|
||||
{
|
||||
'name': 'generate',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'make generate',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
|
||||
def build():
|
||||
return [
|
||||
{
|
||||
'name': 'build',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'make build',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
def ocisServer():
|
||||
return [
|
||||
{
|
||||
'name': 'ocis-server',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'detach': True,
|
||||
'environment' : {
|
||||
'OCIS_LOG_LEVEL': 'debug',
|
||||
|
||||
'REVA_STORAGE_HOME_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'REVA_STORAGE_LOCAL_ROOT': '/srv/app/tmp/reva/root',
|
||||
'REVA_STORAGE_OWNCLOUD_DATADIR': '/srv/app/tmp/reva/data',
|
||||
'REVA_STORAGE_OC_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'REVA_STORAGE_OWNCLOUD_REDIS_ADDR': 'redis:6379',
|
||||
'REVA_LDAP_IDP': 'https://ocis-server:9200',
|
||||
'REVA_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'PROXY_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'REVA_STORAGE_OC_DATA_SERVER_URL': 'http://ocis-server:9164/data',
|
||||
'REVA_DATAGATEWAY_URL': 'https://ocis-server:9200/data',
|
||||
'REVA_FRONTEND_URL': 'https://ocis-server:9200',
|
||||
'PHOENIX_WEB_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
|
||||
'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/tests/config/drone/identifier-registration.yml',
|
||||
'KONNECTD_ISS': 'https://ocis-server:9200',
|
||||
'KONNECTD_TLS': 'true',
|
||||
},
|
||||
'commands': [
|
||||
'apk add mailcap', # install /etc/mime.types
|
||||
'mkdir -p /srv/app/tmp/reva',
|
||||
'bin/ocis server'
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app'
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
def cloneCoreRepos(coreBranch, coreCommit):
|
||||
return [
|
||||
{
|
||||
'name': 'clone-core-repos',
|
||||
'image': 'owncloudci/php:7.2',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/tmp/testing',
|
||||
'git clone -b %s --single-branch --no-tags https://github.com/owncloud/core.git /srv/app/testrunner' % (coreBranch),
|
||||
'cd /srv/app/testrunner',
|
||||
] + ([
|
||||
'git checkout %s' % (coreCommit)
|
||||
] if coreCommit != '' else []),
|
||||
'volumes': [{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
}]
|
||||
}
|
||||
]
|
||||
|
||||
def redis():
|
||||
return [
|
||||
{
|
||||
'name': 'redis',
|
||||
'image': 'webhippie/redis',
|
||||
'pull': 'always',
|
||||
'environment': {
|
||||
'REDIS_DATABASES': 1
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
def selenium():
|
||||
return [
|
||||
{
|
||||
'name': 'selenium',
|
||||
'image': 'selenium/standalone-chrome-debug:3.141.59-20200326',
|
||||
'pull': 'always',
|
||||
'volumes': [{
|
||||
'name': 'uploads',
|
||||
'path': '/uploads'
|
||||
}],
|
||||
}
|
||||
]
|
||||
+11
@@ -5,3 +5,14 @@ coverage.out
|
||||
/hugo
|
||||
*.key
|
||||
*crt
|
||||
|
||||
/eos-docker
|
||||
|
||||
# API acceptance tests
|
||||
composer.lock
|
||||
/vendor
|
||||
vendor-bin/**/vendor
|
||||
vendor-bin/**/composer.lock
|
||||
tests/acceptance/output
|
||||
|
||||
.idea
|
||||
+299
-3
@@ -2,14 +2,77 @@
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Add missing env vars to docker compose: [#392](https://github.com/owncloud/ocis/pull/392)
|
||||
* Bugfix - Don't enforce empty external apps slice: [#473](https://github.com/owncloud/ocis/pull/473)
|
||||
* Bugfix - Fix director selection in proxy: [#521](https://github.com/owncloud/ocis/pull/521)
|
||||
* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#416](https://github.com/owncloud/ocis/pull/416)
|
||||
* Change - Add the thumbnails command: [#156](https://github.com/owncloud/ocis/issues/156)
|
||||
* Change - Integrate import command from ocis-migration: [#249](https://github.com/owncloud/ocis/pull/249)
|
||||
* Change - Initial release of basic version: [#2](https://github.com/owncloud/ocis/issues/2)
|
||||
* Change - Add cli-commands to manage accounts: [#115](https://github.com/owncloud/product/issues/115)
|
||||
* Change - Start ocis-accounts with the ocis server command: [#25](https://github.com/owncloud/product/issues/25)
|
||||
* Change - Switch over to a new custom-built runtime: [#287](https://github.com/owncloud/ocis/pull/287)
|
||||
* Change - Account management permissions for Admin role: [#124](https://github.com/owncloud/product/issues/124)
|
||||
* Change - Make ocis-settings available: [#287](https://github.com/owncloud/ocis/pull/287)
|
||||
* Change - Update ocis-settings to v0.2.0: [#467](https://github.com/owncloud/ocis/pull/467)
|
||||
* Change - Start ocis-proxy with the ocis server command: [#119](https://github.com/owncloud/ocis/issues/119)
|
||||
* Enhancement - Update proxy to v0.2.0: [#167](https://github.com/owncloud/ocis/pull/167)
|
||||
* Change - Update ocis-accounts to v0.4.0: [#479](https://github.com/owncloud/ocis/pull/479)
|
||||
* Change - Update ocis-ocs to v0.3.0: [#500](https://github.com/owncloud/ocis/pull/500)
|
||||
* Change - Update ocis-phoenix to v0.13.0: [#487](https://github.com/owncloud/ocis/pull/487)
|
||||
* Change - Update ocis-proxy to v0.7.0: [#476](https://github.com/owncloud/ocis/pull/476)
|
||||
* Change - Update ocis-reva to 0.13.0: [#496](https://github.com/owncloud/ocis/pull/496)
|
||||
* Change - Update reva config: [#336](https://github.com/owncloud/ocis/pull/336)
|
||||
* Change - Update ocis-settings to v0.3.0: [#490](https://github.com/owncloud/ocis/pull/490)
|
||||
* Enhancement - Document how to run OCIS on top of EOS: [#172](https://github.com/owncloud/ocis/pull/172)
|
||||
* Enhancement - Simplify tracing config: [#92](https://github.com/owncloud/product/issues/92)
|
||||
* Enhancement - Add new REVA config variables to docs: [#345](https://github.com/owncloud/ocis/pull/345)
|
||||
* Enhancement - Update extensions: [#180](https://github.com/owncloud/ocis/pull/180)
|
||||
* Enhancement - Update extensions 2020-07-01: [#357](https://github.com/owncloud/ocis/pull/357)
|
||||
* Enhancement - Update extensions 2020-09-02: [#516](https://github.com/owncloud/ocis/pull/516)
|
||||
* Enhancement - Update extensions: [#209](https://github.com/owncloud/ocis/pull/209)
|
||||
* Enhancement - Update extensions: [#151](https://github.com/owncloud/ocis/pull/151)
|
||||
* Enhancement - Update extensions 2020-07-10: [#376](https://github.com/owncloud/ocis/pull/376)
|
||||
* Enhancement - Update extensions: [#290](https://github.com/owncloud/ocis/pull/290)
|
||||
* Enhancement - Update ocis-reva to 0.4.0: [#295](https://github.com/owncloud/ocis/pull/295)
|
||||
* Enhancement - Update extensions: [#209](https://github.com/owncloud/ocis/pull/209)
|
||||
* Enhancement - Update extensions 2020-06-29: [#334](https://github.com/owncloud/ocis/pull/334)
|
||||
* Enhancement - Update proxy and reva: [#466](https://github.com/owncloud/ocis/pull/466)
|
||||
* Enhancement - Update proxy to v0.2.0: [#167](https://github.com/owncloud/ocis/pull/167)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Add missing env vars to docker compose: [#392](https://github.com/owncloud/ocis/pull/392)
|
||||
|
||||
Without setting `REVA_FRONTEND_URL` and `REVA_DATAGATEWAY_URL` uploads would default to
|
||||
locahost and fail if `OCIS_DOMAIN` was used to run ocis on a remote host.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/392
|
||||
|
||||
|
||||
* Bugfix - Don't enforce empty external apps slice: [#473](https://github.com/owncloud/ocis/pull/473)
|
||||
|
||||
The command for ocis-phoenix enforced an empty external apps configuration. This was
|
||||
removed, as it was blocking a new set of default external apps in ocis-phoenix.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/473
|
||||
|
||||
|
||||
* Bugfix - Fix director selection in proxy: [#521](https://github.com/owncloud/ocis/pull/521)
|
||||
|
||||
We fixed a bug in ocis-proxy where simultaneous requests could be executed on the wrong
|
||||
backend.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/521
|
||||
https://github.com/owncloud/ocis-proxy/pull/99
|
||||
|
||||
|
||||
* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#416](https://github.com/owncloud/ocis/pull/416)
|
||||
|
||||
ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/416
|
||||
|
||||
|
||||
* Change - Add the thumbnails command: [#156](https://github.com/owncloud/ocis/issues/156)
|
||||
|
||||
Added the thumbnails command so that the thumbnails service can get started via ocis.
|
||||
@@ -17,6 +80,12 @@
|
||||
https://github.com/owncloud/ocis/issues/156
|
||||
|
||||
|
||||
* Change - Integrate import command from ocis-migration: [#249](https://github.com/owncloud/ocis/pull/249)
|
||||
|
||||
https://github.com/owncloud/ocis/pull/249
|
||||
https://github.com/owncloud/ocis-migration
|
||||
|
||||
|
||||
* Change - Initial release of basic version: [#2](https://github.com/owncloud/ocis/issues/2)
|
||||
|
||||
Just prepared an initial basic version which simply embeds the minimum of required services in
|
||||
@@ -25,6 +94,75 @@
|
||||
https://github.com/owncloud/ocis/issues/2
|
||||
|
||||
|
||||
* Change - Add cli-commands to manage accounts: [#115](https://github.com/owncloud/product/issues/115)
|
||||
|
||||
COMMANDS: - list, ls List existing accounts - add, create Create a new account - update Make
|
||||
changes to an existing account - remove, rm Removes an existing account - inspect Show detailed
|
||||
data on an existing account - help, h Shows a list of commands or help for one command
|
||||
|
||||
https://github.com/owncloud/product/issues/115
|
||||
|
||||
|
||||
* Change - Start ocis-accounts with the ocis server command: [#25](https://github.com/owncloud/product/issues/25)
|
||||
|
||||
Starts ocis-accounts in single binary mode (./ocis server). This service stores the
|
||||
user-account information.
|
||||
|
||||
https://github.com/owncloud/product/issues/25
|
||||
https://github.com/owncloud/ocis/pull/239/files
|
||||
|
||||
|
||||
* Change - Switch over to a new custom-built runtime: [#287](https://github.com/owncloud/ocis/pull/287)
|
||||
|
||||
We moved away from using the go-micro runtime and are now using [our own
|
||||
runtime](https://github.com/refs/pman). This allows us to spawn service processes even
|
||||
when they are using different versions of go-micro. On top of that we now have the commands `ocis
|
||||
list`, `ocis kill` and `ocis run` available for service runtime management.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/287
|
||||
|
||||
|
||||
* Change - Account management permissions for Admin role: [#124](https://github.com/owncloud/product/issues/124)
|
||||
|
||||
We created an `AccountManagement` permission and added it to the default admin role. There are
|
||||
permission checks in place to protected http endpoints in ocis-accounts against requests
|
||||
without the permission. All existing default users (einstein, marie, richard) have the
|
||||
default user role now (doesn't have the `AccountManagement` permission). Additionally,
|
||||
there is a new default Admin user with credentials `moss:vista`.
|
||||
|
||||
Known issue: for users without the `AccountManagement` permission, the accounts UI
|
||||
extension is still available in the ocis-web app switcher, but the requests for loading the
|
||||
users will fail (as expected). We are working on a way to hide the accounts UI extension if the
|
||||
user doesn't have the `AccountManagement` permission.
|
||||
|
||||
https://github.com/owncloud/product/issues/124
|
||||
https://github.com/owncloud/ocis-settings/pull/59
|
||||
https://github.com/owncloud/ocis-settings/pull/66
|
||||
https://github.com/owncloud/ocis-settings/pull/67
|
||||
https://github.com/owncloud/ocis-settings/pull/69
|
||||
https://github.com/owncloud/ocis-proxy/pull/95
|
||||
https://github.com/owncloud/ocis-pkg/pull/59
|
||||
https://github.com/owncloud/ocis-accounts/pull/95
|
||||
https://github.com/owncloud/ocis-accounts/pull/100
|
||||
https://github.com/owncloud/ocis-accounts/pull/102
|
||||
|
||||
|
||||
* Change - Make ocis-settings available: [#287](https://github.com/owncloud/ocis/pull/287)
|
||||
|
||||
This version delivers `settings` as a new service. It is part of the array of services in the
|
||||
`server` command.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/287
|
||||
|
||||
|
||||
* Change - Update ocis-settings to v0.2.0: [#467](https://github.com/owncloud/ocis/pull/467)
|
||||
|
||||
This version delivers `settings` v0.2.0 and versions of accounts (v0.3.0) and phoenix
|
||||
(v0.15.0) needed for it.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/467
|
||||
|
||||
|
||||
* Change - Start ocis-proxy with the ocis server command: [#119](https://github.com/owncloud/ocis/issues/119)
|
||||
|
||||
Starts the proxy in single binary mode (./ocis server) on port 9200. The proxy serves as a
|
||||
@@ -34,9 +172,117 @@
|
||||
https://github.com/owncloud/ocis/issues/136
|
||||
|
||||
|
||||
* Enhancement - Update proxy to v0.2.0: [#167](https://github.com/owncloud/ocis/pull/167)
|
||||
* Change - Update ocis-accounts to v0.4.0: [#479](https://github.com/owncloud/ocis/pull/479)
|
||||
|
||||
https://github.com/owncloud/ocis/pull/167
|
||||
Provides a web UI for role assignment.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/479
|
||||
|
||||
|
||||
* Change - Update ocis-ocs to v0.3.0: [#500](https://github.com/owncloud/ocis/pull/500)
|
||||
|
||||
This change updates ocis-ocs to version 0.3.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/500
|
||||
|
||||
|
||||
* Change - Update ocis-phoenix to v0.13.0: [#487](https://github.com/owncloud/ocis/pull/487)
|
||||
|
||||
This version delivers ocis-phoenix v0.13.0.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/487
|
||||
|
||||
|
||||
* Change - Update ocis-proxy to v0.7.0: [#476](https://github.com/owncloud/ocis/pull/476)
|
||||
|
||||
This version delivers ocis-proxy v0.7.0.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/476
|
||||
|
||||
|
||||
* Change - Update ocis-reva to 0.13.0: [#496](https://github.com/owncloud/ocis/pull/496)
|
||||
|
||||
This version delivers ocis-reva v0.13.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/496
|
||||
|
||||
|
||||
* Change - Update reva config: [#336](https://github.com/owncloud/ocis/pull/336)
|
||||
|
||||
- EOS homes are not configured with an enable-flag anymore, but with a dedicated storage
|
||||
driver. - We're using it now and adapted default configs of storages
|
||||
|
||||
https://github.com/owncloud/ocis/pull/336
|
||||
https://github.com/owncloud/ocis/pull/337
|
||||
https://github.com/owncloud/ocis/pull/338
|
||||
https://github.com/owncloud/ocis-reva/pull/891
|
||||
|
||||
|
||||
* Change - Update ocis-settings to v0.3.0: [#490](https://github.com/owncloud/ocis/pull/490)
|
||||
|
||||
This version delivers ocis-settings v0.3.0.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/490
|
||||
|
||||
|
||||
* Enhancement - Document how to run OCIS on top of EOS: [#172](https://github.com/owncloud/ocis/pull/172)
|
||||
|
||||
We have added rules to the Makefile that use the official [eos docker
|
||||
images](https://gitlab.cern.ch/eos/eos-docker) to boot an eos cluster and configure OCIS
|
||||
to use it.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/172
|
||||
|
||||
|
||||
* Enhancement - Simplify tracing config: [#92](https://github.com/owncloud/product/issues/92)
|
||||
|
||||
We now apply the oCIS tracing config to all services which have tracing. With this it is possible
|
||||
to set one tracing config for all services at the same time.
|
||||
|
||||
https://github.com/owncloud/product/issues/92
|
||||
https://github.com/owncloud/ocis/pull/329
|
||||
https://github.com/owncloud/ocis/pull/409
|
||||
|
||||
|
||||
* Enhancement - Add new REVA config variables to docs: [#345](https://github.com/owncloud/ocis/pull/345)
|
||||
|
||||
With the default setup of running oCIS with ocis-proxy we need to set `REVA_DATAGATEWAY_URL`
|
||||
and `REVA_FRONTEND_URL` environment variables. We added those to the configuration
|
||||
instructions in the dev docs.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/345
|
||||
|
||||
|
||||
* Enhancement - Update extensions: [#180](https://github.com/owncloud/ocis/pull/180)
|
||||
|
||||
We've updated various extensions to a tagged release: - ocis-phoenix v0.4.0 (phoenix v0.7.0)
|
||||
- ocis-pkg v2.2.0 - ocis-proxy v0.3.1 - ocis-reva v0.1.1 - ocis-thumbnails v0.1.0 -
|
||||
ocis-webdav v0.1.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/180
|
||||
|
||||
|
||||
* Enhancement - Update extensions 2020-07-01: [#357](https://github.com/owncloud/ocis/pull/357)
|
||||
|
||||
- ocis-reva 0.9.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/357
|
||||
|
||||
|
||||
* Enhancement - Update extensions 2020-09-02: [#516](https://github.com/owncloud/ocis/pull/516)
|
||||
|
||||
- ocis-accounts 0.4.2-0.20200828150703-2ca83cf4ac20 - ocis-ocs 0.3.1 - ocis-settings
|
||||
0.3.2-0.20200828130413-0cc0f5bf26fe
|
||||
|
||||
https://github.com/owncloud/ocis/pull/516
|
||||
|
||||
|
||||
* Enhancement - Update extensions: [#209](https://github.com/owncloud/ocis/pull/209)
|
||||
|
||||
We've updated various extensions: - ocis-konnectd v0.3.1 - ocis-phoenix v0.5.0 (phoenix
|
||||
v0.8.0) - ocis-reva v0.2.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/209
|
||||
|
||||
|
||||
* Enhancement - Update extensions: [#151](https://github.com/owncloud/ocis/pull/151)
|
||||
@@ -47,3 +293,53 @@
|
||||
|
||||
https://github.com/owncloud/ocis/pull/151
|
||||
|
||||
|
||||
* Enhancement - Update extensions 2020-07-10: [#376](https://github.com/owncloud/ocis/pull/376)
|
||||
|
||||
- ocis-reva 0.10.0 - ocis-phoenix 0.9.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/376
|
||||
|
||||
|
||||
* Enhancement - Update extensions: [#290](https://github.com/owncloud/ocis/pull/290)
|
||||
|
||||
We've updated various extensions: - ocis-thumbnails v0.1.2 (tag) - ocis-reva v0.3.0 (tag)
|
||||
|
||||
https://github.com/owncloud/ocis/pull/290
|
||||
|
||||
|
||||
* Enhancement - Update ocis-reva to 0.4.0: [#295](https://github.com/owncloud/ocis/pull/295)
|
||||
|
||||
Brings in fixes for trashbin and TUS upload. Also adds partial implementation of public
|
||||
shares.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/295
|
||||
|
||||
|
||||
* Enhancement - Update extensions: [#209](https://github.com/owncloud/ocis/pull/209)
|
||||
|
||||
We've updated various extensions: - ocis-konnectd v0.3.1 - ocis-phoenix v0.6.0 - ocis-reva
|
||||
v0.2.1 - ocis-pkg v2.2.1 - ocis-thumbnails v0.1.2
|
||||
|
||||
https://github.com/owncloud/ocis/pull/209
|
||||
|
||||
|
||||
* Enhancement - Update extensions 2020-06-29: [#334](https://github.com/owncloud/ocis/pull/334)
|
||||
|
||||
- ocis-proxy 0.4.0 - ocis-migration 0.2.0 - ocis-reva 0.8.0 - ocis-phoenix 0.8.1
|
||||
|
||||
https://github.com/owncloud/ocis/pull/334
|
||||
|
||||
|
||||
* Enhancement - Update proxy and reva: [#466](https://github.com/owncloud/ocis/pull/466)
|
||||
|
||||
- ocis-reva contains a lot of sharing, eos and trash fixes - ocis-proxy contains fixes to use
|
||||
ocis on top of eos
|
||||
|
||||
https://github.com/owncloud/ocis/pull/466
|
||||
|
||||
|
||||
* Enhancement - Update proxy to v0.2.0: [#167](https://github.com/owncloud/ocis/pull/167)
|
||||
|
||||
https://github.com/owncloud/ocis/pull/167
|
||||
|
||||
@@ -187,8 +187,8 @@
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Copyright 2020 ownCloud GmbH
|
||||
|
||||
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
|
||||
|
||||
@@ -4,6 +4,7 @@ IMPORT := github.com/owncloud/$(NAME)
|
||||
BIN := bin
|
||||
DIST := dist
|
||||
HUGO := hugo
|
||||
CONFIG := config/identifier-registration.yaml
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
EXECUTABLE := $(NAME).exe
|
||||
@@ -46,6 +47,7 @@ ifndef DATE
|
||||
endif
|
||||
|
||||
LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)"
|
||||
DEBUG_LDFLAGS += -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)"
|
||||
GCFLAGS += all=-N -l
|
||||
|
||||
.PHONY: all
|
||||
@@ -56,10 +58,14 @@ sync:
|
||||
go mod download
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
clean: clean-config
|
||||
go clean -i ./...
|
||||
rm -rf $(BIN) $(DIST) $(HUGO)
|
||||
|
||||
.PHONY: clean-config
|
||||
clean-config:
|
||||
rm -rf $(CONFIG)
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
gofmt -s -w $(SOURCES)
|
||||
@@ -68,10 +74,6 @@ fmt:
|
||||
vet:
|
||||
go vet $(PACKAGES)
|
||||
|
||||
.PHONY: staticcheck
|
||||
staticcheck:
|
||||
go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES)
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
for PKG in $(PACKAGES); do go run golang.org/x/lint/golint -set_exit_status $$PKG || exit 1; done;
|
||||
@@ -99,7 +101,14 @@ $(BIN)/$(EXECUTABLE): $(SOURCES)
|
||||
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME)
|
||||
|
||||
$(BIN)/$(EXECUTABLE)-debug: $(SOURCES)
|
||||
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME)
|
||||
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(DEBUG_LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME)
|
||||
|
||||
$(BIN)/$(EXECUTABLE)-linux: $(SOURCES)
|
||||
GOOS=linux GOARCH=amd64 $(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME)
|
||||
|
||||
.PHONY: staticcheck
|
||||
staticcheck:
|
||||
go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES)
|
||||
|
||||
.PHONY: release
|
||||
release: release-dirs release-linux release-windows release-darwin release-copy release-check
|
||||
@@ -139,17 +148,40 @@ docs-copy:
|
||||
git init; \
|
||||
git remote rm origin; \
|
||||
git remote add origin https://github.com/owncloud/owncloud.github.io; \
|
||||
git fetch; \
|
||||
git fetch --depth=1; \
|
||||
git checkout origin/source -f; \
|
||||
rsync --delete -ax ../docs/ content/$(NAME)
|
||||
rsync --delete -ax --exclude 'static' ../docs/ content/$(NAME); \
|
||||
rsync --delete -ax ../docs/static/ static/$(NAME); \
|
||||
|
||||
.PHONY: config-docs-generate
|
||||
config-docs-generate:
|
||||
go run github.com/owncloud/flaex >| docs/configuration.md
|
||||
|
||||
.PHONY: docs-build
|
||||
docs-build:
|
||||
cd $(HUGO); hugo
|
||||
|
||||
.PHONY: docs
|
||||
docs: docs-copy docs-build
|
||||
docs: config-docs-generate docs-copy docs-build
|
||||
|
||||
.PHONY: watch
|
||||
watch:
|
||||
go run github.com/cespare/reflex -c reflex.conf
|
||||
|
||||
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
|
||||
|
||||
.PHONY: test-acceptance-api
|
||||
test-acceptance-api: vendor-bin/behat/vendor
|
||||
BEHAT_BIN=$(BEHAT_BIN) $(PATH_TO_CORE)/tests/acceptance/run.sh --remote --type api
|
||||
|
||||
vendor/bamarni/composer-bin-plugin: composer.lock
|
||||
composer install
|
||||
|
||||
vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/composer.lock
|
||||
composer bin behat install --no-progress
|
||||
|
||||
vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json
|
||||
@echo behat composer.lock is not up to date.
|
||||
|
||||
composer.lock: composer.json
|
||||
@echo composer.lock is not up to date.
|
||||
@@ -31,6 +31,7 @@ make generate build
|
||||
### Redis server
|
||||
|
||||
You will need to start a redis server as a cache. The ownCloud storage driver currently will try to connect to the default port.
|
||||
A quick way to start one for testing is using this docker instance: `docker run -e REDIS_DATABASES=1 -p 6379:6379 -d webhippie/redis:latest`
|
||||
|
||||
### Root storage
|
||||
|
||||
@@ -42,19 +43,25 @@ mkdir -p /var/tmp/reva/root/{home,oc}
|
||||
|
||||
## Quickstart
|
||||
|
||||
After building the binary with the above steps and also setting up the prerequisites, run this command to start all services:
|
||||
- Make sure that the binary was built with the above steps.
|
||||
|
||||
```console
|
||||
./bin/ocis server
|
||||
```
|
||||
- Now start all services with the following command
|
||||
|
||||
Open [https://localhost:9200](https://localhost:9200) and login using one of the demo accounts:
|
||||
```console
|
||||
./bin/ocis server
|
||||
```
|
||||
|
||||
```console
|
||||
albert:relativity
|
||||
marie:radioactivty
|
||||
richard:superfluidity
|
||||
```
|
||||
- Open [https://localhost:9200](https://localhost:9200)
|
||||
|
||||
- Accept the self-signed certificate (it is regenerated every time the server starts)
|
||||
|
||||
- Login using one of the demo accounts:
|
||||
|
||||
```console
|
||||
einstein:relativity
|
||||
marie:radioactivity
|
||||
richard:superfluidity
|
||||
```
|
||||
|
||||
## Running single extensions
|
||||
|
||||
@@ -82,5 +89,5 @@ Apache-2.0
|
||||
## Copyright
|
||||
|
||||
```console
|
||||
Copyright (c) 2019 ownCloud GmbH <https://owncloud.com>
|
||||
Copyright (c) 2020 ownCloud GmbH <https://owncloud.com>
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
Enhancement: Document how to run OCIS on top of EOS
|
||||
|
||||
We have added rules to the Makefile that use the official [eos docker images](https://gitlab.cern.ch/eos/eos-docker) to boot an eos cluster and configure OCIS to use it.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/172
|
||||
@@ -0,0 +1,5 @@
|
||||
Bugfix: add missing env vars to docker compose
|
||||
|
||||
Without setting `REVA_FRONTEND_URL` and `REVA_DATAGATEWAY_URL` uploads would default to locahost and fail if `OCIS_DOMAIN` was used to run ocis on a remote host.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/392
|
||||
@@ -0,0 +1,5 @@
|
||||
Bugfix: Don't enforce empty external apps slice
|
||||
|
||||
The command for ocis-phoenix enforced an empty external apps configuration. This was removed, as it was blocking a new set of default external apps in ocis-phoenix.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/473
|
||||
@@ -0,0 +1,4 @@
|
||||
Change: Integrate import command from ocis-migration
|
||||
|
||||
https://github.com/owncloud/ocis/pull/249
|
||||
https://github.com/owncloud/ocis-migration
|
||||
@@ -0,0 +1,11 @@
|
||||
Change: Add cli-commands to manage accounts
|
||||
|
||||
COMMANDS:
|
||||
- list, ls List existing accounts
|
||||
- add, create Create a new account
|
||||
- update Make changes to an existing account
|
||||
- remove, rm Removes an existing account
|
||||
- inspect Show detailed data on an existing account
|
||||
- help, h Shows a list of commands or help for one command
|
||||
|
||||
https://github.com/owncloud/product/issues/115
|
||||
@@ -0,0 +1,6 @@
|
||||
Change: Start ocis-accounts with the ocis server command
|
||||
|
||||
Starts ocis-accounts in single binary mode (./ocis server). This service stores the user-account information.
|
||||
|
||||
https://github.com/owncloud/product/issues/25
|
||||
https://github.com/owncloud/ocis/pull/239/files
|
||||
@@ -0,0 +1,7 @@
|
||||
Change: Switch over to a new custom-built runtime
|
||||
|
||||
We moved away from using the go-micro runtime and are now using [our own runtime](https://github.com/refs/pman).
|
||||
This allows us to spawn service processes even when they are using different versions of go-micro. On top of that we
|
||||
now have the commands `ocis list`, `ocis kill` and `ocis run` available for service runtime management.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/287
|
||||
@@ -0,0 +1,21 @@
|
||||
Change: Account management permissions for Admin role
|
||||
|
||||
We created an `AccountManagement` permission and added it to the default admin role. There are permission
|
||||
checks in place to protected http endpoints in ocis-accounts against requests without the permission.
|
||||
All existing default users (einstein, marie, richard) have the default user role now (doesn't have the
|
||||
`AccountManagement` permission). Additionally, there is a new default Admin user with credentials `moss:vista`.
|
||||
|
||||
Known issue: for users without the `AccountManagement` permission, the accounts UI extension is still available
|
||||
in the ocis-web app switcher, but the requests for loading the users will fail (as expected). We are working
|
||||
on a way to hide the accounts UI extension if the user doesn't have the `AccountManagement` permission.
|
||||
|
||||
https://github.com/owncloud/product/issues/124
|
||||
https://github.com/owncloud/ocis-settings/pull/59
|
||||
https://github.com/owncloud/ocis-settings/pull/66
|
||||
https://github.com/owncloud/ocis-settings/pull/67
|
||||
https://github.com/owncloud/ocis-settings/pull/69
|
||||
https://github.com/owncloud/ocis-proxy/pull/95
|
||||
https://github.com/owncloud/ocis-pkg/pull/59
|
||||
https://github.com/owncloud/ocis-accounts/pull/95
|
||||
https://github.com/owncloud/ocis-accounts/pull/100
|
||||
https://github.com/owncloud/ocis-accounts/pull/102
|
||||
@@ -0,0 +1,6 @@
|
||||
Bugfix: Fix director selection in proxy
|
||||
|
||||
We fixed a bug in ocis-proxy where simultaneous requests could be executed on the wrong backend.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/521
|
||||
https://github.com/owncloud/ocis-proxy/pull/99
|
||||
@@ -0,0 +1,5 @@
|
||||
Change: Make ocis-settings available
|
||||
|
||||
This version delivers `settings` as a new service. It is part of the array of services in the `server` command.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/287
|
||||
@@ -0,0 +1,5 @@
|
||||
Change: Update ocis-settings to v0.2.0
|
||||
|
||||
This version delivers `settings` v0.2.0 and versions of accounts (v0.3.0) and phoenix (v0.15.0) needed for it.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/467
|
||||
@@ -0,0 +1,8 @@
|
||||
Enhancement: Simplify tracing config
|
||||
|
||||
We now apply the oCIS tracing config to all services which have tracing. With this it is possible
|
||||
to set one tracing config for all services at the same time.
|
||||
|
||||
https://github.com/owncloud/product/issues/92
|
||||
https://github.com/owncloud/ocis/pull/329
|
||||
https://github.com/owncloud/ocis/pull/409
|
||||
@@ -0,0 +1,5 @@
|
||||
Change: Update ocis-accounts to v0.4.0
|
||||
|
||||
Provides a web UI for role assignment.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/479
|
||||
@@ -0,0 +1,7 @@
|
||||
Enhancement: Add new REVA config variables to docs
|
||||
|
||||
With the default setup of running oCIS with ocis-proxy we need to set `REVA_DATAGATEWAY_URL` and
|
||||
`REVA_FRONTEND_URL` environment variables. We added those to the configuration instructions in
|
||||
the dev docs.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/345
|
||||
File renamed without changes.
@@ -0,0 +1,5 @@
|
||||
Enhancement: Update extensions 2020-07-01
|
||||
|
||||
- ocis-reva 0.9.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/357
|
||||
@@ -0,0 +1,7 @@
|
||||
Enhancement: Update extensions 2020-09-02
|
||||
|
||||
- ocis-accounts 0.4.2-0.20200828150703-2ca83cf4ac20
|
||||
- ocis-ocs 0.3.1
|
||||
- ocis-settings 0.3.2-0.20200828130413-0cc0f5bf26fe
|
||||
|
||||
https://github.com/owncloud/ocis/pull/516
|
||||
@@ -0,0 +1,8 @@
|
||||
Enhancement: Update extensions
|
||||
|
||||
We've updated various extensions:
|
||||
- ocis-konnectd v0.3.1
|
||||
- ocis-phoenix v0.5.0 (phoenix v0.8.0)
|
||||
- ocis-reva v0.2.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/209
|
||||
File renamed without changes.
@@ -0,0 +1,6 @@
|
||||
Enhancement: Update extensions 2020-07-10
|
||||
|
||||
- ocis-reva 0.10.0
|
||||
- ocis-phoenix 0.9.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/376
|
||||
@@ -0,0 +1,7 @@
|
||||
Enhancement: Update extensions
|
||||
|
||||
We've updated various extensions:
|
||||
- ocis-thumbnails v0.1.2 (tag)
|
||||
- ocis-reva v0.3.0 (tag)
|
||||
|
||||
https://github.com/owncloud/ocis/pull/290
|
||||
@@ -0,0 +1,6 @@
|
||||
Enhancement: Update ocis-reva to 0.4.0
|
||||
|
||||
Brings in fixes for trashbin and TUS upload.
|
||||
Also adds partial implementation of public shares.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/295
|
||||
@@ -0,0 +1,10 @@
|
||||
Enhancement: Update extensions
|
||||
|
||||
We've updated various extensions:
|
||||
- ocis-konnectd v0.3.1
|
||||
- ocis-phoenix v0.6.0
|
||||
- ocis-reva v0.2.1
|
||||
- ocis-pkg v2.2.1
|
||||
- ocis-thumbnails v0.1.2
|
||||
|
||||
https://github.com/owncloud/ocis/pull/209
|
||||
@@ -0,0 +1,8 @@
|
||||
Enhancement: Update extensions 2020-06-29
|
||||
|
||||
- ocis-proxy 0.4.0
|
||||
- ocis-migration 0.2.0
|
||||
- ocis-reva 0.8.0
|
||||
- ocis-phoenix 0.8.1
|
||||
|
||||
https://github.com/owncloud/ocis/pull/334
|
||||
@@ -0,0 +1,6 @@
|
||||
Enhancement: Update proxy and reva
|
||||
|
||||
- ocis-reva contains a lot of sharing, eos and trash fixes
|
||||
- ocis-proxy contains fixes to use ocis on top of eos
|
||||
|
||||
https://github.com/owncloud/ocis/pull/466
|
||||
@@ -0,0 +1,5 @@
|
||||
Change: Update ocis-ocs to v0.3.0
|
||||
|
||||
This change updates ocis-ocs to version 0.3.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/500
|
||||
@@ -0,0 +1,5 @@
|
||||
Change: Update ocis-phoenix to v0.13.0
|
||||
|
||||
This version delivers ocis-phoenix v0.13.0.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/487
|
||||
@@ -0,0 +1,5 @@
|
||||
Change: Update ocis-proxy to v0.7.0
|
||||
|
||||
This version delivers ocis-proxy v0.7.0.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/476
|
||||
@@ -0,0 +1,5 @@
|
||||
Change: Update ocis-reva to 0.13.0
|
||||
|
||||
This version delivers ocis-reva v0.13.0
|
||||
|
||||
https://github.com/owncloud/ocis/pull/496
|
||||
@@ -0,0 +1,9 @@
|
||||
Change: Update reva config
|
||||
|
||||
- EOS homes are not configured with an enable-flag anymore, but with a dedicated storage driver.
|
||||
- We're using it now and adapted default configs of storages
|
||||
|
||||
https://github.com/owncloud/ocis/pull/336
|
||||
https://github.com/owncloud/ocis/pull/337
|
||||
https://github.com/owncloud/ocis/pull/338
|
||||
https://github.com/owncloud/ocis-reva/pull/891
|
||||
@@ -0,0 +1,5 @@
|
||||
Change: Update ocis-settings to v0.3.0
|
||||
|
||||
This version delivers ocis-settings v0.3.0.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/490
|
||||
@@ -0,0 +1,5 @@
|
||||
Bugfix: build docker images with alpine:latest instead of alpine:edge
|
||||
|
||||
ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/416
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "owncloud/ocis",
|
||||
"config" : {
|
||||
"platform": {
|
||||
"php": "7.2"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.4"
|
||||
},
|
||||
"extra": {
|
||||
"bamarni-bin": {
|
||||
"bin-links": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
EOS_MQ_URL=mq-master.testnet
|
||||
EOS_MGM_ALIAS=mgm-master.testnet
|
||||
EOS_QDB_NODES=quark-1.testnet:7777 quark-2.testnet:7777 quark-3.testnet:7777
|
||||
EOS_LDAP_HOST=ocis.testnet:9125
|
||||
EOS_GEOTAG=test
|
||||
EOS_INSTANCE_NAME=eostest
|
||||
EOS_MAIL_CC=eos@localhost
|
||||
EOS_USE_QDB=1
|
||||
EOS_USE_QDB_MASTER=1
|
||||
EOS_NS_ACCOUNTING=1
|
||||
EOS_SYNCTIME_ACCOUNTING=1
|
||||
EOS_UTF8=1
|
||||
@@ -0,0 +1,176 @@
|
||||
---
|
||||
version: '3.5'
|
||||
|
||||
networks:
|
||||
testnet:
|
||||
name: testnet
|
||||
|
||||
services:
|
||||
ocis:
|
||||
container_name: ocis
|
||||
image: owncloud/eos-ocis-dev:latest
|
||||
tty: true
|
||||
privileged: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- 9200:9200
|
||||
env_file:
|
||||
- ./config/eos-docker.env
|
||||
hostname: ocis
|
||||
networks:
|
||||
- testnet
|
||||
volumes:
|
||||
- .:/ocis
|
||||
- ../ocis-reva:/ocis-reva
|
||||
- ../reva:/reva
|
||||
environment:
|
||||
# ocis log level will be used for all services
|
||||
OCIS_LOG_LEVEL: debug
|
||||
# domain setup
|
||||
# TODO currently the below lines hardcode the port to 9200, use an OCIS_URL that includes protocol and port
|
||||
OCIS_DOMAIN: ${OCIS_DOMAIN:-localhost}
|
||||
PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200
|
||||
KONNECTD_ISS: https://${OCIS_DOMAIN:-localhost}:9200
|
||||
PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200
|
||||
PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration
|
||||
PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200
|
||||
REVA_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200
|
||||
REVA_LDAP_IDP: https://${OCIS_DOMAIN:-localhost}:9200
|
||||
# TODO make id the default in ocis-reva
|
||||
REVA_STORAGE_EOS_LAYOUT: "{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}"
|
||||
REVA_FRONTEND_URL: https://${OCIS_DOMAIN:-localhost}:9200
|
||||
REVA_DATAGATEWAY_URL: https://${OCIS_DOMAIN:-localhost}:9200/data
|
||||
# common eos settings used for both drivers: eos and eoshome
|
||||
REVA_STORAGE_EOS_MASTER_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
|
||||
REVA_STORAGE_EOS_SLAVE_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
|
||||
REVA_STORAGE_EOS_NAMESPACE: "/eos/dockertest/reva/users"
|
||||
# the eos end xrdcopy binaries use this env var to find the eos mgm
|
||||
EOS_MGM_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
|
||||
|
||||
mgm-master:
|
||||
container_name: mgm-master
|
||||
image: owncloud/eos-mgm:4.6.5
|
||||
tty: true
|
||||
privileged: true
|
||||
stdin_open: true
|
||||
env_file:
|
||||
- ./config/eos-docker.env
|
||||
hostname: mgm-master.testnet
|
||||
networks:
|
||||
- testnet
|
||||
volumes:
|
||||
- eos-mgm-master-log:/var/log/eos
|
||||
- eos-mgm-master-config:/var/eos/config
|
||||
- eos-mgm-master-ns-queue:/var/eos/ns-queue
|
||||
# this volume kills mgm-master during startup
|
||||
# - ./e/master/var/eos/md:/var/eos/md
|
||||
environment:
|
||||
EOS_SET_MASTER: 1
|
||||
|
||||
mq-master:
|
||||
container_name: mq-master
|
||||
image: owncloud/eos-mq:4.6.5
|
||||
tty: true
|
||||
privileged: true
|
||||
stdin_open: true
|
||||
env_file:
|
||||
- ./config/eos-docker.env
|
||||
hostname: mq-master.testnet
|
||||
networks:
|
||||
- testnet
|
||||
volumes:
|
||||
- eos-mq-master-log:/var/log/eos
|
||||
- eos-mq-master-config:/var/eos/config
|
||||
- eos-mq-master-ns-queue:/var/eos/ns-queue
|
||||
environment:
|
||||
EOS_SET_MASTER: 1
|
||||
|
||||
fst:
|
||||
container_name: fst
|
||||
image: owncloud/eos-fst:4.6.5
|
||||
tty: true
|
||||
privileged: true
|
||||
stdin_open: true
|
||||
env_file:
|
||||
- ./config/eos-docker.env
|
||||
hostname: fst.testnet
|
||||
networks:
|
||||
- testnet
|
||||
volumes:
|
||||
- eos-fst-log:/var/log/eos
|
||||
- eos-fst-disks:/disks
|
||||
environment:
|
||||
EOS_MGM_URL: "root://mgm-master.testnet"
|
||||
|
||||
quark-1:
|
||||
container_name: quark-1
|
||||
image: owncloud/eos-qdb:4.6.5
|
||||
tty: true
|
||||
privileged: true
|
||||
stdin_open: true
|
||||
env_file:
|
||||
- ./config/eos-docker.env
|
||||
hostname: quark-1.testnet
|
||||
networks:
|
||||
- testnet
|
||||
volumes:
|
||||
- eos-quarkdb1:/var/lib/quarkdb
|
||||
environment:
|
||||
EOS_QDB_DIR: "/var/lib/quarkdb/eosns"
|
||||
EOS_QDB_PORT: "7777"
|
||||
EOS_QDB_MODE: "raft"
|
||||
EOS_QDB_CLUSTER_ID: "3d659c1a-e70f-43f0-bed4-941a2ca0765b"
|
||||
EOS_QDB_NODES: "quark-1.testnet:7777,quark-2.testnet:7777,quark-3.testnet:7777"
|
||||
|
||||
quark-2:
|
||||
container_name: quark-2
|
||||
image: owncloud/eos-qdb:4.6.5
|
||||
tty: true
|
||||
privileged: true
|
||||
stdin_open: true
|
||||
env_file:
|
||||
- ./config/eos-docker.env
|
||||
hostname: quark-2.testnet
|
||||
networks:
|
||||
- testnet
|
||||
volumes:
|
||||
- eos-quarkdb2:/var/lib/quarkdb
|
||||
environment:
|
||||
EOS_QDB_DIR: "/var/lib/quarkdb/eosns"
|
||||
EOS_QDB_PORT: "7777"
|
||||
EOS_QDB_MODE: "raft"
|
||||
EOS_QDB_CLUSTER_ID: "3d659c1a-e70f-43f0-bed4-941a2ca0765b"
|
||||
EOS_QDB_NODES: "quark-1.testnet:7777,quark-2.testnet:7777,quark-3.testnet:7777"
|
||||
|
||||
quark-3:
|
||||
container_name: quark-3
|
||||
image: owncloud/eos-qdb:4.6.5
|
||||
tty: true
|
||||
privileged: true
|
||||
stdin_open: true
|
||||
env_file:
|
||||
- ./config/eos-docker.env
|
||||
hostname: quark-3.testnet
|
||||
networks:
|
||||
- testnet
|
||||
volumes:
|
||||
- eos-quarkdb3:/var/lib/quarkdb
|
||||
environment:
|
||||
EOS_QDB_DIR: "/var/lib/quarkdb/eosns"
|
||||
EOS_QDB_PORT: "7777"
|
||||
EOS_QDB_MODE: "raft"
|
||||
EOS_QDB_CLUSTER_ID: "3d659c1a-e70f-43f0-bed4-941a2ca0765b"
|
||||
EOS_QDB_NODES: "quark-1.testnet:7777,quark-2.testnet:7777,quark-3.testnet:7777"
|
||||
|
||||
volumes:
|
||||
eos-mgm-master-log:
|
||||
eos-mgm-master-config:
|
||||
eos-mgm-master-ns-queue:
|
||||
eos-mq-master-log:
|
||||
eos-mq-master-config:
|
||||
eos-mq-master-ns-queue:
|
||||
eos-fst-log:
|
||||
eos-fst-disks:
|
||||
eos-quarkdb1:
|
||||
eos-quarkdb2:
|
||||
eos-quarkdb3:
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM amd64/alpine:edge
|
||||
FROM amd64/alpine:latest
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM arm32v6/alpine:edge
|
||||
FROM arm32v6/alpine:latest
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM arm64v8/alpine:edge
|
||||
FROM arm64v8/alpine:latest
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
|
||||
@@ -8,3 +8,23 @@ geekdocFilePath: _index.md
|
||||
---
|
||||
|
||||
This tool provides a single entrypoint for the whole ownCloud Infinite Scale stack.
|
||||
|
||||
{{< mermaid class="text-center">}}
|
||||
graph TD
|
||||
ocis-proxy -->
|
||||
ocis-konnectd & ocis-phoenix & ocis-thumbnails & ocis-ocs & ocis-webdav
|
||||
|
||||
ocis-phoenix --> ocis-reva-fronted
|
||||
ocis-reva-fronted --> ocis-reva-gateway
|
||||
ocis-konnectd --> ocis-glauth
|
||||
|
||||
|
||||
ocis-reva-gateway --> ocis-reva-users
|
||||
ocis-reva-gateway --> ocis-reva-authbasic
|
||||
ocis-reva-gateway --> ocis-reva-auth-bearer
|
||||
|
||||
ocis-reva-gateway --> ocis-reva-sharing
|
||||
ocis-reva-gateway --> ocis-reva-storage-home-*
|
||||
ocis-reva-storage-home-* --> ocis-reva-storage-home-*-data
|
||||
ocis-reva-sharing --> redis
|
||||
{{< /mermaid >}}
|
||||
@@ -0,0 +1,104 @@
|
||||
---
|
||||
title: "Basic Remote Setup"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: 16
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: basic-remote-setup.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
Out of the box the ocis single binary and the `owncloud/ocis` docker image are configured to run on localhost for quick testing and development.
|
||||
|
||||
If you need to access ocis on a VM or a remote machine e.g. when testing a mobile client you need to configure ocis to run on a different host.
|
||||
|
||||
## Use the binary
|
||||
|
||||
If you start the ocis fullstack for the first time with `./bin/ocis server` it will generate a file `identifier-registration.yml` in the config folder relative to its location. This file is used to configure the clients for the built-in Identity Provider.
|
||||
|
||||
{{< hint warning >}}
|
||||
**Outdated version**\
|
||||
The `identifier-registration.yml` file will only be generated if there is no such file in place. You could miss updates on this file. Run `make clean` to delete the file and keep the development environment tidy otherwise as well.
|
||||
{{< /hint >}}
|
||||
|
||||
### Add your hostname to the idp config
|
||||
|
||||
Let us assume `your-host` is your remote domain name or IP adress. Add your host to the `identifier-registration.yml` like this:
|
||||
|
||||
```yaml {linenos=table,hl_lines=["15-17",21]}
|
||||
# OpenID Connect client registry.
|
||||
clients:
|
||||
- id: phoenix
|
||||
name: ownCloud web app
|
||||
application_type: web
|
||||
insecure: yes
|
||||
trusted: yes
|
||||
redirect_uris:
|
||||
- http://localhost:9100/
|
||||
- http://localhost:9100/oidc-callback.html
|
||||
- http://localhost:9100/oidc-silent-redirect.html
|
||||
- https://localhost:9200/
|
||||
- https://localhost:9200/oidc-callback.html
|
||||
- https://localhost:9200/oidc-silent-redirect.html
|
||||
- https://your-server:9200/
|
||||
- https://your-server:9200/oidc-callback.html
|
||||
- https://your-server:9200/oidc-silent-redirect.html
|
||||
origins:
|
||||
- http://localhost:9100
|
||||
- https://localhost:9200
|
||||
- https://your-server:9200
|
||||
```
|
||||
|
||||
In this example we do not change the default port (`9200`). But this could be changed to another port.
|
||||
|
||||
### Start the ocis fullstack server
|
||||
|
||||
You need to configure `your-host` in some services to provide the needed public resources. When using the owncloud storage driver (which is the default) oCIS currently needs a running Redis Server reachable locally on the machine at the default port (`localhost:6379`). You can change this using the following option `REVA_STORAGE_OWNCLOUD_REDIS_ADDR=some-host:6379`.
|
||||
|
||||
```bash
|
||||
PROXY_HTTP_ADDR=0.0.0.0:9200 \
|
||||
KONNECTD_ISS=https://your-server:9200 \
|
||||
REVA_OIDC_ISSUER=https://your-server:9200 \
|
||||
PHOENIX_OIDC_AUTHORITY=https://your-server:9200 \
|
||||
PHOENIX_WEB_CONFIG_SERVER=https://your-server:9200 \
|
||||
PHOENIX_OIDC_METADATA_URL=https://your-server:9200/.well-known/openid-configuration \
|
||||
REVA_DATAGATEWAY_URL=https://your-server:9200/data \
|
||||
REVA_FRONTEND_URL=https://your-server:9200 \
|
||||
PROXY_TRANSPORT_TLS_KEY=./certs/your-host.key \
|
||||
PROXY_TRANSPORT_TLS_CERT=./certs/your-host.crt \
|
||||
KONNECTD_TLS=0 \
|
||||
./bin/ocis server
|
||||
```
|
||||
|
||||
For more configuration options check the configuration secion in [ocis](https://owncloud.github.io/ocis/configuration/) and every ocis extension.
|
||||
|
||||
{{< hint info >}}
|
||||
**TLS Certificate**\
|
||||
In this example, we are replacing the default self signed cert with a CA signed one to avoid the certificate warning when accessing the login page.
|
||||
{{< /hint >}}
|
||||
|
||||
## Use Docker Compose
|
||||
|
||||
We are using our [docker compose playground](https://github.com/owncloud-docker/compose-playground) as a repository to share snippets that make our test setups easier and more aligned.
|
||||
|
||||
You can start oCIS with docker very easily on a different host using this snippet.
|
||||
|
||||
Let us assume your local IP is `192.168.103.195`
|
||||
|
||||
```bash
|
||||
git clone https://github.com/owncloud-docker/compose-playground.git
|
||||
cd compose-playground/compose/ocis
|
||||
|
||||
sed -i -e 's/your-url/192.168.103.195/g' config/identifier-registration.yml
|
||||
|
||||
cat << EOF > .env
|
||||
OCIS_BASE_URL=192.168.103.195
|
||||
OCIS_HTTP_PORT=9200
|
||||
OCIS_DOCKER_TAG=latest
|
||||
EOF
|
||||
|
||||
docker-compose -f ocis.yml -f ../cache/redis-ocis.yml up -d
|
||||
|
||||
curl -k https://192.168.103.195:9200/status.php
|
||||
```
|
||||
+2
-3
@@ -72,21 +72,20 @@ In an `ocis` folder
|
||||
```
|
||||
$ git clone git@github.com:owncloud/ocis-glauth.git
|
||||
$ cd ocis-glauth
|
||||
$ git checkout start-glauth
|
||||
$ make
|
||||
```
|
||||
This should give you a `bin/ocis-glauth` binary. Try listing the help with `bin/ocis-glauth --help`.
|
||||
|
||||
TODO merge glauth PR https://github.com/owncloud/ocis-glauth/pull/1
|
||||
|
||||
#### Run it!
|
||||
|
||||
You need to point `ocis-glauth` to your owncloud domain:
|
||||
```console
|
||||
$ bin/ocis-glauth --log-level debug server --backend-server https://cloud.example.com --backend-basedn dc=example,dc=com
|
||||
$ bin/ocis-glauth --log-level debug server --backend-datastore owncloud --backend-server https://cloud.example.com --backend-basedn dc=example,dc=com
|
||||
```
|
||||
|
||||
`--log-level debug` is only used to generate more verbose output
|
||||
`--backend-datastore owncloud` switches to tho owncloud datastore
|
||||
`--backend-server https://cloud.example.com` is the url to an ownCloud instance with an enabled graphapi app
|
||||
`--backend-basedn dc=example,dc=com` is used to construct the LDAP dn. The user `admin` will become `cn=admin,dc=example,dc=com`.
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "Building the documentation"
|
||||
date: 2020-07-27T08:39:38+00:00
|
||||
weight: 99
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: building-docs.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Buildling the documentation
|
||||
|
||||
Following steps can be applied for every oCIS extension repository.
|
||||
|
||||
### Setting up
|
||||
|
||||
- Install [hugo](https://gohugo.io/getting-started/installing/)
|
||||
- Run `make docs`
|
||||
|
||||
### Viewing the documentation
|
||||
|
||||
To view the rendered docs in the browser run:
|
||||
```bash
|
||||
cd hugo
|
||||
hugo -D server
|
||||
```
|
||||
|
||||
Then open "http://localhost:1313/"
|
||||
|
||||
When making changes to the docs, run `make docs` again and the server will pick up the changes and reload the page automatically
|
||||
|
||||
### Deploying the documentation
|
||||
|
||||
The documentation is automatically deployed from the master branch to https://owncloud.github.io/phoenix/
|
||||
|
||||
+18
-16
@@ -14,11 +14,23 @@ git clone https://github.com/owncloud/ocis.git
|
||||
cd ocis
|
||||
{{< / highlight >}}
|
||||
|
||||
All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`.
|
||||
All required tools besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`. To build the `ocis` binary run:
|
||||
|
||||
## Simple Ocis
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Building the simple ocis binary:
|
||||
Finally, you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis -h` to see all available options.
|
||||
|
||||
|
||||
## Simple Ocis fo extonsions example
|
||||
|
||||
Currently, we are using a go build tag to allow building a more simple set of the binary. It was intended to let extension developers focus on only the necessary services.
|
||||
|
||||
{{< hint info >}}
|
||||
While it the tag based simple build demonstrates how to use ocis as a framework for a micro service architecture, we may change to an approach that uses an explicit command to run only a subset of the services.
|
||||
{{< / hint >}}
|
||||
|
||||
```console
|
||||
TAGS=simple make build
|
||||
@@ -28,20 +40,10 @@ The artifact lives in `/bin/ocis`
|
||||
|
||||
The generated simple ocis binary is a subset of the ocis command with a restricted set of services meant for ease up development. The services included are
|
||||
|
||||
|
||||
```
|
||||
ocis-hello
|
||||
phoenix
|
||||
konnectd
|
||||
devldap
|
||||
ocis-phoenix
|
||||
ocis-konnectd
|
||||
ocis-glauth
|
||||
micro's own services
|
||||
```
|
||||
|
||||
## Backend
|
||||
|
||||
{{< highlight txt >}}
|
||||
make generate
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis -h` to see all available options.
|
||||
+141
-181
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Configuration"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
date: "2020-08-21T17:50:21+0200"
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
@@ -13,6 +13,8 @@ geekdocFilePath: configuration.md
|
||||
|
||||
oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files.
|
||||
|
||||
Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/ocis_proxy/configuration) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands.
|
||||
|
||||
### Configuration using config files
|
||||
|
||||
Out of the box extensions will attempt to read configuration details from:
|
||||
@@ -25,254 +27,212 @@ $HOME/.ocis
|
||||
|
||||
For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*.
|
||||
|
||||
So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`.
|
||||
|
||||
### Envrionment variables
|
||||
|
||||
If you prefer to configure the service with environment variables you can see the available variables below.
|
||||
|
||||
#### Global
|
||||
|
||||
OCIS_CONFIG_FILE
|
||||
: Path to config file
|
||||
|
||||
OCIS_LOG_LEVEL
|
||||
: Set logging level, defaults to `info`
|
||||
|
||||
OCIS_LOG_COLOR
|
||||
: Enable colored logging, defaults to `true`
|
||||
|
||||
OCIS_LOG_PRETTY
|
||||
: Enable pretty logging, defaults to `true`
|
||||
|
||||
#### Server
|
||||
|
||||
OCIS_TRACING_ENABLED
|
||||
: Enable sending traces
|
||||
|
||||
OCIS_TRACING_TYPE
|
||||
: Tracing backend type,
|
||||
|
||||
OCIS_TRACING_ENDPOINT
|
||||
:Endpoint for the agent
|
||||
|
||||
OCIS_TRACING_COLLECTOR
|
||||
: Endpoint for the collector
|
||||
|
||||
OCIS_TRACING_SERVICE
|
||||
: Service name for tracing"
|
||||
|
||||
OCIS_DEBUG_ADDR
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9010`
|
||||
|
||||
OCIS_DEBUG_TOKEN
|
||||
: Token to grant metrics access, empty default value
|
||||
|
||||
OCIS_DEBUG_PPROF
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
|
||||
OCIS_DEBUG_ZPAGES
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
|
||||
OCIS_HTTP_ADDR
|
||||
: Address to bind http server, defaults to `0.0.0.0:9000`
|
||||
|
||||
OCIS_HTTP_ROOT
|
||||
: Root path for http endpoint, defaults to `/`
|
||||
|
||||
OCIS_GRPC_ADDR
|
||||
: Address to bind grpc server, defaults to `0.0.0.0:9001`
|
||||
|
||||
OCIS_SERVICES_ENABLED
|
||||
: List of enabled services, defaults to `phoenix,konnectd,graph,ocs,webdav,hello`
|
||||
|
||||
#### Health
|
||||
|
||||
OCIS_DEBUG_ADDR
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9010`
|
||||
|
||||
### Commandline flags
|
||||
|
||||
If you prefer to configure the service with commandline flags you can see the available variables below.
|
||||
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
|
||||
|
||||
#### Global
|
||||
## Root Command
|
||||
|
||||
--config-file
|
||||
: Path to config file
|
||||
ownCloud Infinite Scale Stack
|
||||
|
||||
--log-level
|
||||
: Set logging level, defaults to `info`
|
||||
Usage: `ocis [global options] command [command options] [arguments...]`
|
||||
|
||||
--log-color
|
||||
: Enable colored logging, defaults to `true`
|
||||
--config-file | $OCIS_CONFIG_FILE
|
||||
: Path to config file.
|
||||
|
||||
--log-pretty
|
||||
: Enable pretty logging, defaults to `true`
|
||||
--log-level | $OCIS_LOG_LEVEL
|
||||
: Set logging level. Default: `info`.
|
||||
|
||||
#### Server
|
||||
--log-pretty | $OCIS_LOG_PRETTY
|
||||
: Enable pretty logging. Default: `true`.
|
||||
|
||||
--tracing-enabled
|
||||
: Enable sending traces
|
||||
--log-color | $OCIS_LOG_COLOR
|
||||
: Enable colored logging. Default: `true`.
|
||||
|
||||
--tracing-type
|
||||
: Tracing backend type,
|
||||
## Sub Commands
|
||||
|
||||
--tracing-endpoint
|
||||
:Endpoint for the agent
|
||||
### ocis server
|
||||
|
||||
--tracing-collector
|
||||
: Endpoint for the collector
|
||||
Start fullstack server
|
||||
|
||||
--tracing-service
|
||||
: Service name for tracing"
|
||||
Usage: `ocis server [command options] [arguments...]`
|
||||
|
||||
--debug-addr
|
||||
: Address to bind debug server, defaults to `0.0.0.0:9010`
|
||||
--tracing-enabled | $OCIS_TRACING_ENABLED
|
||||
: Enable sending traces.
|
||||
|
||||
--debug-token
|
||||
: Token to grant metrics access, empty default value
|
||||
--tracing-type | $OCIS_TRACING_TYPE
|
||||
: Tracing backend type. Default: `jaeger`.
|
||||
|
||||
--debug-pprof
|
||||
: Enable pprof debugging, defaults to `false`
|
||||
--tracing-endpoint | $OCIS_TRACING_ENDPOINT
|
||||
: Endpoint for the agent. Default: `localhost:6831`.
|
||||
|
||||
--debug-zpages
|
||||
: Enable zpages debugging, defaults to `false`
|
||||
--tracing-collector | $OCIS_TRACING_COLLECTOR
|
||||
: Endpoint for the collector. Default: `http://localhost:14268/api/traces`.
|
||||
|
||||
--http-addr
|
||||
: Address to bind http server, defaults to `0.0.0.0:9000`
|
||||
--tracing-service | $OCIS_TRACING_SERVICE
|
||||
: Service name for tracing. Default: `ocis`.
|
||||
|
||||
--http-root
|
||||
: Root path for http endpoint, defaults to `/`
|
||||
--debug-addr | $OCIS_DEBUG_ADDR
|
||||
: Address to bind debug server. Default: `0.0.0.0:9010`.
|
||||
|
||||
--grpc-addr
|
||||
: Address to bind grpc server, defaults to `0.0.0.0:9001`
|
||||
--debug-token | $OCIS_DEBUG_TOKEN
|
||||
: Token to grant metrics access.
|
||||
|
||||
--services-enabled
|
||||
: List of enabled services, defaults to `hello,phoenix,graph,graph-explorer,ocs,webdav,reva-frontend,reva-gateway,reva-users,reva-auth-basic,reva-auth-bearer,reva-sharing,reva-storage-root,reva-storage-home,reva-storage-home-data,reva-storage-oc,reva-storage-oc-data,devldap`
|
||||
--debug-pprof | $OCIS_DEBUG_PPROF
|
||||
: Enable pprof debugging.
|
||||
|
||||
#### Health
|
||||
--debug-zpages | $OCIS_DEBUG_ZPAGES
|
||||
: Enable zpages debugging.
|
||||
|
||||
--debug-addr
|
||||
: Address to debug endpoint, defaults to `0.0.0.0:9010`
|
||||
--http-addr | $OCIS_HTTP_ADDR
|
||||
: Address to bind http server. Default: `0.0.0.0:9000`.
|
||||
|
||||
### Configuration file
|
||||
--http-root | $OCIS_HTTP_ROOT
|
||||
: Root path of http server. Default: `/`.
|
||||
|
||||
So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`.
|
||||
--grpc-addr | $OCIS_GRPC_ADDR
|
||||
: Address to bind grpc server. Default: `0.0.0.0:9001`.
|
||||
|
||||
## Usage
|
||||
### ocis health
|
||||
|
||||
The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis --help`.
|
||||
Check health status
|
||||
|
||||
### Server
|
||||
Usage: `ocis health [command options] [arguments...]`
|
||||
|
||||
The server command is used to start the http and debug server on two addresses within a single process. The http server is serving the general webservice while the debug server is used for health check, readiness check and to server the metrics mentioned below. For further help please execute:
|
||||
--debug-addr | $OCIS_DEBUG_ADDR
|
||||
: Address to debug endpoint. Default: `0.0.0.0:9010`.
|
||||
|
||||
{{< highlight txt >}}
|
||||
ocis server --help
|
||||
{{< / highlight >}}
|
||||
### List of available Extension subcommands
|
||||
|
||||
### Health
|
||||
There are more subcommands to start the individual extensions. Please check the documentation about their usage and options in the dedicated section of the documentation.
|
||||
|
||||
The health command is used to execute a health check, if the exit code equals zero the service should be up and running, if the exist code is greater than zero the service is not in a healthy state. Generally this command is used within our Docker containers, it could also be used within Kubernetes.
|
||||
#### ocis glauth
|
||||
|
||||
{{< highlight txt >}}
|
||||
ocis health --help
|
||||
{{< / highlight >}}
|
||||
Start glauth server
|
||||
|
||||
## Metrics
|
||||
#### ocis ocs
|
||||
|
||||
This service provides some [Prometheus](https://prometheus.io/) metrics through the debug endpoint, you can optionally secure the metrics endpoint by some random token, which got to be configured through one of the flag `--debug-token` or the environment variable `OCIS_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:8001/metrics`.
|
||||
Start ocs server
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
#### ocis store
|
||||
|
||||
go_gc_duration_seconds_sum
|
||||
: A summary of the GC invocation durations
|
||||
Start a go-micro store
|
||||
|
||||
go_gc_duration_seconds_count
|
||||
: A summary of the GC invocation durations
|
||||
#### ocis reva-auth-basic
|
||||
|
||||
go_goroutines
|
||||
: Number of goroutines that currently exist
|
||||
Start reva auth-basic service
|
||||
|
||||
go_info
|
||||
: Information about the Go environment
|
||||
#### ocis reva-storage-oc
|
||||
|
||||
go_memstats_alloc_bytes
|
||||
: Number of bytes allocated and still in use
|
||||
Start reva oc storage
|
||||
|
||||
go_memstats_alloc_bytes_total
|
||||
: Total number of bytes allocated, even if freed
|
||||
#### ocis run
|
||||
|
||||
go_memstats_buck_hash_sys_bytes
|
||||
: Number of bytes used by the profiling bucket hash table
|
||||
Runs an extension
|
||||
|
||||
go_memstats_frees_total
|
||||
: Total number of frees
|
||||
#### ocis graph-explorer
|
||||
|
||||
go_memstats_gc_cpu_fraction
|
||||
: The fraction of this program's available CPU time used by the GC since the program started
|
||||
Start graph explorer
|
||||
|
||||
go_memstats_gc_sys_bytes
|
||||
: Number of bytes used for garbage collection system metadata
|
||||
#### ocis hello
|
||||
|
||||
go_memstats_heap_alloc_bytes
|
||||
: Number of heap bytes allocated and still in use
|
||||
Start hello server
|
||||
|
||||
go_memstats_heap_idle_bytes
|
||||
: Number of heap bytes waiting to be used
|
||||
#### ocis phoenix
|
||||
|
||||
go_memstats_heap_inuse_bytes
|
||||
: Number of heap bytes that are in use
|
||||
Start phoenix server
|
||||
|
||||
go_memstats_heap_objects
|
||||
: Number of allocated objects
|
||||
#### ocis reva-storage-eos-data
|
||||
|
||||
go_memstats_heap_released_bytes
|
||||
: Number of heap bytes released to OS
|
||||
Start reva eos storage dataprovider
|
||||
|
||||
go_memstats_heap_sys_bytes
|
||||
: Number of heap bytes obtained from system
|
||||
#### ocis reva-frontend
|
||||
|
||||
go_memstats_last_gc_time_seconds
|
||||
: Number of seconds since 1970 of last garbage collection
|
||||
Start reva frontend
|
||||
|
||||
go_memstats_lookups_total
|
||||
: Total number of pointer lookups
|
||||
#### ocis reva-storage-home
|
||||
|
||||
go_memstats_mallocs_total
|
||||
: Total number of mallocs
|
||||
Start reva home storage
|
||||
|
||||
go_memstats_mcache_inuse_bytes
|
||||
: Number of bytes in use by mcache structures
|
||||
#### ocis webdav
|
||||
|
||||
go_memstats_mcache_sys_bytes
|
||||
: Number of bytes used for mcache structures obtained from system
|
||||
Start webdav server
|
||||
|
||||
go_memstats_mspan_inuse_bytes
|
||||
: Number of bytes in use by mspan structures
|
||||
#### ocis konnectd
|
||||
|
||||
go_memstats_mspan_sys_bytes
|
||||
: Number of bytes used for mspan structures obtained from system
|
||||
Start konnectd server
|
||||
|
||||
go_memstats_next_gc_bytes
|
||||
: Number of heap bytes when next garbage collection will take place
|
||||
#### ocis reva-auth-bearer
|
||||
|
||||
go_memstats_other_sys_bytes
|
||||
: Number of bytes used for other system allocations
|
||||
Start reva auth-bearer service
|
||||
|
||||
go_memstats_stack_inuse_bytes
|
||||
: Number of bytes in use by the stack allocator
|
||||
#### ocis reva-storage-home-data
|
||||
|
||||
go_memstats_stack_sys_bytes
|
||||
: Number of bytes obtained from system for stack allocator
|
||||
Start reva home storage dataprovider
|
||||
|
||||
go_memstats_sys_bytes
|
||||
: Number of bytes obtained from system
|
||||
#### ocis reva-users
|
||||
|
||||
go_threads
|
||||
: Number of OS threads created
|
||||
Start reva users service
|
||||
|
||||
promhttp_metric_handler_requests_in_flight
|
||||
: Current number of scrapes being served
|
||||
#### ocis accounts
|
||||
|
||||
Start accounts server
|
||||
|
||||
#### ocis graph
|
||||
|
||||
Start graph server
|
||||
|
||||
#### ocis reva-storage-oc-data
|
||||
|
||||
Start reva oc storage dataprovider
|
||||
|
||||
#### ocis proxy
|
||||
|
||||
Start proxy server
|
||||
|
||||
#### ocis reva-storage-eos
|
||||
|
||||
Start reva eos storage
|
||||
|
||||
#### ocis settings
|
||||
|
||||
Start settings server
|
||||
|
||||
#### ocis kill
|
||||
|
||||
Kill an extension by name
|
||||
|
||||
#### ocis list
|
||||
|
||||
Lists running ocis extensions
|
||||
|
||||
#### ocis import
|
||||
|
||||
Import a user exported by owncloud/data_exporter
|
||||
|
||||
#### ocis thumbnails
|
||||
|
||||
Start thumbnails server
|
||||
|
||||
#### ocis reva-gateway
|
||||
|
||||
Start reva gateway
|
||||
|
||||
#### ocis reva-sharing
|
||||
|
||||
Start reva sharing service
|
||||
|
||||
#### ocis reva-storage-public-link
|
||||
|
||||
Start reva public link storage
|
||||
|
||||
#### ocis reva-storage-root
|
||||
|
||||
Start reva root storage
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
@@ -0,0 +1,217 @@
|
||||
---
|
||||
title: "Debugging"
|
||||
date: 2020-03-19T08:21:00+01:00
|
||||
weight: 50
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: debugging.md
|
||||
---
|
||||
|
||||
## Debugging
|
||||
|
||||
As a single binary for easy deployment running `ocis server` just forks itself to start all the services, which makes debugging those processes a little harder.
|
||||
|
||||
Ultimately, we want to be able to stop a single service using eg. `ocis kill phoenix` so that you can start the service you want to debug in debug mode. We need to [change the way we fork processes](https://github.com/owncloud/ocis/issues/77) though, otherwise the runtime will automatically restart a service if killed.
|
||||
|
||||
### Start ocis
|
||||
|
||||
For debugging there are two workflows that work well, depending on your preferences.
|
||||
|
||||
#### Use the debug binary and attach to the process as needed
|
||||
|
||||
Run the debug binary with `OCIS_LOG_LEVEL=debug bin/ocis-debug server` and then find the service you want to debug using:
|
||||
|
||||
```console
|
||||
# ps ax | grep ocis
|
||||
12837 pts/1 Sl+ 0:00 bin/ocis-debug server
|
||||
12845 pts/1 Sl 0:00 bin/ocis-debug graph
|
||||
12847 pts/1 Sl 0:00 bin/ocis-debug reva-auth-bearer
|
||||
12848 pts/1 Sl 0:00 bin/ocis-debug graph-explorer
|
||||
12849 pts/1 Sl 0:00 bin/ocis-debug ocs
|
||||
12850 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc-data
|
||||
12863 pts/1 Sl 0:00 bin/ocis-debug webdav
|
||||
12874 pts/1 Sl 0:00 bin/ocis-debug reva-frontend
|
||||
12897 pts/1 Sl 0:00 bin/ocis-debug reva-sharing
|
||||
12905 pts/1 Sl 0:00 bin/ocis-debug reva-gateway
|
||||
12912 pts/1 Sl 0:00 bin/ocis-debug reva-storage-home
|
||||
12920 pts/1 Sl 0:00 bin/ocis-debug reva-users
|
||||
12929 pts/1 Sl 0:00 bin/ocis-debug glauth
|
||||
12940 pts/1 Sl 0:00 bin/ocis-debug reva-storage-home-data
|
||||
12948 pts/1 Sl 0:00 bin/ocis-debug konnectd
|
||||
12952 pts/1 Sl 0:00 bin/ocis-debug proxy
|
||||
12961 pts/1 Sl 0:00 bin/ocis-debug thumbnails
|
||||
12971 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc
|
||||
12981 pts/1 Sl 0:00 bin/ocis-debug web
|
||||
12993 pts/1 Sl 0:00 bin/ocis-debug api
|
||||
12998 pts/1 Sl 0:00 bin/ocis-debug registry
|
||||
13004 pts/1 Sl 0:00 bin/ocis-debug phoenix
|
||||
13015 pts/1 Sl 0:00 bin/ocis-debug reva-auth-basic
|
||||
```
|
||||
|
||||
Then you can set a breakpoint in the service you need and attach to the process via processid. To debug the `reva-sharing` service the VS Code `launch.json` would look like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "ocis attach",
|
||||
"type": "go",
|
||||
"request": "attach",
|
||||
"mode": "local",
|
||||
"processId": 12897,
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Start all services independently to replace one of them with a debug process
|
||||
|
||||
1. You can use this `./ocis.sh` script to start all services independently, so they don't get restrarted by the runtime when you kill them:
|
||||
```bash
|
||||
#/bin/sh
|
||||
LOG_LEVEL="debug"
|
||||
|
||||
bin/ocis --log-level=$LOG_LEVEL micro &
|
||||
|
||||
bin/ocis --log-level=$LOG_LEVEL glauth &
|
||||
bin/ocis --log-level=$LOG_LEVEL graph-explorer &
|
||||
bin/ocis --log-level=$LOG_LEVEL graph &
|
||||
#bin/ocis --log-level=$LOG_LEVEL hello &
|
||||
bin/ocis --log-level=$LOG_LEVEL konnectd &
|
||||
#bin/ocis --log-level=$LOG_LEVEL ocs &
|
||||
bin/ocis --log-level=$LOG_LEVEL phoenix &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-auth-basic &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-auth-bearer &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-frontend &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-gateway &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-sharing &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-storage-home &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-storage-home-data &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-storage-oc &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-storage-oc-data &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-storage-root &
|
||||
bin/ocis --log-level=$LOG_LEVEL reva-users &
|
||||
#bin/ocis --log-level=$LOG_LEVEL webdav
|
||||
|
||||
bin/ocis --log-level=$LOG_LEVEL proxy &
|
||||
```
|
||||
|
||||
2. Get the list of running processes:
|
||||
|
||||
```console
|
||||
# ps ax | grep ocis
|
||||
12837 pts/1 Sl+ 0:00 bin/ocis-debug server
|
||||
12845 pts/1 Sl 0:00 bin/ocis-debug graph
|
||||
12847 pts/1 Sl 0:00 bin/ocis-debug reva-auth-bearer
|
||||
12848 pts/1 Sl 0:00 bin/ocis-debug graph-explorer
|
||||
12849 pts/1 Sl 0:00 bin/ocis-debug ocs
|
||||
12850 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc-data
|
||||
12863 pts/1 Sl 0:00 bin/ocis-debug webdav
|
||||
12874 pts/1 Sl 0:00 bin/ocis-debug reva-frontend
|
||||
12897 pts/1 Sl 0:00 bin/ocis-debug reva-sharing
|
||||
12905 pts/1 Sl 0:00 bin/ocis-debug reva-gateway
|
||||
12912 pts/1 Sl 0:00 bin/ocis-debug reva-storage-home
|
||||
12920 pts/1 Sl 0:00 bin/ocis-debug reva-users
|
||||
12929 pts/1 Sl 0:00 bin/ocis-debug glauth
|
||||
12940 pts/1 Sl 0:00 bin/ocis-debug reva-storage-home-data
|
||||
12948 pts/1 Sl 0:00 bin/ocis-debug konnectd
|
||||
12952 pts/1 Sl 0:00 bin/ocis-debug proxy
|
||||
12961 pts/1 Sl 0:00 bin/ocis-debug thumbnails
|
||||
12971 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc
|
||||
12981 pts/1 Sl 0:00 bin/ocis-debug web
|
||||
12993 pts/1 Sl 0:00 bin/ocis-debug api
|
||||
12998 pts/1 Sl 0:00 bin/ocis-debug registry
|
||||
13004 pts/1 Sl 0:00 bin/ocis-debug phoenix
|
||||
13015 pts/1 Sl 0:00 bin/ocis-debug reva-auth-basic
|
||||
```
|
||||
|
||||
3. Kill the service you want to start in debug mode:
|
||||
|
||||
|
||||
```console
|
||||
# kill 17628
|
||||
```
|
||||
|
||||
4. Start the service you are interested in in debug mode. When using make to build the binary there is already a `bin/ocis-debug` binary for you. When running an IDE tell it which service to start by providing the corresponding sub command, eg. `bin\ocis-debug reva-frontend`.
|
||||
|
||||
### Gather error messages
|
||||
|
||||
We recommend you collect all related information in a single file or in a github issue. Let us start with an error that pops up in the Web UI:
|
||||
|
||||
> Error while sharing.
|
||||
> error sending a grpc stat request
|
||||
|
||||
This popped up when I tried to add `marie` as a collaborator in phoenix. That triggers a request to the server which I copied as curl. We can strip a lot of headers and the gist of it is:
|
||||
|
||||
```console
|
||||
# curl 'https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares' -d 'shareType=0&shareWith=marie&path=%2FNeuer+Ordner&permissions=1' -u einstein:relativity -k -v | xmllint -format -
|
||||
[... headers ...]
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ocs>
|
||||
<meta>
|
||||
<status>error</status>
|
||||
<statuscode>998</statuscode>
|
||||
<message>error sending a grpc stat request</message>
|
||||
</meta>
|
||||
</ocs>
|
||||
```
|
||||
|
||||
{{< hint info >}}
|
||||
The username and password only work when basic auth is available. Otherwise you have to obtain a bearer token, eg. by grabbing it from the browser.
|
||||
{{< /hint >}}
|
||||
{{< hint danger >}}
|
||||
TODO add ocis cli tool to obtain a bearer token.
|
||||
{{< /hint >}}
|
||||
|
||||
We also have a few interesting log entries:
|
||||
|
||||
```
|
||||
0:43PM INF home/jfd/go/pkg/mod/github.com/cs3org/reva@v0.0.2-0.20200318111623-a2f97d4aa741/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="18/Mar/2020:22:43:40 +0100" from=tcp://[::1]:44078 pid=17836 pkg=rgrpc start="18/Mar/2020:22:43:40 +0100" time_ns=95841 traceid=b4eb9a9f45921f7d3632523ca32a42b0 uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetStorageProvider user-agent=grpc-go/1.26.0
|
||||
10:43PM ERR home/jfd/go/pkg/mod/github.com/cs3org/reva@v0.0.2-0.20200318111623-a2f97d4aa741/internal/grpc/interceptors/log/log.go:69 > unary code=Unknown end="18/Mar/2020:22:43:40 +0100" from=tcp://[::1]:43910 pid=17836 pkg=rgrpc start="18/Mar/2020:22:43:40 +0100" time_ns=586115 traceid=b4eb9a9f45921f7d3632523ca32a42b0 uri=/cs3.gateway.v1beta1.GatewayAPI/Stat user-agent=grpc-go/1.26.0
|
||||
10:43PM ERR home/jfd/go/pkg/mod/github.com/cs3org/reva@v0.0.2-0.20200318111623-a2f97d4aa741/internal/http/services/owncloud/ocs/reqres.go:94 > error sending a grpc stat request error="rpc error: code = Unknown desc = gateway: error calling Stat: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp [::1]:9152: connect: connection refused\"" pid=17832 pkg=rhttp traceid=b4eb9a9f45921f7d3632523ca32a42b0
|
||||
```
|
||||
|
||||
{{< hint danger >}}
|
||||
TODO return the trace id in the response so we can correlate easier. For reva tracked in https://github.com/cs3org/reva/issues/587
|
||||
{{< /hint >}}
|
||||
|
||||
The last line gives us a hint where the log message originated: `.../github.com/cs3org/reva@v0.0.2-0.20200318111623-a2f97d4aa741/internal/http/services/owncloud/ocs/reqres.go:94`. Which looks like this:
|
||||
|
||||
```go
|
||||
89: // WriteOCSResponse handles writing ocs responses in json and xml
|
||||
90: func WriteOCSResponse(w http.ResponseWriter, r *http.Request, res *Response, err error) {
|
||||
91: var encoded []byte
|
||||
92:
|
||||
93: if err != nil {
|
||||
94: appctx.GetLogger(r.Context()).Error().Err(err).Msg(res.OCS.Meta.Message)
|
||||
95: }
|
||||
```
|
||||
|
||||
Ok, so this seems to be a convenience method that is called from multiple places an also handles errors. Unfortunately, this hides the actual source of the error. We could set a breakpoint in line 94 and reproduce the problem, which can be a lot harder than just clicking the share button or sending a curl request again. So let us see what else the log tells us.
|
||||
|
||||
The previous line tells us that a Stat request failed: `uri=/cs3.gateway.v1beta1.GatewayAPI/Stat`. This time the line is written by the grpc log interceptor. What else is there?
|
||||
|
||||
The first line tells us that looking up the responsible storage provider seems to have succeeded: `uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetStorageProvider`.
|
||||
|
||||
At this point it your familiarity with the codebase starts to become a factor. If you are new you should probably go back to setting a break point on the log line and check the stack trace.
|
||||
|
||||
Debug wherever the call trace leads you to ... good luck!
|
||||
|
||||
### Managing dependencies and testing changes
|
||||
|
||||
You can either run and manage the services independently, or you can update the `go.mod` file and replace dependencies with your local version.
|
||||
|
||||
To debug the reva frontend we need to add two replacements:
|
||||
```
|
||||
// use the local ocis-reva repo
|
||||
replace github.com/owncloud/ocis-reva => ../ocis-reva
|
||||
// also use the local reva repo
|
||||
replace github.com/cs3org/reva => ../reva
|
||||
```
|
||||
{{< hint info >}}
|
||||
The username and password only work when basic auth is available. Otherwise you have to obtain a bearer token, eg. by grabbing it from the browser.
|
||||
{{< /hint >}}
|
||||
|
||||
Rebuild ocis to make sure the dependency is used. It should be sufficient to just restart the service you want to debug.
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
---
|
||||
title: "Getting Started with Development"
|
||||
date: 2020-07-07T20:35:00+01:00
|
||||
weight: 15
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: development.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Docker dev environment
|
||||
|
||||
### Option 1: Plain docker
|
||||
|
||||
To build and run your local ocis code with default storage driver
|
||||
|
||||
```
|
||||
docker run --rm -ti --name ocis -v $PWD:/ocis -p 9200:9200 owncloud/eos-ocis-dev
|
||||
```
|
||||
|
||||
The eos-ocis-dev container will build and run ocis using the owncloud storage driver and store files in the container at `/var/tmp/reva/data/<username>/files`
|
||||
|
||||
To check the uploaded files start digging with: `docker exec -it ocis ls -l /var/tmp/reva/`
|
||||
|
||||
{{< hint info >}}
|
||||
On MacOS do not mount a local folder to the `/var/tmp/reva/` path. The fuse driver used by docker [does not support extended attributes](https://docs.docker.com/v18.09/docker-for-mac/osxfs/). See [#182](https://github.com/owncloud/ocis/issues/182) for more details.
|
||||
{{< /hint >}}
|
||||
|
||||
|
||||
### Option 2: Docker compose
|
||||
|
||||
With the `docker-compose.yml` file in ocis repo you can also start ocis via compose:
|
||||
|
||||
```
|
||||
docker-compose up -d ocis
|
||||
```
|
||||
|
||||
{{< hint info >}}
|
||||
We are only starting the `ocis` container here.
|
||||
{{< /hint >}}
|
||||
|
||||
## Verification
|
||||
|
||||
Check the services are running
|
||||
|
||||
```
|
||||
$ docker-compose exec ocis ./bin/ocis list
|
||||
+--------------------------+-----+
|
||||
| EXTENSION | PID |
|
||||
+--------------------------+-----+
|
||||
| accounts | 172 |
|
||||
| api | 204 |
|
||||
| glauth | 187 |
|
||||
| graph | 41 |
|
||||
| graph-explorer | 55 |
|
||||
| konnectd | 196 |
|
||||
| ocs | 59 |
|
||||
| phoenix | 29 |
|
||||
| proxy | 22 |
|
||||
| registry | 226 |
|
||||
| reva-auth-basic | 96 |
|
||||
| reva-auth-bearer | 104 |
|
||||
| reva-frontend | 485 |
|
||||
| reva-gateway | 78 |
|
||||
| reva-sharing | 286 |
|
||||
| reva-storage-eos | 129 |
|
||||
| reva-storage-eos-data | 134 |
|
||||
| reva-storage-home | 442 |
|
||||
| reva-storage-home-data | 464 |
|
||||
| reva-storage-oc | 149 |
|
||||
| reva-storage-oc-data | 155 |
|
||||
| reva-storage-public-link | 168 |
|
||||
| reva-users | 420 |
|
||||
| settings | 23 |
|
||||
| thumbnails | 201 |
|
||||
| web | 218 |
|
||||
| webdav | 63 |
|
||||
+--------------------------+-----+
|
||||
```
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
---
|
||||
title: "EOS"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: 30
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: eos.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
OCIS can be configured to run on top of [eos](https://eos.web.cern.ch/). While the [eos documentation](http://eos-docs.web.cern.ch/) does cover a lot of topics it leaves out some details that you may have to either pull from various [docker containers](https://gitlab.cern.ch/eos/eos-docker), the [forums](https://eos-community.web.cern.ch/) or even the [source](https://github.com/cern-eos/eos) itself.
|
||||
|
||||
This document is a work in progress of the current setup.
|
||||
|
||||
## Docker dev environment for eos storage
|
||||
|
||||
We begin with the docker-compose.yml found in https://github.com/owncloud/ocis/ and
|
||||
switch it to eos-storage.
|
||||
|
||||
### 1. Start eos & ocis containers
|
||||
|
||||
Start the eos cluster and ocis via the compose stack.
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
{{< hint info >}}
|
||||
The first time the **ocis** container starts up, it will compile ocis from scratch which can take a while.
|
||||
To follow progress, run `docker-compose logs -f --tail=10 ocis`
|
||||
{{< /hint >}}
|
||||
|
||||
### 2. LDAP support
|
||||
|
||||
Configure the OS to resolve users and groups using ldap
|
||||
|
||||
```
|
||||
docker-compose exec -d ocis /start-ldap
|
||||
```
|
||||
|
||||
Check that the OS in the ocis container can now resolve einstein or the other demo users
|
||||
|
||||
```
|
||||
$ docker-compose exec ocis id einstein
|
||||
uid=20000(einstein) gid=30000(users) groups=30000(users),30001(sailing-lovers),30002(violin-haters),30007(physics-lovers)
|
||||
```
|
||||
|
||||
{{< hint info >}}
|
||||
If the user is not found at first you might need to wait a few more minutes in case the ocis container is still compiling.
|
||||
{{< /hint >}}
|
||||
|
||||
We also need to restart the reva-users service so it picks up the changed environment. Without a restart it is not able to resolve users from LDAP.
|
||||
```
|
||||
docker-compose exec ocis ./bin/ocis kill reva-users
|
||||
docker-compose exec ocis ./bin/ocis run reva-users
|
||||
```
|
||||
|
||||
### 3. Home storage
|
||||
|
||||
Kill the home storage. By default it uses the `owncloud` storage driver. We need to switch it to the `eoshome` driver and make it use the storage id of the eos storage provider:
|
||||
|
||||
```
|
||||
docker-compose exec ocis ./bin/ocis kill reva-storage-home
|
||||
docker-compose exec -e REVA_STORAGE_HOME_DRIVER=eoshome -e REVA_STORAGE_HOME_MOUNT_ID=1284d238-aa92-42ce-bdc4-0b0000009158 ocis ./bin/ocis run reva-storage-home
|
||||
```
|
||||
|
||||
### 4. Home data provider
|
||||
|
||||
Kill the home data provider. By default it uses the `owncloud` storage driver. We need to switch it to the `eoshome` driver and make it use the storage id of the eos storage provider:
|
||||
|
||||
```
|
||||
docker-compose exec ocis ./bin/ocis kill reva-storage-home-data
|
||||
docker-compose exec -e REVA_STORAGE_HOME_DATA_DRIVER=eoshome ocis ./bin/ocis run reva-storage-home-data
|
||||
```
|
||||
|
||||
{{< hint info >}}
|
||||
The difference between the *home storage* and the *home data provider* are that the former is responsible for metadata changes while the latter is responsible for actual data transfer. The *home storage* uses the cs3 api to manage a folder hierarchy, while the *home data provider* is responsible for moving bytes to and from the storage.
|
||||
{{< /hint >}}
|
||||
|
||||
## Verification
|
||||
|
||||
Login with `einstein / relativity`, upload a file to einsteins home and verify the file is there using
|
||||
|
||||
```
|
||||
docker-compose exec ocis eos ls -l /eos/dockertest/reva/users/4/4c510ada-c86b-4815-8820-42cdf82c3d51/
|
||||
-rw-r--r-- 1 einstein users 10 Jul 1 15:24 newfile.txt
|
||||
```
|
||||
|
||||
If the problem persists, please check the [troubleshooting section about uploads](#creation-and-upload-of-files-does-not-work).
|
||||
|
||||
## Further exploration
|
||||
|
||||
EOS has a built in shell that you can enter using
|
||||
```
|
||||
$ docker-compose exec mgm-master eos
|
||||
# ---------------------------------------------------------------------------
|
||||
# EOS Copyright (C) 2011-2019 CERN/Switzerland
|
||||
# This program comes with ABSOLUTELY NO WARRANTY; for details type `license'.
|
||||
# This is free software, and you are welcome to redistribute it
|
||||
# under certain conditions; type `license' for details.
|
||||
# ---------------------------------------------------------------------------
|
||||
EOS_INSTANCE=eostest
|
||||
EOS_SERVER_VERSION=4.6.5 EOS_SERVER_RELEASE=1
|
||||
EOS_CLIENT_VERSION=4.6.5 EOS_CLIENT_RELEASE=1
|
||||
EOS Console [root://localhost] |/> help
|
||||
access Access Interface
|
||||
accounting Accounting Interface
|
||||
acl Acl Interface
|
||||
archive Archive Interface
|
||||
attr Attribute Interface
|
||||
backup Backup Interface
|
||||
clear Clear the terminal
|
||||
cd Change directory
|
||||
chmod Mode Interface
|
||||
chown Chown Interface
|
||||
config Configuration System
|
||||
console Run Error Console
|
||||
cp Cp command
|
||||
debug Set debug level
|
||||
exit Exit from EOS console
|
||||
file File Handling
|
||||
fileinfo File Information
|
||||
find Find files/directories
|
||||
newfind Find files/directories (new implementation)
|
||||
fs File System configuration
|
||||
fsck File System Consistency Checking
|
||||
fuse Fuse Mounting
|
||||
fusex Fuse(x) Administration
|
||||
geosched Geoscheduler Interface
|
||||
group Group configuration
|
||||
health Health information about system
|
||||
help Display this text
|
||||
info Retrieve file or directory information
|
||||
inspector Interact with File Inspector
|
||||
io IO Interface
|
||||
json Toggle JSON output flag for stdout
|
||||
license Display Software License
|
||||
ls List a directory
|
||||
ln Create a symbolic link
|
||||
map Path mapping interface
|
||||
member Check Egroup membership
|
||||
mkdir Create a directory
|
||||
motd Message of the day
|
||||
mv Rename file or directory
|
||||
node Node configuration
|
||||
ns Namespace Interface
|
||||
pwd Print working directory
|
||||
quit Exit from EOS console
|
||||
quota Quota System configuration
|
||||
reconnect Forces a re-authentication of the shell
|
||||
recycle Recycle Bin Functionality
|
||||
rmdir Remove a directory
|
||||
rm Remove a file
|
||||
role Set the client role
|
||||
route Routing interface
|
||||
rtlog Get realtime log output from mgm & fst servers
|
||||
silent Toggle silent flag for stdout
|
||||
space Space configuration
|
||||
stagerrm Remove disk replicas of a file if it has tape replicas
|
||||
stat Run 'stat' on a file or directory
|
||||
squash Run 'squashfs' utility function
|
||||
test Run performance test
|
||||
timing Toggle timing flag for execution time measurement
|
||||
touch Touch a file
|
||||
token Token interface
|
||||
tracker Interact with File Tracker
|
||||
transfer Transfer Interface
|
||||
version Verbose client/server version
|
||||
vid Virtual ID System Configuration
|
||||
whoami Determine how we are mapped on server side
|
||||
who Statistics about connected users
|
||||
? Synonym for 'help'
|
||||
.q Exit from EOS console
|
||||
EOS Console [root://localhost] |/>
|
||||
```
|
||||
|
||||
But this is a different adventure. See the links at the top of this page for other sources of information on eos.
|
||||
|
||||
## Cleaning up
|
||||
|
||||
To clean up and start completely from scratch, run `docker-compose down -v`.
|
||||
Then delete the local "bin" folder as root which contains the ocis binaries compiled by the "ocis" docker.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Docker-compose exits right away
|
||||
|
||||
When running `docker-compose up -d` ocis exits right away.
|
||||
|
||||
You can check the error code using `docker-compose ps` and investigate further by running only ocis again using `docker-compose up ocis` (without `-d` so you can see what is going on in the foreground).
|
||||
One reason might be that the binary was already built but does not match the container env. Try running `make clean` before running `docker-compose up ocis` so it gets built inside the container.
|
||||
|
||||
### Where are the logs ?
|
||||
|
||||
The ocis logs can be accessed using `docker-compose logs ocis`. Add `-f` for following.
|
||||
|
||||
### How do I update a service in the ocis container?
|
||||
|
||||
1. `docker-compose exec ocis make clean build` to update the binary
|
||||
2. `docker-compose exec ocis ./bin/ocis kill <service>` to kill the service
|
||||
3. `docker-compose exec ocis ./bin/ocis run <service>` to start the service. Do not forget to set any env vars, eg.
|
||||
`docker-compose exec -e REVA_STORAGE_EOS_LAYOUT="{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}" -e REVA_STORAGE_HOME_DRIVER=eoshome ocis ./bin/ocis run reva-storage-home`
|
||||
|
||||
### Creation and upload of files does not work
|
||||
|
||||
If the upload did not work, please check the status of the eos space using the command `docker-compose exec mgm-master eos fs ls`.
|
||||
In case the default space appears as offline, run `docker-compose exec mgm-master eos space set default on`.
|
||||
|
||||
### Uploading big files appears to hang
|
||||
|
||||
Please note that the uploads first go into the "ocis" docker and land in its "/tmp" folder, then gets copied over to the EOS docker using `xrdcopy`.
|
||||
This is why uploading first transfers all bytes and then seem to hang for a while during the final copy.
|
||||
|
||||
### Running out of space quickly
|
||||
|
||||
The EOS dockers are configured with replication, so every file uploaded there will be replicated 4 times,
|
||||
so make sure there is enough physical space on disk when testing.
|
||||
|
||||
Also please note that older failed uploads might still be present in the "/tmp" directory of the "ocis" container.
|
||||
|
||||
+4
-2
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "Extensions"
|
||||
title: "Extension"
|
||||
date: 2020-02-27T20:35:00+01:00
|
||||
weight: 40
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
@@ -169,7 +169,9 @@ This is what hello is: copy and extend!
|
||||
|
||||
## Phoenix extension points
|
||||
|
||||
> Note: For an up to date list check out [the phoenix documentation](https://github.com/owncloud/phoenix/issues/2423).
|
||||
{{< hint info >}}
|
||||
For an up to date list check out [the phoenix documentation](https://github.com/owncloud/phoenix/issues/2423).
|
||||
{{< /hint >}}
|
||||
|
||||
Several ones available:
|
||||
|
||||
|
||||
+121
-2
@@ -53,6 +53,26 @@ chmod +x ocis
|
||||
- Running ocis currently needs a working Redis caching server
|
||||
- The default promary storage location is `/var/tmp/reva/data`. You can change that value by configuration.
|
||||
|
||||
## Usage
|
||||
|
||||
The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis --help`.
|
||||
|
||||
### Server
|
||||
|
||||
The server command is used to start the http and debug server on two addresses within a single process. The http server is serving the general webservice while the debug server is used for health check, readiness check and to server the metrics mentioned below. For further help please execute:
|
||||
|
||||
{{< highlight txt >}}
|
||||
ocis server --help
|
||||
{{< / highlight >}}
|
||||
|
||||
### Health
|
||||
|
||||
The health command is used to execute a health check, if the exit code equals zero the service should be up and running, if the exist code is greater than zero the service is not in a healthy state. Generally this command is used within our Docker containers, it could also be used within Kubernetes.
|
||||
|
||||
{{< highlight txt >}}
|
||||
ocis health --help
|
||||
{{< / highlight >}}
|
||||
|
||||
## Quickstart for Developers
|
||||
|
||||
Following https://github.com/owncloud/ocis#development
|
||||
@@ -67,8 +87,8 @@ Open https://localhost:9200 and login using one of the demo accounts:
|
||||
|
||||
```console
|
||||
einstein:relativity
|
||||
marie:radioactivty
|
||||
richard:superfluidity
|
||||
marie:radioactivity
|
||||
feynman:superfluidity
|
||||
```
|
||||
|
||||
## Runtime
|
||||
@@ -107,3 +127,102 @@ com.owncloud.api.hello
|
||||
|
||||
To the list of available services.
|
||||
|
||||
## Metrics
|
||||
|
||||
This service provides some [Prometheus](https://prometheus.io/) metrics through the debug endpoint, you can optionally secure the metrics endpoint by some random token, which got to be configured through one of the flag `--debug-token` or the environment variable `OCIS_DEBUG_TOKEN` mentioned above. By default the metrics endpoint is bound to `http://0.0.0.0:8001/metrics`.
|
||||
|
||||
go_gc_duration_seconds
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_sum
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_gc_duration_seconds_count
|
||||
: A summary of the GC invocation durations
|
||||
|
||||
go_goroutines
|
||||
: Number of goroutines that currently exist
|
||||
|
||||
go_info
|
||||
: Information about the Go environment
|
||||
|
||||
go_memstats_alloc_bytes
|
||||
: Number of bytes allocated and still in use
|
||||
|
||||
go_memstats_alloc_bytes_total
|
||||
: Total number of bytes allocated, even if freed
|
||||
|
||||
go_memstats_buck_hash_sys_bytes
|
||||
: Number of bytes used by the profiling bucket hash table
|
||||
|
||||
go_memstats_frees_total
|
||||
: Total number of frees
|
||||
|
||||
go_memstats_gc_cpu_fraction
|
||||
: The fraction of this program's available CPU time used by the GC since the program started
|
||||
|
||||
go_memstats_gc_sys_bytes
|
||||
: Number of bytes used for garbage collection system metadata
|
||||
|
||||
go_memstats_heap_alloc_bytes
|
||||
: Number of heap bytes allocated and still in use
|
||||
|
||||
go_memstats_heap_idle_bytes
|
||||
: Number of heap bytes waiting to be used
|
||||
|
||||
go_memstats_heap_inuse_bytes
|
||||
: Number of heap bytes that are in use
|
||||
|
||||
go_memstats_heap_objects
|
||||
: Number of allocated objects
|
||||
|
||||
go_memstats_heap_released_bytes
|
||||
: Number of heap bytes released to OS
|
||||
|
||||
go_memstats_heap_sys_bytes
|
||||
: Number of heap bytes obtained from system
|
||||
|
||||
go_memstats_last_gc_time_seconds
|
||||
: Number of seconds since 1970 of last garbage collection
|
||||
|
||||
go_memstats_lookups_total
|
||||
: Total number of pointer lookups
|
||||
|
||||
go_memstats_mallocs_total
|
||||
: Total number of mallocs
|
||||
|
||||
go_memstats_mcache_inuse_bytes
|
||||
: Number of bytes in use by mcache structures
|
||||
|
||||
go_memstats_mcache_sys_bytes
|
||||
: Number of bytes used for mcache structures obtained from system
|
||||
|
||||
go_memstats_mspan_inuse_bytes
|
||||
: Number of bytes in use by mspan structures
|
||||
|
||||
go_memstats_mspan_sys_bytes
|
||||
: Number of bytes used for mspan structures obtained from system
|
||||
|
||||
go_memstats_next_gc_bytes
|
||||
: Number of heap bytes when next garbage collection will take place
|
||||
|
||||
go_memstats_other_sys_bytes
|
||||
: Number of bytes used for other system allocations
|
||||
|
||||
go_memstats_stack_inuse_bytes
|
||||
: Number of bytes in use by the stack allocator
|
||||
|
||||
go_memstats_stack_sys_bytes
|
||||
: Number of bytes obtained from system for stack allocator
|
||||
|
||||
go_memstats_sys_bytes
|
||||
: Number of bytes obtained from system
|
||||
|
||||
go_threads
|
||||
: Number of OS threads created
|
||||
|
||||
promhttp_metric_handler_requests_in_flight
|
||||
: Current number of scrapes being served
|
||||
|
||||
promhttp_metric_handler_requests_total
|
||||
: Total number of scrapes by HTTP status code
|
||||
@@ -0,0 +1,85 @@
|
||||
---
|
||||
title: "Login Flow"
|
||||
date: 2020-05-04T20:47:00+01:00
|
||||
weight: 43
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: login-flow.md
|
||||
---
|
||||
|
||||
|
||||
## Login Flow
|
||||
|
||||
The following sequence diagram describes the [openid connect auth code flow](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth). The eight numbered steps and notes correspond to the [openid connect auth code flow steps](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowSteps). Example requests are based on the spec as well.:
|
||||
|
||||
{{< mermaid class="text-center">}}
|
||||
sequenceDiagram
|
||||
%% we have comments!! \o/
|
||||
%% this documents the login workflow
|
||||
%% examples taken from the oidc spec https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth
|
||||
%% TODO add PKCE, see https://developer.okta.com/blog/2019/08/22/okta-authjs-pkce#use-pkce-to-make-your-apps-more-secure
|
||||
participant user as User
|
||||
participant client as Client
|
||||
participant proxy as ocis-proxy
|
||||
participant idp as IdP
|
||||
participant glauth as ocis-glauth
|
||||
participant graph as ocis-graph
|
||||
participant accounts as ocis-accounts
|
||||
participant ldap as external LDAP server
|
||||
|
||||
user->>+client: What is the content of my home?
|
||||
|
||||
client->>+proxy: PROPFIND <br> no (or expired) auth
|
||||
Note over client,proxy: ocis needs to know the IdP that is<br>used to authenticate users. The<br>proxy will redirect unauthenticated<br>requests to that IdP.
|
||||
proxy-->>-client: 302 Found
|
||||
Note over client, idp: HTTP/1.1 302 Found<br>Location: https://server.example.com/authorize?<br>response_type=code&<br>scope=openid%20profile%20email<br>&client_id=s6BhdRkqt3<br>&state=af0ifjsldkj<br>&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
|
||||
|
||||
Note over client, idp: We should follow the OpenID Connect Discovery protocol
|
||||
Note over client, idp: Clients might fall back to the ocis server if the discovery failed.<br>We can provide a webfinger endpoint there to let guests use an idp<br>that is backed by the accounts service.
|
||||
Note over client, idp: For now, clients can only handle one IdP, which is configured in ocis.
|
||||
|
||||
client-->>client: 1. Client prepares an Authentication Request<br>containing the desired request parameters.
|
||||
|
||||
client->>+idp: 2. Client sends the request to the Authorization Server.
|
||||
Note over client, idp: GET /authorize?<br>response_type=code<br>&scope=openid%20profile%20email<br>&client_id=s6BhdRkqt3<br>&state=af0ifjsldkj<br>&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb HTTP/1.1<br>Host: server.example.com
|
||||
Note over user, idp: 3. Authorization Server Authenticates the End-User.
|
||||
Note over idp,ldap: Either an IdP already exists or a new one is introduced. Since we are not yet using oidc discovery we can only use one IdP.
|
||||
alt all users managed by konnectd/ocis
|
||||
idp->>+glauth: LDAP query/bind
|
||||
glauth->>+graph: GET user with Basic Auth<br>GraphAPI
|
||||
graph->>+accounts: internal GRPC
|
||||
accounts-->>-graph: response
|
||||
graph-->>-glauth: OData response
|
||||
glauth-->>-idp: LDAP result
|
||||
Note over accounts,ldap: In case internal users are managed<br>in an external ldap they have to be<br>synced to the accounts service to<br>show up as recipients during sharing.
|
||||
else all users authenticated by an external idp
|
||||
idp->>+ldap: LDAP query/bind
|
||||
ldap-->>-idp: LDAP result
|
||||
alt guest accounts managed in ocis / lookup using glauth proxy:
|
||||
Note over idp,glauth: Idp is configured to use glauth as a<br>second ldap server.
|
||||
idp->>+glauth: LDAP query/bind
|
||||
glauth->>+graph: GET user with Basic Auth<br>GraphAPI
|
||||
graph->>+accounts: internal GRPC
|
||||
accounts-->>-graph: response
|
||||
graph-->>-glauth: OData response
|
||||
glauth-->>-idp: LDAP result
|
||||
else guest account provisioned by other means
|
||||
Note over accounts, ldap: In case guest accounts are managed<br>in an existing ldap they need to be<br>synced to the accounts service to<br>be able to login and show up as<br>recipients during sharing.
|
||||
end
|
||||
end
|
||||
Note over user, idp: 4. Authorization Server obtains End-User Consent/Authorization.
|
||||
idp-->>-client: 5. Authorization Server sends the End-User back<br>to the Client with an Authorization Code.
|
||||
Note over client, idp: HTTP/1.1 302 Found<br>Location: https://client.example.org/cb?<br>code=SplxlOBeZQQYbYS6WxSbIA&state=af0ifjsldkj
|
||||
|
||||
client->>+idp: 6. Client requests a response using the<br>Authorization Code at the Token Endpoint.
|
||||
Note over client, idp: POST /token HTTP/1.1<br>Host: server.example.com<br>Content-Type: application/x-www-form-urlencoded<br>grant_type=authorization_code&code=SplxlOBeZQQYbYS6WxSbIA<br>&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
|
||||
idp-->>-client: 7. Client receives a response that contains an<br>ID Token and Access Token in the response body.
|
||||
Note over client, idp: HTTP/1.1 200 OK<br>Content-Type: application/json<br>Cache-Control: no-store<br>Pragma: no-cache<br>{<br>"access_token": "SlAV32hkKG",<br>"token_type": "Bearer",<br>"refresh_token": "8xLOxBtZp8",<br>"expires_in": 3600,<br>"id_token": "a ... b.c ... d.e ... f" // must be a JWT<br>}
|
||||
|
||||
|
||||
client-->>client: 8. Client validates the ID token and<br>retrieves the End-User's Subject Identifier.
|
||||
|
||||
client->>+proxy: PROPFIND <br> With access token
|
||||
proxy-->>-client: 207 Multi-Status
|
||||
client-->>-user: List of Files X, Y, Z ...
|
||||
{{< /mermaid >}}
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "Public upload Flow"
|
||||
date: 2020-07-27T14:16:00+01:00
|
||||
weight: 47
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: public-upload-flow.md
|
||||
---
|
||||
|
||||
|
||||
## Public Upload flow
|
||||
|
||||
The following diagram describes the flow of requests:
|
||||
|
||||
{{< svg src="static/ocis/tus-public-upload.svg" >}}
|
||||
@@ -0,0 +1,96 @@
|
||||
---
|
||||
title: "Request Flow"
|
||||
date: 2020-04-27T16:07:00+01:00
|
||||
weight: 45
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: request-flow.md
|
||||
---
|
||||
|
||||
|
||||
## Request Flow
|
||||
|
||||
The following sequence diagram describes the general request flow. It shows where account provisioning and token minting are happening:
|
||||
|
||||
{{< mermaid class="text-center">}}
|
||||
sequenceDiagram
|
||||
%% we have comments!! \o/
|
||||
participant user as User
|
||||
participant client as Client
|
||||
participant proxy as ocis-proxy
|
||||
participant idp as IdP
|
||||
participant accounts as ocis-accounts
|
||||
participant ldap as corporate LDAP server
|
||||
|
||||
user->>+client: What is the content of my home?
|
||||
|
||||
client->>+proxy: PROPFIND <br> Bearer auth using oidc auth token
|
||||
Note over client,proxy: What is in a bearer token? <br> The spec recommends opaque tokens. <br> Treat it as random byte noise.
|
||||
Note over client,proxy: the proxy MUST authenticate users <br> using ocis-accounts because it needs <br> to decide where to send the request
|
||||
%% Mention introspection endpoint for opaque tokens
|
||||
%% konnectd uses jwt, so we can save a request
|
||||
%% either way the token can be used to look up the sub and iss of the user
|
||||
|
||||
%% or is token check enough?
|
||||
proxy->>+idp: GET /userinfo
|
||||
alt userinfo succeeds
|
||||
|
||||
idp-->>proxy: 200 OK
|
||||
Note over proxy,accounts: Content-Type: application/json<br>{<br>"sub": "248289761001",<br>"name": "Jane Doe",<br>"given_name": "Jane",<br>"family_name": "Doe",<br>"preferred_username": "j.doe",<br>"email": "janedoe@example.com",<br>"picture": "http://example.com/janedoe/me.jpg"<br>}
|
||||
%% see: https://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse
|
||||
|
||||
else userinfo fails
|
||||
|
||||
idp-->>-proxy: 401 Unauthorized
|
||||
Note over proxy,accounts: WWW-Authenticate: error="invalid_token",<br>error_description="The Access Token expired"
|
||||
|
||||
proxy-->>client: 401 Unauthorized or <br>302 Found with redirect to idp
|
||||
Note over client: start at login flow<br> or refresh the token
|
||||
|
||||
end
|
||||
|
||||
proxy->>+accounts: TODO API call to exchange sub@iss with account UUID
|
||||
Note over proxy,accounts: does not autoprovision users. They are explicitly provsioned later.
|
||||
|
||||
alt account exists or has been migrated
|
||||
|
||||
accounts-->>proxy: existing account UUID
|
||||
else account does not exist
|
||||
|
||||
opt oc10 endpoint is configured
|
||||
Note over proxy,oc10: Check if user exists in oc10
|
||||
proxy->>+oc10: GET /apps/graphapi/v1.0/users/<uuid>
|
||||
opt user exists in oc10
|
||||
oc10-->>-proxy: 200
|
||||
%% TODO auth using internal token
|
||||
proxy->>+oc10: PROPFIND
|
||||
Note over proxy,oc10: forward existing bearer auth
|
||||
oc10-->>-proxy: Multistatus response
|
||||
proxy-->>client: Multistatus response
|
||||
client-->>user: List of Files X, Y, Z ...
|
||||
end
|
||||
end
|
||||
|
||||
Note over proxy,accounts: provision a new account including displayname, email and sub@iss <br> TODO only if the user is allowed to login, based on group <br> membership in the ldap server
|
||||
proxy->>proxy: generate new uuid
|
||||
proxy->>+accounts: TODO create account with new generated uuid
|
||||
accounts-->>-proxy: OK / error
|
||||
|
||||
else account has been disabled
|
||||
|
||||
accounts-->>-proxy: account is disabled
|
||||
proxy-->>client: 401 Unauthorized or <br>302 Found with redirect to idp
|
||||
Note over client: start at login flow<br> or refresh the token
|
||||
|
||||
end
|
||||
proxy->>proxy: store uuid in context
|
||||
|
||||
%% what if oc10 does not support a certain request / API
|
||||
|
||||
proxy->>proxy: mint an internal jwt that includes the UUID and username using revas `x-access-token` header
|
||||
proxy->>+reva: PROPFIND <br>Token auth using internal JWT
|
||||
reva-->>-proxy: Multistatus response
|
||||
proxy-->>-client: Multistatus response
|
||||
|
||||
client-->>-user: List of Files X, Y, Z ...
|
||||
{{< /mermaid >}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<mxfile host="www.draw.io" modified="2020-07-03T22:04:42.450Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.68 Safari/537.36 Edg/84.0.522.28" etag="JnAG7dQXQdTAWl8PFjsE" version="13.3.7"><diagram id="us1YkacyxVIFBk4meOfR" name="Page-1">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 truncated
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-0.5 -0.5 1262 1238" content="<mxfile host="www.draw.io" modified="2020-07-27T12:14:24.266Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36 Edg/84.0.522.39" version="13.5.3" etag="3Ni10M2KuQwJcF6Az9xO"><diagram id="unxj-4yZAXxXVZdKTZu8">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 truncated
|
||||
|
After Width: | Height: | Size: 66 KiB |
+107
@@ -0,0 +1,107 @@
|
||||
---
|
||||
title: "Testing"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 37
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: testing.md
|
||||
---
|
||||
|
||||
|
||||
## Acceptance tests
|
||||
|
||||
We are using the ownCloud 10 acceptance testsuite against ocis. To set this up you need the owncloud 10 core repo, a ldap server that the acceptance tests can use to manage users, a redis server for file-versions and the ocis code.
|
||||
|
||||
### Getting the tests
|
||||
|
||||
All you need to do to get the acceptance tests is check out the core repo:
|
||||
```
|
||||
git clone https://github.com/owncloud/core.git
|
||||
```
|
||||
|
||||
### Run a redis server in a docker container
|
||||
|
||||
File versions need a redis server. Start one with docker by using:
|
||||
|
||||
`docker run -e REDIS_DATABASES=1 -p 6379:6379 -d webhippie/redis:latest`
|
||||
|
||||
### Run ocis
|
||||
|
||||
To start ocis:
|
||||
```
|
||||
bin/ocis server
|
||||
```
|
||||
|
||||
### Run the acceptance tests
|
||||
First we will need to clone the testing app in owncloud which contains the skeleton files required for running the tests.
|
||||
In the ownCloud 10 core clone the testing app with the following command:
|
||||
|
||||
```
|
||||
git clone https://github.com/owncloud/testing apps/testing
|
||||
```
|
||||
|
||||
Then run the api acceptance tests with the following command:
|
||||
```
|
||||
make test-acceptance-api \
|
||||
TEST_SERVER_URL=https://localhost:9200 \
|
||||
TEST_OCIS=true \
|
||||
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
|
||||
SKELETON_DIR=apps/testing/data/apiSkeleton \
|
||||
BEHAT_FILTER_TAGS='~@notToImplementOnOCIS&&~@toImplementOnOCIS'
|
||||
```
|
||||
|
||||
Make sure to adjust the settings `TEST_SERVER_URL` and `OCIS_REVA_DATA_ROOT` according to your environment.
|
||||
|
||||
This will run all tests that are relevant to OCIS.
|
||||
|
||||
To run a single test add `BEHAT_FEATURE=<feature file>`
|
||||
|
||||
### use existing tests for BDD
|
||||
|
||||
As a lot of scenarios are written for oC10, we can use those tests for Behaviour driven development in ocis.
|
||||
Every scenario that does not work in OCIS with OC storage, is listed in `tests/acceptance/expected-failures-on-OC-storage.txt` with a link to the related issue.
|
||||
|
||||
Those scenarios are run in the ordinary acceptance test pipeline in CI. The scenarios that fail are checked against the
|
||||
expected failures. If there are any differences then the CI pipeline fails.
|
||||
Similarly, scenarios that do not work in OCIS with EOS storage are listed in `tests/acceptance/expected-failures-on-EOS-storage.txt`.
|
||||
Additionally, some issues have scenarios that demonstrate the current buggy behaviour in ocis(reva).
|
||||
Those scenarios are in this ocis repository in `tests/acceptance/features/apiOcisSpecific`.
|
||||
Have a look into the [documentation](https://doc.owncloud.com/server/developer_manual/testing/acceptance-tests.html#writing-scenarios-for-bugs) to understand why we are writing those tests.
|
||||
|
||||
If you want to work on a specific issue
|
||||
|
||||
1. adjust the core commit id to the latest commit in core so that CI will run the latest test code and scenarios from core.
|
||||
For that change `coreCommit` in the `config` section:
|
||||
|
||||
config = {
|
||||
'apiTests': {
|
||||
'coreBranch': 'master',
|
||||
'coreCommit': 'a06b1bd5ba8e5244bfaf7fa04f441961e6fb0daa',
|
||||
'numberOfParts': 2
|
||||
}
|
||||
}
|
||||
|
||||
2. locally run each of the tests marked with that issue in the expected failures file
|
||||
|
||||
E.g.:
|
||||
```
|
||||
make test-acceptance-api \
|
||||
TEST_SERVER_URL=https://localhost:9200 \
|
||||
TEST_OCIS=true \
|
||||
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
|
||||
BEHAT_FEATURE='tests/acceptance/features/apiComments/comments.feature:123'
|
||||
```
|
||||
|
||||
3. the tests will fail, try to understand how and why they are failing
|
||||
4. fix the code
|
||||
5. go back to 2. and repeat till the tests are passing.
|
||||
6. remove those tests from the expected failures file
|
||||
7. run each of the local tests that were demonstrating the **buggy** behavior. They should fail.
|
||||
8. delete each of the local tests that were demonstrating the **buggy** behavior.
|
||||
9. make a PR that has the fixed code, relevant lines removed from the expected failures file and bug demonstration tests deleted.
|
||||
|
||||
If the changes also affect the `ocis-reva` repository make sure the changes get ported over there.
|
||||
|
||||
### Notes
|
||||
- in a normal case the test-code cleans up users after the test-run, but if a test-run is interrupted (e.g. by CTRL+C) users might have been left on the LDAP server. In that case rerunning the tests requires wiping the users in the ldap server, otherwise the tests will fail when trying to populate the users.
|
||||
- the tests usually create users in the OU `TestUsers` with usernames specified in the feature file. If not defined in the feature file, most users have the password `123456`, defined by `regularUserPassword` in `behat.yml`, but other passwords are also used, see [`\FeatureContext::getPasswordForUser()`](https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/FeatureContext.php#L386) for mapping and [`\FeatureContext::__construct`](https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/FeatureContext.php#L1668) for the password definitions.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: "Tracing"
|
||||
date: 2020-05-13T12:09:00+01:00
|
||||
weight: 55
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
geekdocFilePath: tracing.md
|
||||
---
|
||||
|
||||
By default, we use [Jaeger](https://www.jaegertracing.io) for request tracing within oCIS. You can follow these steps
|
||||
to get started:
|
||||
|
||||
1. Start Jaeger by using the all-in-one docker image:
|
||||
```console
|
||||
docker run -d --name jaeger \
|
||||
-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
|
||||
-p 5775:5775/udp \
|
||||
-p 6831:6831/udp \
|
||||
-p 6832:6832/udp \
|
||||
-p 5778:5778 \
|
||||
-p 16686:16686 \
|
||||
-p 14268:14268 \
|
||||
-p 14250:14250 \
|
||||
-p 9411:9411 \
|
||||
jaegertracing/all-in-one:1.17
|
||||
```
|
||||
2. Every single oCIS service has its own environment variables for enabling and configuring tracing.
|
||||
1. You can enable and configure tracing on each service individually. For example, enable tracing
|
||||
in Reva when starting the oCIS single binary like this:
|
||||
```console
|
||||
REVA_TRACING_ENABLED=true \
|
||||
REVA_TRACING_ENDPOINT=localhost:6831 \
|
||||
REVA_TRACING_COLLECTOR=http://localhost:14268/api/traces \
|
||||
./bin/ocis server
|
||||
```
|
||||
2. Enabling and configuring tracing on oCIS itself will forward the configuration to all services:
|
||||
```console
|
||||
OCIS_TRACING_ENABLED=true \
|
||||
OCIS_TRACING_ENDPOINT=localhost:6831 \
|
||||
OCIS_TRACING_COLLECTOR=http://localhost:14268/api/traces \
|
||||
./bin/ocis server
|
||||
```
|
||||
If you want to set individual tracing configuration for each service, make sure to set
|
||||
`OCIS_TRACING_ENABLED=false`.
|
||||
3. Make the actual request that you want to trace.
|
||||
4. Open up the [Jaeger UI](http://localhost:16686) to analyze request traces.
|
||||
|
||||
For more information on Jaeger, please refer to their [Documentation](https://www.jaegertracing.io/docs/1.17/).
|
||||
@@ -3,38 +3,54 @@ module github.com/owncloud/ocis
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.2.0
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.6.0
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.2.1
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.7.0
|
||||
contrib.go.opencensus.io/exporter/zipkin v0.1.1
|
||||
github.com/chzyer/logex v1.1.10 // indirect
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 // indirect
|
||||
github.com/gogo/protobuf v1.3.1 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
|
||||
github.com/micro/cli/v2 v2.1.2-0.20200203150404-894195727d9c
|
||||
github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e
|
||||
github.com/micro/micro/v2 v2.0.1-0.20200210100719-f38a1d8d5348
|
||||
github.com/UnnoTed/fileb0x v1.1.4
|
||||
github.com/bmatcuk/doublestar v1.3.2 // indirect
|
||||
github.com/coreos/etcd v3.3.21+incompatible // indirect
|
||||
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
|
||||
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
||||
github.com/go-log/log v0.2.0 // indirect
|
||||
github.com/karrick/godirwalk v1.16.1 // indirect
|
||||
github.com/labstack/echo v3.3.10+incompatible // indirect
|
||||
github.com/labstack/gommon v0.3.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.7 // indirect
|
||||
github.com/micro/cli/v2 v2.1.2
|
||||
github.com/micro/micro/v2 v2.8.0
|
||||
github.com/nsf/termbox-go v0.0.0-20200418040025-38ba6e5628f1 // indirect
|
||||
github.com/openzipkin/zipkin-go v0.2.2
|
||||
github.com/owncloud/ocis-glauth v0.4.0
|
||||
github.com/owncloud/flaex v0.2.0
|
||||
github.com/owncloud/ocis-accounts v0.4.2-0.20200901074457-6a27781a2741
|
||||
github.com/owncloud/ocis-glauth v0.5.1-0.20200731165959-1081de7c60f1
|
||||
github.com/owncloud/ocis-graph v0.0.0-20200318175820-9a5a6e029db7
|
||||
github.com/owncloud/ocis-graph-explorer v0.0.0-20200210111049-017eeb40dc0c
|
||||
github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200207094758-c866cafca7e5
|
||||
github.com/owncloud/ocis-konnectd v0.2.0
|
||||
github.com/owncloud/ocis-ocs v0.0.0-20200318181133-cc66a0531da7
|
||||
github.com/owncloud/ocis-phoenix v0.4.1
|
||||
github.com/owncloud/ocis-pkg/v2 v2.2.0
|
||||
github.com/owncloud/ocis-proxy v0.3.1
|
||||
github.com/owncloud/ocis-reva v0.1.1
|
||||
github.com/owncloud/ocis-thumbnails v0.1.0
|
||||
github.com/owncloud/ocis-webdav v0.1.0
|
||||
go.opencensus.io v0.22.3
|
||||
github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200828085053-37fcf3c8f853
|
||||
github.com/owncloud/ocis-konnectd v0.3.2
|
||||
github.com/owncloud/ocis-migration v0.2.0
|
||||
github.com/owncloud/ocis-ocs v0.3.1
|
||||
github.com/owncloud/ocis-phoenix v0.13.0
|
||||
github.com/owncloud/ocis-pkg/v2 v2.4.1-0.20200828095914-d3b859484b2b
|
||||
github.com/owncloud/ocis-proxy v0.7.1-0.20200904132806-fcceec602fcb
|
||||
github.com/owncloud/ocis-reva v0.13.0
|
||||
github.com/owncloud/ocis-settings v0.3.2-0.20200902094647-35dc3aeaba78
|
||||
github.com/owncloud/ocis-store v0.1.1
|
||||
github.com/owncloud/ocis-thumbnails v0.3.0
|
||||
github.com/owncloud/ocis-webdav v0.1.1
|
||||
github.com/refs/pman v0.0.0-20200701173654-f05b8833071a
|
||||
github.com/restic/calens v0.2.0
|
||||
github.com/valyala/fasttemplate v1.2.1 // indirect
|
||||
go.opencensus.io v0.22.4
|
||||
go.uber.org/atomic v1.5.1 // indirect
|
||||
go.uber.org/multierr v1.4.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4 // indirect
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect
|
||||
stash.kopano.io/kc/konnect v0.29.0 // indirect
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect
|
||||
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 // indirect
|
||||
golang.org/x/text v0.3.3 // indirect
|
||||
golang.org/x/tools v0.0.0-20200817023811-d00afeaade8f // indirect
|
||||
)
|
||||
|
||||
replace stash.kopano.io/kc/konnect => github.com/IljaN/konnect v0.30.0-alpha1
|
||||
|
||||
replace google.golang.org/grpc => google.golang.org/grpc v1.26.0
|
||||
|
||||
replace github.com/lucas-clemente/quic-go v0.15.7 => github.com/lucas-clemente/quic-go v0.14.1
|
||||
|
||||
replace github.com/gomodule/redigo => github.com/gomodule/redigo v1.8.2
|
||||
@@ -0,0 +1,49 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-accounts/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-accounts/pkg/config"
|
||||
"github.com/owncloud/ocis-accounts/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// AccountsCommand is the entrypoint for the accounts command.
|
||||
func AccountsCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "accounts",
|
||||
Usage: "Start accounts server",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.ServerWithConfig(cfg.Accounts),
|
||||
Subcommands: []*cli.Command{
|
||||
command.ListAccounts(cfg.Accounts),
|
||||
command.AddAccount(cfg.Accounts),
|
||||
command.UpdateAccount(cfg.Accounts),
|
||||
command.RemoveAccount(cfg.Accounts),
|
||||
command.InspectAccount(cfg.Accounts),
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
accountsCommand := command.Server(configureAccounts(cfg))
|
||||
if err := accountsCommand.Before(c); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return cli.HandleAction(accountsCommand.Action, c)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureAccounts(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Accounts.Log.Level = cfg.Log.Level
|
||||
cfg.Accounts.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Accounts.Log.Color = cfg.Log.Color
|
||||
|
||||
return cfg.Accounts
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(AccountsCommand)
|
||||
}
|
||||
@@ -31,6 +31,15 @@ func configureGLAuth(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.GLAuth.Log.Level = cfg.Log.Level
|
||||
cfg.GLAuth.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.GLAuth.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.GLAuth.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.GLAuth.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.GLAuth.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.GLAuth.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.GLAuth.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.GLAuth
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,14 @@ func configureGraphExplorer(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.GraphExplorer.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.GraphExplorer.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.GraphExplorer.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.GraphExplorer.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.GraphExplorer.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.GraphExplorer.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.GraphExplorer.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.GraphExplorer
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,14 @@ func configureGraph(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Graph.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Graph.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Graph.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Graph.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Graph.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Graph.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Graph.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Graph
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
logger.Fatal().
|
||||
Int("code", resp.StatusCode).
|
||||
Msg("Health seems to be in bad state")
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"net/rpc"
|
||||
"os"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// KillCommand is the entrypoint for the kill command.
|
||||
func KillCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "kill",
|
||||
Usage: "Kill an extension by name",
|
||||
Category: "Runtime",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "hostname",
|
||||
Value: "localhost",
|
||||
EnvVars: []string{"OCIS_RUNTIME_HOSTNAME"},
|
||||
Destination: &cfg.Runtime.Hostname,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "port",
|
||||
Value: "10666",
|
||||
EnvVars: []string{"OCIS_RUNTIME_PORT"},
|
||||
Destination: &cfg.Runtime.Port,
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Hostname, cfg.Runtime.Port))
|
||||
if err != nil {
|
||||
log.Fatal("dialing:", err)
|
||||
}
|
||||
|
||||
var arg1 int
|
||||
|
||||
if err := client.Call("Service.Kill", os.Args[2], &arg1); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Printf("process %v terminated", os.Args[2])
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(KillCommand)
|
||||
}
|
||||
@@ -34,6 +34,14 @@ func configureKonnectd(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Konnectd.Log.Color = cfg.Log.Color
|
||||
cfg.Konnectd.HTTP.TLS = false
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Konnectd.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Konnectd.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Konnectd.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Konnectd.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Konnectd.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Konnectd
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"net/rpc"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// ListCommand is the entrypoint for the list command.
|
||||
func ListCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "list",
|
||||
Usage: "Lists running ocis extensions",
|
||||
Category: "Runtime",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "hostname",
|
||||
Value: "localhost",
|
||||
EnvVars: []string{"OCIS_RUNTIME_HOSTNAME"},
|
||||
Destination: &cfg.Runtime.Hostname,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "port",
|
||||
Value: "10666",
|
||||
EnvVars: []string{"OCIS_RUNTIME_PORT"},
|
||||
Destination: &cfg.Runtime.Port,
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Hostname, cfg.Runtime.Port))
|
||||
if err != nil {
|
||||
log.Fatal("dialing:", err)
|
||||
}
|
||||
|
||||
var arg1 string
|
||||
|
||||
if err := client.Call("Service.List", struct{}{}, &arg1); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Println(arg1)
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(ListCommand)
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-migration/pkg/command"
|
||||
toolconfig "github.com/owncloud/ocis-migration/pkg/config"
|
||||
"github.com/owncloud/ocis-migration/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// ImportCommand is the entrypoint for the accounts command.
|
||||
func ImportCommand(cfg *config.Config) *cli.Command {
|
||||
tc := toolconfig.New()
|
||||
return &cli.Command{
|
||||
Name: "import",
|
||||
Usage: "Import a user exported by owncloud/data_exporter",
|
||||
Flags: flagset.ImportWithConfig(tc),
|
||||
Action: func(c *cli.Context) error {
|
||||
importCommand := command.Import(tc)
|
||||
return cli.HandleAction(importCommand.Action, c)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(ImportCommand)
|
||||
}
|
||||
@@ -35,6 +35,14 @@ func configureOCS(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.OCS.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.OCS.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.OCS.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.OCS.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.OCS.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.OCS.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.OCS.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.OCS
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,13 @@ func configurePhoenix(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Phoenix.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Phoenix.Log.Color = cfg.Log.Color
|
||||
|
||||
// disable ocis-hello extension
|
||||
cfg.Phoenix.Phoenix.Config.ExternalApps = []svcconfig.ExternalApp{}
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Phoenix.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Phoenix.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Phoenix.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Phoenix.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Phoenix.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Phoenix
|
||||
}
|
||||
@@ -12,6 +12,14 @@ func configurePhoenix(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Phoenix.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Phoenix.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Phoenix.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Phoenix.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Phoenix.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Phoenix.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Phoenix.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
// disable built in apps
|
||||
cfg.Phoenix.Phoenix.Config.Apps = []string{}
|
||||
// enable ocis-hello extension
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -33,6 +35,18 @@ func configureProxy(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Proxy.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Proxy.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Proxy.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Proxy.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Proxy.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Proxy.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Proxy.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
if cfg.Reva.Reva.JWTSecret != "" {
|
||||
cfg.Proxy.TokenManager.JWTSecret = cfg.Reva.Reva.JWTSecret
|
||||
}
|
||||
|
||||
return cfg.Proxy
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaAuthBasic(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaAuthBearer(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaFrontend(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaGateway(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaSharing(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-reva/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-reva/pkg/config"
|
||||
"github.com/owncloud/ocis-reva/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// RevaStorageEOSCommand is the entrypoint for the reva-storage-oc command.
|
||||
func RevaStorageEOSCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "reva-storage-eos",
|
||||
Usage: "Start reva eos storage",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageEOSWithConfig(cfg.Reva),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureRevaStorageEOS(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageEOS(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureRevaStorageEOS(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Level = cfg.Log.Level
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(RevaStorageEOSCommand)
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-reva/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-reva/pkg/config"
|
||||
"github.com/owncloud/ocis-reva/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// RevaStorageEOSDataCommand is the entrypoint for the reva-storage-eos-data command.
|
||||
func RevaStorageEOSDataCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "reva-storage-eos-data",
|
||||
Usage: "Start reva eos storage dataprovider",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageEOSDataWithConfig(cfg.Reva),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureRevaStorageEOSData(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageEOSData(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureRevaStorageEOSData(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Level = cfg.Log.Level
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(RevaStorageEOSDataCommand)
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,7 +34,13 @@ func configureRevaStorageHome(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
cfg.Reva.Reva.StorageHome.ExposeDataServer = true
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaStorageHomeData(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,7 +34,13 @@ func configureRevaStorageOC(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
cfg.Reva.Reva.StorageOC.ExposeDataServer = true
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaStorageOCData(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-reva/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-reva/pkg/config"
|
||||
"github.com/owncloud/ocis-reva/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// RevaStoragePublicLinkCommand is the entrypoint for the reva-storage-oc command.
|
||||
func RevaStoragePublicLinkCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "reva-storage-public-link",
|
||||
Usage: "Start reva public link storage",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StoragePublicLink(cfg.Reva),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureRevaStoragePublicLink(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StoragePublicLink(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureRevaStoragePublicLink(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Level = cfg.Log.Level
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(RevaStoragePublicLinkCommand)
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaStorageRoot(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaUsers(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Reva.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Reva.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Reva.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Reva.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Reva
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -7,8 +7,8 @@ import (
|
||||
"github.com/owncloud/ocis-pkg/v2/log"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/micro/runtime"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/pkg/runtime"
|
||||
"github.com/owncloud/ocis/pkg/version"
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"net/rpc"
|
||||
"os"
|
||||
|
||||
cli "github.com/micro/cli/v2"
|
||||
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
"github.com/refs/pman/pkg/process"
|
||||
)
|
||||
|
||||
// RunCommand is the entrypoint for the run command.
|
||||
func RunCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "run",
|
||||
Usage: "Runs an extension",
|
||||
Category: "Runtime",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "hostname",
|
||||
Value: "localhost",
|
||||
EnvVars: []string{"OCIS_RUNTIME_HOSTNAME"},
|
||||
Destination: &cfg.Runtime.Hostname,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "port",
|
||||
Value: "10666",
|
||||
EnvVars: []string{"OCIS_RUNTIME_PORT"},
|
||||
Destination: &cfg.Runtime.Port,
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Hostname, cfg.Runtime.Port))
|
||||
if err != nil {
|
||||
log.Fatal("dialing:", err)
|
||||
}
|
||||
|
||||
proc := process.NewProcEntry(os.Args[2], os.Environ(), []string{os.Args[2]}...)
|
||||
var res int
|
||||
|
||||
if err := client.Call("Service.Start", proc, &res); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Println(res)
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(RunCommand)
|
||||
}
|
||||
+3
-15
@@ -6,11 +6,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/micro/go-micro/v2/config/cmd"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/micro/runtime"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/pkg/runtime"
|
||||
"github.com/owncloud/ocis/pkg/tracing"
|
||||
)
|
||||
|
||||
@@ -29,23 +28,12 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if err := tracing.Start(cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
runtime := runtime.New(
|
||||
runtime.Services(append(runtime.MicroServices, runtime.Extensions...)),
|
||||
runtime.Logger(logger),
|
||||
runtime.MicroRuntime(cmd.DefaultCmd.Options().Runtime),
|
||||
runtime.Context(c),
|
||||
)
|
||||
|
||||
runtime.Start()
|
||||
runtime.Trap()
|
||||
|
||||
return nil
|
||||
r := runtime.New()
|
||||
return r.Start(append(runtime.Extensions, runtime.MicroServices...)...)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,24 +6,20 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/micro/go-micro/v2/config/cmd"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/micro/runtime"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/pkg/runtime"
|
||||
"github.com/owncloud/ocis/pkg/tracing"
|
||||
)
|
||||
|
||||
var (
|
||||
// SimpleRuntimeServices declares which services will be started for the fullstack server
|
||||
// SimpleRuntimeServices declares which services will be started for the simple server
|
||||
SimpleRuntimeServices = []string{
|
||||
"hello",
|
||||
"phoenix",
|
||||
"reva-frontend",
|
||||
"reva-gateway",
|
||||
"reva-users",
|
||||
"reva-auth-basic",
|
||||
"reva-auth-bearer",
|
||||
"konnectd",
|
||||
"glauth",
|
||||
}
|
||||
)
|
||||
|
||||
@@ -42,25 +38,12 @@ func Simple(cfg *config.Config) *cli.Command {
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if err := tracing.Start(cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
runtime := runtime.New(
|
||||
runtime.Logger(logger),
|
||||
runtime.Services(append(runtime.RuntimeServices, SimpleRuntimeServices...)),
|
||||
runtime.MicroRuntime(cmd.DefaultCmd.Options().Runtime),
|
||||
runtime.Context(c),
|
||||
)
|
||||
|
||||
{
|
||||
runtime.Start()
|
||||
runtime.Trap()
|
||||
}
|
||||
|
||||
return nil
|
||||
r := runtime.New()
|
||||
return r.Start(append(SimpleRuntimeServices, runtime.MicroServices...)...)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-settings/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-settings/pkg/config"
|
||||
"github.com/owncloud/ocis-settings/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// SettingsCommand is the entry point for the settings command.
|
||||
func SettingsCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "settings",
|
||||
Usage: "Start settings server",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.ServerWithConfig(cfg.Settings),
|
||||
Action: func(ctx *cli.Context) error {
|
||||
settingsCommand := command.Server(configureSettings(cfg))
|
||||
|
||||
if err := settingsCommand.Before(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return cli.HandleAction(settingsCommand.Action, ctx)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureSettings(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Settings.Log.Level = cfg.Log.Level
|
||||
cfg.Settings.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Settings.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Settings.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Settings.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Settings.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Settings.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Settings.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
if cfg.Reva.Reva.JWTSecret != "" {
|
||||
cfg.Settings.TokenManager.JWTSecret = cfg.Reva.Reva.JWTSecret
|
||||
}
|
||||
|
||||
return cfg.Settings
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(SettingsCommand)
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-store/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-store/pkg/config"
|
||||
"github.com/owncloud/ocis-store/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StoreCommand is the entrypoint for the ocs command.
|
||||
func StoreCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "store",
|
||||
Usage: "Start a go-micro store",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.ServerWithConfig(cfg.Store),
|
||||
Action: func(ctx *cli.Context) error {
|
||||
storeCommand := command.Server(configureStore(cfg))
|
||||
|
||||
if err := storeCommand.Before(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return cli.HandleAction(storeCommand.Action, ctx)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureStore(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Store.Log.Level = cfg.Log.Level
|
||||
cfg.Store.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Store.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Store.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Store.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Store.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Store.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Store.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Store
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StoreCommand)
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -34,6 +36,14 @@ func configureThumbnails(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Thumbnails.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Thumbnails.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Thumbnails.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Thumbnails.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Thumbnails.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Thumbnails.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Thumbnails.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Thumbnails
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,14 @@ func configureWebDAV(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.WebDAV.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.WebDAV.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.WebDAV.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.WebDAV.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.WebDAV.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.WebDAV.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.WebDAV.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.WebDAV
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 152 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user