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_olcne15
- 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.
Read the prerequisites in the top level README to set up Vagrant with either VirtualBox or KVM
- Clone this repository
git clone https://github.com/oracle/vagrant-projects
- Change into the
vagrant-projects/Ocr-Yum-Mirror
directory - Run
vagrant status
to check Vagrantfile status and possible plugin(s) required - Run
vagrant up
- The first time you run this it will provision everything and may take a while. Ensure you have a good internet connection!
- The Vagrant file allows for customization.
- SSH into the VM either by using
vagrant ssh
If required, by Vagrantfile you can also setup ssh port forwarding. - You can shut down the VM via the usual
vagrant halt
and the start it up again viavagrant up
.
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>...
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
- 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.