:construction: Section under Construction :construction:
\ No newline at end of file
# Environments
We have 2 environments available for this project:
- One environment of dev hosted on scaleway and manage by the dev team
- One environment of production hosted on Cozy and manage by Cozy
## Dev environment aka alpha
The dev environnment has been mounted on a dedicated instance on scaleway.
### Cozy stack
It is based on the easy-cozy project available on GitLab: https://forge.grandlyon.com/pocs/cozy/easy-cozy
On the server, the .env file has been initialize with the good secrets (see the .env.template) and also initialize to create instance with Ecolyo and the 3 needed konnectors by default.
This projet will build and run 3 images:
- the cozy stack
- the couch db
- keycloack
To run the project please refer to the documentation on the GitLab project.
Once the project is up and running, we are able to create, update and delete instance.
Let's see more details in the dedicated section.
### Proxy
Konnector for Ecolyo need proxy for the OAuth dance. The proxy is also mount on the same instance as the Cozy stack and based on the project available on GitLab: https://forge.grandlyon.com/pocs/cozy/cozy-oauth-proxy
The proxy is written in Go language. The "main.go" file containt all the source code and also the default variables.
Default variables are the one used for the dev environment but we will be overwrite for the production.
To Launch the proxy, just pull the project and use the docker-compose file with following commands:
By default the version present on the "build-dev" branch is used to install Ecolyo app and konnectors on a new instance.
Some scripts has been created in order to install, update, downgrade, remove app and konnectors. Please refer to the dedicated section for more information.
## Prod environment
This environment is fully managed by Cozy team.
### Cozy stack
Fully managed by Cozy team.
### Proxy
A dedicated proxy is deployed on Cozy side to allow konnector to make the OAuth dance.
The proxy deployed is based on the project available on the GitLab but variables are overwrite using flags by the Cozy team in order to fit to the environment.
For each modification in production, it needs:
- to be done on the gitLab project
- to be testeded in dev environnment
After that we should ask Cozy to pull the modification from the GitLab in order to have them in production.
### Ecolyo and konnectors
The production environment is based on the build branch which should reflect the build of sources present on master branch.
Each deployment is done manually for each app/konnector by:
- building the application (yarn build)
- deploy the build on the build branch (yarn deploy)
- publishing content of build branch into Cozy repo (yarn cozyPublish)
Once it is published, Cozy team should validate it before deploying the new app version into all Cozy Grand Lyon instances.