diff --git a/.vscode/settings.json b/.vscode/settings.json index 4280153cd9e12d99d7111da05126c2ecd2a53d57..3ed2d4848da522d8ec9e4f8cca17180466aabeb4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -43,6 +43,7 @@ "nginx", "noreply", "numerique", + "Openshift", "Scaleway", "timestep", "usageevent" diff --git a/docs/ecolyo-agent/technical/api_routes.md b/docs/ecolyo-agent/technical/api_routes.md index f37b0e2856380b25e1043cf60f4bf20e5dcf79dc..1079ce84eba73f34889e554d0315fa1f518b2196 100644 --- a/docs/ecolyo-agent/technical/api_routes.md +++ b/docs/ecolyo-agent/technical/api_routes.md @@ -3,4 +3,4 @@ :warning: WIP :warning: The different routes exposed by the backend are described by Swagger documentation. -Once the api deployed, the documentation is accessible at https://HOSTNAME/swagger/index.html \ No newline at end of file +Once the api deployed, the documentation is accessible at https://HOSTNAME/swagger/index.html diff --git a/docs/ecolyo-agent/technical/backup.md b/docs/ecolyo-agent/technical/backup.md index beb421c477075ab47dd9cc92c8cb702fb60a30a8..4114bd8ca9378344a20db9b0577782cca90c75bd 100644 --- a/docs/ecolyo-agent/technical/backup.md +++ b/docs/ecolyo-agent/technical/backup.md @@ -8,7 +8,7 @@ It is running a crontab that execute the backup.sh script every day at midnight. The dump of the database are stored in folders name like this : "ecolyo-agent-YEAR-MONTH-DAY-HOUR-MINUTE-SECOND". Only the 14 last days are stored. -The location of the backup folder on the server is specified in the volumes of the "database-backup" service, in the docker-compose file. +The location of the backup folder on the server is specified in the volumes of the "database-backup" service, in the docker-compose file. ## Backup manually diff --git a/docs/ecolyo-agent/technical/deploy.md b/docs/ecolyo-agent/technical/deploy.md index 3b92c7cd0473f4e7b757f952004ed6f66350038d..d121e006ea23c2e00f638109385cab1a4fe0981c 100644 --- a/docs/ecolyo-agent/technical/deploy.md +++ b/docs/ecolyo-agent/technical/deploy.md @@ -1,5 +1,3 @@ # Deploy Ecolyo-Agent application This app is deployed on an Openshift cluster provided by Synaaps, all instructions for authentification and deployment are given [here](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/backoffice-server/-/blob/dev/k8s/README.md) - - diff --git a/docs/ecolyo-agent/technical/getting_started.md b/docs/ecolyo-agent/technical/getting_started.md index 909b44c0362f691e44815936c0d60636ff825e02..a9b5400088954be565a97168ed2cbf05ead93996 100644 --- a/docs/ecolyo-agent/technical/getting_started.md +++ b/docs/ecolyo-agent/technical/getting_started.md @@ -43,7 +43,7 @@ To stop it properly use yarn local-down ``` -This app runs in https, such as the backend, to access it go on https://localhost/ +This app runs in https, such as the backend, to access it go on <https://localhost/> Also make sure you have HTTPS env variable set to true. Do not use the app with the port 3000, you won't be able to login. @@ -76,9 +76,9 @@ You should obtain the following messages: > --- Server is starting --- > Token signing key set -> Mock OAuth2 server Listening on: http://localhost:8090 +> Mock OAuth2 server Listening on: <http://localhost:8090> -Once the application is started, you can access it here: [localhost](https://localhost) +Once the application is started, you can access it at <https://localhost> ## Alpha usage diff --git a/docs/ecolyo-agent/technical/handle_assets.md b/docs/ecolyo-agent/technical/handle_assets.md index 42e343db09c59d4d2a81158039013d99d7285249..f17b310e10f53c475c956fff263a71936b3f6871 100644 --- a/docs/ecolyo-agent/technical/handle_assets.md +++ b/docs/ecolyo-agent/technical/handle_assets.md @@ -1,15 +1,38 @@ -# Handle assets +# Handle email assets This section will allow you to import the assets used in the newsletter from Ecolyo ## Import assets -In the rec or prod server, in the folder `scripts`, there is the following script, named [`import-convert-assets.sh`](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/backoffice-client/-/blob/dev/scripts/import-convert-assets.sh). +When email or ecogesture assets changes in Ecolyo project, you need to update them in the backoffice's server. -To import assets for the ecogesture images, run it +### Convert the assets -```sh -sudo sh import-convert-assets.sh -``` +This step is needed to convert some svg files and all ecogestures. -Check that a "image-lib" folder has been created, that it contains a "ecogesture" folder and some PNG images and that the owner of the "image-lib" folder is the user id 1000. +- Go to the backoffice server [pipelines page](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/backoffice-server/-/pipelines/new). +- Run a new pipeline for **master** branch. + +!!! note "Optional" + + You can specify from which Ecolyo branch you would like to get assets by overwriting _ECOLYO_ASSETS_BRANCH_ variable with a branch name (ex: 123-new-feature). + +- Launch manually the job **import-convert-assets** + +Once the job is finished, an artifact containing the required assets is created on GitLab. + +### Import the assets on OpenShift + +- Connect to the Openshift console +- Select the correct project (REC or PROD) +- Connect to the terminal of ecolyo-agent-server +- Go to the volume folder `cd /app/mnt` +- Import assets generated previously + +`curl --header "PRIVATE-TOKEN:<BACKOFFICE-API-TOKEN>" https://forge.grandlyon.com/api/v4/projects/621/jobs/artifacts/master/download?job=import-convert-assets --output image-lib.zip` + +>This command fetches the latest artifact for the **import-convert-assets** job + +- Extract and overwrite current assets `unzip -o image-lib.zip` + +If everything is successful you can go to <https://ecolyo-agent-rec.apps.com/assets/> or <https://ecolyo-agent.apps.com/assets/> to check your updated images.