Compare commits
427
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 | ||
|
|
e66555f11c | ||
|
|
0698afea29 |
No files matched your search
@@ -4,5 +4,6 @@ exclude_paths:
|
||||
- changelog/**
|
||||
- docs/**
|
||||
- pkg/proto/**
|
||||
- tests/acceptance/features/bootstrap/*
|
||||
|
||||
...
|
||||
+414
-167
@@ -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,58 +194,97 @@ 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',
|
||||
'REVA_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'PHOENIX_WEB_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
|
||||
'PHOENIX_ASSET_PATH': '/srv/app/phoenix/dist',
|
||||
'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/tests/config/drone/identifier-registration.yml',
|
||||
'KONNECTD_ISS': 'https://ocis-server:9200',
|
||||
'KONNECTD_TLS': 'true',
|
||||
'LDAP_URI': 'ldap://ldap',
|
||||
'LDAP_BINDDN': 'cn=admin,dc=owncloud,dc=com',
|
||||
'LDAP_BINDPW': 'admin',
|
||||
'LDAP_BASEDN': 'dc=owncloud,dc=com'
|
||||
},
|
||||
'commands': [
|
||||
'mkdir -p /srv/app/tmp/reva',
|
||||
'bin/ocis server'
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'oC10APIAcceptanceTests',
|
||||
'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': [
|
||||
'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 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': [
|
||||
'git clone -b master --depth=1 https://github.com/owncloud/core.git /srv/app/testrunner',
|
||||
'cd /srv/app/testrunner',
|
||||
'make test-acceptance-api',
|
||||
],
|
||||
@@ -186,29 +293,71 @@ def testing(ctx):
|
||||
'path': '/srv/app',
|
||||
}]
|
||||
},
|
||||
],
|
||||
'services':
|
||||
redis(),
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'phoenixWebUIAcceptanceTests',
|
||||
'image': 'owncloudci/nodejs:10',
|
||||
'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': 'http://ocis-server:9100',
|
||||
'BACKEND_HOST': 'http://ocis-server:9140',
|
||||
'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',
|
||||
'OCIS_PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
|
||||
'LDAP_SERVER_URL': 'ldap://ldap',
|
||||
'PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
|
||||
'TEST_TAGS': 'not @skipOnOCIS and not @skip',
|
||||
'LOCAL_UPLOAD_DIR': '/uploads'
|
||||
'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 master --depth=1 https://github.com/owncloud/phoenix.git /srv/app/phoenix',
|
||||
'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 dist',
|
||||
'cp -r /drone/src/tests/config/drone/ocis-config.json /srv/app/phoenix/dist/config.json',
|
||||
'yarn run acceptance-tests-drone'
|
||||
],
|
||||
'volumes': [{
|
||||
@@ -221,37 +370,9 @@ def testing(ctx):
|
||||
}]
|
||||
},
|
||||
],
|
||||
'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
|
||||
},
|
||||
},
|
||||
{
|
||||
'name': 'selenium',
|
||||
'image': 'selenium/standalone-chrome-debug:latest',
|
||||
'pull': 'always',
|
||||
'volumes': [{
|
||||
'name': 'uploads',
|
||||
'path': '/uploads'
|
||||
}],
|
||||
},
|
||||
],
|
||||
'services':
|
||||
redis() +
|
||||
selenium(),
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
@@ -280,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',
|
||||
@@ -359,8 +454,10 @@ def docker(ctx, arch):
|
||||
},
|
||||
],
|
||||
'depends_on': [
|
||||
'testing',
|
||||
],
|
||||
'linting',
|
||||
'unitTests',
|
||||
'localApiTestsOcStorage',
|
||||
] + getCoreApiTestPipelineNames() + getUITestSuiteNames(),
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
@@ -418,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',
|
||||
@@ -516,8 +600,10 @@ def binary(ctx, name):
|
||||
},
|
||||
],
|
||||
'depends_on': [
|
||||
'testing',
|
||||
],
|
||||
'linting',
|
||||
'unitTests',
|
||||
'localApiTestsOcStorage',
|
||||
] + getCoreApiTestPipelineNames() + getUITestSuiteNames(),
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
@@ -527,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',
|
||||
@@ -825,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'
|
||||
}],
|
||||
}
|
||||
]
|
||||
+10
-1
@@ -6,4 +6,13 @@ coverage.out
|
||||
*.key
|
||||
*crt
|
||||
|
||||
/eos-docker
|
||||
/eos-docker
|
||||
|
||||
# API acceptance tests
|
||||
composer.lock
|
||||
/vendor
|
||||
vendor-bin/**/vendor
|
||||
vendor-bin/**/composer.lock
|
||||
tests/acceptance/output
|
||||
|
||||
.idea
|
||||
+258
@@ -2,18 +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)
|
||||
* 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.
|
||||
@@ -21,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
|
||||
@@ -29,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
|
||||
@@ -38,6 +172,59 @@
|
||||
https://github.com/owncloud/ocis/issues/136
|
||||
|
||||
|
||||
* Change - Update ocis-accounts to v0.4.0: [#479](https://github.com/owncloud/ocis/pull/479)
|
||||
|
||||
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
|
||||
@@ -47,6 +234,25 @@
|
||||
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)
|
||||
@@ -56,6 +262,21 @@
|
||||
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
|
||||
@@ -73,6 +294,28 @@
|
||||
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
|
||||
@@ -81,6 +324,21 @@
|
||||
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
|
||||
|
||||
@@ -74,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;
|
||||
@@ -110,6 +106,10 @@ $(BIN)/$(EXECUTABLE)-debug: $(SOURCES)
|
||||
$(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
|
||||
|
||||
@@ -148,9 +148,10 @@ 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:
|
||||
@@ -167,132 +168,20 @@ docs: config-docs-generate docs-copy docs-build
|
||||
watch:
|
||||
go run github.com/cespare/reflex -c reflex.conf
|
||||
|
||||
# -------------------------------------------------------------------------------
|
||||
# EOS related destinations
|
||||
# -------------------------------------------------------------------------------
|
||||
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
|
||||
|
||||
EOS_LDAP_HOST ?= host.docker.internal:9125
|
||||
.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
|
||||
|
||||
eos-docker:
|
||||
git clone https://gitlab.cern.ch/eos/eos-docker.git
|
||||
vendor/bamarni/composer-bin-plugin: composer.lock
|
||||
composer install
|
||||
|
||||
eos-docker/scripts/start_services_ocis.sh: eos-docker
|
||||
# TODO find a way to properly inject the following env vars into the container:
|
||||
# EOS_UTF8=1 enables utf8 filenames
|
||||
# EOS_NS_ACCOUNTING=1 enables dir size propagation
|
||||
# EOS_SYNCTIME_ACCOUNTING=1 enables mtime propagation
|
||||
# - needs the sys.mtime.propagation=1 on a home dir, handled by the reva eos storage driver
|
||||
# - sys.allow.oc.sync=1 is not needed, it is an option for the eos built in webdav endpoint
|
||||
# 1. -e: for now, we patch the start_services.sh and use that
|
||||
# 2. -e: we need to expose the storageprovider ports whan running the docker containen
|
||||
# TODO use port from address to open different ports, this currently only works for one client container
|
||||
sed -e "s/--name eos-mgm1 --net/--name eos-mgm1 --env EOS_UTF8=1 --env EOS_NS_ACCOUNTING=1 --env EOS_SYNCTIME_ACCOUNTING=1 --net/" -e 's/--name $${CLIENTHOSTNAME} --net=eoscluster.cern.ch/--name $${CLIENTHOSTNAME} -p 9154:9154 -p 9155:9155 -p 9156:9156 -p 9157:9157 -p 9158:9158 -p 9159:9159 -p 9160:9160 -p 9161:9161 --net=eoscluster.cern.ch/' ./eos-docker/scripts/start_services.sh > ./eos-docker/scripts/start_services_ocis.sh
|
||||
chmod +x ./eos-docker/scripts/start_services_ocis.sh
|
||||
vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/composer.lock
|
||||
composer bin behat install --no-progress
|
||||
|
||||
.PHONY: eos-deploy
|
||||
eos-deploy: eos-docker/scripts/start_services_ocis.sh
|
||||
# TODO keep eos up to date: see https://gitlab.cern.ch/dss/eos/tags
|
||||
./eos-docker/scripts/start_services_ocis.sh -i gitlab-registry.cern.ch/dss/eos:4.7.5 -q
|
||||
# Install ldap packages
|
||||
docker exec -i eos-mgm1 yum install -y nss-pam-ldapd nscd authconfig
|
||||
docker exec -i eos-cli1 yum install -y nss-pam-ldapd nscd authconfig
|
||||
|
||||
.PHONY: eos-setup
|
||||
eos-setup: eos-docker/scripts/start_services_ocis.sh
|
||||
#Allow resolving uids against ldap
|
||||
# 9125 is the ldap port, 9126 would be tls ... but self signed cert
|
||||
# TODO check out the error message (ignoring for now ... still works): read LDAP host from env var, if not set fall back to docker host, in docker compose should be the ocis-glauth container because it contains guest accounts a well
|
||||
ifeq ($(UNAME), Linux)
|
||||
#on linux add host.docker.internal to hosts: https://stackoverflow.com/questions/714100/os-detecting-makefile
|
||||
docker exec -it eos-mgm1 /bin/sh -c $$'echo -e "`/sbin/ip route | awk \'/default/ { print $$3 }\'`\thost.docker.internal" | sudo tee -a /etc/hosts > /dev/null'
|
||||
docker exec -it eos-cli1 /bin/sh -c $$'echo -e "`/sbin/ip route | awk \'/default/ { print $$3 }\'`\thost.docker.internal" | sudo tee -a /etc/hosts > /dev/null'
|
||||
endif
|
||||
docker exec -i eos-mgm1 authconfig --enableldap --enableldapauth --ldapserver=$(EOS_LDAP_HOST) --ldapbasedn="dc=example,dc=org" --update; \
|
||||
docker exec -i eos-cli1 authconfig --enableldap --enableldapauth --ldapserver=$(EOS_LDAP_HOST) --ldapbasedn="dc=example,dc=org" --update;
|
||||
|
||||
# setup users on mgm
|
||||
#TODO Failed to get D-Bus connection: Operation not permitted\ngetsebool: SELinux is disabled
|
||||
docker exec -i eos-mgm1 sed -i "s/#binddn cn=.*/binddn cn=reva,ou=sysusers,dc=example,dc=org/" /etc/nslcd.conf
|
||||
docker exec -i eos-mgm1 sed -i "s/#bindpw .*/bindpw reva/" /etc/nslcd.conf
|
||||
# print the actual authconfig
|
||||
docker exec -i eos-mgm1 authconfig --test
|
||||
# start nslcd. you need to restart it if you change the ldap config
|
||||
docker exec -i eos-mgm1 nslcd
|
||||
# use unix accounts
|
||||
docker exec -i eos-mgm1 eos vid set map -unix "<pwd>" vuid:0 vgid:0
|
||||
# allow cli to create homes
|
||||
docker exec -i eos-mgm1 eos vid add gateway eos-cli1
|
||||
# krb not needed
|
||||
docker exec -i eos-mgm1 eos vid disable krb5
|
||||
|
||||
# setup users on cli, same as for mgm
|
||||
docker exec -i eos-cli1 sed -i "s/#binddn cn=.*/binddn cn=reva,ou=sysusers,dc=example,dc=org/" /etc/nslcd.conf
|
||||
docker exec -i eos-cli1 sed -i "s/#bindpw .*/bindpw reva/" /etc/nslcd.conf
|
||||
docker exec -i eos-cli1 nslcd
|
||||
|
||||
# create necessary lib link for ocis
|
||||
docker exec -i eos-cli1 ln -s /lib64/ld-linux-x86-64.so.2 /lib
|
||||
|
||||
.PHONY: eos-test
|
||||
eos-test:
|
||||
# check we know the demo users
|
||||
docker exec -i eos-mgm1 id einstein
|
||||
docker exec -i eos-mgm1 id marie
|
||||
docker exec -i eos-mgm1 id feynman
|
||||
|
||||
.PHONY: eos-copy-ocis
|
||||
eos-copy-ocis: build $(BIN)/$(EXECUTABLE)-linux
|
||||
# copy the linux binary to the eos-cli1 container
|
||||
docker cp ./bin/ocis-linux eos-cli1:/usr/local/bin/ocis
|
||||
|
||||
.PHONY: eos-ocis-storage-home
|
||||
eos-ocis-storage-home:
|
||||
# configure the home storage to use the eos driver and return the mount id of the eos driver in responses
|
||||
docker exec -i \
|
||||
--env OCIS_LOG_LEVEL=debug \
|
||||
--env REVA_STORAGE_HOME_DRIVER=eos \
|
||||
--env REVA_STORAGE_HOME_MOUNT_ID=1284d238-aa92-42ce-bdc4-0b0000009158 \
|
||||
eos-cli1 ocis reva-storage-home &
|
||||
docker exec -i \
|
||||
--env OCIS_LOG_LEVEL=debug \
|
||||
--env REVA_STORAGE_HOME_DATA_DRIVER=eos \
|
||||
eos-cli1 ocis reva-storage-home-data &
|
||||
docker exec -i \
|
||||
--env OCIS_LOG_LEVEL=debug \
|
||||
eos-cli1 ocis reva-storage-eos &
|
||||
docker exec -i \
|
||||
--env OCIS_LOG_LEVEL=debug \
|
||||
eos-cli1 ocis reva-storage-eos-data &
|
||||
|
||||
.PHONY: eos-ocis
|
||||
eos-ocis:
|
||||
export OCIS_LOG_LEVEL=debug; \
|
||||
export DAV_FILES_NAMESPACE="/eos/"; \
|
||||
bin/ocis micro & \
|
||||
bin/ocis glauth & \
|
||||
bin/ocis graph-explorer & \
|
||||
bin/ocis graph & \
|
||||
bin/ocis konnectd & \
|
||||
bin/ocis phoenix & \
|
||||
bin/ocis thumbnails & \
|
||||
bin/ocis webdav & \
|
||||
bin/ocis reva-auth-basic & \
|
||||
bin/ocis reva-auth-bearer & \
|
||||
bin/ocis reva-frontend & \
|
||||
bin/ocis reva-gateway & \
|
||||
bin/ocis reva-sharing & \
|
||||
bin/ocis reva-users & \
|
||||
bin/ocis proxy &
|
||||
|
||||
|
||||
.PHONY: eos-start
|
||||
eos-start: eos-deploy eos-setup eos-copy-ocis eos-ocis-storage-home eos-ocis
|
||||
|
||||
.PHONY: eos-clean
|
||||
eos-clean:
|
||||
rm eos-docker/scripts/start_services_ocis.sh
|
||||
|
||||
.PHONY: eos-stop
|
||||
eos-stop: eos-docker
|
||||
./eos-docker/scripts/shutdown_services.sh
|
||||
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 @@
|
||||
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
|
||||
@@ -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,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,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 && \
|
||||
|
||||
@@ -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/
|
||||
|
||||
+118
-78
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Configuration"
|
||||
date: "2020-04-14T22:00:52+0200"
|
||||
date: "2020-08-21T17:50:21+0200"
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs
|
||||
@@ -57,15 +57,6 @@ Usage: `ocis [global options] command [command options] [arguments...]`
|
||||
|
||||
## Sub Commands
|
||||
|
||||
### ocis health
|
||||
|
||||
Check health status
|
||||
|
||||
Usage: `ocis health [command options] [arguments...]`
|
||||
|
||||
--debug-addr | $OCIS_DEBUG_ADDR
|
||||
: Address to debug endpoint. Default: `0.0.0.0:9010`.
|
||||
|
||||
### ocis server
|
||||
|
||||
Start fullstack server
|
||||
@@ -79,10 +70,10 @@ Usage: `ocis server [command options] [arguments...]`
|
||||
: Tracing backend type. Default: `jaeger`.
|
||||
|
||||
--tracing-endpoint | $OCIS_TRACING_ENDPOINT
|
||||
: Endpoint for the agent.
|
||||
: Endpoint for the agent. Default: `localhost:6831`.
|
||||
|
||||
--tracing-collector | $OCIS_TRACING_COLLECTOR
|
||||
: Endpoint for the collector.
|
||||
: Endpoint for the collector. Default: `http://localhost:14268/api/traces`.
|
||||
|
||||
--tracing-service | $OCIS_TRACING_SERVICE
|
||||
: Service name for tracing. Default: `ocis`.
|
||||
@@ -108,90 +99,139 @@ Usage: `ocis server [command options] [arguments...]`
|
||||
--grpc-addr | $OCIS_GRPC_ADDR
|
||||
: Address to bind grpc server. Default: `0.0.0.0:9001`.
|
||||
|
||||
### ocis health
|
||||
|
||||
Check health status
|
||||
|
||||
Usage: `ocis health [command options] [arguments...]`
|
||||
|
||||
--debug-addr | $OCIS_DEBUG_ADDR
|
||||
: Address to debug endpoint. Default: `0.0.0.0:9010`.
|
||||
|
||||
### List of available Extension subcommands
|
||||
|
||||
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.
|
||||
|
||||
#### ocis proxy
|
||||
|
||||
Start proxy server
|
||||
|
||||
#### ocis reva-storage-oc-data
|
||||
|
||||
Start reva oc storage dataprovider
|
||||
|
||||
#### ocis reva-auth-bearer
|
||||
|
||||
Start reva auth-bearer service
|
||||
|
||||
#### ocis webdav
|
||||
|
||||
Start webdav server
|
||||
|
||||
#### ocis reva-sharing
|
||||
|
||||
Start reva sharing service
|
||||
|
||||
#### ocis reva-gateway
|
||||
|
||||
Start reva gateway
|
||||
|
||||
#### ocis graph-explorer
|
||||
|
||||
Start graph explorer
|
||||
|
||||
#### ocis reva-auth-basic
|
||||
|
||||
Start reva auth-basic service
|
||||
|
||||
#### ocis hello
|
||||
|
||||
Start hello server
|
||||
|
||||
#### ocis reva-storage-home
|
||||
|
||||
Start reva home storage
|
||||
|
||||
#### ocis reva-storage-oc
|
||||
|
||||
Start reva oc storage
|
||||
|
||||
#### ocis reva-frontend
|
||||
|
||||
Start reva frontend
|
||||
|
||||
#### ocis reva-storage-home-data
|
||||
|
||||
Start reva home storage dataprovider
|
||||
|
||||
#### ocis graph
|
||||
|
||||
Start graph server
|
||||
|
||||
#### ocis konnectd
|
||||
|
||||
Start konnectd server
|
||||
|
||||
#### ocis thumbnails
|
||||
|
||||
Start thumbnails server
|
||||
|
||||
#### ocis glauth
|
||||
|
||||
Start glauth server
|
||||
|
||||
#### ocis ocs
|
||||
|
||||
Start ocs server
|
||||
|
||||
#### ocis store
|
||||
|
||||
Start a go-micro store
|
||||
|
||||
#### ocis reva-auth-basic
|
||||
|
||||
Start reva auth-basic service
|
||||
|
||||
#### ocis reva-storage-oc
|
||||
|
||||
Start reva oc storage
|
||||
|
||||
#### ocis run
|
||||
|
||||
Runs an extension
|
||||
|
||||
#### ocis graph-explorer
|
||||
|
||||
Start graph explorer
|
||||
|
||||
#### ocis hello
|
||||
|
||||
Start hello server
|
||||
|
||||
#### ocis phoenix
|
||||
|
||||
Start phoenix server
|
||||
|
||||
#### ocis ocs
|
||||
#### ocis reva-storage-eos-data
|
||||
|
||||
Start ocs server
|
||||
Start reva eos storage dataprovider
|
||||
|
||||
#### ocis reva-frontend
|
||||
|
||||
Start reva frontend
|
||||
|
||||
#### ocis reva-storage-home
|
||||
|
||||
Start reva home storage
|
||||
|
||||
#### ocis webdav
|
||||
|
||||
Start webdav server
|
||||
|
||||
#### ocis konnectd
|
||||
|
||||
Start konnectd server
|
||||
|
||||
#### ocis reva-auth-bearer
|
||||
|
||||
Start reva auth-bearer service
|
||||
|
||||
#### ocis reva-storage-home-data
|
||||
|
||||
Start reva home storage dataprovider
|
||||
|
||||
#### ocis reva-users
|
||||
|
||||
Start reva users service
|
||||
|
||||
#### 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
|
||||
|
||||
@@ -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 |
|
||||
+--------------------------+-----+
|
||||
```
|
||||
+186
-39
@@ -13,61 +13,208 @@ OCIS can be configured to run on top of [eos](https://eos.web.cern.ch/). While t
|
||||
|
||||
This document is a work in progress of the current setup.
|
||||
|
||||
## Current status
|
||||
## Docker dev environment for eos storage
|
||||
|
||||
Using ocis and eos it is possible today to manage folders. Sharing is [heavily](https://github.com/cs3org/reva/pull/523) [under](https://github.com/cs3org/reva/pull/585) [development](https://github.com/cs3org/reva/pull/482). FIle up and download needs proper configuration of the dataprovider to also use eos.
|
||||
We begin with the docker-compose.yml found in https://github.com/owncloud/ocis/ and
|
||||
switch it to eos-storage.
|
||||
|
||||
## How to do it
|
||||
|
||||
### Grab it!
|
||||
### 1. Start eos & ocis containers
|
||||
|
||||
Start the eos cluster and ocis via the compose stack.
|
||||
```
|
||||
$ git clone git@github.com:owncloud/ocis.git
|
||||
$ cd ocis
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
|
||||
### Run it!
|
||||
|
||||
We poured the nitty gritty details of setting up ocis into Makefile destinations. After running
|
||||
|
||||
```
|
||||
$ make eos-start
|
||||
```
|
||||
|
||||
the eos related docker containers will be created, started and setup to authenticate a gainst the ocis-glauth service.
|
||||
|
||||
It will also copy the ocis binary tho the `eos-cli1` container and start `ocis reva-storage-home` with the necessary environment variables to use the eos storage driver.
|
||||
|
||||
For details have a look at the `Makefile`.
|
||||
|
||||
|
||||
### Test it!
|
||||
|
||||
You should now be able to point your browser to https://localhost:9200 and login using the demo user credentials, eg `einstein:relativity`.
|
||||
|
||||
{{< hint info >}}
|
||||
If you encounter an error when the IdP redirects you back to phoenix, just reload the page and it should be gone ... or debug it. PR welcome!
|
||||
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 >}}
|
||||
|
||||
Create a folder in the ui. Then check it was created in eos:
|
||||
### 2. LDAP support
|
||||
|
||||
Configure the OS to resolve users and groups using ldap
|
||||
|
||||
```
|
||||
$ docker exec -it eos-mgm1 eos ls /eos/dockertest/einstein
|
||||
docker-compose exec -d ocis /start-ldap
|
||||
```
|
||||
|
||||
Now create a new folder in eos (using eos-mgm1 you will be logged in as admin, see the `whoami`, which is why we `chown` the folder to the uid and gid of einstein afterwards):
|
||||
Check that the OS in the ocis container can now resolve einstein or the other demo users
|
||||
|
||||
```
|
||||
$ docker exec -it eos-mgm1 eos whoami
|
||||
$ docker exec -it eos-mgm1 eos mkdir /eos/dockertest/einstein/rocks
|
||||
$ docker exec -it eos-mgm1 eos chown 20000:30000 /eos/dockertest/einstein/rocks
|
||||
$ docker-compose exec ocis id einstein
|
||||
uid=20000(einstein) gid=30000(users) groups=30000(users),30001(sailing-lovers),30002(violin-haters),30007(physics-lovers)
|
||||
```
|
||||
|
||||
Check that the folder exists in the web ui.
|
||||
{{< 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 >}}
|
||||
|
||||
## Next steps
|
||||
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.
|
||||
|
||||
- configure storage-home-data to enable file upload, PRs against `ocis-reva` welcome
|
||||
- get sharing implemented, PRs against `reva` welcome
|
||||
- simplify home logic, see https://github.com/cs3org/reva/issues/601 and https://github.com/cs3org/reva/issues/578
|
||||
+3
-1
@@ -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:
|
||||
|
||||
|
||||
@@ -87,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
|
||||
|
||||
@@ -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" >}}
|
||||
+53
-33
@@ -10,7 +10,7 @@ geekdocFilePath: request-flow.md
|
||||
|
||||
## Request Flow
|
||||
|
||||
The following sequence diagram describes the general 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
|
||||
@@ -25,52 +25,72 @@ sequenceDiagram
|
||||
user->>+client: What is the content of my home?
|
||||
|
||||
client->>+proxy: PROPFIND <br> Bearer auth using oidc auth token
|
||||
Note right of client: What is in a bearer token? <br> The spec recommends opaque tokens. <br> So it is just random byte noise.
|
||||
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
|
||||
idp-->>-proxy: JSON response
|
||||
Note right of proxy: the result contains <br> the sub of the user
|
||||
%% see: https://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse
|
||||
alt userinfo succeeds
|
||||
|
||||
proxy->>+accounts: TODO API call to exchange sub@iss with account UUID
|
||||
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
|
||||
|
||||
alt internal account
|
||||
accounts->>+ldap: is user allowed to use ocis
|
||||
ldap-->>-accounts: yes/no - group based
|
||||
else guest account
|
||||
accounts->>accounts: check if is valid guest account
|
||||
end
|
||||
else userinfo fails
|
||||
|
||||
idp-->>-proxy: 401 Unauthorized
|
||||
Note over proxy,accounts: WWW-Authenticate: error="invalid_token",<br>error_description="The Access Token expired"
|
||||
|
||||
accounts-->>-proxy: new or existing account UUID / error
|
||||
Note right of accounts: actually this provisions <br> the account including <br> displayname, email and <br> sub@iss if the user is <br> allowed to login, based <br> on group membership <br> in the ldap server
|
||||
|
||||
|
||||
Note right of proxy: the proxy MUST <br> authenticate users <br> using ocis-accounts <br> because it needs to <br> decide where to <br> send the request
|
||||
|
||||
Note right of proxy: forward request to <br> ocis or oc10
|
||||
%% what if oc10 does not support a certain request / API
|
||||
alt user is migrated
|
||||
|
||||
Note right of proxy: mint an internal jwt <br> token that includes <br> the UUID and username
|
||||
proxy->>+reva: PROPFIND <br> Bearer auth using internal JWT
|
||||
reva-->>-proxy: Multistatus response
|
||||
|
||||
else user is not migrated
|
||||
|
||||
Note right of proxy: forward existing bearer auth?
|
||||
proxy->>+oc10: PROPFIND <br> Bearer auth using internal JWT
|
||||
%% TODO auth using internal token?
|
||||
oc10-->>-proxy: Multistatus response
|
||||
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 >}}
|
||||
{{< /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,36 +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/UnnoTed/fileb0x v1.1.4
|
||||
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/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/flaex v0.2.0
|
||||
github.com/owncloud/ocis-glauth v0.4.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.3.1
|
||||
github.com/owncloud/ocis-ocs v0.0.0-20200318181133-cc66a0531da7
|
||||
github.com/owncloud/ocis-phoenix v0.6.0
|
||||
github.com/owncloud/ocis-pkg/v2 v2.2.1
|
||||
github.com/owncloud/ocis-proxy v0.3.1
|
||||
github.com/owncloud/ocis-reva v0.2.1
|
||||
github.com/owncloud/ocis-thumbnails v0.1.2-0.20200422124828-f92a40879feb
|
||||
github.com/owncloud/ocis-webdav v0.1.0
|
||||
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
|
||||
go.opencensus.io v0.22.3
|
||||
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/sys v0.0.0-20200223170610-d5e6a3e2c0ae // 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 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
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
@@ -32,6 +34,14 @@ func configureRevaStorageEOS(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 configureRevaStorageEOSData(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 configureRevaStorageHome(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 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,6 +34,14 @@ func configureRevaStorageOC(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 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,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"
|
||||
)
|
||||
|
||||
@@ -39,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.MicroServices, 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
|
||||
}
|
||||
|
||||
|
||||
+15
-3
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
accounts "github.com/owncloud/ocis-accounts/pkg/config"
|
||||
glauth "github.com/owncloud/ocis-glauth/pkg/config"
|
||||
graphExplorer "github.com/owncloud/ocis-graph-explorer/pkg/config"
|
||||
graph "github.com/owncloud/ocis-graph/pkg/config"
|
||||
@@ -10,8 +11,11 @@ import (
|
||||
phoenix "github.com/owncloud/ocis-phoenix/pkg/config"
|
||||
proxy "github.com/owncloud/ocis-proxy/pkg/config"
|
||||
reva "github.com/owncloud/ocis-reva/pkg/config"
|
||||
settings "github.com/owncloud/ocis-settings/pkg/config"
|
||||
store "github.com/owncloud/ocis-store/pkg/config"
|
||||
thumbnails "github.com/owncloud/ocis-thumbnails/pkg/config"
|
||||
webdav "github.com/owncloud/ocis-webdav/pkg/config"
|
||||
pman "github.com/refs/pman/pkg/config"
|
||||
)
|
||||
|
||||
// Log defines the available logging configuration.
|
||||
@@ -58,22 +62,27 @@ type Config struct {
|
||||
GRPC GRPC
|
||||
Tracing Tracing
|
||||
|
||||
Accounts *accounts.Config
|
||||
Graph *graph.Config
|
||||
GraphExplorer *graphExplorer.Config
|
||||
GLAuth *glauth.Config
|
||||
Hello *hello.Config
|
||||
Konnectd *konnectd.Config
|
||||
OCS *ocs.Config
|
||||
Phoenix *phoenix.Config
|
||||
WebDAV *webdav.Config
|
||||
Reva *reva.Config
|
||||
GLAuth *glauth.Config
|
||||
Proxy *proxy.Config
|
||||
Reva *reva.Config
|
||||
Thumbnails *thumbnails.Config
|
||||
WebDAV *webdav.Config
|
||||
Settings *settings.Config
|
||||
Store *store.Config
|
||||
Runtime *pman.Config
|
||||
}
|
||||
|
||||
// New initializes a new configuration with or without defaults.
|
||||
func New() *Config {
|
||||
return &Config{
|
||||
Accounts: accounts.New(),
|
||||
Graph: graph.New(),
|
||||
GraphExplorer: graphExplorer.New(),
|
||||
Hello: hello.New(),
|
||||
@@ -85,5 +94,8 @@ func New() *Config {
|
||||
GLAuth: glauth.New(),
|
||||
Proxy: proxy.New(),
|
||||
Thumbnails: thumbnails.New(),
|
||||
Settings: settings.New(),
|
||||
Store: store.New(),
|
||||
Runtime: pman.NewConfig(),
|
||||
}
|
||||
}
|
||||
@@ -70,14 +70,14 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-endpoint",
|
||||
Value: "",
|
||||
Value: "localhost:6831",
|
||||
Usage: "Endpoint for the agent",
|
||||
EnvVars: []string{"OCIS_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-collector",
|
||||
Value: "",
|
||||
Value: "http://localhost:14268/api/traces",
|
||||
Usage: "Endpoint for the collector",
|
||||
EnvVars: []string{"OCIS_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
gorun "github.com/micro/go-micro/v2/runtime"
|
||||
"github.com/owncloud/ocis-pkg/v2/log"
|
||||
)
|
||||
|
||||
// Options is a runtime option
|
||||
type Options struct {
|
||||
Services []string
|
||||
Logger log.Logger
|
||||
MicroRuntime *gorun.Runtime
|
||||
Context *cli.Context
|
||||
}
|
||||
|
||||
// Option undocummented
|
||||
type Option func(o *Options)
|
||||
|
||||
// newOptions initializes the available default options.
|
||||
func newOptions(opts ...Option) Options {
|
||||
opt := Options{}
|
||||
|
||||
for _, o := range opts {
|
||||
o(&opt)
|
||||
}
|
||||
|
||||
return opt
|
||||
}
|
||||
|
||||
// Services option
|
||||
func Services(s []string) Option {
|
||||
return func(o *Options) {
|
||||
o.Services = append(o.Services, s...)
|
||||
}
|
||||
}
|
||||
|
||||
// Logger option
|
||||
func Logger(l log.Logger) Option {
|
||||
return func(o *Options) {
|
||||
o.Logger = l
|
||||
}
|
||||
}
|
||||
|
||||
// MicroRuntime option
|
||||
func MicroRuntime(rt *gorun.Runtime) Option {
|
||||
return func(o *Options) {
|
||||
o.MicroRuntime = rt
|
||||
}
|
||||
}
|
||||
|
||||
// Context option
|
||||
func Context(c *cli.Context) Option {
|
||||
return func(o *Options) {
|
||||
o.Context = c
|
||||
}
|
||||
}
|
||||
@@ -1,162 +0,0 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
gorun "github.com/micro/go-micro/v2/runtime"
|
||||
"github.com/micro/micro/v2/api"
|
||||
"github.com/micro/micro/v2/proxy"
|
||||
"github.com/micro/micro/v2/registry"
|
||||
"github.com/micro/micro/v2/runtime"
|
||||
"github.com/micro/micro/v2/web"
|
||||
"github.com/owncloud/ocis-pkg/v2/log"
|
||||
)
|
||||
|
||||
var (
|
||||
// OwncloudNamespace is the base path for micro' services to use
|
||||
OwncloudNamespace = "com.owncloud."
|
||||
|
||||
// MicroServices to start as part of the fullstack option
|
||||
MicroServices = []string{
|
||||
"api", // :8080
|
||||
// "proxy", // :8081
|
||||
"web", // :8082
|
||||
"registry", // :8000
|
||||
// "runtime", // :8088 (future proof. We want to be able to control extensions through a runtime)
|
||||
}
|
||||
|
||||
// Extensions are ocis extension services
|
||||
Extensions = []string{
|
||||
// "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-eos",
|
||||
"reva-storage-eos-data",
|
||||
"reva-storage-oc",
|
||||
"reva-storage-oc-data",
|
||||
"glauth",
|
||||
"konnectd",
|
||||
"proxy", // TODO rename this command. It collides with micro's `proxy`
|
||||
"thumbnails",
|
||||
}
|
||||
)
|
||||
|
||||
// Runtime is a wrapper around micro's own runtime
|
||||
type Runtime struct {
|
||||
Logger log.Logger
|
||||
R *gorun.Runtime
|
||||
Ctx *cli.Context
|
||||
|
||||
services []*gorun.Service
|
||||
}
|
||||
|
||||
// New creates a new ocis + micro runtime
|
||||
func New(opts ...Option) Runtime {
|
||||
options := newOptions(opts...)
|
||||
|
||||
r := Runtime{
|
||||
Logger: options.Logger,
|
||||
R: options.MicroRuntime,
|
||||
Ctx: options.Context,
|
||||
}
|
||||
|
||||
for _, v := range append(MicroServices, Extensions...) {
|
||||
r.services = append(r.services, &gorun.Service{Name: v})
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
// Trap listen and blocks for termination signals
|
||||
func (r Runtime) Trap() {
|
||||
shutdown := make(chan os.Signal, 1)
|
||||
signal.Notify(shutdown, syscall.SIGTERM, syscall.SIGINT, syscall.SIGQUIT)
|
||||
|
||||
if err := (*r.R).Start(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
for range shutdown {
|
||||
r.Logger.Info().Msg("shutdown signal received")
|
||||
close(shutdown)
|
||||
}
|
||||
|
||||
if err := (*r.R).Stop(); err != nil {
|
||||
r.Logger.Err(err).Msgf("error while shutting down")
|
||||
}
|
||||
|
||||
for _, s := range r.services {
|
||||
r.Logger.Info().Msgf("gracefully stopping service %v", s.Name)
|
||||
if err := (*r.R).Delete(s); err != nil {
|
||||
r.Logger.Err(err).Msgf("error while deleting service: %v", s.Name)
|
||||
}
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
// Start starts preconfigured services
|
||||
func (r *Runtime) Start() {
|
||||
env := os.Environ()
|
||||
|
||||
for _, s := range r.services {
|
||||
args := []string{os.Args[0]}
|
||||
|
||||
args = append(args, s.Name)
|
||||
gorunArgs := []gorun.CreateOption{
|
||||
gorun.WithCommand(args...),
|
||||
gorun.WithEnv(env),
|
||||
gorun.WithOutput(os.Stdout),
|
||||
}
|
||||
|
||||
go (*r.R).Create(s, gorunArgs...)
|
||||
// args = args[:len(args)-1]
|
||||
}
|
||||
}
|
||||
|
||||
// AddMicroPlatform adds the micro subcommands to the cli app
|
||||
func AddMicroPlatform(app *cli.App) {
|
||||
setDefaults()
|
||||
|
||||
app.Commands = append(app.Commands, api.Commands()...)
|
||||
app.Commands = append(app.Commands, proxy.Commands()...)
|
||||
app.Commands = append(app.Commands, web.Commands()...)
|
||||
app.Commands = append(app.Commands, registry.Commands()...)
|
||||
app.Commands = append(app.Commands, runtime.Commands()...)
|
||||
}
|
||||
|
||||
// provide a config.Config with default values?
|
||||
func setDefaults() {
|
||||
// api
|
||||
api.Name = OwncloudNamespace + "api"
|
||||
api.Namespace = OwncloudNamespace + "api"
|
||||
api.HeaderPrefix = "X-Micro-Owncloud-"
|
||||
|
||||
// proxy
|
||||
proxy.Name = OwncloudNamespace + "proxy"
|
||||
|
||||
// web
|
||||
web.Name = OwncloudNamespace + "web"
|
||||
web.Namespace = OwncloudNamespace + "web"
|
||||
|
||||
// registry
|
||||
registry.Name = OwncloudNamespace + "registry"
|
||||
|
||||
// runtime
|
||||
runtime.Name = OwncloudNamespace + "runtime"
|
||||
}
|
||||
@@ -2,8 +2,6 @@ package runtime
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/micro/go-micro/v2/config/cmd"
|
||||
"github.com/owncloud/ocis-pkg/v2/log"
|
||||
)
|
||||
|
||||
// Command adds micro runtime commands to the cli app
|
||||
@@ -13,18 +11,8 @@ func Command(app *cli.App) *cli.Command {
|
||||
Description: "starts the go-micro runtime services",
|
||||
Category: "Micro",
|
||||
Action: func(c *cli.Context) error {
|
||||
runtime := New(
|
||||
Services(MicroServices),
|
||||
Logger(log.NewLogger()),
|
||||
MicroRuntime(cmd.DefaultCmd.Options().Runtime),
|
||||
)
|
||||
|
||||
{
|
||||
runtime.Start()
|
||||
runtime.Trap()
|
||||
}
|
||||
|
||||
return nil
|
||||
runtime := New()
|
||||
return runtime.Start()
|
||||
},
|
||||
}
|
||||
return &command
|
||||
@@ -0,0 +1,30 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-pkg/v2/log"
|
||||
)
|
||||
|
||||
// Options is a runtime option
|
||||
type Options struct {
|
||||
Services []string
|
||||
Logger log.Logger
|
||||
Context *cli.Context
|
||||
}
|
||||
|
||||
// Option undocummented
|
||||
type Option func(o *Options)
|
||||
|
||||
// Services option
|
||||
func Services(s []string) Option {
|
||||
return func(o *Options) {
|
||||
o.Services = append(o.Services, s...)
|
||||
}
|
||||
}
|
||||
|
||||
// Context option
|
||||
func Context(c *cli.Context) Option {
|
||||
return func(o *Options) {
|
||||
o.Context = c
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
golog "log"
|
||||
"net/rpc"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
cli "github.com/micro/cli/v2"
|
||||
|
||||
"github.com/micro/micro/v2/client/api"
|
||||
"github.com/micro/micro/v2/client/web"
|
||||
"github.com/micro/micro/v2/service/registry"
|
||||
|
||||
"github.com/refs/pman/pkg/process"
|
||||
"github.com/refs/pman/pkg/service"
|
||||
)
|
||||
|
||||
var (
|
||||
// OwncloudNamespace is the base path for micro' services to use
|
||||
OwncloudNamespace = "com.owncloud."
|
||||
|
||||
// MicroServices to start as part of the fullstack option
|
||||
MicroServices = []string{
|
||||
"api", // :8080
|
||||
"web", // :8082
|
||||
"registry", // :8000
|
||||
}
|
||||
|
||||
// Extensions are ocis extension services
|
||||
Extensions = []string{
|
||||
"proxy",
|
||||
"store",
|
||||
"settings",
|
||||
"phoenix",
|
||||
"graph",
|
||||
"graph-explorer",
|
||||
"ocs",
|
||||
"webdav",
|
||||
"reva-frontend",
|
||||
"reva-gateway",
|
||||
"reva-users",
|
||||
"reva-auth-basic",
|
||||
"reva-auth-bearer",
|
||||
"reva-storage-home",
|
||||
"reva-storage-home-data",
|
||||
"reva-storage-eos",
|
||||
"reva-storage-eos-data",
|
||||
"reva-storage-oc",
|
||||
"reva-storage-oc-data",
|
||||
"reva-storage-public-link",
|
||||
"accounts",
|
||||
"glauth",
|
||||
"konnectd",
|
||||
"thumbnails",
|
||||
}
|
||||
|
||||
// There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present.
|
||||
dependants = []string{
|
||||
"reva-sharing",
|
||||
}
|
||||
|
||||
// Maximum number of retries until getting a connection to the rpc runtime service.
|
||||
maxRetries int = 10
|
||||
)
|
||||
|
||||
// Runtime represents an oCIS runtime environment.
|
||||
type Runtime struct{}
|
||||
|
||||
// New creates a new ocis + micro runtime
|
||||
func New() Runtime {
|
||||
return Runtime{}
|
||||
}
|
||||
|
||||
// Start rpc runtime
|
||||
func (r *Runtime) Start(services ...string) error {
|
||||
go r.Launch(services)
|
||||
return service.Start()
|
||||
}
|
||||
|
||||
// Launch ocis default ocis extensions.
|
||||
func (r *Runtime) Launch(services []string) {
|
||||
var client *rpc.Client
|
||||
var err error
|
||||
var try int
|
||||
|
||||
for {
|
||||
if try >= maxRetries {
|
||||
golog.Fatal("could not get a connection to rpc runtime on localhost:10666")
|
||||
}
|
||||
client, err = rpc.DialHTTP("tcp", "localhost:10666")
|
||||
if err != nil {
|
||||
try++
|
||||
fmt.Println("runtime not available, retrying in 1 second...")
|
||||
time.Sleep(1 * time.Second)
|
||||
} else {
|
||||
goto OUT
|
||||
}
|
||||
}
|
||||
|
||||
OUT:
|
||||
for _, v := range services {
|
||||
args := process.NewProcEntry(v, os.Environ(), []string{v}...)
|
||||
var reply int
|
||||
|
||||
if err := client.Call("Service.Start", args, &reply); err != nil {
|
||||
golog.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(refs) this should disappear and tackled at the runtime (pman) level.
|
||||
// see https://github.com/cs3org/reva/issues/795 for race condition.
|
||||
// dependants might not be needed on a ocis_simple build, therefore
|
||||
// it should not be started under these circumstances.
|
||||
if len(services) >= len(Extensions) { // it will not run for ocis_simple builds.
|
||||
time.Sleep(2 * time.Second)
|
||||
for _, v := range dependants {
|
||||
args := process.NewProcEntry(v, os.Environ(), []string{v}...)
|
||||
var reply int
|
||||
|
||||
if err := client.Call("Service.Start", args, &reply); err != nil {
|
||||
golog.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// AddMicroPlatform adds the micro subcommands to the cli app
|
||||
func AddMicroPlatform(app *cli.App) {
|
||||
setDefaults()
|
||||
|
||||
app.Commands = append(app.Commands, api.Commands()...)
|
||||
app.Commands = append(app.Commands, web.Commands()...)
|
||||
app.Commands = append(app.Commands, registry.Commands()...)
|
||||
}
|
||||
|
||||
// provide a config.Config with default values?
|
||||
func setDefaults() {
|
||||
// api
|
||||
api.Name = OwncloudNamespace + "api"
|
||||
api.Namespace = OwncloudNamespace + "api"
|
||||
api.HeaderPrefix = "X-Micro-Owncloud-"
|
||||
|
||||
// web
|
||||
web.Name = OwncloudNamespace + "web"
|
||||
web.Namespace = OwncloudNamespace + "web"
|
||||
|
||||
// registry
|
||||
registry.Name = OwncloudNamespace + "registry"
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
default:
|
||||
autoload:
|
||||
'': '%paths.base%/../features/bootstrap'
|
||||
|
||||
suites:
|
||||
apiOcisSpecific:
|
||||
paths:
|
||||
- '%paths.base%/../features/apiOcisSpecific'
|
||||
context: &common_ldap_suite_context
|
||||
parameters:
|
||||
ldapAdminPassword: admin
|
||||
ldapUsersOU: TestUsers
|
||||
ldapGroupsOU: TestGroups
|
||||
ldapInitialUserFilePath: /../../config/ldap-users.ldif
|
||||
contexts:
|
||||
- RevaContext:
|
||||
- OccContext:
|
||||
- FeatureContext: &common_feature_context_params
|
||||
baseUrl: http://localhost:8080
|
||||
adminUsername: admin
|
||||
adminPassword: admin
|
||||
regularUserPassword: 123456
|
||||
ocPath: apps/testing/api/v1/occ
|
||||
- CapabilitiesContext:
|
||||
- ChecksumContext:
|
||||
- FavoritesContext:
|
||||
- FilesVersionsContext:
|
||||
- PublicWebDavContext:
|
||||
- TrashbinContext:
|
||||
- WebDavPropertiesContext:
|
||||
|
||||
extensions:
|
||||
jarnaiz\JUnitFormatter\JUnitFormatterExtension:
|
||||
filename: report.xml
|
||||
outputDir: '%paths.base%/../output/'
|
||||
Loaded 100 of 142 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user