Skip to content
Snippets Groups Projects
commands.md 2.75 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Easy Cozy commands
    
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    This section includes all common commands used on dev environment.
    
    ## App
    
    ### Install a specific version of an app
    
    
    ```bash
    $ cd /easy-cozy
    $ docker-compose exec cozy ./cozy apps update home --domain "[name].cozy.self-data.alpha.grandlyon.com" git://github.com/doubleface/cozy-collect.git#build-debug
    ```
    
    
    ## Konnector
    
    ### Install a specific version of a konnector
    
    
    ```bash
    $ cd /easy-cozy
    # cozy-stack konnectors uninstall ${konn} --domain ${url}
    $ docker-compose exec cozy ./cozy konnectors uninstall grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
    grdfgrandlyon has been uninstalled
    # cozy-stack konnectors install ${konn} --domain ${url}
    $ docker-compose exec cozy ./cozy konnectors install grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com" git://forge.grandlyon.com/web-et-numerique/llle_project/grdf-adict-konnector.git#build
    grdfgrandlyon (0.1.5-a3f6f05d9fde7c705b811658b3ce3667a9d7d0b5) has been installed on [name].cozy.self-data.alpha.grandlyon.com
    ```
    
    
    ### Update the version of a konnector
    
    
    ```bash
    $ cd /easy-cozy
    # cozy-stack konnectors update ${konn} --domain ${url}
    $ docker-compose exec cozy ./cozy konnectors update grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
    grdfgrandlyon has been upgraded to 0.1.5-d4bbe7350ecf13d13734f559c538e3c0ee8dc7ae
    ```
    
    ### Run a konnector from the stack
    
    
    ```bash
    $ cd /root/easy-cozy
    # cozy-stack konnectors run ${konn} --domain ${url}
    $ docker-compose exec cozy ./cozy konnectors run grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
    ```
    
    
    ## Instance
    
    ### Set log level to debug for an instance
    
    
    ```bash
    $ cd /root/easy-cozy
    # cozy-stack instances debug ${url} true
    $ docker-compose exec cozy ./cozy instances debug --domain "[name].cozy.self-data.alpha.grandlyon.com" true
    ```
    
    
    
    ## Stack
    
    ### Check stack version
    
    
    ```bash
    $ cd /easy-cozy
    $ docker-compose exec cozy ./cozy version
    ```
    
    
    ### Update stack version
    
    
    Update version in the Dockerfile on gitlab.
    
    **On serveur :**
    
    1. git pull or change localy the version in cozy-stack/Dockerfile
    2. create the docker image using:
    
        ```bash
        cd /easy-cozy/build
        ./build-docker-image.sh
        ```
    
    3. Start the container based on the built image
    
        ```bash
        cd ..
        docker-compose up -d cozy
        ```
    
    !!! info "Error encounter"
        Docker container was not launched, when consulting logs we can see the folowing error
        > ./cozy: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./cozy)
    
        We have replaced debian:stable-slim with unbuntu:20.10 as installer for our docker build:  [https://forge.grandlyon.com/pocs/cozy/easy-cozy/-/commit/48a30a03f209169e0f1ebb0d106bb4361e7cd167](https://forge.grandlyon.com/pocs/cozy/easy-cozy/-/commit/48a30a03f209169e0f1ebb0d106bb4361e7cd167)