Skip to content
Snippets Groups Projects
deploy.md 2.96 KiB
Newer Older
  • Learn to ignore specific revisions
  • 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.
    
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ## Configuration of MobaXterm
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    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.
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ## Deploy Ecolyo
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ### Deploy on Alpha - Scaleway
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    There is 2 environment you can deploy on alpha for testing:
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    - ecolyo_dev
    - ecolyo_test
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    #### Windows
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    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]
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    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 :
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    yarn build
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    After this, you can launch the deployment.
    In order to deploy on ecolyo_dev (development environment) use the command :
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    yarn deploy-dev
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    If you want to deploy on the ecolyo-build environment, use :
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    yarn deploy
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm.
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    #### Linux
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    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.
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ### Create an instance
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    If you want to create a specific instance, please ask for the admin.
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ### Reset your instance
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    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
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    cd easy-cozy/admin_scripts
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    
    If you want to reset your instance, use the script reset_instance.sh with the name of your instance
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ./reset-instance.sh <instance-name>
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    You'll be prompted for the complete url of your instance in order to confirm the reset
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    <instance-name>.cozy.self-data.alpha.grandlyon.com
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    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.
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    #### 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.
    
    ```
    ./update_ecolyo_test.sh <instance-name>
    ```
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    Now you can access your updated version of Ecolyo with the following URl, enjoy : `ecolyo.instance-name.cozy.self-data.alpha.grandlyon.com`