Skip to content

Latest commit

 

History

History

Ocr-Yum-Mirror

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Ocr-Yum-Mirror

A Vagrant project to automatically build an Oracle Linux Yum Server mirror and, at the same time, an Oracle Container Registry mirror for Oracle Cloud Native Environment. This projects collects all the software (RPMs and container images) required to deploy/install Oracle Cloud Native Environment on Oracle Linux 8 and can be very helpful while looking for an offline deployment option for the same. By default, following Oracle Linux 8 Yum Channels are mirrored on the vagrant machine:

  • ol8_baseos_latest
  • ol8_appstream
  • ol8_olcne16
  • ol8_addons
  • ol8_UEKR6
  • ol8_UEKR7

Optionally further channels can be added once the virtual machine completed the first boot. Channels could also be added to the script /home/vagrant/sync-yum.sh to get them synced automatically.

Prerequisites

Read the prerequisites in the top level README to set up Vagrant with either VirtualBox or KVM

Getting started

  1. Clone this repository git clone https://github.com/oracle/vagrant-projects
  2. Change into the vagrant-projects/Ocr-Yum-Mirror directory
  3. Run vagrant status to check Vagrantfile status and possible plugin(s) required
  4. Run vagrant up
    1. The first time you run this it will provision everything and may take a while. Ensure you have a good internet connection!
    2. The Vagrant file allows for customization.
  5. SSH into the VM either by using vagrant ssh If required, by Vagrantfile you can also setup ssh port forwarding.
  6. You can shut down the VM via the usual vagrant halt and the start it up again via vagrant up.

Optional plugins

When installed, this Vagrant project will make use of the following third party Vagrant plugins:

  • vagrant-env: loads environment variables from .env files;
  • vagrant-proxyconf: set proxies in the guest VMs if you need to access the Internet through proxy. See plugin documentation for the configuration.
  • vagrant-reload: reload the VM during provisioning to activate the latest kernel.

To install Vagrant plugins run:

vagrant plugin install <name>...

Further information

The vagrant box contains two custom scripts to possibly resync the Oracle Linux Yum Channels as well as the Oracle Container Registry (OCR) mirrors. Those commands could be edited to add further yum-channels to be mirrored or customize the synchronization process. Examples:

  • Synchronize Yum mirror - to be executed with "vagrant" user
/home/vagrant/sync-yum.sh
  • Synchronize OCR mirror - to be executed with "vagrant" user
/home/vagrant/sync-ocr.sh

Other info

  • If you need to, you can connect to the machine via vagrant ssh.
  • The directory in which the Vagrantfile is located is automatically mounted into the guest at /vagrant as a shared folder.