title: 'SOP: Compose and Repo Sync for Rocky Linux and Peridot'
---
This SOP covers how the Rocky Linux Release Engineering Team handles composes and repository syncs for the distribution. It contains information of the scripts that are utilized and in what order, depending on the use case.
There are several git repositories used in the overall composition of a repository or a set of repositories.
[Pungi](https://git.rockylinux.org/rocky/pungi-rocky) - This repository contains all the necessary pungi configuration files that peridot translates into its own configuration. Pungi is no longer used for Rocky Linux.
[Comps](https://git.rockylinux.org/rocky/comps) - This repository contains all the necessary comps (which are groups and other data) for a given major version. Peridot (and pungi) use this information to properly build repositories.
[Toolkit](https://github.com/rocky-linux/sig-core-toolkit) - This repository contains various scripts and utilities used by Release Engineering, such as syncing composes, functionality testing, and mirror maintenance.
## Composing Repositories
### Mount Structure
There is a designated system that takes care of composing repositories. These systems contain the necessary EFS/NFS mounts for the staging and production repositories as well as composes.
*`/mnt/compose` -> Compose data
*`/mnt/repos-staging` -> Staging
*`/mnt/repos-production` -> Production
### Empanadas
Each repository or set of repositories are controlled by various comps and pungi configurations that are translated into peridot. Empanadas is used to run a reposync from peridot's yumrepofs repositories, generate ISO's, and create a pungi compose look-a-like. Because of this, the comps and pungi-rocky configuration is not referenced with empanadas.
### Running a Compose
First, the toolkit must be cloned. In the `iso/empanadas` directory, run `poetry install`. You'll then have access to the various commands needed:
The below are common vars files. common_X will override what's in common. Typically these set what repositories exist and how they are named or look at the top level. These also set the current major.minor release as necessary.
```
.
├── common
├── common_8
├── common_9
```
These are for the releases in general. What they do is noted below.
```
├── gen-torrents.sh -> Generates torrents for images
├── minor-release-sync-to-staging.sh -> Syncs a minor release to staging
├── prep-staging-X.sh -> Preps staging updates and signs repos (only for 8)
├── sign-repos-only.sh -> Signs the repomd (only for 8)
├── sync-file-list-parallel.sh -> Generates file lists in parallel for mirror sync scripts
├── sync-to-prod.sh -> Syncs staging to production
├── sync-to-prod.delete.sh -> Syncs staging to production (deletes artifacts that are no longer in staging)
├── sync-to-prod-sig.sh -> Syncs a sig provided compose to production
├── sync-to-staging.sh -> Syncs a provided compose to staging
├── sync-to-staging.delete.sh -> Syncs a provided compose to staging (deletes artifacts that are no longer in the compose)
├── sync-to-staging-sig.sh -> Syncs a sig provided compose to staging
Generally, you will only run `sync-to-staging.sh` or `sync-to-staging.delete.sh` to sync. The former is for older releases, the latter is for newer releases. Optionally, if you are syncing a "beta" or "lookahead" release, you will need to also provide the `RLREL` variable as `beta` or `lookahead`.
During this phase, staging is rsynced with production, the file list is updated, and the full time list is also updated to allow mirrors to know that the repositories have been updated and that they can sync.
**Note**: If multiple releases are being updated, it is important to run the syncs to completion before running the file list parallel script.