-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to add aiida daemon system service? #1434
Comments
I guess the problem is that the
|
After reading the systemd docs I've made some progress, but for some reason the daemon still doesn't want to start properly, when called from systemd:
The same works just fine, if I call it from the command line:
here the updated .service file
|
In essence it was just a typo ( Will add this to the docs now.
|
@giovannipizzi asks about how to generalize this for a per-user service There is such a thing as user services. It seems like the service should be put in |
Are you sure it will be killed at logout? The note in "How it works" at your link says it's per-user and not per-session that makes me think the opposite, but I didn't test. |
The second sentence in "How it works" literally reads: "This process will survive as long as there is some session for that user, and will be killed as soon as the last session for the user is closed."
Well, it's still a system-wide service, meaning for example you can't run two identical ones on the same machine. There is something called "unit templates" (see also here), which allow you to run a We'll take care of this once the workflows branch has been merged (and then, this issue can be closed). |
Moreover, I think it is very useful to have AiiDA running when not logged in (I can log out and the daemon will still take care of my simulations). Imagine e.g. that AiiDA runs on a non-graphical server, where nobody is logged in but still you want AiiDA to check your calculations and submit new wf steps. |
This is a script that works for the AiiDA 1.0.0 series (there are some variables to change, this is taken from a template of a ansible script):
This needs just to be updated in the docs |
In order to run the daemon per profile using unit templates, is it like this?
Feel free to edit. |
Update this for 1.0 |
As soon as the beta is out, this can be fixed in the Quantum Mobile, and this issue closed. We have already prepared the correct script for the tutorial last May (and I think it is the code I pasted above). |
Here the updated config for the aiida 0.12 series which fixes two issues (daemon starting before postgres, parsing of restartsec).
This system service configuration is used in Quantum Mobile |
And here comes the equivalent configuration for aiida 1.0
Name this unit template "[email protected]" and start the daemon for profile This is tested on Ubuntu 16.04 and 1804 here All that remains to be done is to add links to the docs |
For our quantum mobile machine, we'd like to add the aiida daemon as a system service so that it is always running when a user starts the machine.
I'm not familiar with daemonization, so perhaps some of the folks working on this can give a few pointers.
Here is an example aiida-daemon.service file for systemd (that doesn't work, however - I guess this will be obvious for people who know how this is supposed to work)
The text was updated successfully, but these errors were encountered: