Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/cdn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# CDN

[Fastly](https://www.fastly.com) sponsors the CDN for Foreman.

## Configuration

The configuration happens through the `ansible/fastly.yml` Ansible playbook in this repository.

The major points of the configuration are:

* Set the backend to the right webserver (website01, repo-rpm01, repo-deb01)
* Enable shielding: a central system fetches the assets and then distributes them across the CDN instead of each CDN node fetches them itself, this costs more CDN traffic, but is usually faster
* Configure a health-check and serve stale content when it fails

## TLS

Fastly provides a shared certificate which has `theforeman.org` and `*.theforeman.org` as DNSAltName.

This certificate is signed by GlobalSign and we have a `_globalsign-domain-verification` TXT record in the `theforeman.org` DNS zone for verification of ownership.

## DNS

Each vhost has a CNAME pointing at `dualstack.p2.shared.global.fastly.net` which is the Fastly global, dualstack loadbalancer.
10 changes: 9 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Fork https://github.com/theforeman/foreman-infra and add your key into the [file
| [DEB repository](repo-deb.md) | OSUOSL |
| [RPM repository](repo-rpm.md) | OSUOSL |
| [Monitoring](monitoring.md) | Grafana Labs |
| [CDN](cdn.md) | Fastly |
| [Packaging](packaging.md) | COPR, Packit |

## Infrastructure providers

Expand Down Expand Up @@ -68,7 +70,7 @@ A list of the hosting we have, who provides it, and what capacity it has
* Provides Jenkins and bare metal hardware for running pipeline testing
* Support:
* IRC: `#centos-ci` on `libera.chat`
* Ticket system: [https://pagure.io/centos-infra](https://pagure.io/centos-infra/issues)
* Ticket system: [https://gitlab.com/CentOS/infra/tracker/](https://gitlab.com/CentOS/infra/tracker/)
### Conova
* Sponsored
* 1 HP Proliant machine (24 core, 192 GB RAM, 2×1TB SSD), incl power and network
Expand All @@ -88,3 +90,9 @@ A list of the hosting we have, who provides it, and what capacity it has
* Sponsorship needs renewal once a year, mail `community@grafana.com` before it runs out (24.04 is the end data, so mailing in February is a good idea)
* Grafana access via https://theforeman.grafana.net/
* People with access: Eric, Evgeni, Ewoud
### COPR
* Sponsored
* Access managed via Fedora Accounts: [https://accounts.fedoraproject.org/group/theforeman/](https://accounts.fedoraproject.org/group/theforeman/)
### Packit
* Sponsored
* Access managed by having write access to the GitHub repository
56 changes: 56 additions & 0 deletions docs/packaging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Packaging

Foreman builds RPM and DEB packages for its users.
This page summarizes how the and where the packages are built.

## DEB

### Building

The packages are built by [Jenkins](jenkins.md) on a Jenkins node configured using the [`jenkins_node::packaging::debian`](https://github.com/theforeman/foreman-infra/blob/master/puppet/modules/jenkins_node/manifests/packaging/debian.pp) Puppet class.

Jenkins prepares a Debian source tree and then executes `pbuilder` to build the package for each supported Debian/Ubuntu release.

### Publishing

Once built the packages are published to `deb.theforeman.org` or `stagingdeb.theforeman.org` on the [DEB repository server](repo-deb.md).
Comment thread
evgeni marked this conversation as resolved.

Packages from the `plugins` directory land directly in the respective repository on `deb.theforeman.org`, while those from `foreman` and `dependencies` land on `stagingdeb.theforeman.org` to be tested by [`foreman-deb.groovy`](https://github.com/theforeman/jenkins-jobs/blob/master/theforeman.org/pipelines/release/pipelines/foreman-deb.groovy) and pushed to `deb.theforeman.org` afterwards.

### Pull Requests

Pull Requests are built using the same stack and published to `stagingdeb.theforeman.org` with the PR author's name as the repository name.

## RPM

### Building

The packages are built by [Jenkins](jenkins.md) on a Jenkins node configured using the [`jenkins_node::packaging::rpm`](https://github.com/theforeman/foreman-infra/blob/master/puppet/modules/jenkins_node/manifests/packaging/rpm.pp) Puppet class.

Jenkins prepares an SRPM and submits the build to [COPR](https://copr.fedorainfracloud.org/), which performs the actual build.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it help to mention we have https://ci.theforeman.org/job/foreman-packaging-rpm-copr-nightly-release/ for regular packages (and foreman-packaging-rpm-${release}-release for stable branches) together with ${package}-${branch}-package-release for nightly packages? Those are the actual jobs that prepare the SRPM and submit.

And then we have a similar setup for pulpcore-packaging, but candlepin-packaging is special.


COPR requires a token for the [`theforeman-bot`](https://accounts.fedoraproject.org/user/theforeman-bot/) user to work.
The tokens have a validity of 6 months and need rotation once expired.
Jenkins stores the COPR configuration, which includes the token, in the `theforeman-bot-copr` credential.

### Publishing

COPR publishes the built packages in own repositories, but doesn't support neither filtering nor gating of the built packages.
Instead we use a process where a staging repository is built based on the COPR content, published to `stagingyum.theforeman.org`, tests are executed and once the tests pass the repository is published to `yum.theforeman.org`.

For nightly, the process can be seen in [`foreman-rpm.groovy`](https://github.com/theforeman/jenkins-jobs/blob/master/theforeman.org/pipelines/release/pipelines/foreman-rpm.groovy).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we also mention the concrete pipelines? Like https://ci.theforeman.org/job/foreman-nightly-rpm-pipeline/

For releases, the process is described in the [release procedure](https://github.com/theforeman/theforeman-rel-eng/blob/master/procedures/foreman/release.md.erb).

All user-facing repositories are hosted on the [RPM repository server](repo-rpm.md).

### Pull Requests against the packaging repository

Pull Requests against `foreman-packaging` are built by Jenkins in special, temporary COPR projects.

### Pull Requests against the source repositories

Several repositories utilize [Packit](https://packit.dev) to build RPM packages when a Pull Request is opened.
Packit uses the RPM spec from `foreman-packaging` and builds the packages on COPR.
More information on our Packit setup can be found in:
- [Packit for Foreman - get production RPMs from PRs](https://community.theforeman.org/t/packit-for-foreman-get-production-rpms-from-prs/32412)
- [Packit-based nightlies or how to properly test plugins in production](https://theforeman.org/2025/11/packit-based-nightlies-or-how-to-properly-test-plugins-in-production.html)
24 changes: 2 additions & 22 deletions docs/repo-deb.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,9 @@ The backends have TLS certificates from Let's Encrypt, using the HTTP challenge.

This allows the frontend to talk securely to the backends.

### Fastly CDN
### CDN

The frontend is served by the Fastly CDN.

The configuration happens through the `ansible/fastly.yml` Ansible playbook in this repository.

The major points of the configuration are:

* Set the backend to `<vhost>-backend.repo-deb01.osuosl.theforeman.org`
* Enable shielding: a central system fetches the assets and then distributes them across the CDN instead of each CDN node fetches them itself, this costs more CDN traffic, but is usually faster
* Configure a health-check and serve stale content when it fails

#### TLS

Fastly provides a shared certificate which has `theforeman.org` and `*.theforeman.org` as DNSAltName.

This certificate is signed by GlobalSign and we have a `_globalsign-domain-verification` TXT record in the `theforeman.org` DNS zone for verification of ownership.

#### DNS

Each vhost has a CNAME pointing at `dualstack.p2.shared.global.fastly.net` which is the Fastly global, dualstack loadbalancer.

Alternatively one can use `p2.shared.global.fastly.net` for an IPv4-only setup.
The frontend is served by the [CDN](cdn.md).

## Volumes

Expand Down
24 changes: 2 additions & 22 deletions docs/repo-rpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,9 @@ The backends have TLS certificates from Let's Encrypt, using the HTTP challenge.

This allows the frontend to talk securely to the backends.

### Fastly CDN
### CDN

The frontend is served by the Fastly CDN.

The configuration happens through the `ansible/fastly.yml` Ansible playbook in this repository.

The major points of the configuration are:

* Set the backend to `<vhost>-backend.repo-rpm01.osuosl.theforeman.org`
* Enable shielding: a central system fetches the assets and then distributes them across the CDN instead of each CDN node fetches them itself, this costs more CDN traffic, but is usually faster
* Configure a health-check and serve stale content when it fails

#### TLS

Fastly provides a shared certificate which has `theforeman.org` and `*.theforeman.org` as DNSAltName.

This certificate is signed by GlobalSign and we have a `_globalsign-domain-verification` TXT record in the `theforeman.org` DNS zone for verification of ownership.

#### DNS

Each vhost has a CNAME pointing at `dualstack.p2.shared.global.fastly.net` which is the Fastly global, dualstack loadbalancer.

Alternatively one can use `p2.shared.global.fastly.net` for an IPv4-only setup.
The frontend is served by the [CDN](cdn.md).

## Volumes

Expand Down
31 changes: 2 additions & 29 deletions docs/webserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,9 @@ These domains are all hosted on the webserver.
* theforeman.org, www.theforeman.org
* downloads.theforeman.org

### Fastly CDN
### CDN

A Fastly CDN exists that sits in front of:

* theforeman.org, www.theforeman.org
* downloads.theforeman.org

For these, the webserver acts as a backend while the content is served from the Fastly CDN to users.

#### Configuration

The Fastly configuration happens through the `ansible/fastly.yml` Ansible playbook in this repository.

The major points of the configuration are:

* Set the backend to `<vhost>-backend.website01.osuosl.theforeman.org`
* Enable shielding: a central system fetches the assets and then distributes them across the CDN instead of each CDN node fetches them itself, this costs more CDN traffic, but is usually faster
* Configure a health-check and serve stale content when it fails

#### TLS

Fastly provides a shared certificate which has `theforeman.org` and `*.theforeman.org` as DNSAltName.

This certificate is signed by GlobalSign and we have a `_globalsign-domain-verification` TXT record in the `theforeman.org` DNS zone for verification of ownership.

#### DNS

Each vhost has a CNAME pointing at `dualstack.p2.shared.global.fastly.net` which is the Fastly global, dualstack loadbalancer.

Alternatively one can use `p2.shared.global.fastly.net` for an IPv4-only setup.
The user traffic is served the [CDN](cdn.md), the webserver acts as a backend.

## Volumes

Expand Down
5 changes: 5 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ nav:
- Redmine: redmine.md
- Virt: virt.md
- Webserver: webserver.md
- RPM repository: repo-rpm.md
- DEB repository: repo-deb.md
- GPG: gpg.md
- Secrets: secrets.md
- Backups: backups.md
- Bootstrap: bootstrap.md
- Monitoring: monitoring.md
- CDN: cdn.md
- Packaging: packaging.md