Skip to content
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

Support runit in non-production environments #70

Closed
lucafavatella opened this issue Mar 1, 2017 · 7 comments
Closed

Support runit in non-production environments #70

lucafavatella opened this issue Mar 1, 2017 · 7 comments

Comments

@lucafavatella
Copy link
Contributor

Developers using Docker for development/testing/staging environment (not for production) would benefit from using the same scripts for all environments. In Docker containers, alternative init systems are usually preferred to systemd - runit is one of those e.g. see https://github.com/phusion/baseimage-docker .

@christophermancini
Copy link
Contributor

Hi @lucafavatella, I am not sure I want to open the door of offering full support for non-system default init systems. I think it is reasonable to add a var that allows the user to skip the standard OS init task. Then in your playbook, you can add whatever tasks are necessary for your desired init system. Thoughts?

@lucafavatella
Copy link
Contributor Author

@christophermancini I totally agree with you in theory - I am not sure how that realizes in practice.
Would you mind drafting a change (branch) for skipping "the standard OS init task"? I would then happy to use it in my playbook.

My concern comes from the changes I identified in https://github.com/basho-labs/ansible-riak/pull/71/files . I need to avoid Ansible modules service and systemd for runit - and here my limited knowledge of Ansible does not help:

  • Can a Ansible handler be made conditional? Otherwise I propose deleting restart riak handler altogether.
  • File tasks/main.yml reboots riak - using service Ansible module - then waits for Riak to be up. How can tasks/main.yml conditionally delegate to the user one task (reboot) in the middle of the file?

@christophermancini
Copy link
Contributor

@lucafavatella The handler is actually not even being used anymore, so I removed it in #74. I created a var, riak_init_system which defaults to system. If this var does not equal system, it will skip the reboot task via the service module.

This allows you to reboot Riak yourself within the tasks section of your playbook, which will execute after the roles section is completed.

@lucafavatella
Copy link
Contributor Author

@christophermancini I managed to get back to this, sorry for the delay. Thanks for the change, it helped. I got two remaining issues for managing to use it:

@lucafavatella
Copy link
Contributor Author

Failed waiting for Riak to come up after (non-)reboot - not sure how to fix this yet.

I believe #76 fixes this - tested on local VM (was failing before).

@lucafavatella
Copy link
Contributor Author

I believe #76 fixes this - tested on local VM (was failing before).

I closed #76 - see #76 (comment) for reason.

I suggest this ticket is closed after #75 is merged.

@lucafavatella
Copy link
Contributor Author

#75 is merged. Closing this then.

See #76 (comment) for runit support until Ansible matures in handlers/notify semantics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants