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

Add customization of port #67

Merged
merged 4 commits into from
Jul 30, 2022
Merged

Conversation

martinpitt
Copy link
Collaborator

@martinpitt martinpitt commented Jul 29, 2022

Introduce a cockpit_port variable which changes the default port 9090,
as per https://cockpit-project.org/guide/latest/listen.html#listen-systemd

This requires an extra step with SELinux: It only allows cockpit to own port
9090, so for any other port the user needs to adjust the policy first. As this
is outside of what the cockpit role ought to mess with, only document it and do
that in the tests.

Fixes #63


Documentation preview: https://github.com/martinpitt/lsr-cockpit/tree/custom-port

@martinpitt
Copy link
Collaborator Author

@richm, @tabowling : WDYT, should the role automatically do the SELinux thingy, or is that too intrusive/unexpected? My current gut feeling is the latter, but that's not well tuned wrt. lsr yet 😁

@martinpitt
Copy link
Collaborator Author

The ubuntu test fails because Azure's Ubuntu mirror is wonky. The scheduled runs show that this has happend for some time. For this PR I'll just retry a few times, and I'll try and run these tests on 22.04 instead (but in a different PR).

This aovids package download 404 due to the random outdated local
package cache on the GitHub instance.
Make sure this is something sensible (we expect the login page), and
clean up the output file.
Introduce a `cockpit_port` variable which changes the default port 9090,
as per https://cockpit-project.org/guide/latest/listen.html#listen-systemd

This requires an extra step with SELinux: It only allows cockpit to own port
9090, so for any other port the user needs to adjust the policy first. As this
is outside of what the cockpit role ought to mess with, only document it and do
that in the tests.

Fixes linux-system-roles#63
@martinpitt
Copy link
Collaborator Author

Nevermind, I found the reason for this, fixed in a separate commit. PR #68 was still a good exercise, to make sure this works on recent OS releases.

@richm
Copy link
Contributor

richm commented Jul 29, 2022

[citest]

@martinpitt
Copy link
Collaborator Author

/bin/sh: line 1: semanage: command not found

Uh - @richm , that'd be a new test dependency in the shared infra? (Seems a little weird to have SELinux turned on without semanage, argh)

@richm
Copy link
Contributor

richm commented Jul 29, 2022

/bin/sh: line 1: semanage: command not found

Uh - @richm , that'd be a new test dependency in the shared infra? (Seems a little weird to have SELinux turned on without semanage, argh)

It would be easier for you to add it as a dependency in the test - just add something like this https://github.com/linux-system-roles/selinux/blob/master/tasks/set_facts_packages.yml#L8-L36 to the test playbook that uses selinux

@richm
Copy link
Contributor

richm commented Jul 29, 2022

[citest]

@richm
Copy link
Contributor

richm commented Jul 30, 2022

@richm, @tabowling : WDYT, should the role automatically do the SELinux thingy, or is that too intrusive/unexpected? My current gut feeling is the latter, but that's not well tuned wrt. lsr yet grin

The role should automatically do the SELinux thingy (and the firewall thingy) by using the selinux and firewall system roles.

But I don't think this is a high priority right now.

@richm richm merged commit 78f902f into linux-system-roles:master Jul 30, 2022
richm added a commit to richm/linux-system-roles-cockpit that referenced this pull request Jul 30, 2022
[1.3.0] - 2022-07-29
--------------------

### New Features

- Add customization of port (linux-system-roles#67)

* Add customization of port

Introduce a `cockpit_port` variable which changes the default port 9090,
as per https://cockpit-project.org/guide/latest/listen.html#listen-systemd

This requires an extra step with SELinux: It only allows cockpit to own port
9090, so for any other port the user needs to adjust the policy first. As this
is outside of what the cockpit role ought to mess with, only document it and do
that in the tests.

Fixes linux-system-roles#63

### Bug Fixes

- none

### Other Changes

- changelog_to_tag action - support other than "master" for the main branch name (linux-system-roles#66)

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@martinpitt
Copy link
Collaborator Author

Thanks @richm !

@martinpitt martinpitt deleted the custom-port branch July 30, 2022 06:56
richm added a commit to richm/linux-system-roles-cockpit that referenced this pull request Aug 1, 2022
[1.3.0] - 2022-07-29
--------------------

### New Features

- Add customization of port (linux-system-roles#67)

* Add customization of port

Introduce a `cockpit_port` variable which changes the default port 9090,
as per https://cockpit-project.org/guide/latest/listen.html#listen-systemd

This requires an extra step with SELinux: It only allows cockpit to own port
9090, so for any other port the user needs to adjust the policy first. As this
is outside of what the cockpit role ought to mess with, only document it and do
that in the tests.

Fixes linux-system-roles#63

### Bug Fixes

- none

### Other Changes

- changelog_to_tag action - support other than "master" for the main branch name (linux-system-roles#66)

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm added a commit to richm/linux-system-roles-cockpit that referenced this pull request Aug 1, 2022
[1.3.0] - 2022-07-29
--------------------

- Add customization of port (linux-system-roles#67)

* Add customization of port

Introduce a `cockpit_port` variable which changes the default port 9090,
as per https://cockpit-project.org/guide/latest/listen.html#listen-systemd

This requires an extra step with SELinux: It only allows cockpit to own port
9090, so for any other port the user needs to adjust the policy first. As this
is outside of what the cockpit role ought to mess with, only document it and do
that in the tests.

Fixes linux-system-roles#63

- none

- changelog_to_tag action - support other than "master" for the main branch name (linux-system-roles#66)

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm added a commit to richm/linux-system-roles-cockpit that referenced this pull request Aug 1, 2022
[1.3.0] - 2022-07-29
--------------------

- Add customization of port (linux-system-roles#67)

Introduce a `cockpit_port` variable which changes the default port 9090,
as per https://cockpit-project.org/guide/latest/listen.html#listen-systemd

This requires an extra step with SELinux: It only allows cockpit to own port
9090, so for any other port the user needs to adjust the policy first. As this
is outside of what the cockpit role ought to mess with, only document it and do
that in the tests.

Fixes linux-system-roles#63

- changelog_to_tag action - support other than "master" for the main branch name (linux-system-roles#66)

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm added a commit that referenced this pull request Aug 1, 2022
[1.3.0] - 2022-07-29
--------------------

- Add customization of port (#67)

Introduce a `cockpit_port` variable which changes the default port 9090,
as per https://cockpit-project.org/guide/latest/listen.html#listen-systemd

This requires an extra step with SELinux: It only allows cockpit to own port
9090, so for any other port the user needs to adjust the policy first. As this
is outside of what the cockpit role ought to mess with, only document it and do
that in the tests.

Fixes #63

- changelog_to_tag action - support other than "master" for the main branch name (#66)

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@martinpitt
Copy link
Collaborator Author

The role should automatically do the SELinux thingy

Ack - developing this in PR #73.

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.

Change default port
2 participants