-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from butonic/ocis-on-eos
[WIP] add eos to makefile
- Loading branch information
Showing
11 changed files
with
308 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ coverage.out | |
/hugo | ||
*.key | ||
*crt | ||
|
||
/eos-docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Enhancement: Document how to run OCIS on top of EOS | ||
|
||
We have added rules to the Makefile that use the official [eos docker images](https://gitlab.cern.ch/eos/eos-docker) to boot an eos cluster and configure OCIS to use it. | ||
|
||
https://github.com/owncloud/ocis/pull/172 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
title: "EOS" | ||
date: 2020-02-27T20:35:00+01:00 | ||
weight: 30 | ||
geekdocRepo: https://github.com/owncloud/ocis | ||
geekdocEditPath: edit/master/docs | ||
geekdocFilePath: eos.md | ||
--- | ||
|
||
{{< toc >}} | ||
|
||
OCIS can be configured to run on top of [eos](https://eos.web.cern.ch/). While the [eos documentation](http://eos-docs.web.cern.ch/) does cover a lot of topics it leaves out some details that you may have to either pull from various [docker containers](https://gitlab.cern.ch/eos/eos-docker), the [forums](https://eos-community.web.cern.ch/) or even the [source](https://github.com/cern-eos/eos) itself. | ||
|
||
This document is a work in progress of the current setup. | ||
|
||
## Current status | ||
|
||
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. | ||
|
||
## How to do it | ||
|
||
### Grab it! | ||
|
||
``` | ||
$ git clone git@github.com:owncloud/ocis.git | ||
$ cd ocis | ||
``` | ||
|
||
|
||
### 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! | ||
{{< /hint >}} | ||
|
||
Create a folder in the ui. Then check it was created in eos: | ||
|
||
``` | ||
$ docker exec -it eos-mgm1 eos ls /eos/dockertest/einstein | ||
``` | ||
|
||
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): | ||
|
||
``` | ||
$ 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 | ||
``` | ||
|
||
Check that the folder exists in the web ui. | ||
|
||
## Next steps | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package command | ||
|
||
import ( | ||
"github.com/micro/cli/v2" | ||
"github.com/owncloud/ocis-reva/pkg/command" | ||
svcconfig "github.com/owncloud/ocis-reva/pkg/config" | ||
"github.com/owncloud/ocis-reva/pkg/flagset" | ||
"github.com/owncloud/ocis/pkg/config" | ||
"github.com/owncloud/ocis/pkg/register" | ||
) | ||
|
||
// RevaStorageEOSCommand is the entrypoint for the reva-storage-oc command. | ||
func RevaStorageEOSCommand(cfg *config.Config) *cli.Command { | ||
return &cli.Command{ | ||
Name: "reva-storage-eos", | ||
Usage: "Start reva eos storage", | ||
Category: "Extensions", | ||
Flags: flagset.StorageEOSWithConfig(cfg.Reva), | ||
Action: func(c *cli.Context) error { | ||
scfg := configureRevaStorageEOS(cfg) | ||
|
||
return cli.HandleAction( | ||
command.StorageEOS(scfg).Action, | ||
c, | ||
) | ||
}, | ||
} | ||
} | ||
|
||
func configureRevaStorageEOS(cfg *config.Config) *svcconfig.Config { | ||
cfg.Reva.Log.Level = cfg.Log.Level | ||
cfg.Reva.Log.Pretty = cfg.Log.Pretty | ||
cfg.Reva.Log.Color = cfg.Log.Color | ||
|
||
return cfg.Reva | ||
} | ||
|
||
func init() { | ||
register.AddCommand(RevaStorageEOSCommand) | ||
} |
Oops, something went wrong.