Skip to content
Snippets Groups Projects
Commit 32d77a85 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

review deploy and environments

parent c737903c
No related branches found
No related tags found
No related merge requests found
Pipeline #12450 passed
This section will show you how to deploy your project on different environments.
## Setup
First of all you'll need to install [MobaXterm](https://mobaxterm.mobatek.net/download.html) in order to connect to the server.
Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands.
## Configuration of MobaXterm
# Deploy
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
This section will show you how to deploy your project on different environments.
### Deploy version to builds branches
## Deploy build to builds branches
3 builds branch are today available for Ecolyo:
- 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
- **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
If you use windows, make sure you have WSL installed and a Linux distribution. For more information about it see the [Install WSL section](../getting_started/setup_your_environment.md)
!!! info "Windows users"
Some command did not run on Windows. Please use your Linux distribution installed on your WSL. For more information about it see the [Install WSL section](../getting_started/setup_your_environment.md)
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 :
Make sure that:
```
yarn
yarn build
```
- you are on the right branch (dev or master) depending on the enviroment you need to deploy.
- your branch is up to date
- you node modules are up to date
After this, you can launch the deployment using the command linked to the target branch.
First build the application :
```
# deploy on build-test branch
yarn deploy-test
# deploy on build-dev branch
yarn deploy-dev
# deploy on build branch
yarn deploy
$ yarn build
```
#### Linux
From your current branch, run `yarn build`.
After this, you can launch the deployment using the command linked to the target branch.
Next you can deploy the build to the target branch:
```
# deploy on build-test branch
yarn deploy-test
$ yarn deploy-test
# deploy on build-dev branch
yarn deploy-dev
$ yarn deploy-dev
# deploy on build branch
yarn deploy
$ yarn deploy
```
### Deploy build-dev branch to Scaleway
## Deploy build-dev branch to Scaleway
You can now deploy the content of build-dev branch into Scaleway using the scripts present on the Scaleway server.
You can directly use the content of build-dev branch to update apps on dev environment using scripts (from the server).
For more informations you can check for [Easy Cozy scripts](../../../easycozy/scripts/).
### Deploy build branch to Cozy
## Deploy build branch to Cozy
Use thecozy-app-publish command after replacing following value:
You can deploy content of build branch into Cozy registry by using the cozy-app-publish command after replacing following value:
- $REGISTRY_TOKEN : token provided by Cozy team
- $VERSION_NUMBER: version of the application
- $COZY_SPACE: space of the Cozy
```
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
$ 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
```
More information at [cozy-app-publish/](https://docs.cozy.io/en/cozy-app-publish/)
\ No newline at end of file
More information at [cozy-app-publish/](https://docs.cozy.io/en/cozy-app-publish/)
......@@ -8,6 +8,12 @@ We have 2 environments available for this project:
The dev environnment has been mounted on a dedicated instance on scaleway.
### Access to the dev environment
You need to install an ssh tool like Putty or [MobaXterm](https://mobaxterm.mobatek.net/download.html) in order to connect to the server.
Connection to the server is made using ssh key, you need to generate your own and ask administrator to allow your ssh key.
Once done, you shoul be able to connect to the server using your private key.
### Cozy stack
It is based on the easy-cozy project available on GitLab: https://forge.grandlyon.com/pocs/cozy/easy-cozy
......
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