Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a VM with the data flavour. This will automatically install ECMWF packages such as MARS and Aviso.
  2. Configure MARS credentials, follow the instructions in Configuring MARS access. Aviso uses the same credentials.

  3. Create a configuration file in the default location ~/aviso/config.yaml with the following settings.

    1. Below an example for products notifications:

      Code Block
      languageyml
      listeners:
        - event: dissemination
          request:
            destination: <user_destination>
            class: od
            expver: 1
            domain: g
            stream: enfo
            step: [1,2,3]
          triggers:
            - type: echo
    The listeners block is an example of a
    1. Note the dissemination event listener. request describes for which dissemination event users want to execute the triggers. It is made of a set of fields. Users have to specify only the fields they wants to use as filters. destination is a mandatory field and it is associated to one or more destinations which are linked to the user's ECMWF account. Only the notifications complying with all the fields defined will execute the trigger. The trigger in this example is echo. This will simply print out the notification to the console output.

    2. Below an example for real time model output notifications:

      Code Block
      languageyml
      listeners:
        - event: mars
          request:
            class: od
            expver: 1
            domain: g
            stream: enfo
            step: [1,2,3]
          triggers:
            - type: echo

      Note the mars event listener. destination field is not present here.

  4. Activate base conda environment. Aviso is part of it.

    Code Block
    languagebash
    themeDJango
    user@local conda activate


  5. Launch the aviso application

    Code Block
    languagebash
    themeDJango
    user@local aviso listen

    Once in execution this command will create a process waiting for notifications. Users can terminate the application by typing CTRL+C .

    Note, the configuration file is only read at start time, therefore every time users make changes to it they need to restart the listening process.

...

Aviso can be executed as a system service. This helps automating its restart in case of machine reboots. The following steps help to configure Aviso to run as a service that automatically restart:

  1. Identify the location of the Aviso executable:

    Code Block
    languagebash
    themeDJango
    user@local whereis aviso


  2. Create a system service unit, by creating the following file in /etc/systemd/system/aviso.service:

    Code Block
    languageyml
    [Unit]​
    Description=Aviso​
    
    [Service]​
    User=<username> (if omitted it will run as root)
    Group=<groupname> (optional)
    WorkingDirectory= <home_directory> (optional)
    ExecStart=<aviso_location> listen​
    Restart=always
    
    [Install]​
    WantedBy=multi-user.target​

  3. Enable the aviso service:

    Code Block
    languagebash
    themeDJango
    user@local sudo systemctl enable aviso.service​


  4. Reload systemd:

    Code Block
    languagebash
    themeDJango
    user@local sudo systemctl daemon-reload​


  5. Start the service:

    Code Block
    languagebash
    themeDJango
    user@local sudo systemctl start aviso.service


...