Skip to content

Latest commit

 

History

History
128 lines (87 loc) · 1.96 KB

naming-repos.md

File metadata and controls

128 lines (87 loc) · 1.96 KB

1️⃣ File Naming Convention

Directory:

/etc/yum.repos.d/

Recommended format:

<org>-<env>-<os><major>-<repo-purpose>.repo

Example:

networknuts-prod-rhel9-baseos.repo
networknuts-prod-rhel9-appstream.repo
networknuts-dev-rhel9-epel.repo
networknuts-test-rhel8-internal-tools.repo

Why this works

  • Immediately tells you:

    • Organization
    • Environment
    • OS version
    • Repo content purpose
  • Scales cleanly when you have 20+ repos

  • Works well with configuration management tools (Ansible, Puppet)


2️⃣ Inside the .repo File (Repository ID Naming)

Inside the file:

[networknuts-prod-rhel9-baseos]
name=NetworkNuts Production RHEL 9 BaseOS
baseurl=http://repo.networknuts.local/rhel/9/baseos/
enabled=1
gpgcheck=1
gpgkey=http://repo.networknuts.local/RPM-GPG-KEY-networknuts

Repo ID naming convention:

<org>-<env>-<os><major>-<component>

Example:

networknuts-prod-rhel9-baseos
networknuts-prod-rhel9-appstream
networknuts-dev-rhel9-epel

Keep repo IDs lowercase and avoid spaces.


3️⃣ Enterprise Standard Pattern (Very Clean Model)

In serious enterprise datacenters, the pattern is usually:

<env>-<os>-<version>-<component>

Example:

prod-rhel-9-baseos.repo
prod-rhel-9-appstream.repo
dev-rhel-9-epel.repo

Short, readable, scalable.


4️⃣ If You Have Multiple Architectures

Add architecture only if required:

prod-rhel-9-baseos-x86_64.repo
prod-rhel-9-baseos-aarch64.repo

Usually not needed unless mixed-arch infra.


5️⃣ If You Mirror Upstream Repos Internally

If you're mirroring Red Hat or EPEL internally:

prod-rhel-9-redhat-baseos.repo
prod-rhel-9-redhat-appstream.repo
prod-rhel-9-epel.repo

This helps differentiate:

  • Vendor provided
  • Internal curated
  • Custom package repo

6️⃣ What NOT To Do

❌ repo1.repo ❌ internal.repo ❌ rhel.repo ❌ base.repo

These become impossible to manage at scale.