Skip to content

Add systemd support#14

Merged
jarshwah merged 2 commits intorvdh:masterfrom
andy-s-clark:systemd-support
Aug 3, 2016
Merged

Add systemd support#14
jarshwah merged 2 commits intorvdh:masterfrom
andy-s-clark:systemd-support

Conversation

@andy-s-clark
Copy link
Copy Markdown
Contributor

  • Add support for systemd on RHEL 7 / CentOS 7
  • Move creation of pid, socket and log directories out of the startup scripts and into puppet.

Comment thread templates/uwsgi_systemd.service.erb Outdated

[Service]
Type=simple
ExecStart=/usr/sbin/uwsgi --die-on-term --ini <%= @config_file %>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you parameterise the uwsgi binary location or just leave the path off? I'm just imagining other distros that use systemd may not install uwsgi into sbin.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll parameterize the binary path. On CentOS 7, the service failed to start without the full path.
Any preference for the name of the parameter? "app_binary_directory"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just go with something like "binary_location" and include the uwsgi component. Thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the name "binary_directory" in order to match the variables "app_directory", "log_directory", etc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that makes sense. Fine with me.

@jarshwah
Copy link
Copy Markdown
Contributor

jarshwah commented Aug 2, 2016

Could you please modify the README service_provider section and the service_provider comments in the head of the init.pp file to mention systemd support? Should be good to go from there.

* Add binary_directory parameter for systemd
* Add systemd information to README
@jarshwah jarshwah merged commit 27505e7 into rvdh:master Aug 3, 2016
@jarshwah
Copy link
Copy Markdown
Contributor

jarshwah commented Aug 3, 2016

@andy-s-clark I'm unsure if I'm going to release this or not. It depends on the outcome of cwood#7

My module isn't very well maintained and includes no tests, so if the fork is willing to take over, then I'd be happy for that to happen. I'd then ask you to target your patch at the fork.

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.

2 participants