fix eos config (#127)

* fix eos config

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix ldap idp config

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* set default file for user share manager json driver

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update reva

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update reva

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix user layouts and owncloud driver frontend dav prefix

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix acceptance tests

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-04-14 12:59:16 +02:00
committed by GitHub
parent b092e9a2a8
commit 8e33804ba7
24 changed files with 1236 additions and 64 deletions

View File

@@ -137,11 +137,12 @@ def testing(ctx):
'REVA_LDAP_BIND_DN': 'cn=admin,dc=owncloud,dc=com',
'REVA_LDAP_BIND_PASSWORD': 'admin',
'REVA_LDAP_BASE_DN': 'dc=owncloud,dc=com',
'REVA_LDAP_SCHEMA_DISPLAYNAME': 'displayName',
'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_STORAGE_OWNCLOUD_REDIS_ADDR': 'redis:6379',
'REVA_SHARING_USER_JSON_FILE': '/srv/app/tmp/reva/shares.json'
},
'commands': [
'mkdir -p /srv/app/tmp/reva',

View File

@@ -0,0 +1,5 @@
Bugfix: Fix eos config
We have added missing config options for the home layout to the config struct that is passed to eos.
https://github.com/owncloud/ocis-reva/pull/125

2
go.mod
View File

@@ -4,7 +4,7 @@ go 1.13
require (
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cs3org/reva v0.1.1-0.20200320145721-40c4334849c3
github.com/cs3org/reva v0.1.1-0.20200409120332-3642312a10a1
github.com/gofrs/uuid v3.2.0+incompatible
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/micro/cli/v2 v2.1.1

35
go.sum
View File

@@ -71,8 +71,8 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l
github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee h1:3T/l+vMotQ7cDSLWNAn2Vg1SAQ3mdyLgBWWBitSS3uU=
github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt4WATGGgae9mURNGQQqxAudPKrxfsbSDSGOso+g=
github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.29.28 h1:4eKUDBN+v1yxpGDxxPY+FG2Abc6yJB6vvkEDRJ9jIW0=
github.com/aws/aws-sdk-go v1.29.28/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg=
github.com/aws/aws-sdk-go v1.30.7 h1:IaXfqtioP6p9SFAnNfsqdNczbR5UNbYqvcZUSsCAdTY=
github.com/aws/aws-sdk-go v1.30.7/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -134,10 +134,10 @@ github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMEl
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0 h1:jTKILSBtDm0GEw3FtXPxc5wxGpaw2pxzREg1GBV9LIQ=
github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva v0.1.1-0.20200320145721-40c4334849c3 h1:7BfCqdqybadKHM54yat8xvmjVdZhbRpHsEkv5705ASU=
github.com/cs3org/reva v0.1.1-0.20200320145721-40c4334849c3/go.mod h1:Gbm21YRiquCdR34ATmcp6HF0IGSr/EyhSIm/jHh0ZCc=
github.com/cs3org/go-cs3apis v0.0.0-20200408065125-6e23f3ecec0a h1:+enFdliTCV/aaLAvLmeka/r9wUoEypngV4JD5Gy92Uc=
github.com/cs3org/go-cs3apis v0.0.0-20200408065125-6e23f3ecec0a/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva v0.1.1-0.20200409120332-3642312a10a1 h1:1dtbY/ZxOcxTFpMzjIyneSOc/2kFPV77NqTF+Wuaqyg=
github.com/cs3org/reva v0.1.1-0.20200409120332-3642312a10a1/go.mod h1:baGkmcec/4WxTux30nbIz05RWKaueMGTkDihcVxLp8Y=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -217,6 +217,8 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -294,6 +296,8 @@ github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4Fw
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc=
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1/go.mod h1:DFXrEwSRX0p/aSvxE21319menCBFeQO0jXpRj7LEZUA=
@@ -384,8 +388,8 @@ github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9
github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.2.1 h1:pSevhhKCEjOuZHQWDBYAHxcimg60m1fGFj6atY7zAdE=
github.com/mitchellh/mapstructure v1.2.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4=
github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -441,8 +445,8 @@ github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mo
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
github.com/ory/fosite v0.30.4 h1:2cd8qlIad58Lgz3MrVtpaaEQKDXLphYvCEClJTYPUJE=
github.com/ory/fosite v0.30.4/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKGbN8=
github.com/ory/fosite v0.31.0 h1:NZ0FA4ywPEYrCGLNVBAz2dq8vTacLDbbO4Iiy68WCKQ=
github.com/ory/fosite v0.31.0/go.mod h1:lSSqjo8Kr/U1P3kJWxsNGHmq7TnH/7pS1ijvQRT7G+g=
github.com/ory/go-convenience v0.1.0 h1:zouLKfF2GoSGnJwGq+PE/nJAE6dj2Zj5QlTgmMTsTS8=
github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8TWB0yn9KNs=
github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ=
@@ -564,6 +568,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
@@ -623,7 +629,6 @@ go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190130090550-b01c7a725664/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -671,7 +676,6 @@ golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -745,6 +749,7 @@ golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 h1:Hynbrlo6LbYI3H1IqXpkVDOcX
golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200103143344-a1369afcdac7 h1:/W9OPMnnpmFXHYkcp2rQsbFUbRlRzfECQjmAFiOyHE8=
golang.org/x/sys v0.0.0-20200103143344-a1369afcdac7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
@@ -823,8 +828,8 @@ google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.28.1 h1:C1QC6KzgSiLyBabDi87BbjaGreoRgGUF5nOyvfrAZ1k=
google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
@@ -878,5 +883,7 @@ honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXe
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=

View File

@@ -125,7 +125,7 @@ func Gateway(cfg *config.Config) *cli.Command {
cfg.Reva.StorageRoot.MountPath: cfg.Reva.StorageRoot.URL,
cfg.Reva.StorageRoot.MountID: cfg.Reva.StorageRoot.URL,
cfg.Reva.StorageHome.MountPath: cfg.Reva.StorageHome.URL,
// home has no lookup by mount id because it resolves to another storage
// the home storage has no mount id. In responses it returns the mount id of the actual storage
cfg.Reva.StorageEOS.MountPath: cfg.Reva.StorageEOS.URL,
cfg.Reva.StorageEOS.MountID: cfg.Reva.StorageEOS.URL,
cfg.Reva.StorageOC.MountPath: cfg.Reva.StorageOC.URL,

View File

@@ -85,6 +85,11 @@ func Sharing(cfg *config.Config) *cli.Command {
"services": map[string]interface{}{
"usershareprovider": map[string]interface{}{
"driver": cfg.Reva.Sharing.UserDriver,
"drivers": map[string]interface{}{
"json": map[string]interface{}{
"file": cfg.Reva.Sharing.UserJSONFile,
},
},
},
"publicshareprovider": map[string]interface{}{
"driver": cfg.Reva.Sharing.PublicDriver,

206
pkg/command/storageeos.go Normal file
View File

@@ -0,0 +1,206 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageEOS is the entrypoint for the storage-eos command.
func StorageEOS(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-eos",
Usage: "Start reva storage-eos service",
Flags: flagset.StorageEOSWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageEOS.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageEOS.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.StorageEOS.Network,
"address": cfg.Reva.StorageEOS.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"storageprovider": map[string]interface{}{
"driver": cfg.Reva.StorageEOS.Driver,
"drivers": map[string]interface{}{
"eos": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Namespace,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,
"cache_directory": cfg.Reva.Storages.EOS.CacheDirectory,
"enable_logging": cfg.Reva.Storages.EOS.EnableLogging,
"show_hidden_sys_files": cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
"force_single_user_mode": cfg.Reva.Storages.EOS.ForceSingleUserMode,
"use_keytab": cfg.Reva.Storages.EOS.UseKeytab,
"sec_protocol": cfg.Reva.Storages.EOS.SecProtocol,
"keytab": cfg.Reva.Storages.EOS.Keytab,
"single_username": cfg.Reva.Storages.EOS.SingleUsername,
"enable_home": cfg.Reva.Storages.EOS.EnableHome,
"user_layout": cfg.Reva.Storages.EOS.Layout,
},
"local": map[string]interface{}{
"root": cfg.Reva.Storages.Local.Root,
},
"owncloud": map[string]interface{}{
"datadirectory": cfg.Reva.Storages.OwnCloud.Datadirectory,
"scan": cfg.Reva.Storages.OwnCloud.Scan,
"redis": cfg.Reva.Storages.OwnCloud.Redis,
"enable_home": cfg.Reva.Storages.OwnCloud.EnableHome,
"user_layout": cfg.Reva.Storages.OwnCloud.Layout,
},
"s3": map[string]interface{}{
"region": cfg.Reva.Storages.S3.Region,
"access_key": cfg.Reva.Storages.S3.AccessKey,
"secret_key": cfg.Reva.Storages.S3.SecretKey,
"endpoint": cfg.Reva.Storages.S3.Endpoint,
"bucket": cfg.Reva.Storages.S3.Bucket,
"prefix": cfg.Reva.Storages.S3.Prefix,
},
},
"mount_path": cfg.Reva.StorageEOS.MountPath,
"mount_id": cfg.Reva.StorageEOS.MountID,
"expose_data_server": cfg.Reva.StorageEOS.ExposeDataServer,
// TODO use cfg.Reva.SStorageEOSData.URL, ?
"data_server_url": cfg.Reva.StorageEOS.DataServerURL,
"enable_home_creation": cfg.Reva.StorageEOS.EnableHomeCreation,
},
},
},
}
gr.Add(func() error {
runtime.Run(rcfg, pidFile)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageEOS.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,202 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageEOSData is the entrypoint for the storage-oc-data command.
func StorageEOSData(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-oc-data",
Usage: "Start reva storage-oc-data service",
Flags: flagset.StorageEOSDataWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageEOSData.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageEOSData.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"http": map[string]interface{}{
"network": cfg.Reva.StorageEOSData.Network,
"address": cfg.Reva.StorageEOSData.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"dataprovider": map[string]interface{}{
"prefix": cfg.Reva.StorageEOSData.Prefix,
"driver": cfg.Reva.StorageEOSData.Driver,
"drivers": map[string]interface{}{
"eos": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Namespace,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,
"cache_directory": cfg.Reva.Storages.EOS.CacheDirectory,
"enable_logging": cfg.Reva.Storages.EOS.EnableLogging,
"show_hidden_sys_files": cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
"force_single_user_mode": cfg.Reva.Storages.EOS.ForceSingleUserMode,
"use_keytab": cfg.Reva.Storages.EOS.UseKeytab,
"sec_protocol": cfg.Reva.Storages.EOS.SecProtocol,
"keytab": cfg.Reva.Storages.EOS.Keytab,
"single_username": cfg.Reva.Storages.EOS.SingleUsername,
"enable_home": cfg.Reva.Storages.EOS.EnableHome,
"user_layout": cfg.Reva.Storages.EOS.Layout,
},
"local": map[string]interface{}{
"root": cfg.Reva.Storages.Local.Root,
},
"owncloud": map[string]interface{}{
"datadirectory": cfg.Reva.Storages.OwnCloud.Datadirectory,
"scan": cfg.Reva.Storages.OwnCloud.Scan,
"redis": cfg.Reva.Storages.OwnCloud.Redis,
"enable_home": cfg.Reva.Storages.OwnCloud.EnableHome,
"user_layout": cfg.Reva.Storages.OwnCloud.Layout,
},
"s3": map[string]interface{}{
"region": cfg.Reva.Storages.S3.Region,
"access_key": cfg.Reva.Storages.S3.AccessKey,
"secret_key": cfg.Reva.Storages.S3.SecretKey,
"endpoint": cfg.Reva.Storages.S3.Endpoint,
"bucket": cfg.Reva.Storages.S3.Bucket,
"prefix": cfg.Reva.Storages.S3.Prefix,
},
},
"temp_folder": cfg.Reva.StorageEOSData.TempFolder,
},
},
},
}
gr.Add(func() error {
runtime.Run(rcfg, pidFile)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageEOSData.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -87,6 +87,8 @@ func StorageHome(cfg *config.Config) *cli.Command {
"drivers": map[string]interface{}{
"eos": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Namespace,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,

View File

@@ -89,6 +89,8 @@ func StorageHomeData(cfg *config.Config) *cli.Command {
"eos": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Namespace,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,

View File

@@ -87,6 +87,8 @@ func StorageOC(cfg *config.Config) *cli.Command {
"drivers": map[string]interface{}{
"eos": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Namespace,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,

View File

@@ -88,6 +88,8 @@ func StorageOCData(cfg *config.Config) *cli.Command {
"drivers": map[string]interface{}{
"eos": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Namespace,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,

View File

@@ -31,6 +31,7 @@ type Gateway struct {
type Sharing struct {
Port
UserDriver string
UserJSONFile string
PublicDriver string
}
@@ -92,6 +93,13 @@ type DriverEOS struct {
// Namespace for metadata operations
Namespace string
// ShadowNamespace for storing shadow data
ShadowNamespace string
// ShareFolder defines the name of the folder in the
// shadowed namespace. Ex: /eos/user/.shadow/h/hugo/MyShares
ShareFolder string
// Location of the eos binary.
// Default is /usr/bin/eos.
EosBinary string

View File

@@ -150,6 +150,13 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_LDAP_BIND_PASSWORD"},
Destination: &cfg.Reva.LDAP.BindPassword,
},
&cli.StringFlag{
Name: "ldap-idp",
Value: "https://localhost:9200",
Usage: "Identity provider to use for users",
EnvVars: []string{"REVA_LDAP_IDP"},
Destination: &cfg.Reva.LDAP.IDP,
},
// ldap dn is always the dn
&cli.StringFlag{
Name: "ldap-schema-uid",

View File

@@ -137,8 +137,9 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_GATEWAY_SERVICES"},
},
&cli.BoolFlag{
Name: "commit-share-to-storage-grant",
Value: true,
Name: "commit-share-to-storage-grant",
Value: true,
// TODO clarify
Usage: "Commit shares to the share manager",
EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT"},
Destination: &cfg.Reva.Gateway.CommitShareToStorageGrant,
@@ -153,7 +154,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "share-folder",
Value: "/",
Value: "Shares",
Usage: "mount shares in this folder of the home storage provider",
EnvVars: []string{"REVA_GATEWAY_SHARE_FOLDER"},
Destination: &cfg.Reva.Gateway.ShareFolder,
@@ -229,7 +230,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "storage-root-mount-id",
Value: "123e4567-e89b-12d3-a456-426655440001",
Value: "1284d238-aa92-42ce-bdc4-0b0000009152",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_ID"},
Destination: &cfg.Reva.StorageRoot.MountID,
@@ -249,20 +250,28 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_PATH"},
Destination: &cfg.Reva.StorageHome.MountPath,
},
&cli.StringFlag{
Name: "storage-home-mount-id",
Value: "123e4567-e89b-12d3-a456-426655440000",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
Destination: &cfg.Reva.StorageHome.MountID,
},
// The home storage has no mount id. In responses it returns the mount id of the actual storage
&cli.StringFlag{
Name: "storage-home-data-url",
Value: "localhost:9156",
Name: "storage-eos-url",
Value: "localhost:9158",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_URL"},
Destination: &cfg.Reva.StorageHomeData.URL,
EnvVars: []string{"REVA_STORAGE_EOS_URL"},
Destination: &cfg.Reva.StorageEOS.URL,
},
&cli.StringFlag{
Name: "storage-eos-mount-path",
Value: "/eos",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_PATH"},
Destination: &cfg.Reva.StorageEOS.MountPath,
},
&cli.StringFlag{
Name: "storage-eos-mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009158",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_ID"},
Destination: &cfg.Reva.StorageEOS.MountID,
},
&cli.StringFlag{
@@ -281,18 +290,10 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "storage-oc-mount-id",
Value: "123e4567-e89b-12d3-a456-426655440000",
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"},
Destination: &cfg.Reva.StorageOC.MountID,
},
&cli.StringFlag{
Name: "storage-oc-data-url",
Value: "localhost:9164",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_OC_DATA_URL"},
Destination: &cfg.Reva.StorageOCData.URL,
},
}
}

View File

@@ -127,6 +127,13 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_SHARING_USER_DRIVER"},
Destination: &cfg.Reva.Sharing.UserDriver,
},
&cli.StringFlag{
Name: "user-json-file",
Value: "/var/tmp/reva/shares.json",
Usage: "file used to persist shares for the UserShareProvider",
EnvVars: []string{"REVA_SHARING_USER_JSON_FILE"},
Destination: &cfg.Reva.Sharing.UserJSONFile,
},
&cli.StringFlag{
Name: "public-driver",
Value: "memory",

333
pkg/flagset/storageeos.go Normal file
View File

@@ -0,0 +1,333 @@
package flagset
import (
"os"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
// StorageEOSWithConfig applies cfg to the root flagset
func StorageEOSWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
// debug ports are the odd ports
&cli.StringFlag{
Name: "debug-addr",
Value: "0.0.0.0:9159",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_EOS_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageEOS.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
// REVA
&cli.StringFlag{
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
// Services
// Storage oc
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_EOS_NETWORK"},
Destination: &cfg.Reva.StorageEOS.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_EOS_PROTOCOL"},
Destination: &cfg.Reva.StorageEOS.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9158",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_EOS_ADDR"},
Destination: &cfg.Reva.StorageEOS.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9158",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_EOS_URL"},
Destination: &cfg.Reva.StorageEOS.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("storageprovider"),
Usage: "--service storageprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_EOS_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "eos",
Usage: "storage driver, eg. local, eos, owncloud or s3",
EnvVars: []string{"REVA_STORAGE_EOS_DRIVER"},
Destination: &cfg.Reva.StorageEOS.Driver,
},
&cli.StringFlag{
Name: "mount-path",
Value: "/eos",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_PATH"},
Destination: &cfg.Reva.StorageEOS.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009158",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_ID"},
Destination: &cfg.Reva.StorageEOS.MountID,
},
&cli.BoolFlag{
Name: "expose-data-server",
Value: true,
Usage: "exposes a dedicated data server",
EnvVars: []string{"REVA_STORAGE_EOS_EXPOSE_DATA_SERVER"},
Destination: &cfg.Reva.StorageEOS.ExposeDataServer,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "http://localhost:9160/data",
Usage: "data server url",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageEOS.DataServerURL,
},
&cli.BoolFlag{
Name: "enable-home-creation",
Value: false,
Usage: "if enabled home dirs will be automatically created",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME_CREATION"},
Destination: &cfg.Reva.StorageEOS.EnableHomeCreation,
},
// Storage drivers
// Eos
&cli.StringFlag{
Name: "storage-eos-namespace",
Value: "/eos/dockertest/reva",
Usage: "Namespace for metadata operations",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-shadow-namespace",
// Defaults to path.Join(c.Namespace, ".shadow")
Usage: "Shadow namespace where share references are stored",
EnvVars: []string{"REVA_STORAGE_EOS_SHADOW_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
},
&cli.StringFlag{
Name: "storage-eos-share-folder",
Value: "/Shares",
Usage: "name of the share folder",
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVars: []string{"REVA_STORAGE_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVars: []string{"REVA_STORAGE_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Master EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Slave EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVars: []string{"REVA_STORAGE_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVars: []string{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVars: []string{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Usage: "the username to use when SingleUserMode is enabled",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},
// local
&cli.StringFlag{
Name: "storage-local-root",
Value: "/var/tmp/reva/root",
Usage: "the path to the local storage root",
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
// owncloud
&cli.StringFlag{
Name: "storage-owncloud-datadir",
Value: "/var/tmp/reva/data",
Usage: "the path to the owncloud data directory",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
},
&cli.BoolFlag{
Name: "storage-owncloud-scan",
Value: true,
Usage: "scan files on startup to add fileids",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
Usage: "the address of the redis server",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.BoolFlag{
Name: "storage-owncloud-enable-home",
Value: false,
Usage: "enable the creation of home storages",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
},
}
}

View File

@@ -0,0 +1,321 @@
package flagset
import (
"os"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
// StorageEOSDataWithConfig applies cfg to the root flagset
func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
// debug ports are the odd ports
&cli.StringFlag{
Name: "debug-addr",
Value: "0.0.0.0:9161",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_OC_DATA_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageEOSData.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
// REVA
&cli.StringFlag{
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
// Services
// Storage eos data
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_NETWORK"},
Destination: &cfg.Reva.StorageEOSData.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "http",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_PROTOCOL"},
Destination: &cfg.Reva.StorageEOSData.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9160",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_ADDR"},
Destination: &cfg.Reva.StorageEOSData.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9160",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_URL"},
Destination: &cfg.Reva.StorageEOSData.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("dataprovider"),
Usage: "--service dataprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "eos",
Usage: "storage driver, eg. local, eos, owncloud or s3",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_DRIVER"},
Destination: &cfg.Reva.StorageEOSData.Driver,
},
&cli.StringFlag{
Name: "prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_PREFIX"},
Destination: &cfg.Reva.StorageEOSData.Prefix,
},
&cli.StringFlag{
Name: "temp-folder",
Value: "/var/tmp/",
Usage: "temp folder",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_TEMP_FOLDER"},
Destination: &cfg.Reva.StorageEOSData.TempFolder,
},
// Storage drivers
// Eos
&cli.StringFlag{
Name: "storage-eos-namespace",
Value: "/eos/dockertest/reva",
Usage: "Namespace for metadata operations",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-shadow-namespace",
// Defaults to path.Join(c.Namespace, ".shadow")
Usage: "Shadow namespace where share references are stored",
EnvVars: []string{"REVA_STORAGE_EOS_SHADOW_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
},
&cli.StringFlag{
Name: "storage-eos-share-folder",
Value: "/Shares",
Usage: "name of the share folder",
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVars: []string{"REVA_STORAGE_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVars: []string{"REVA_STORAGE_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Master EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Slave EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVars: []string{"REVA_STORAGE_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVars: []string{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVars: []string{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Usage: "the username to use when SingleUserMode is enabled",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},
// local
&cli.StringFlag{
Name: "storage-local-root",
Value: "/var/tmp/reva/root",
Usage: "the path to the local storage root",
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
// owncloud
&cli.StringFlag{
Name: "storage-owncloud-datadir",
Value: "/var/tmp/reva/data",
Usage: "the path to the owncloud data directory",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
},
&cli.BoolFlag{
Name: "storage-owncloud-scan",
Value: true,
Usage: "scan files on startup to add fileids",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
Usage: "the address of the redis server",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.BoolFlag{
Name: "storage-owncloud-enable-home",
Value: false,
Usage: "enable the creation of home storages",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
},
// Gateway
&cli.StringFlag{
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVars: []string{"REVA_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
}
}

View File

@@ -138,8 +138,10 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
Destination: &cfg.Reva.StorageHome.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: "123e4567-e89b-12d3-a456-426655440000",
Name: "mount-id",
// This is tho mount id of the /oc storage
// set it to 1284d238-aa92-42ce-bdc4-0b0000009158 for /eos
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
Destination: &cfg.Reva.StorageHome.MountID,
@@ -172,11 +174,25 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "storage-eos-namespace",
Value: "",
Value: "/eos/dockertest/reva/users",
Usage: "Namespace for metadata operations",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-shadow-namespace",
// Defaults to path.Join(c.Namespace, ".shadow")
Usage: "Shadow namespace where share references are stored",
EnvVars: []string{"REVA_STORAGE_EOS_SHADOW_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
},
&cli.StringFlag{
Name: "storage-eos-share-folder",
Value: "/Shares",
Usage: "name of the share folder",
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
@@ -193,14 +209,14 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-example.org",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Master EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-example.org",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Slave EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
@@ -238,35 +254,33 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Value: true,
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Value: "",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Value: "",
Usage: "the username to use when SingleUserMode is enabled",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "E/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},

View File

@@ -150,11 +150,25 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "storage-eos-namespace",
Value: "",
Value: "/eos/dockertest/reva/users",
Usage: "Namespace for metadata operations",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-shadow-namespace",
// Defaults to path.Join(c.Namespace, ".shadow")
Usage: "Shadow namespace where share references are stored",
EnvVars: []string{"REVA_STORAGE_EOS_SHADOW_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
},
&cli.StringFlag{
Name: "storage-eos-share-folder",
Value: "/Shares",
Usage: "name of the share folder",
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
@@ -171,14 +185,14 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-example.org",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Master EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-example.org",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Slave EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
@@ -216,35 +230,33 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Value: true,
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Value: "",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Value: "",
Usage: "the username to use when SingleUserMode is enabled",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "E/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},

View File

@@ -139,7 +139,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "mount-id",
Value: "123e4567-e89b-12d3-a456-426655440000",
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"},
Destination: &cfg.Reva.StorageOC.MountID,
@@ -177,6 +177,20 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-shadow-namespace",
// Defaults to path.Join(c.Namespace, ".shadow")
Usage: "Shadow namespace where share references are stored",
EnvVars: []string{"REVA_STORAGE_EOS_SHADOW_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
},
&cli.StringFlag{
Name: "storage-eos-share-folder",
Value: "",
Usage: "name of the share folder",
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
@@ -265,7 +279,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,

View File

@@ -155,6 +155,20 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-shadow-namespace",
// Defaults to path.Join(c.Namespace, ".shadow")
Usage: "Shadow namespace where share references are stored",
EnvVars: []string{"REVA_STORAGE_EOS_SHADOW_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
},
&cli.StringFlag{
Name: "storage-eos-share-folder",
Value: "",
Usage: "name of the share folder",
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
@@ -243,7 +257,7 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,

View File

@@ -263,7 +263,7 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,

View File

@@ -133,6 +133,13 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_LDAP_BIND_PASSWORD"},
Destination: &cfg.Reva.LDAP.BindPassword,
},
&cli.StringFlag{
Name: "ldap-idp",
Value: "https://localhost:9200",
Usage: "Identity provider to use for users",
EnvVars: []string{"REVA_LDAP_IDP"},
Destination: &cfg.Reva.LDAP.IDP,
},
// ldap dn is always the dn
&cli.StringFlag{
Name: "ldap-schema-uid",