mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
work on docs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "Getting Started with Development"
|
||||
title: "Getting Started"
|
||||
date: 2020-07-07T20:35:00+01:00
|
||||
weight: 15
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
@@ -9,72 +9,49 @@ geekdocFilePath: getting-started.md
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Docker dev environment
|
||||
## Requirements
|
||||
|
||||
### Option 1: Plain docker
|
||||
We want contribution to oCIS and the creation of extensions to be as easy as possible.
|
||||
So we are trying to reflect this the used tooling. It should be kept simple and quick to be set up.
|
||||
|
||||
To build and run your local ocis code with default storage driver
|
||||
Besides of standard development tools like git and a text editor, you need following software for development:
|
||||
|
||||
```
|
||||
docker run --rm -ti --name ocis -v $PWD:/ocis -p 9200:9200 owncloud/eos-ocis-dev
|
||||
```
|
||||
- Go >= v1.13 ([install instructions](https://golang.org/doc/install))
|
||||
- Yarn ([install instructions](https://classic.yarnpkg.com/en/docs/install))
|
||||
- docker ([install instructions](https://docs.docker.com/get-docker/))
|
||||
- docker-compose ([install instructions](https://docs.docker.com/compose/install/))
|
||||
|
||||
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`
|
||||
If you find tools needed besides the mentioned above, please feel free to open an issue or open a PR.
|
||||
|
||||
To check the uploaded files start digging with: `docker exec -it ocis ls -l /var/tmp/reva/`
|
||||
## Repository structure
|
||||
|
||||
{{< 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 >}}
|
||||
This repository follows the [golang-standard project-layout](https://github.com/golang-standards/project-layout).
|
||||
|
||||
oCIS consists of multiple micro services, also called extensions. We started by having standalone repositories for each of them but quickly noticed, that this adds a time consuming overhead for developers. So we ended up with a monorepo housing all the extensions in one repository.
|
||||
|
||||
### Option 2: Docker compose
|
||||
Each of the extensions live in a subfolder (eg. `accounts` or `settings`) in this repository, technically creating independant Go modules.
|
||||
|
||||
With the `docker-compose.yml` file in ocis repo you can also start ocis via compose:
|
||||
The `ocis` folder does also contain a Go module but is no extension at all. Instead this module is used to import all extensions and furthermore implement commands to start the extensions. With the resulting oCIS binary you can start single extensions or even all extensions at the same time.
|
||||
|
||||
```
|
||||
docker-compose up -d ocis
|
||||
```
|
||||
The `docs` folder contains the source for the [oCIS documentation](https://owncloud.github.io/ocis/).
|
||||
|
||||
{{< hint info >}}
|
||||
We are only starting the `ocis` container here.
|
||||
{{< /hint >}}
|
||||
The `deployments` folder contains documented deployment configurations and templates.
|
||||
|
||||
## Verification
|
||||
The `scripts` folder contains scripts to perform various build, install, analysis, etc operations.
|
||||
|
||||
Check the services are running
|
||||
## Starting points
|
||||
|
||||
```
|
||||
$ 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 |
|
||||
+--------------------------+-----+
|
||||
```
|
||||
Depending on what you want do develop there are different starting points. These will be described below.
|
||||
|
||||
### Developing oCIS
|
||||
|
||||
If you want to contribute to oCIS:
|
||||
|
||||
- see [contribution guidelines](https://github.com/owncloud/ocis#contributing)
|
||||
- make sure the tooling is set up by [building oCIS]({{< relref "build.md" >}}) and [building the docs]({{< relref "build-docs.md" >}})
|
||||
- create or pick an [open issue](https://github.com/owncloud/ocis/issues) to develop on
|
||||
- open a PR and get things done
|
||||
|
||||
### Developing extensions
|
||||
|
||||
If you want to develop an extension, start here: [Extensions]({{< relref "extensions.md">}})
|
||||
|
||||
Reference in New Issue
Block a user