How to setup OpenStack repository in CentOS?


Table of Contents

OpenStack is a popular way to manage cloud servers. As OpenStack fetches packages from the repository, the setup of proper repository is really critical.

This again depends on the server type. Unfortunately, a bad OpenStack repository can result in broken packages too.

At 1 onlyhost , we get requests from customers to setup OpenStack repository as part of our Server Management Services.

Today, we’ll see how 1 onlyhost  Engineers correctly setup Openstack repository in CentOS servers to avoid package errors.


Why we need repository?

Firstly, we’ll see the need for a repository in OpenStack installation.

In simple words, a Linux repository is a collection of packages. The repository can be set up on the same server or at a different location. Usually, to save disk space on the server, we set up the repository at a remote server. These repositories contain thousands of programs. In the repo configuration, we just specify the link to the storage location.

When we install updates or a new program, the system fetches the related packages from this repository.

Basically, repo server will make sure that it has all the necessary packages. To ensure the smooth working of OpenStack, our Support Engineers just ensure that connection to repo server works fine.

Again, there are different type of repositories. For example, YUM Repositories are collection of RPM package files. This helps in quick and easy software installation on Linux servers.


Steps to setup OpenStack repository in CentOS

We’ve discussed the need for a repository in CentOS so far. Now, let’s see how our Support Engineers properly enable OpenStack repository in CentOS server.


1. Preparing the server

As the first step, we prepare the server for repository addition. Here, our Dedicated Engineers ensure that the server has the latest versions of base installation packages. When we see missing packages, we install them first.

Further, we disable or remove any automatic update services on the server. Thus, we can avoid it affecting the OpenStack environment.

Additionally, we make sure that these steps are done on all node servers.


2. Enable OpenStack repository

Now, its time to enable the OpenStack repository.

Luckily, on CentOS, the extras repository provides the RPM that enables the OpenStack repository. And, CentOS includes the extras repository by default. Therefore, to enable the OpenStack repository, our Dedicated Engineers simply install this package using yum utility. Again, the package name differs for various releases of CentOS.

For instance, when installing the Rocky release, we run the command:

yum install centos-release-openstack-rocky

Similarly, the other package names are centos-release-openstack-queenscentos-release-openstack-pike, etc.


3. Completing the installation

Now, to complete the installation, we upgrade the packages on all nodes.

For this, we execute the command:

yum upgrade

Again, when there are upgrades for the server kernel, only a reboot will activate it. On servers with live websites, our Dedicated Engineers schedule the server reboot to off peak times. This helps to reduce the business impact.

Further, we install the OpenStack client:

yum install python-openstackclient

Additionally, to manage the security policies for OpenStack services, we install the openstack-selinux package using:

yum install openstack-selinux


4. Viewing repo list

Finally, we check and confirm the repository list on the server.

To see list of enabled repos in CentOS server, we execute the command “yum repolist“.

A sample output from one of our servers looks like :

[root@server ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,007
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 9,692
extras/7/x86_64 CentOS-7 - Extras 228
openstack-liberty/x86_64 OpenStack Liberty Repository 976
updates/7/x86_64 CentOS-7 - Updates 991
repolist: 20,894
[root@server ~]#


Common repo errors and their fixes

Although, the steps to setup OpenStack repository in CentOS servers look pretty easy, often customers see problems with it.

Let’s check the top repo errors and how we fix them.


1. Error installing package

Recently, one of our customers reported problems with installing OpenStack-Queens package in CentOS 7.2. He was getting the error as:

Finished Dependency Resolutions
Error: Package: python2-cryptography-2.1.4-1.e17.x86_64 (centos-openstack-queens)

Since the error was complaining about the openssl package, customer also tried to update it. But, that didn’t fix the error.

On a detailed check, we found that customer had Vault repositories enabled on his server. This was conflicting with the package install. So, to fix the error, our Support Engineers edited the file /etc/yum.repos.d/CentOS-Vault.repo and added enabled=0 into all repository configs in that file. Thus, we disabled the Vault repo. Finally, we ran a yum update command and that fixed the error.


2. Incorrect repository link

Similarly, errors can happen due to incorrect repository link too. Any attempt to install a package will result in error mentioned below.

[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: openstack-kilo. Please verify its path and try again.

Here, the system complains about the non existing link to the repository. Firstly, our Dedicated Engineers check the internet connection on the server. Then, we access the repo link from an actual browser to see if it really exists.

Then, to fix the error, we edit the .repo file in the /etc/yum.repos.d/ directory and set the correct url. And, then the package update works fine.

[Do you know that you can easily avoid CentOS repository errors with periodic server management? We are available 24×7 to monitor your servers.]



In short, incorrect repository settings can create problems in CentOS OpenStack installation. Today, we saw how our Support Engineers setup OpenStack repository in CentOS servers and fix common errors with it.

Leave a Comment

Your email address will not be published. Required fields are marked *

Social Share


Cheapest Web Hosting

Fasters Web Hosting Promo
Scroll to Top

Launch your Website at RS599

Create a professional website yourself with our domain hosting combo. Get Extra benefits at this Year end Sale with 10% OFF and Enjoy Amazing Deels on Shared Hosting!

Starting at Only RS599/Year

Year End Sale


Use Code STARTBIZ at Checkout.

Create an earning opportunity with A Web Hosting Business

Become reseller and start reselling domains, web hosting, ssl certificates and More.

45% OFF

Starting at RS399/Month


Use coupon: at the checkout.