...
- Make sure to have Python3 installed with pip3 support, setuptools and wheel.
Install Aviso
Code Block language bash theme DJango user@local sudo pip3 install -e git+https://git.ecmwf.int/scm/lex/aviso.git@master#egg=aviso
Create a configuration file in the default location /etc/aviso/config.yaml with the following settings:
Code Block language yml username: <user_email> key_file: <location of ECMWF key> listeners: - event: dissemination request: destination: <user_destination> class: od expver: 1 domain: g stream: enfo step: [1,2,3] triggers: - type: echo
The first line is required for a correct authentication, the username is the email associated to the user's ECMWF account. This can be checked by logging at https://api.ecmwf.int/v1/key/.
The
listeners
block is an example of adissemination
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 isecho
. This will simply print out the notification to the console output.Save If the ECMWF key is already saved in the machine (because of a MARS installation), write it's path to
key_file
. Otherwise, save the ECMWF key as a file in /etc/aviso/key. The key , this is the default location. The key can be obtained by logging at https://api.ecmwf.int/v1/key/ .Launch the aviso application
Code Block language bash theme DJango 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.
...