-
Notifications
You must be signed in to change notification settings - Fork 18
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
can we use systemd services instead of rc.local to run ansible-pull-script.sh once on boot ? #141
Comments
Related: fgci-org/ansible-role-cuda#5 |
Reopened and renaming as the cuda part is now done. Guess I shouldn't have two issues in the same issue.. |
fgci-org/ansible-role-cuda@f93fd8a cuda_init.sh now uses a systemd service oneshot and that seems to work.
|
An idea: maybe if the ansible-pull-script.sh creates for example /etc/FGCI (once, after first success of the ansible-pull command) and then if that file exists then the systemd service does not wait and if /etc/FGCI does not exist then it waits at that point in boot? |
To add this we could: One pro for B is that there won't be a confusing rc.local entry sometimes Thoughts? Is A OK? |
/etc/FGCI added in fgci-org/ansible-role-fgci-install@ac6e092 |
Here's a blog post that provides a systemd service to run ansible-pull on boot: https://calgaryrhce.ca/blog/2016/02/03/ansible-pull-and-kickstart-for-one-touch-server-provisioning/ |
https://github.com/CSC-IT-Center-for-Science/ansible-role-fgci-install/releases/tag/v1.7.0 wget change to "--accept=yml" - fgci-org/ansible-role-fgci-install@1065bd7 template in and configure a systemd for ansible-pull in #141 disabled by default
The fgci-install role can now install the ansible-pull script. Some thought is still required to think about when exactly to run it during boot and how to make it non-blocking when the node has already been configured once with ansible (because on some sites it takes ~an hour for ansible-pull to run) |
We now install a watermark file https://github.com/CSCfi/fgci-ansible/tree/master/roles/watermark-release so that could/should be used when doing this. |
It would be good if ansible runs at the end of the systemd boot sequence, not at the rc.local (which runs before many services like ypbind, slurm and fs mounts, see "systemd-analyze plot > plot.svg" output).
The text was updated successfully, but these errors were encountered: