Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor EOS fs #830

Merged
merged 3 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions docs/content/en/docs/config/packages/storage/fs/eos/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
title: "eos"
linkTitle: "eos"
weight: 10
description: >
Configuration for the eos service
---

# _struct: config_

{{% dir name="namespace" type="string" default="/" %}}
Namespace for metadata operations [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L38)
{{< highlight toml >}}
[storage.fs.eos]
namespace = "/"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="shadow_namespace" type="string" default="/.shadow" %}}
ShadowNamespace for storing shadow data [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L41)
{{< highlight toml >}}
[storage.fs.eos]
shadow_namespace = "/.shadow"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="uploads_namespace" type="string" default="/.uploads" %}}
UploadsNamespace for storing upload data [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L44)
{{< highlight toml >}}
[storage.fs.eos]
uploads_namespace = "/.uploads"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="share_folder" type="string" default="/MyShares" %}}
ShareFolder defines the name of the folder in the shadowed namespace. Ex: /eos/user/.shadow/h/hugo/MyShares [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L48)
{{< highlight toml >}}
[storage.fs.eos]
share_folder = "/MyShares"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="eos_binary" type="string" default="/usr/bin/eos" %}}
Location of the eos binary. Default is /usr/bin/eos. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L52)
{{< highlight toml >}}
[storage.fs.eos]
eos_binary = "/usr/bin/eos"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="xrdcopy_binary" type="string" default="/usr/bin/xrdcopy" %}}
Location of the xrdcopy binary. Default is /usr/bin/xrdcopy. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L56)
{{< highlight toml >}}
[storage.fs.eos]
xrdcopy_binary = "/usr/bin/xrdcopy"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="master_url" type="string" default="root://eos-example.org" %}}
URL of the Master EOS MGM. Default is root:eos-example.org [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L60)
{{< highlight toml >}}
[storage.fs.eos]
master_url = "root://eos-example.org"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="slave_url" type="string" default="root://eos-example.org" %}}
URL of the Slave EOS MGM. Default is root:eos-example.org [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L64)
{{< highlight toml >}}
[storage.fs.eos]
slave_url = "root://eos-example.org"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="cache_directory" type="string" default="/var/tmp/" %}}
Location on the local fs where to store reads. Defaults to os.TempDir() [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L68)
{{< highlight toml >}}
[storage.fs.eos]
cache_directory = "/var/tmp/"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="sec_protocol" type="string" default="-" %}}
SecProtocol specifies the xrootd security protocol to use between the server and EOS. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L73)
{{< highlight toml >}}
[storage.fs.eos]
sec_protocol = "-"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="keytab" type="string" default="-" %}}
Keytab specifies the location of the keytab to use to authenticate to EOS. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L76)
{{< highlight toml >}}
[storage.fs.eos]
keytab = "-"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="single_username" type="string" default="-" %}}
SingleUsername is the username to use when SingleUserMode is enabled [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L79)
{{< highlight toml >}}
[storage.fs.eos]
single_username = "-"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="enable_logging" type="bool" default=false %}}
Enables logging of the commands executed Defaults to false [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L83)
{{< highlight toml >}}
[storage.fs.eos]
enable_logging = false
{{< /highlight >}}
{{% /dir %}}

{{% dir name="show_hidden_sys_files" type="bool" default=false %}}
ShowHiddenSysFiles shows internal EOS files like .sys.v# and .sys.a# files. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L87)
{{< highlight toml >}}
[storage.fs.eos]
show_hidden_sys_files = false
{{< /highlight >}}
{{% /dir %}}

{{% dir name="force_single_user_mode" type="bool" default=false %}}
ForceSingleUserMode will force connections to EOS to use SingleUsername [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L90)
{{< highlight toml >}}
[storage.fs.eos]
force_single_user_mode = false
{{< /highlight >}}
{{% /dir %}}

{{% dir name="use_keytab" type="bool" default=false %}}
UseKeyTabAuth changes will authenticate requests by using an EOS keytab. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eos/eos.go#L94)
{{< highlight toml >}}
[storage.fs.eos]
use_keytab = false
{{< /highlight >}}
{{% /dir %}}

146 changes: 146 additions & 0 deletions docs/content/en/docs/config/packages/storage/fs/eoshome/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
title: "eoshome"
linkTitle: "eoshome"
weight: 10
description: >
Configuration for the eoshome service
---

# _struct: config_

{{% dir name="namespace" type="string" default="/" %}}
Namespace for metadata operations [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L38)
{{< highlight toml >}}
[storage.fs.eoshome]
namespace = "/"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="shadow_namespace" type="string" default="/.shadow" %}}
ShadowNamespace for storing shadow data [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L41)
{{< highlight toml >}}
[storage.fs.eoshome]
shadow_namespace = "/.shadow"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="uploads_namespace" type="string" default="/.uploads" %}}
UploadsNamespace for storing upload data [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L44)
{{< highlight toml >}}
[storage.fs.eoshome]
uploads_namespace = "/.uploads"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="share_folder" type="string" default="/MyShares" %}}
ShareFolder defines the name of the folder in the shadowed namespace. Ex: /eos/user/.shadow/h/hugo/MyShares [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L48)
{{< highlight toml >}}
[storage.fs.eoshome]
share_folder = "/MyShares"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="eos_binary" type="string" default="/usr/bin/eos" %}}
Location of the eos binary. Default is /usr/bin/eos. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L52)
{{< highlight toml >}}
[storage.fs.eoshome]
eos_binary = "/usr/bin/eos"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="xrdcopy_binary" type="string" default="/usr/bin/xrdcopy" %}}
Location of the xrdcopy binary. Default is /usr/bin/xrdcopy. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L56)
{{< highlight toml >}}
[storage.fs.eoshome]
xrdcopy_binary = "/usr/bin/xrdcopy"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="master_url" type="string" default="root://eos-example.org" %}}
URL of the Master EOS MGM. Default is root:eos-example.org [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L60)
{{< highlight toml >}}
[storage.fs.eoshome]
master_url = "root://eos-example.org"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="slave_url" type="string" default="root://eos-example.org" %}}
URL of the Slave EOS MGM. Default is root:eos-example.org [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L64)
{{< highlight toml >}}
[storage.fs.eoshome]
slave_url = "root://eos-example.org"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="cache_directory" type="string" default="/var/tmp/" %}}
Location on the local fs where to store reads. Defaults to os.TempDir() [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L68)
{{< highlight toml >}}
[storage.fs.eoshome]
cache_directory = "/var/tmp/"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="sec_protocol" type="string" default="-" %}}
SecProtocol specifies the xrootd security protocol to use between the server and EOS. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L73)
{{< highlight toml >}}
[storage.fs.eoshome]
sec_protocol = "-"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="keytab" type="string" default="-" %}}
Keytab specifies the location of the keytab to use to authenticate to EOS. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L76)
{{< highlight toml >}}
[storage.fs.eoshome]
keytab = "-"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="single_username" type="string" default="-" %}}
SingleUsername is the username to use when SingleUserMode is enabled [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L79)
{{< highlight toml >}}
[storage.fs.eoshome]
single_username = "-"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="user_layout" type="string" default="{{.Username}}" %}}
UserLayout wraps the internal path with user information. Example: if conf.Namespace is /eos/user and received path is /docs and the UserLayout is {{.Username}} the internal path will be: /eos/user/<username>/docs [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L85)
{{< highlight toml >}}
[storage.fs.eoshome]
user_layout = "{{.Username}}"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="enable_logging" type="bool" default=false %}}
Enables logging of the commands executed Defaults to false [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L89)
{{< highlight toml >}}
[storage.fs.eoshome]
enable_logging = false
{{< /highlight >}}
{{% /dir %}}

{{% dir name="show_hidden_sys_files" type="bool" default=false %}}
ShowHiddenSysFiles shows internal EOS files like .sys.v# and .sys.a# files. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L93)
{{< highlight toml >}}
[storage.fs.eoshome]
show_hidden_sys_files = false
{{< /highlight >}}
{{% /dir %}}

{{% dir name="force_single_user_mode" type="bool" default=false %}}
ForceSingleUserMode will force connections to EOS to use SingleUsername [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L96)
{{< highlight toml >}}
[storage.fs.eoshome]
force_single_user_mode = false
{{< /highlight >}}
{{% /dir %}}

{{% dir name="use_keytab" type="bool" default=false %}}
UseKeyTabAuth changes will authenticate requests by using an EOS keytab. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/eoshome/eoshome.go#L100)
{{< highlight toml >}}
[storage.fs.eoshome]
use_keytab = false
{{< /highlight >}}
{{% /dir %}}

2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/ocdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/cs3org/reva/pkg/rhttp/global"
"github.com/cs3org/reva/pkg/rhttp/router"
"github.com/cs3org/reva/pkg/sharedconf"
"github.com/cs3org/reva/pkg/storage/templates"
"github.com/cs3org/reva/pkg/storage/utils/templates"
ctxuser "github.com/cs3org/reva/pkg/user"
"github.com/mitchellh/mapstructure"
"github.com/rs/zerolog"
Expand Down
2 changes: 1 addition & 1 deletion pkg/eosclient/eosclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

"github.com/cs3org/reva/pkg/appctx"
"github.com/cs3org/reva/pkg/errtypes"
"github.com/cs3org/reva/pkg/storage/acl"
"github.com/cs3org/reva/pkg/storage/utils/acl"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
"go.opencensus.io/trace"
Expand Down
Loading