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

Merge branch 'master' of...

parents dd04c2ae 365842c7
No related branches found
No related tags found
No related merge requests found
Pipeline #12441 passed
!!! info ""
:construction: Section under Construction :construction:
This section will show you how to deploy your project on different environments. This section will show you how to deploy your project on different environments.
## Setup ## Setup
...@@ -8,108 +5,87 @@ This section will show you how to deploy your project on different environments. ...@@ -8,108 +5,87 @@ This section will show you how to deploy your project on different environments.
First of all you'll need to install [MobaXterm](https://mobaxterm.mobatek.net/download.html) in order to connect to the server. 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. 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.
### Install WSL ## Configuration of MobaXterm
First open Powershell as administrator and launch the following command : 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.
```powershell ## Deploy Ecolyo
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
```
This command will install WSL on your computer. After this, you'll need to **reboot**. ### Deploy on Alpha - Scaleway
### Install your Linux distribution There is 2 environment you can deploy on alpha for testing:
After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. - ecolyo_dev
- ecolyo_test
To make sure it's correctly installed and working, you can open Powershell and paste the following command : #### Windows
```powershell 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)
wsl.exe --list --running
```
Now you should see the name of your distribution in the list.
### Setup your distribution 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 :
Start updating the packages list by typing :
``` ```
sudo apt update yarn build
``` ```
Install nodejs using the apt package manager After this, you can launch the deployment.
In order to deploy on ecolyo_dev (development environment) use the command :
```
sudo apt install
```
To verify the Installation execute the following command :
``` ```
nodejs --version yarn deploy-dev
``` ```
To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : For test environment ecolyo_testuse the command :
```
sudo apt install npm
```
To verify the npm Install check using the command :
``` ```
npm --version yarn deploy-test
```
To Downlaod and Setup Yarn
```
sudo apt install yarn
``` ```
To check the Installed version of Yarn : If you want to deploy on the ecolyo-build environment, use :
``` ```
yarn --version yarn deploy
``` ```
Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. #### Linux
In order to achieve this, you'll have to launch several commands :
``` 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.
sudo apt-get remove cmdtest
sudo apt autoremove
sudo apt-get update
sudo apt install curl -y
curl -o- -L https://yarnpkg.com/install.sh | bash
source ~/.bashrc
```
Now you should be at least in version ^1.22 and ready to go on.
### Create an instance
## Configuration of MobaXterm If you want to create a specific instance, please ask for the admin.
First open a new session and connect to the distant host **192.168.62.31**. Don't forget to add the path to the private key in the advanced SSH settings. ### Reset your instance
## Deploy Ecolyo 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
### Deploy on Alpha - Scaleway ```
cd easy-cozy/admin_scripts
```
#### Windows If you want to reset your instance, use the script reset_instance.sh with the name of your instance
First open your Ubuntu terminal, 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 build ./reset-instance.sh <instance-name>
``` ```
After this, you can launch the deployment.
In order to deploy on ecolyo-dev-build (development environment) use the command : You'll be prompted for the complete url of your instance in order to confirm the reset
``` ```
yarn deploy-dev <instance-name>.cozy.self-data.alpha.grandlyon.com
``` ```
If you want to deploy on the ecolyo-build environment, use : 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.
#### Update Ecolyo App
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.
``` ```
yarn deploy ./update_ecolyo_test.sh <instance-name>
``` ```
To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm. Now you can access your updated version of Ecolyo with the following URl, enjoy : `ecolyo.instance-name.cozy.self-data.alpha.grandlyon.com`
#### 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. For more informations you can check for [Easy Cozy scripts](../../../easycozy/scripts/)
...@@ -63,6 +63,7 @@ If this file is not empty, you can simply add the follwing lines to it: ...@@ -63,6 +63,7 @@ If this file is not empty, you can simply add the follwing lines to it:
"diffEditor.ignoreTrimWhitespace": false, "diffEditor.ignoreTrimWhitespace": false,
"window.zoomLevel": 0, "window.zoomLevel": 0,
``` ```
## Git ## Git
The project is using GitLab, you will need to install Git to checkout the projet. The project is using GitLab, you will need to install Git to checkout the projet.
...@@ -90,3 +91,111 @@ Installation of Docker can be found here: [Installation of Docker](https://www.d ...@@ -90,3 +91,111 @@ Installation of Docker can be found here: [Installation of Docker](https://www.d
### Install Docker-Compose ### Install Docker-Compose
Installation of Docker-Compose (according to your OS) is explained here: [Installation of Docker-Compose](https://docs.docker.com/compose/install/). Installation of Docker-Compose (according to your OS) is explained here: [Installation of Docker-Compose](https://docs.docker.com/compose/install/).
### Install WSL
First open Powershell as administrator and launch the following command :
```powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
```
This command will install WSL on your computer. After this, you'll need to **reboot**.
### Upgrade to WSL 2
If you're on WSL 1 and want to upgrade to WSL 2, here is the process :
Open an elevated powershell and paste the following command :
```
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
```
Then, enable the Virtual Machine Platform optional feature.
```
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
```
Now restart your computer to apply these features. Once it's done, open an elevated powershell again and set the default wsl version to 2
```
wsl --set-default-version 2
```
You might see this message after running the command above:
> :bulb: WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel.
If you do, please follow the link [https://aka.ms/wsl2kernel](https://aka.ms/wsl2kernel) and install the MSI from that page on Microsoft's documentation to install a Linux kernel on your machine for WSL 2 to use. Once you have the kernel installed, please run the wsl --set-default-version 2 command again and it should complete successfully without showing the message.
### Install your Linux distribution
After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account.
To make sure it's correctly installed and working, you can open Powershell and paste the following command :
```powershell
wsl.exe --list --running
```
Now you should see the name of your distribution in the list.
### Setup your distribution
Start updating the packages list by typing :
```
sudo apt update
```
Install nodejs using the apt package manager
```
sudo apt install
```
To verify the Installation execute the following command :
```
nodejs --version
```
To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type :
```
sudo apt install npm
```
To verify the npm Install check using the command :
```
npm --version
```
To Downlaod and Setup Yarn
```
sudo apt install yarn
```
To check the Installed version of Yarn :
```
yarn --version
```
Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly.
In order to achieve this, you'll have to launch several commands :
```
sudo apt-get remove cmdtest
sudo apt autoremove
sudo apt-get update
sudo apt install curl -y
curl -o- -L https://yarnpkg.com/install.sh | bash
source ~/.bashrc
```
Now you should be at least in version ^1.22 and ready to go on.
...@@ -30,7 +30,8 @@ This kind of doctype are set from the team. We have push two remote doctypes (ea ...@@ -30,7 +30,8 @@ This kind of doctype are set from the team. We have push two remote doctypes (ea
- [`org.mps.store.rec`]: Required for store information on rec back-endTS - [`org.mps.store.rec`]: Required for store information on rec back-endTS
- [`org.mps.share.rec`]: Required for searching on rec back-endTS - [`org.mps.share.rec`]: Required for searching on rec back-endTS
If you need to target rec remote doctype, you need to change the request : client.getStackClient().fetchJSON('POST','...')
and change them into the manifest also.
## Custom doctypes ## Custom doctypes
......
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