We were using CentOS for the last years to run our build environment and internal infrastructure. It was a nice fit and we were happy with it. At least, until it was announced that CentOS is going to put their efforts on CentOS stream (https://blog.centos.org/2020/12/future-is-centos-stream/).
With this change and the related fear that we run into a volatile installation with permanent updates, we decided to switch to openSUSE. With that and a lot of VMs currently running CentOS, we needed to have a local mirror or proxy for openSUSE to save the internet traffic during times of updates.
Currentlty, Nexus is used as YUM proxy for CentOS. We wanted to have something similar, if not equal.
The first idea was to use the mirror approach as described in https://en.opensuse.org/openSUSE:Mirror_howto. But, the installation is cumbersome and as we have a Nexus in place, the wish was to re-use it. So, I gave it a try…
…and I succeeded. 🙂
Nexus setup as openSUSE proxy
- If needed, create a new BLOB store. As the RPMs may consume a considerable amount of space, it is preferred.
2. Create a new repository of type ‘raw (proxy)’
3. Set the new repository up to proxy http://download.opensuse.org:
4. Add a cleanup policy and other settings as needed and create the repo.
Configure openSUSE to use Nexus
In openSUSE, the repositories are configured in
/etc/zypp/repos.d. In the repo files contained therein, change the baseurl entry by replacing download.opensuse.org with your Nexus repository base URL like:
Afterwards, you can use zypper as usual…
Easy and nice way to use Nexus as openSUSE download proxy.