Skip to content
Snippets Groups Projects
Commit 2c271ac9 authored by PEDROLI Benjamin's avatar PEDROLI Benjamin
Browse files

Merge branch 'master' of...

parents a45b985e a4903366
No related branches found
No related tags found
No related merge requests found
Pipeline #12420 passed
Here are common commands use on dev environment. # Easy Cozy commands
# App This section includes all common commands used on dev environment.
## Install a specific version of an app ## App
### Install a specific version of an app
```bash ```bash
$ cd /easy-cozy $ cd /easy-cozy
$ docker-compose exec cozy ./cozy apps update home --domain "[name].cozy.self-data.alpha.grandlyon.com" git://github.com/doubleface/cozy-collect.git#build-debug $ docker-compose exec cozy ./cozy apps update home --domain "[name].cozy.self-data.alpha.grandlyon.com" git://github.com/doubleface/cozy-collect.git#build-debug
``` ```
# Konnector ## Konnector
## Install a specific version of a konnector ### Install a specific version of a konnector
```bash ```bash
$ cd /easy-cozy $ cd /easy-cozy
...@@ -23,7 +25,7 @@ $ docker-compose exec cozy ./cozy konnectors install grdfgrandlyon --domain "[na ...@@ -23,7 +25,7 @@ $ docker-compose exec cozy ./cozy konnectors install grdfgrandlyon --domain "[na
grdfgrandlyon (0.1.5-a3f6f05d9fde7c705b811658b3ce3667a9d7d0b5) has been installed on [name].cozy.self-data.alpha.grandlyon.com grdfgrandlyon (0.1.5-a3f6f05d9fde7c705b811658b3ce3667a9d7d0b5) has been installed on [name].cozy.self-data.alpha.grandlyon.com
``` ```
## Update the version of a konnector ### Update the version of a konnector
```bash ```bash
$ cd /easy-cozy $ cd /easy-cozy
...@@ -31,7 +33,7 @@ $ cd /easy-cozy ...@@ -31,7 +33,7 @@ $ cd /easy-cozy
$ docker-compose exec cozy ./cozy konnectors update grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com" $ docker-compose exec cozy ./cozy konnectors update grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
grdfgrandlyon has been upgraded to 0.1.5-d4bbe7350ecf13d13734f559c538e3c0ee8dc7ae grdfgrandlyon has been upgraded to 0.1.5-d4bbe7350ecf13d13734f559c538e3c0ee8dc7ae
``` ```
## Run a konnector from the stack ### Run a konnector from the stack
```bash ```bash
$ cd /root/easy-cozy $ cd /root/easy-cozy
...@@ -39,9 +41,9 @@ $ cd /root/easy-cozy ...@@ -39,9 +41,9 @@ $ cd /root/easy-cozy
$ docker-compose exec cozy ./cozy konnectors run grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com" $ docker-compose exec cozy ./cozy konnectors run grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
``` ```
# Instance ## Instance
## Set log level to debug for an instance ### Set log level to debug for an instance
```bash ```bash
$ cd /root/easy-cozy $ cd /root/easy-cozy
...@@ -50,16 +52,16 @@ $ docker-compose exec cozy ./cozy instances debug --domain "[name].cozy.self-dat ...@@ -50,16 +52,16 @@ $ docker-compose exec cozy ./cozy instances debug --domain "[name].cozy.self-dat
``` ```
# Stack ## Stack
## Check stack version ### Check stack version
```bash ```bash
$ cd /easy-cozy $ cd /easy-cozy
$ docker-compose exec cozy ./cozy version $ docker-compose exec cozy ./cozy version
``` ```
## Update stack version ### Update stack version
Update version in the Dockerfile on gitlab. Update version in the Dockerfile on gitlab.
...@@ -83,4 +85,5 @@ Update version in the Dockerfile on gitlab. ...@@ -83,4 +85,5 @@ Update version in the Dockerfile on gitlab.
!!! info "Error encounter" !!! info "Error encounter"
Docker container was not launched, when consulting logs we can see the folowing error Docker container was not launched, when consulting logs we can see the folowing error
> ./cozy: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./cozy) > ./cozy: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./cozy)
We have replaced debian:stable-slim with unbuntu:20.10 as installer for our docker build: [https://forge.grandlyon.com/pocs/cozy/easy-cozy/-/commit/48a30a03f209169e0f1ebb0d106bb4361e7cd167](https://forge.grandlyon.com/pocs/cozy/easy-cozy/-/commit/48a30a03f209169e0f1ebb0d106bb4361e7cd167) We have replaced debian:stable-slim with unbuntu:20.10 as installer for our docker build: [https://forge.grandlyon.com/pocs/cozy/easy-cozy/-/commit/48a30a03f209169e0f1ebb0d106bb4361e7cd167](https://forge.grandlyon.com/pocs/cozy/easy-cozy/-/commit/48a30a03f209169e0f1ebb0d106bb4361e7cd167)
# Easy Cozy scripts # Easy Cozy scripts
Easy cozy project comes with 2 main scripts: Easy cozy project comes with 2 main scripts:
- create-instance.sh: used to create an instance for a user - create-instance.sh: used to create an instance for a user
- remove-instance.sh: used to remove an instance for a specific user - remove-instance.sh: used to remove an instance for a specific user
In addition of these scripts we have added custom scripts for some specific needs. All these scripts are available in the "admin_scripts" folder In addition of these scripts we have added custom scripts for some specific needs. All these scripts are available in the "admin_scripts" folder
# Scripts for instances ## Scripts for instances
| Scripts | Args | Description | | Scripts | Args | Description |
|-------------------|-------------------|----------------------------------------------------------| |-------------------|-------------------|----------------------------------------------------------|
| reset_instance.sh | instance_url | Remove and recreate again the instance for a given user | | reset_instance.sh | instance_username | Remove and recreate again the instance for a given user |
# Scripts for applications ## Scripts for applications
| Scripts | Args | Description | | Scripts | Args | Description |
|--------------------------|-------------------|-------------------------------------------------------------------------------| |--------------------------|-------------------|-------------------------------------------------------------------------------|
| update_all_ecolyo_dev.sh | none | update Ecolyo with last version from build-dev branch on all instances | | update_all_ecolyo_dev.sh | none | update Ecolyo with last version from build-dev branch on all instances |
| update_ecolyo_master.sh | instance_url | update Ecolyo with last version from build branch on a specific instance | | update_ecolyo_master.sh | instance_username | update Ecolyo with last version from build branch on a specific instance |
| update_ecolyo_dev.sh | instance_url | update Ecolyo with last version from build-dev branch on a specific instance | | update_ecolyo_dev.sh | instance_username | update Ecolyo with last version from build-dev branch on a specific instance |
| update_ecolyo_test.sh | instance_url | update Ecolyo with last version from build-test branch on a specific instance | | update_ecolyo_test.sh | instance_username | update Ecolyo with last version from build-test branch on a specific instance |
| update_pilote_master.sh | instance_url | update Pilote with last version from build-dev branch on a specific instance | | update_pilote_master.sh | instance_username | update Pilote with last version from build-dev branch on a specific instance |
| update_pilote_dev.sh | instance_url | update PIlote with last version from build-test branch on a specific instance | | update_pilote_dev.sh | instance_username | update PIlote with last version from build-test branch on a specific instance |
# Scripts for konnectors ## Scripts for konnectors
| Scripts | Args | Description | | Scripts | Args | Description |
|---------------------------------|-------------------|----------------------------------------------------------------------------------------| |---------------------------------|-------------------|----------------------------------------------------------------------------------------|
| update_enedis_konnector_prod.sh | instance_url | update Enedis konnector with last version from build branch on a specific instance | | update_enedis_konnector_prod.sh | instance_username | update Enedis konnector with last version from build branch on a specific instance |
| update_enedis_konnector_dev.sh | instance_url | update Enedis konnector with last version from build-dev branch on a specific instance | | update_enedis_konnector_dev.sh | instance_username | update Enedis konnector with last version from build-dev branch on a specific instance |
## Libraries # Architecture
For this project, we use the libraries below: ## Principle diagram
###React The principle diagram below describes the responsibilities of each application brick.
Library to create user interfaces. ![Architecture principles](/img/architecture/cozy-architecture-principles.png)
Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.
Build encapsulated components that manage their own state, then compose them to make complex UIs.
Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM
###React Redux
It is a predictable state container.
It is implemented for a better management of the states because it allows to centralize all the states and the logic of the application.
It lets a react component read data from a Redux store, and dispatch actions to the store to update data.
###Axios
HTTP client library
It allows to send HTTP request and manage the responses.
###Lodash
javascript utility library
Lodash'modular method are great for:
- Iterating arrays, objects, & strings
- Manipulating & testing values
- Creating composite functions
###Moment
Date library to parse, validate, manipulate, and display dates and times in JavaScript.
###Luxon
Wrapper for Javascript dates and times.
###Jest
Testing library
It allows to evaluate functionnalities of an app to ensure that the product is defect-free in order to produce the quality product.
###Enzyme
Testing utility for React
It makes it easier to test your React Components' output. You can also manipulate, traverse, and in some ways simulate runtime given the output.
###Sass
CSS preprocessor
It allows us to easily manage large CSS files and split across different files.
It allows us to create variables, nested rules, mixins, functions, and do mathematical calculations.
###Material UI
It allows to create react component that implements Google's material design
###D3
It allows to manipulate documents based on data.
It combines visualization components and a data-driven approach to DOM manipulation.
###React-swipeable-views
It is a React component to make swipeable views
###React-lottie
Lottie Animation View for React.
It allows app to use animations easily.
###Husky
It is used to improve your commit.
!!! info ""
:construction: Section under Construction :construction:
\ No newline at end of file
# Libraries
For this project, we use the libraries below:
## React
Library to create user interfaces.
Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.
Build encapsulated components that manage their own state, then compose them to make complex UIs.
Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM
## React Redux
It is a predictable state container.
It is implemented for a better management of the states because it allows to centralize all the states and the logic of the application.
It lets a react component read data from a Redux store, and dispatch actions to the store to update data.
## Axios
HTTP client library
It allows to send HTTP request and manage the responses.
## Lodash
javascript utility library
Lodash'modular method are great for:
- Iterating arrays, objects, & strings
- Manipulating & testing values
- Creating composite functions
## Moment
Date library to parse, validate, manipulate, and display dates and times in JavaScript.
## Luxon
Wrapper for Javascript dates and times.
## Jest
Testing library
It allows to evaluate functionnalities of an app to ensure that the product is defect-free in order to produce the quality product.
## Enzyme
Testing utility for React
It makes it easier to test your React Components' output. You can also manipulate, traverse, and in some ways simulate runtime given the output.
## Sass
CSS preprocessor
It allows us to easily manage large CSS files and split across different files.
It allows us to create variables, nested rules, mixins, functions, and do mathematical calculations.
## Material UI
It allows to create react component that implements Google's material design
## D3
It allows to manipulate documents based on data.
It combines visualization components and a data-driven approach to DOM manipulation.
##React-swipeable-views
It is a React component to make swipeable views
## React-lottie
Lottie Animation View for React.
It allows app to use animations easily.
## Husky
It is used to improve your commit.
docs/img/architecture/cozy-architecture-principles.png

340 KiB

File moved
File moved
File moved
...@@ -5,94 +5,93 @@ repo_name: "Clone the Project" ...@@ -5,94 +5,93 @@ repo_name: "Clone the Project"
repo_url: "https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" repo_url: "https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc"
theme: theme:
name: "material" name: "material"
# logo: 'img/self_data_grdlyon.png' # logo: 'img/self_data_grdlyon.png'
favicon: "img/self_data_grdlyon.png" favicon: "img/self_data_grdlyon.png"
palette: palette:
primary: "white" primary: "white"
accent: "red" accent: "red"
markdown_extensions: markdown_extensions:
- admonition - admonition
- plantuml_markdown: - plantuml_markdown:
server: http://www.plantuml.com/plantuml server: http://www.plantuml.com/plantuml
- attr_list - attr_list
- pymdownx.emoji - pymdownx.emoji
extra_css: extra_css:
- "stylesheets/extra.css" - "stylesheets/extra.css"
nav: nav:
- Home: index.md - Home: index.md
- Easy Cozy: - Easy Cozy:
- Scripts: easycozy/scripts.md - Scripts: easycozy/scripts.md
- Commands: easycozy/commands.md - Commands: easycozy/commands.md
- Pilote: - Ecolyo:
- Pilote - TS - Back: - Introduction: ecolyo/index.md
- Index: pilote/Pilote - TS - Back/index.md - Getting started:
- Application: - Setup your environment: ecolyo/getting_started/setup_your_environment.md
- Deploy: pilote/Pilote - TS - Back/application/deploy.md - Launch the application on local: ecolyo/getting_started/launch_local_application.md
- Functionalities: - Launch a konnector on local: ecolyo/getting_started/launch_local_konnector.md
- Routes: pilote/Pilote - TS - Back/functionalities/routes.md - Project Architecture:
- Getting Started: - Architecture: ecolyo/project_architecture/architecture.md
- Launch the application on local: pilote/Pilote - TS - Back/getting_started/launch_local_application.md - Libraries: ecolyo/project_architecture/libraries.md
- Setup your environment: pilote/Pilote - TS - Back/getting_started/setup_your_environment.md - Environments: ecolyo/project_architecture/environments.md
- Project Architecture: pilote/Pilote - TS - Back/project_architecture/architecture.md - DocTypes: ecolyo/project_architecture/doctypes.md
- Pilote - TS - Front: - Application:
- Index: pilote/Pilote - TS - Front/index.md - Description: ecolyo/application/description.md
- Application: - Scaffolding: ecolyo/application/scaffolding.md
- Deploy: pilote/Pilote - TS - Front/application/deploy.md - Services: ecolyo/application/services.md
- Functionalities: - Gitflow: ecolyo/application/gitflow.md
- Routes: pilote/Pilote - TS - Front/functionalities/functions.md - Deploy: ecolyo/application/deploy.md
- Getting Started: - Functionalities:
- Launch the application on local: pilote/Pilote - TS - Front/getting_started/launch_local_application.md - Initialization: ecolyo/functionalities/initialization.md
- Pilote - Usager: - Consumption: ecolyo/functionalities/consumption.md
- Application: - Ecogesture: ecolyo/functionalities/ecogesture.md
- Deploy: pilote/Pilote - Usager/application/deploy.md - Challenge: ecolyo/functionalities/challenge.md
- Doctypes: pilote/Pilote - Usager/application/doctypes.md - Profile Type: ecolyo/functionalities/profile_type.md
- Gitflow: pilote/Pilote - Usager/application/gitflow.md - Pilote:
- Scaffolding: pilote/Pilote - Usager/application/scaffolding.md - Pilote - TS - Back:
- Services: pilote/Pilote - Usager/application/services.md - Index: pilote/Pilote - TS - Back/index.md
- Store: pilote/Pilote - Usager/application/store.md - Application:
- Functionalities: - Deploy: pilote/Pilote - TS - Back/application/deploy.md
- Appointments: pilote/Pilote - Usager/functionalities/appointments.md - Functionalities:
- Contact: pilote/Pilote - Usager/functionalities/contact.md - Routes: pilote/Pilote - TS - Back/functionalities/routes.md
- Document: pilote/Pilote - Usager/functionalities/document.md - Getting Started:
- Settings: pilote/Pilote - Usager/functionalities/setting.md - Launch the application on local: pilote/Pilote - TS - Back/getting_started/launch_local_application.md
- Getting Started: - Setup your environment: pilote/Pilote - TS - Back/getting_started/setup_your_environment.md
- Launch local doctypes: pilote/Pilote - Usager/getting_started/launch_local_doctypes.md - Project Architecture: pilote/Pilote - TS - Back/project_architecture/architecture.md
- Launch local services: pilote/Pilote - Usager/getting_started/launch_local_services.md - Pilote - TS - Front:
- Ecolyo: - Index: pilote/Pilote - TS - Front/index.md
- Introduction: ecolyo/index.md - Application:
- Getting started: - Deploy: pilote/Pilote - TS - Front/application/deploy.md
- Setup your environment: ecolyo/getting_started/setup_your_environment.md - Functionalities:
- Launch the application on local: ecolyo/getting_started/launch_local_application.md - Routes: pilote/Pilote - TS - Front/functionalities/functions.md
- Launch a konnector on local: ecolyo/getting_started/launch_local_konnector.md - Getting Started:
- Project Architecture: - Launch the application on local: pilote/Pilote - TS - Front/getting_started/launch_local_application.md
- Architecture: ecolyo/project_architecture/architecture.md - Pilote - Usager:
- Cozy: ecolyo/project_architecture/cozy.md - Application:
- Environments: ecolyo/project_architecture/environments.md - Deploy: pilote/Pilote - Usager/application/deploy.md
- DocTypes: ecolyo/project_architecture/doctypes.md - Doctypes: pilote/Pilote - Usager/application/doctypes.md
- Application: - Gitflow: pilote/Pilote - Usager/application/gitflow.md
- Description: ecolyo/application/description.md - Scaffolding: pilote/Pilote - Usager/application/scaffolding.md
- Scaffolding: ecolyo/application/scaffolding.md - Services: pilote/Pilote - Usager/application/services.md
- Services: ecolyo/application/services.md - Store: pilote/Pilote - Usager/application/store.md
- Gitflow: ecolyo/application/gitflow.md - Functionalities:
- Deploy: ecolyo/application/deploy.md - Appointments: pilote/Pilote - Usager/functionalities/appointments.md
- Konnectors: - Contact: pilote/Pilote - Usager/functionalities/contact.md
- Enedis: ecolyo/konnectors/enedis.md - Document: pilote/Pilote - Usager/functionalities/document.md
- GRDF: ecolyo/konnectors/grdf.md - Settings: pilote/Pilote - Usager/functionalities/setting.md
- Eau du Grand Lyon: ecolyo/konnectors/egl.md - Getting Started:
- Functionalities: - Launch local doctypes: pilote/Pilote - Usager/getting_started/launch_local_doctypes.md
- Initialization: ecolyo/functionalities/initialization.md - Launch local services: pilote/Pilote - Usager/getting_started/launch_local_services.md
- Consumption: ecolyo/functionalities/consumption.md - Konnectors:
- Ecogesture: ecolyo/functionalities/ecogesture.md - Enedis: konnectors/enedis.md
- Challenge: ecolyo/functionalities/challenge.md - GRDF: konnectors/grdf.md
- Analysis: ecolyo/functionalities/analysis.md - Eau du Grand Lyon: konnectors/egl.md
- Profile Type: ecolyo/functionalities/profile_type.md - Proxy:
- Proxy: - Description: proxy/description.md
- Description: proxy/description.md - Monitoring: proxy/monitoring.md
- Monitoring: proxy/monitoring.md - Use cases:
- Use cases: - Enedis: proxy/use_cases/enedis.md
- Enedis: proxy/use_cases/enedis.md - Grdf Adict: proxy/use_cases/grdfadict.md
- Grdf Adict: proxy/use_cases/grdfadict.md
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment