-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fixes #29246 - introduce new feature to handle foreman service #321
Fixes #29246 - introduce new feature to handle foreman service #321
Conversation
Issues: #29246 |
definitions/features/puma.rb
Outdated
@@ -0,0 +1,18 @@ | |||
module ForemanMaintain | |||
module Features | |||
class Puma < ForemanMaintain::Feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to name this something related to foreman-service given thats the systemd service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree here too, we don't need to call out puma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed feature puma
to foreman_service
.
Few thoughts on this one,
This way we still refer to foreman_server while doing or adding changes and at same time maintain both of these ? |
The passenger is not a separate service but it is embedded into httpd itself. But the new
I recommend keeping the new foreman.service separate as it is intended to be separate from httpd. |
Starting with Foreman 2.1 (Sat 6.8) the architecture will be a separate foreman service with Apache as a reverse proxy. So |
@ehelms, currently |
@upadhyeammit, @sthirugn, |
Apache remains the application server for Pulp 2. For Foreman and Pulpcore
Apache is a reverse proxy to their services.
…On Wed, Mar 4, 2020, 7:29 AM kgaikwad ***@***.***> wrote:
Starting with Foreman 2.1 (Sat 6.8) the architecture will be a separate
foreman service with Apache as a reverse proxy. So httpd will no longer
need to be restarted to restart Foreman with the Foreman server.
Currently httpd service added in three features i.e foreman, pulp2,
pulpcore. Doesn't that mean it will no longer required in all or only
applicable for Foreman?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#321?email_source=notifications&email_token=AACHT47OLYEQ53PPCUVMEXDRFZCRVA5CNFSM4LAD57NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENXTXOI#issuecomment-594492345>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACHT45SCS5XT7K6GHQPRETRFZCRVANCNFSM4LAD57NA>
.
|
module Features | ||
class ForemanService < ForemanMaintain::Feature | ||
metadata do | ||
label :puma |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you renamed everything but missed this puma
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. Fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries, thank you for the quick fix
I am not fully aware of foreman_maintain architecture, so the changes here look sane to me in general. I will let @upadhyeammit weigh in with respect to architecture. |
35cafd5
to
686487e
Compare
Tests are failing due to current changes. I will update PR. |
As part of theforeman/foreman#7536 we'll also add |
@ehelms, @sthirugn, |
Yes, httpd should still be shown. |
038ce71
to
fb3c9d2
Compare
@ehelms, @upadhyeammit,
@ekohl, does it mean like services we need to provide way to apply actions (start/stop/status) for socket? |
system_service('httpd', 30) | ||
] | ||
if foreman_service_installed? | ||
[system_service('foreman', 30)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have introduced a foreman.socket
that works like a service but does not need to be restarted. However, I think it would be helpful to ensure that the socket is running whenever we perform service operations. @ekohl what do you think regarding handling the socket?
If the socket is started and Apache is as well, it'll automatically start foreman.service. Probably good to ensure it's stopped as well when stopping Short summary: Full stop: |
@sthirugn, |
All changes for the service are in nightly. |
Ah, that makes sense. |
[ | ||
system_service('httpd', 30) | ||
] | ||
if foreman_service_installed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If foreman-service
is installed, Apache is usually still used as a reverse proxy. The installer can set it up without Apache, but I personally haven't used that and we don't recommend it unless you know what you're doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
foreman-service
is installed, Apache is usually still used as a reverse proxy.
Yes, Apache will be there. To handle this, I have added Apache feature separately which having httpd
in services list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f5eddbe
to
5dc2073
Compare
Resolved Rubocop warnings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one comment, request to check.
4250319
to
11a104c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, but overall 👍
With this commit, renamed feature puma to foreman_service and modified the hammer setup tests.
11a104c
to
53faf85
Compare
@upadhyeammit, @ekohl, |
looks great |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Untested, but 👍 from a conceptual perspective. I'll leave it for other reviewers.
@sthirugn, I have mentioned service priority as 30. Please correct me if any modifications required.
It would be good to have your review on overall changes.
Reference links for these changes:
theforeman/puppet-foreman#802
https://github.com/theforeman/foreman/blob/develop/extras/systemd/foreman.service