From c737903cd832b8a0f3ad12012cb24b20e78fa497 Mon Sep 17 00:00:00 2001 From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com> Date: Thu, 11 Mar 2021 17:07:50 +0100 Subject: [PATCH] review deploy --- docs/ecolyo/application/deploy.md | 78 ++++++++++++------------------- 1 file changed, 30 insertions(+), 48 deletions(-) diff --git a/docs/ecolyo/application/deploy.md b/docs/ecolyo/application/deploy.md index e401871..af20a8a 100644 --- a/docs/ecolyo/application/deploy.md +++ b/docs/ecolyo/application/deploy.md @@ -7,16 +7,17 @@ Then, if your're on Linux you can skip the following section, otherwise if you a ## Configuration of MobaXterm -First open a new session and connect to the distant host **51.158.104.84**. Don't forget to add the path to the private key in the advanced SSH settings. Also don't forget to ask an administrator to add your public key so you can access the server. +First open a new session and connect to the distant host. Don't forget to add the path to the private key in the advanced SSH settings. Also don't forget to ask an administrator to add your public key so you can access the server. ## Deploy Ecolyo -### Deploy on Alpha - Scaleway +### Deploy version to builds branches -There is 2 environment you can deploy on alpha for testing: +3 builds branch are today available for Ecolyo: -- ecolyo_dev -- ecolyo_test +- build: reflect the build of the master branch and the version deployed in production environment +- build-dev: reflect the build of the dev branch and the version deployed on dev environment +- build-test reflect a temporary build which can be used for test purpose #### Windows @@ -25,67 +26,48 @@ If you use windows, make sure you have WSL installed and a Linux distribution. F First open your Ubuntu terminal (or any other distribution you've installed), and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : ``` +yarn yarn build ``` -After this, you can launch the deployment. -In order to deploy on ecolyo_dev (development environment) use the command : - -``` -yarn deploy-dev -``` - -For test environment ecolyo_testuse the command : - +After this, you can launch the deployment using the command linked to the target branch. ``` +# deploy on build-test branch yarn deploy-test -``` - -If you want to deploy on the ecolyo-build environment, use : - -``` +# deploy on build-dev branch +yarn deploy-dev +# deploy on build branch yarn deploy ``` #### Linux -From your current branch, run `yarn build` then `sudo yarn deploy_dev` to instantly deploy your working branch on the latest tagged Ecolyo-dev container registry. - -### Create an instance - -If you want to create a specific instance, please ask for the admin. - -### Reset your instance - -Once you've deployed your branch, connect to Scaleway server using mobaXterm (or any other software), and then go to the admin-scripts folder in easy-cozy - -``` -cd easy-cozy/admin_scripts -``` - -If you want to reset your instance, use the script reset_instance.sh with the name of your instance - +From your current branch, run `yarn build`. +After this, you can launch the deployment using the command linked to the target branch. ``` -./reset-instance.sh <instance-name> +# deploy on build-test branch +yarn deploy-test +# deploy on build-dev branch +yarn deploy-dev +# deploy on build branch +yarn deploy ``` -You'll be prompted for the complete url of your instance in order to confirm the reset +### Deploy build-dev branch to Scaleway -``` -<instance-name>.cozy.self-data.alpha.grandlyon.com -``` +You can now deploy the content of build-dev branch into Scaleway using the scripts present on the Scaleway server. +For more informations you can check for [Easy Cozy scripts](../../../easycozy/scripts/). -After this, you'll have to activate your cozy instance by clicking on the prompted url with the registration token and choose a password for your instance. -Once it is done, you can process on the update of your app. +### Deploy build branch to Cozy -#### Update Ecolyo App +Use thecozy-app-publish command after replacing following value: -In order to update your app, you can execute the script depending on the branch you deployed. Keep in mind to prioritize using ecolyo_test for your testings. +- $REGISTRY_TOKEN : token provided by Cozy team +- $VERSION_NUMBER: version of the application +- $COZY_SPACE: space of the Cozy ``` -./update_ecolyo_test.sh <instance-name> +yarn cozy-app-publish --token $REGISTRY_TOKEN --build-url https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/-/archive/build/ecolyo-build.tar.gz --manual-version $VERSION_NUMBER --space $COZY_SPACE ``` -Now you can access your updated version of Ecolyo with the following URl, enjoy : `ecolyo.instance-name.cozy.self-data.alpha.grandlyon.com` - -For more informations you can check for [Easy Cozy scripts](../../../easycozy/scripts/) +More information at [cozy-app-publish/](https://docs.cozy.io/en/cozy-app-publish/) \ No newline at end of file -- GitLab