From 87b08d9cbfa9fc4a9d946e3b8f9731c9be1ad3b5 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Thu, 22 Feb 2024 19:33:33 -0300 Subject: [PATCH] Migrate docs to new stack --- staging_docs/admin/guides/.gitkeep | 0 staging_docs/admin/guides/extend-support.md | 42 +++++++++++++++++++ staging_docs/admin/index.md | 45 +++++++++++++++++++++ staging_docs/admin/learn/.gitkeep | 0 staging_docs/admin/reference/.gitkeep | 0 staging_docs/admin/tutorials/.gitkeep | 0 staging_docs/dev/guides/.gitkeep | 0 staging_docs/dev/guides/release.md | 9 +++++ staging_docs/dev/learn/.gitkeep | 0 staging_docs/dev/reference/.gitkeep | 0 staging_docs/dev/tutorials/.gitkeep | 0 staging_docs/user/guides/.gitkeep | 0 staging_docs/user/learn/.gitkeep | 0 staging_docs/user/reference/.gitkeep | 0 staging_docs/user/tutorials/.gitkeep | 0 15 files changed, 96 insertions(+) create mode 100644 staging_docs/admin/guides/.gitkeep create mode 100644 staging_docs/admin/guides/extend-support.md create mode 100644 staging_docs/admin/index.md create mode 100644 staging_docs/admin/learn/.gitkeep create mode 100644 staging_docs/admin/reference/.gitkeep create mode 100644 staging_docs/admin/tutorials/.gitkeep create mode 100644 staging_docs/dev/guides/.gitkeep create mode 100644 staging_docs/dev/guides/release.md create mode 100644 staging_docs/dev/learn/.gitkeep create mode 100644 staging_docs/dev/reference/.gitkeep create mode 100644 staging_docs/dev/tutorials/.gitkeep create mode 100644 staging_docs/user/guides/.gitkeep create mode 100644 staging_docs/user/learn/.gitkeep create mode 100644 staging_docs/user/reference/.gitkeep create mode 100644 staging_docs/user/tutorials/.gitkeep diff --git a/staging_docs/admin/guides/.gitkeep b/staging_docs/admin/guides/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/admin/guides/extend-support.md b/staging_docs/admin/guides/extend-support.md new file mode 100644 index 0000000..c21f4e6 --- /dev/null +++ b/staging_docs/admin/guides/extend-support.md @@ -0,0 +1,42 @@ +# Extend webserver support + +## Adding support for remote repos running on custom ports + +**Optional** By default, pulp is allowed to connect to web servers running on several standard or semi-standard ports: `80, 81, 443, 488, 8008, 8009, 8443, 9000`. + +If any of the remote repos you are trying to connect to are hosted on non-standard +HTTP/HTTPS ports, you can configure Pulp to be able to talk to them like in the following example +for port `10011`. + +`sudo semanage port -a -t http_port_t -p tcp 10011` + +## Adding support for proxy servers running on custom ports + +**Optional** By default, pulp is allowed to connect to web proxy servers on several standard or semi-standard ports: `3128, 3401, 4827, 8080, 8118, 8123, 10001-10010`. + +If Pulp is configured to use a proxy server (in order to talk to remote repos), but the proxy +server is on a non-standard port, you can configure Pulp to be able to talk to them like in the +following example for port `10012`. + +`sudo semanage port -a -t http_cache_port_t -p tcp 10012` + +!!! note + + If you get the following error: + + `ValueError: Port tcp/10012 already defined` + + That means that the port number is already labelled for some other purpose by SELinux. No change was + made to your system. Run this command instead (substitute `http_port_t` for remote repos): + + `sudo semanage port -m -t http_cache_port_t -p tcp 10012` + +!!! note + + Technically Pulp can talk to any remote repo or proxy server running on any SELinux-recognized + ports for web servers or for proxy servers. (They are effectively one cumulative list.) + +!!! note + + To see the complete list of these ports currently recognized on your system, run: + `sudo semanage port -l | grep -E "^http_port_t|^http_cache_port_t|^squid_port_t" | grep tcp` diff --git a/staging_docs/admin/index.md b/staging_docs/admin/index.md new file mode 100644 index 0000000..a640b55 --- /dev/null +++ b/staging_docs/admin/index.md @@ -0,0 +1,45 @@ +# Overview + +The SELinux policy for Pulp 3.Y releases. + +## Quickstart + +### Building + +``` +sudo yum install -y selinux-policy-devel policycoreutils +git clone https://github.com/pulp/pulpcore-selinux +cd pulpcore-selinux + +make -f /usr/share/selinux/devel/Makefile pulpcore_port.pp +make -f /usr/share/selinux/devel/Makefile pulpcore.pp +make -f /usr/share/selinux/devel/Makefile pulpcore_rhsmcertd.pp +``` + +### Installing + +``` +sudo semodule -i pulpcore_port.pp +sudo semodule -i pulpcore.pp +sudo semodule -i pulpcore_rhsmcertd.pp +``` + +### Labeling pulpcore_port + +**Required**: You must label ports used by Pulp with `pulpcore_port_t` so that the proper type is assigned to the ports and Pulp is allowed to communicate on with the network correctly. + +Apply the `pulpcore_port_t` SELinux type to ports 24816 and 24817 with: + +`sudo semanage port -a -t pulpcore_port_t -p tcp 24816-24817` + + +### Uninstalling + +Uninstall in the following order: + +``` +sudo semanage port -d -t pulpcore_port_t -p tcp 24816-24817 +sudo semodule -r pulpcore_rhsmcertd +sudo semodule -r pulpcore +sudo semodule -r pulpcore_port +``` diff --git a/staging_docs/admin/learn/.gitkeep b/staging_docs/admin/learn/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/admin/reference/.gitkeep b/staging_docs/admin/reference/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/admin/tutorials/.gitkeep b/staging_docs/admin/tutorials/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/dev/guides/.gitkeep b/staging_docs/dev/guides/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/dev/guides/release.md b/staging_docs/dev/guides/release.md new file mode 100644 index 0000000..8e471be --- /dev/null +++ b/staging_docs/dev/guides/release.md @@ -0,0 +1,9 @@ +# Release Guide + +1. Bump the version number (`sed -i -e 's/1.2.1/1.2.2/g' *.te`). +1. Create a PR with all the changes above and merge it after a review. +1. Create a release on github. It will create the corresponding tag. +1. In that release, copy and paste the git commit titles since the last release +(`git shortlog 1.2.1...master --no-merges | grep -E "^(\s)+\w" | sed -e 's/ /*/'`) +1. Create a corresponding PR ([example](https://github.com/pulp/pulp_installer/pull/524)) for pulp_installer to use the new pulpcore-selinux tag. +(Bump `__pulp_selinux_version` in `roles/pulp_common/defaults/main.yml`) diff --git a/staging_docs/dev/learn/.gitkeep b/staging_docs/dev/learn/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/dev/reference/.gitkeep b/staging_docs/dev/reference/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/dev/tutorials/.gitkeep b/staging_docs/dev/tutorials/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/user/guides/.gitkeep b/staging_docs/user/guides/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/user/learn/.gitkeep b/staging_docs/user/learn/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/user/reference/.gitkeep b/staging_docs/user/reference/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/staging_docs/user/tutorials/.gitkeep b/staging_docs/user/tutorials/.gitkeep new file mode 100644 index 0000000..e69de29