How to mirror the Virtuozzo Infrastructure repository
This guide describes how to deploy an HTTP server that will act as a repository mirror for Virtuozzo Infrastructure. This will allow you to manage Virtuozzo Infrastructure clusters without direct Internet access.
Creating a virtual machine
Create a virtual machine with the following parameters:
- OS: CentOS 9 (recommended and tested) or any RPM-based OS that runs on Linux kernel 5.x
- vCPU: 2
- RAM: 4 GB
- Storage: 100 GB
- Access to https://repo.virtuozzo.com/
Connect to the virtual machine using SSH. We recommend using sudo.
Installing prerequisites
1. Install the httpd server, createrepo, reposync tools, and the xml editor:
| |
2. Download and copy these RPM GPG keys to the keys directory /etc/pki/rpm-gpg/:
3. Import the RPM GPG keys:
| |
Configuring the repository
We will be using the following variables:
<REPO-NAME>is the repository name, for example:hci-6.2<UPGRADE-REPO-NAME>is the name of the upgrade repository, for example:hci-7.1<BUILD-NUMBER>is the build number, for example:6.2.1-92<REPOMD-BUILD-NUMBER>is the build number that will be displayed in the admin panel, for example:6.2.1 (92)<MAJOR-BUILD-NUMBER>is the major release version, for example:6.2<UPGRADE-MAJOR-BUILD-NUMBER>is the version of a major release to upgrade to, for example:7.1<HTTP-SERVER_IP-OR-DNS_NAME>is the IP address or resolvable DNS name of your mirror server
1. Create the directory structure:
| |
2. Create the mirrorlists directory:
| |
3. In the mirrorlists directory, create the releases-os.mirrorlist and releases-updates.mirrorlist files with the following content:
| |
4. Synchronize the public repository to the directory <REPO-NAME>:
4.1. Create the repos directory:
| |
4.2. Create the /root/repos/<REPO-NAME>.repo file with the following content:
| |
4.3. Synchronize the repository:
| |
4.4. Create the repository metadata:
| |
4.5. Place the release notes file to the repo directory:
| |
4.6. Create the releases directory:
| |
4.7. Create the hci-registry.json file in the releases directory with the following contents:
| |
5. Adjust ownership:
| |
6. Restart the httpd service:
| |
Configuring DNS
We highly recommend adding a new A record to your own DNS server:
| |
If you do not have your own DNS server, you can add the following record to the /etc/hosts file on all Virtuozzo Infrastructure servers:
| |
Updating to the next major version
To update to a new major Virtuozzo Infrastructure version, repeat the step Configuring the repository.