-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
janus: add systemd unit file #306
Conversation
Perhaps there should be a "contrib" or "init" folder with stuff like this. (I'd also not add too much systemd basics to the janus-gateway README, maybe just a link to a good reference) |
Do you have any concrete suggestion? I personally don't foresee many more contributed init files, for better or worse systemd is the standard and it's here to stay. I'd address that if we need to. Debian and Ubuntu only have systemd support on their latest release, so putting the most basic instructions on the README (just the necessary to get started) didn't sound like a bad idea to me. |
Please not in the README... we can add a new page in mainpage.dox for that. |
I don't mind removing the README part, though I still think it could help people, mainpage.dox is not that accessible, the README is the first thing a user sees.
Just a couple more 😎 |
f6250d8
to
ca577e7
Compare
Dropped the README changes. |
The current LTS release of ubuntu, which is pretty popular, uses "upstart". Some people run janus under docker instead of their init system. If you wanted examples of alternatives :) |
We use Upstart for a parent management process. That management process handles keeping Janus online and translating messages for the rest of our systems. There are a number of different solutions here. |
Feel free to send a Pull Request with a different init file, right now
|
Considering the feedback, I'm even more convinced I'd rather have this as part of the documentation instead of having a separate folder/file. I'm thinking of an ad-hoc page like the one we have for the different ways of deploying Janus behind web servers: http://janus.conf.meetecho.com/docs/deploy.html a new page that might contain info on the different approaches you listed. Especially if the init file is so small (~12 lines, IIRC from Twitter) I see no harm in having it listed in a documentation file as an example users can refer to, which is what most OS projects do anyway. I don't consider the fact people are more willing to read the README a pro, actually: I'd instead very much encourage people to check the documentation (RTFM 😄 ), as otherwise I end up writing the same responses over and over on the group/issues, which is what happens more than I'd like. What can be added to the README is some stronger statement about the fact most of the info is in the docs, something that's probably lacking as of now. I can take care of preparing this documentation when I get back from my vacation, starting from the effort @saghul contributed. @ploxiln @willbarrett if you guys have anything you're willing to share about the way you did things, I'll add the info to the same page. |
@lminiero Thanks for taking the time to reply. FWIW, I don't need this to be in the Janus repo, as I have it as part of a Debian package. I thought that it would be useful for others, that's why I shared it. Ping me when you have the skeleton for the deployment section and I can add something to it, at least the systemd part. I still find it much more useful to have these file(s) in file form rather than embedded in the docs, but that's your call to make. |
Ping me as well - when you're ready. I'm happy to provide a sample Upstart file. |
Hi guys, I just prepared a first version of the page I mentioned. You can see a live image here: http://janus.conf.meetecho.com/docs/service.html Any feedback is more than welcome! The systemd section is admittedly a bit lacking, so if you have any additional text for it, that would be great @saghul 😃 @ploxiln @willbarrett same as to the upstart info guys, if you have any sample/text to share I'll be happy to add it there (with the proper acknowledgments, of course). |
I can offer an upstart file (typically copied to
Admittedly, I don't use this anymore, as I use docker for running janus now. (EDIT: also, just for the record, no need for acknowledgement for this snippet) |
@ploxiln's solution looks good to me. Pretty much matches what we do. |
Thanks guys, I'll add this to the documentation later today. |
Just tried adding it to systemd today on Ubuntu 16.04, I had to add these to the unit file, otherwise DNS lookup failed to the stun server:
|
I confirm the "network.target" is non existent in /etc/systemd/system/, probably name change since the original commit. After=network-online.target |
I just did some search and found https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ that explains the difference between
|
No description provided.