@@ -41,10 +41,8 @@ Launch the stack with the following command:
...
@@ -41,10 +41,8 @@ Launch the stack with the following command:
docker-compose up
docker-compose up
```
```
!!! note "If you have an access denied issue, try to docker login"
!!! note "If you have an access denied issue"
```sh
`docker login registry.forge.grandlyon.com`
docker login registry.forge.grandlyon.com
```
Wait until the success message:
Wait until the success message:
...
@@ -60,7 +58,7 @@ Local database can also be consulted at the following url: [Cozy local DB](http:
...
@@ -60,7 +58,7 @@ Local database can also be consulted at the following url: [Cozy local DB](http:
In most case you will use mocked konnectors with mock data, but for some testing goals you will need real accounts.
In most case you will use mocked konnectors with mock data, but for some testing goals you will need real accounts.
In local, it is possible to run EGL en SGE-Enedis konnectors, with real accounts, but it needs some specific manipulation as well as you'll need to use api secrets that are, of course, basically not available in the project. If you need to use konnectors with real accounts in testing goals, please follow the following steps. Otherwise, refer to the next two sections 'Import Mock Data' et 'Simulate konnector connections'.
In local, it is possible to run EGL en SGE-Enedis konnectors, with real accounts, but it needs some specific manipulation as well as you'll need to use api secrets that are, of course, basically not available in the project. If you need to use konnectors with real accounts in testing goals, please follow the following steps. Otherwise, refer to the next two sections 'Import Mock Data' et 'Simulate konnector connections'.
First step, make sure your stack is running. Then open your [CouchDB](http://localhost:5984/_utils/) and look for the ```secrets/io-cozy-account_types``` entry.
First step, make sure your stack is running. Then open your [CouchDB](http://localhost:5984/_utils/) and look for the `secrets/io-cozy-account_types` entry.
Then add a new document like this :
Then add a new document like this :
EGL Example
EGL Example
...
@@ -94,18 +92,18 @@ SGE Enedis example
...
@@ -94,18 +92,18 @@ SGE Enedis example
```
```
!!! info ""
!!! info ""
You'll need to use konnector slug as is to make it work properly
You'll need to use konnector slug as is to make it work properly
You can contact an administrator in order to get the proper information to fill in your secret.
You can contact an administrator in order to get the proper information to fill in your secret.
Once it is done, you will be able to use these 2 Konnectors with real accounts.
Once it is done, you will be able to use these 2 Konnectors with real accounts.
!!! warning "You might see this message before trying to log with SGE Account"
!!! warning "You might see this message before trying to log with SGE Account"
Make sure you have the people's consent to use his PDL number, as well as it is a sensitive data.
Make sure you have the people's consent to use his PDL number, as well as it is a sensitive data.
## Import mock data
## Import mock data
!!! info "Requirement"
!!! info "Requirement"
Your dev stack should be running to import the mock data
Your dev stack should be running to import the mock data
First install ACH using yarn :
First install ACH using yarn :
```sh
```sh
...
@@ -115,7 +113,7 @@ yarn global add cozy-ach
...
@@ -115,7 +113,7 @@ yarn global add cozy-ach
Next create the "config.js" file base on the "config.template.js"
Next create the "config.js" file base on the "config.template.js"
!!! info ""
!!! info ""
You can change the period of data generated by changing the following lines:
You can change the period of data generated by changing the following lines:
```js
```js
const startingdate = DateTime.local()
const startingdate = DateTime.local()
...
@@ -143,7 +141,7 @@ cd scripts
...
@@ -143,7 +141,7 @@ cd scripts
```
```
!!! info ""
!!! info ""
If you cannot execute `ACH` after this command, it may be because you do not have the directory where yarn stores its symbolic links in your `PATH`. Edit it to append the result of `yarn global bin`.
If you cannot execute `ACH` after this command, it may be because you do not have the directory where yarn stores its symbolic links in your `PATH`. Edit it to append the result of `yarn global bin`.
You'll be prompted for a **cozysessid**, you can get it in the web console : in the `application` tab, look for the cookies and just copy the cozysessid value.
You'll be prompted for a **cozysessid**, you can get it in the web console : in the `application` tab, look for the cookies and just copy the cozysessid value.
...
@@ -154,7 +152,7 @@ Finally your data is loaded in the Ecolyo Application !
...
@@ -154,7 +152,7 @@ Finally your data is loaded in the Ecolyo Application !
## Simulate konnectors connection
## Simulate konnectors connection
!!! info "Requirement"
!!! info "Requirement"
Your dev stack should be running to import data needed to simulate konnectors connection
Your dev stack should be running to import data needed to simulate konnectors connection
When using local environment, konnectors are not able to connect as in production.
When using local environment, konnectors are not able to connect as in production.
To simulate the connection you can use the script **createConnection.js** available in **scripts** folder.
To simulate the connection you can use the script **createConnection.js** available in **scripts** folder.
...
@@ -162,10 +160,8 @@ To simulate the connection you can use the script **createConnection.js** availa
...
@@ -162,10 +160,8 @@ To simulate the connection you can use the script **createConnection.js** availa
First update the authorization and cookie information from the "config.js" file (if not created just create it from the "config.template.js" file):
First update the authorization and cookie information from the "config.js" file (if not created just create it from the "config.template.js" file):
```js
```js
const authorization =
constauthorization='Bearer xxxxxxxxxxx';
'Bearer xxxxxxxxxxx'
constcookie='cozysessid=xxxxxxxxxxx';
const cookie =
'cozysessid=xxxxxxxxxxx'
```
```
To obtain your own Bearer and cozysessid you need to have the application launched and display the web console (F12) in your navigator and select the **Network tab**. Just select one request and retrieve information for Request Header:
To obtain your own Bearer and cozysessid you need to have the application launched and display the web console (F12) in your navigator and select the **Network tab**. Just select one request and retrieve information for Request Header: