diff --git a/docs/cozystack/index.md b/docs/cozystack/index.md new file mode 100644 index 0000000000000000000000000000000000000000..6dc5087b2e40162609c558bccf79bfe055babed7 --- /dev/null +++ b/docs/cozystack/index.md @@ -0,0 +1,31 @@ +{: .center} + +## What is Cozy-Stack + +It is the core server of the Cozy platform. It consists of a single process, *the Cozy stack*. + +[Full Cozy-Stack documentation here](https://docs.cozy.io/en/cozy-stack/). + +The Cozy-Stack is in charge of serving the Web applications users have installed from the application store. + +It provides its services through a REST API that allows to: + + - create, update, delete documents inside the database; + - authenticate users and client applications; + - send emails; + - launch jobs on the server. Connectors that import data from remote websites are some sort of jobs. Jobs can be one time tasks (sending a message) or periodic tasks. Some jobs, like the connectors, that require executing third party code on the server side, are sandboxed (we use `nsjail` for now). + - … + +The Cozy-Stack also allows to access the database replication API, allowing to sync documents between the server and local databases, for example in mobile clients. + +Two authentication methods are available: + + - Web applications running on the server get a session token when the user log in; + - OAuth2 for other applications. + +Feel free to [open an issue](https://github.com/cozy/cozy-stack/issues/new) +for questions and suggestions. + +## Why we use it ? + +Without that stack we are not able to properly interact with all cozy apps and data. That's why we are using it. For local developpment we are using the official cozy-stack repo with some packaging updates, and for our test env we are using [Easy cozy](../easycozy/index.md) \ No newline at end of file diff --git a/docs/cozystack/local.md b/docs/cozystack/local.md new file mode 100644 index 0000000000000000000000000000000000000000..276a6eeca8a8808d2532e9223c783b0e140779d3 --- /dev/null +++ b/docs/cozystack/local.md @@ -0,0 +1,28 @@ +## Local stack + +[GitLab Repo](https://forge.grandlyon.com/web-et-numerique/llle_project/cozy-stack) + +### Why are we clonning the official repo ? + +Because of some political choice Cozy Cloud are not maintaining there official [docker image](https://hub.docker.com/r/cozy/cozy-app-dev) properly. That's why we have a mirroring version of there official repository with some custom docker configuration improving : + +* CouchDb version. Officialy Cozy Cloud use CouchDb 3.2.2, but in there official image it's not the case yet. + +### What change should be done by cozy in order to upgrade there image ? + +Cozy should upgrade there CouchDb version inside there image. But unfortunately, the base image `debian:stretch-slim` does not support ERLANG/OTP>=19, and CouchDb need at least a version >=20 for their `3.2.2` version, see [official doc](https://docs.couchdb.org/en/stable/whatsnew/3.2.html#id2). + +As a consequence they should upgrade there base image to at least `debian:buster`. But this add a new issue, the official binary of couch-db cannot be build on this version according to some missing libs. + +That's why we took the shortcut of using an official [CouchDb image](https://hub.docker.com/_/couchdb) + +### How to build new version of the stack ? + +If we want to build a new stack version it's easy ! A manual pipeline has been created. You just need to run the following steps : + +* Run the manual pipeline in CI/CD part of gitlab +* Enter the requested parameter `VERSION` and a value (ex: 1.5.7) + + + +The image will be automaticaly build based on the branch and store in the registry. diff --git a/docs/img/stack-pipeline.png b/docs/img/stack-pipeline.png new file mode 100644 index 0000000000000000000000000000000000000000..16f53eaead2a0b093c71d6d26abd9268f4c954be Binary files /dev/null and b/docs/img/stack-pipeline.png differ diff --git a/mkdocs.yml b/mkdocs.yml index 550e75ce1c98862d61806926561323614f82bef9..edd4d0284dc4d1afca2d96c03c116f6e33caf98e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -52,6 +52,9 @@ nav: - Known errors: easycozy/known_errors.md - Scripts: easycozy/scripts.md - Tips: easycozy/tips.md + - Cozy stack: + - Introduction: cozystack/index.md + - Local Stack: cozystack/local.md - Ecolyo: - Introduction: ecolyo/index.md - Getting started: