...
- Create a VM with the
data
flavour. This will automatically install ECMWF packages such as MARS and Aviso. Configure MARS credentials, follow the instructions in Configuring MARS access. Aviso uses the same credentials.
Create a configuration file in the default location ~/aviso/config.yaml with the following settings.
Below an example for products notifications:
Code Block language yml listeners: - event: dissemination request: destination: <user_destination> class: od expver: 1 domain: g stream: enfo step: [1,2,3] triggers: - type: echo
listeners
block is an example of aNote 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 isecho
. This will simply print out the notification to the console output.Below an example for real time model output notifications:
Code Block language yml 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.
Activate base conda environment. Aviso is part of it.
Code Block language bash theme DJango user@local conda activate
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.
...
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:
Identify the location of the Aviso executable:
Code Block language bash theme DJango user@local whereis aviso
Create a system service unit, by creating the following file in /etc/systemd/system/aviso.service:
Code Block language yml [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
Enable the aviso service:
Code Block language bash theme DJango user@local sudo systemctl enable aviso.service
Reload systemd:
Code Block language bash theme DJango user@local sudo systemctl daemon-reload
Start the service:
Code Block language bash theme DJango user@local sudo systemctl start aviso.service
...