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

Adding Debian specific init script #98

Merged
merged 0 commits into from
Oct 25, 2013
Merged

Conversation

remkade
Copy link

@remkade remkade commented May 31, 2013

The init script provided doesn't work on a Debian machine since Debian requires LSB headers now. I've created an init script that uses debian's standard init tools, and I tested on Squeeze.

@karmi
Copy link
Contributor

karmi commented Jun 10, 2013

@remkade Sorry for the delay!, got into these issues at last. As I wrote in #91, I'm almost sure that we should:

a) Allow installing from the official .deb and .rpm packages, not only from .tar.gz
b) Facilitate using a custom init scripts for people

I'm kinda on the fence right now with just pulling a change like this in -- it would seem a bit inconsistent with the original init script (eg. the status -v), and installing from the official .deb would probably solve this issue? (See the init script.)

@karmi
Copy link
Contributor

karmi commented Aug 1, 2013

@remkade Any ideas on my notes?

@remkade
Copy link
Author

remkade commented Aug 1, 2013

I'd say that the ideal option would be to use an OS specific deb or RPM which would handle the init scripts. If that isn't currently an option, chef makes it pretty trivial to implement OS specific templates without additional configuration. It would just be some work to keep the scripts up to date to support init/systemd/upstart.

If you go with the OS specific deb or rpm you'd have to remove the init template section from chef. As it stands now it'll break on any debian based systems.

@karmi
Copy link
Contributor

karmi commented Aug 1, 2013

@remkade We currently support the official .deb and .rpm packages (see 2d98a82 and beb8107), but these are added more as a starting point and do not support all features of the cookbook.

Also, there's already a change to use start-stop-daemon in 306e0c7, could you have a look and evaluate the differences? Maybe it does what you need already?

@remkade
Copy link
Author

remkade commented Aug 1, 2013

The start-stop-daemon change only fixes one problem on Debian. The other problem is that Debian requires LSB headers now which aren't compatible with Redhat's init headers.

@karmi
Copy link
Contributor

karmi commented Aug 1, 2013

@remkade Could you check with @chrisroberts and maybe integrate those changes together?

@remkade
Copy link
Author

remkade commented Aug 14, 2013

I personally think that since there are some pretty big changes to the init script to get it working properly on debian/ubuntu, it would be cleaner to use Chef's built in platform specific templates. The quantity of if statements and platform checks needed if we were to stay with a unified file seems pretty unwieldy.

Thoughts @karmi @chrisroberts?

@karmi
Copy link
Contributor

karmi commented Sep 16, 2013

@remkade Sorry for the silence -- I feel like we should move towards making all installation methods (deb/rpm/tar) on par, and rely on their init scripts. The current init script could be left as default for the tar.

@karmi
Copy link
Contributor

karmi commented Oct 1, 2013

@remkade To be more specific, yes, I think refactoring+extracting the current template into platform specific templates is a good idea -- if you have time for that, feel free to do so!

@karmi
Copy link
Contributor

karmi commented Oct 1, 2013

@remkade Can you please also check #130?

@karmi
Copy link
Contributor

karmi commented Oct 1, 2013

@remkade Also, the Nginx cookbook separates debian and ubuntu, is it worth inspecting the differences?

@remkade
Copy link
Author

remkade commented Oct 2, 2013

There appears to be no differences between their debian and ubuntu init scripts. I'm assume they did it that way to make the whole Debian family use the non-default template.

@NickPadilla
Copy link

@karmi @remkade Hey Guys! I was wondering if there was any movement on this ticket. I don't think I can push this into production until I have confidence in the init.d script. Seems there are many problems that need to be solved with the current script, as already stated. :) I would have to agree that migrating to platform specific init scripts using chef templates is a good idea. I always want to move to the newer releases and the official linux repos(all of them :) ) are always behind, being able to be agile in the upgrades is important for me.

Kyle - do you have a working impl of this in your repo? Didn't notice the logic in the default recipe where we install the service. If not I'll look at getting this all together, at least for Debian/Ubuntu.

It doesn't make a whole lot of sense to have to separate scripts for Debian/Ubuntu so I'll keep them together, unless there is a good reason for separation.

@NickPadilla
Copy link

@remkade Nevermind my chef noobness. :) Looks like it automatically finds the platform based on the folder name in templates. It also looks like we need to have the ubuntu directory b/c on ubuntu machines chef doesn't recognize the debian directory as one that applies.

@remkade
Copy link
Author

remkade commented Oct 24, 2013

Yes my repo is up to date now. You'll want to use the debian_init_scripts branch.

@karmi karmi merged commit 711cd97 into sous-chefs:master Oct 25, 2013
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

Successfully merging this pull request may close these issues.

3 participants