keepcalculator

06 Numbers and Powers

OpenStack Installation Guide for RHEL/CentOS

Card No. 06·47988 · Updated · Standard formula, shown below

This guide walks you through installing OpenStack on RHEL or CentOS using the Packstack utility, which automates the deployment of a single-node or multi-node OpenStack environment. You’ll learn the prerequisites, the exact commands to run, and how to verify your installation. This is the fastest way to get a working OpenStack cloud on a Red Hat-compatible system for testing or development.

What is OpenStack and Why Use Packstack?

OpenStack is an open-source cloud computing platform that controls large pools of compute, storage, and networking resources, managed through a dashboard or API. On RHEL/CentOS, the official distribution method is through the RDO (Red Hat OpenStack) project, which provides RPM packages. Packstack is a command-line tool from RDO that installs and configures all the core OpenStack services (Nova, Neutron, Glance, Keystone, Cinder, Horizon) with a single command. It’s ideal for a proof-of-concept, a development environment, or a small production deployment, because it handles the complex inter-service configuration automatically.

Prerequisites

Before you begin, ensure your system meets these minimum requirements. The commands below assume you have a fresh minimal installation of CentOS 7 or RHEL 7 (or 8/9 with the appropriate RDO repos).

  • Hardware: At least 8 GB RAM, 4 CPU cores, and 40 GB free disk space. More is better if you plan to run actual virtual machines.
  • Operating System: CentOS 7 x86_64 (most stable for RDO Queens and earlier). RHEL 7 or 8 with a valid subscription for RDO packages.
  • Network: A static IP address is strongly recommended. Packstack will configure network interfaces, and a dynamic IP can cause issues.
  • SELinux: Set to permissive (setenforce 0 and edit /etc/selinux/config) to avoid permission errors during installation.
  • Firewall: Disable firewalld (systemctl stop firewalld; systemctl disable firewalld) for simplicity, or configure the necessary ports manually.

Step-by-Step Installation

Follow these steps in order. They assume you’re logged in as root or have sudo privileges.

  1. Update the system: yum update -y (or dnf update -y on newer versions). Reboot if the kernel was updated.
  2. Install the RDO repository: For CentOS 7, use yum install -y centos-release-openstack-queens. For RHEL, enable the RHEL repository and install rdo-release from the RDO project. The exact package name depends on the OpenStack release you want (e.g., train, ussuri).
  3. Install Packstack: yum install -y openstack-packstack
  4. Run Packstack (single-node): The simplest command is packstack --allinone. This installs all services on the same host. It will take 10-20 minutes depending on your hardware.
  5. For a multi-node setup: First generate an answer file with packstack --gen-answer-file=answers.txt, then edit it to specify the controller and compute nodes, and finally run packstack --answer-file=answers.txt.
  6. After completion: Packstack prints a summary with the Horizon dashboard URL, admin username, and password. Save this information.

Verifying Your Installation

Once Packstack finishes, you should verify that the services are running and functional. Here are the key checks:

  • Dashboard: Open a browser and go to http://your-server-ip/dashboard. Log in with the admin credentials printed at the end of the installation.
  • CLI check: Source the admin credentials file (source ~/keystonerc_admin) and run openstack service list to see all registered services.
  • Image service: Run openstack image list to confirm Glance is working. You may need to upload a test image first.
  • Compute service: Run openstack hypervisor list to see the compute node(s).
  • Network service: Run openstack network list to see the default networks created by Packstack.

Common Problems and Solutions

Even with Packstack, things can go wrong. Here are frequent issues and how to fix them.

  • Packstack fails with a Python error: This often happens due to a broken pip or setuptools. Try pip install --upgrade pip setuptools and re-run Packstack.
  • MariaDB/MySQL service won’t start: Check the logs at /var/log/mariadb/mariadb.log. Often it’s a permissions issue on the database directory. Fix with chown -R mysql:mysql /var/lib/mysql.
  • Neutron agents are down: Run systemctl status neutron-* to see which agent failed. Common causes are misconfigured bridge interfaces or the Open vSwitch service not running.
  • Horizon shows a 502 Bad Gateway: The Apache httpd service may have failed. Check systemctl status httpd and the error log at /var/log/httpd/error_log.
  • Can’t create a VM because of insufficient resources: Ensure your CPU supports virtualization (VT-x/AMD-V) and that it’s enabled in the BIOS. Check with egrep -c '(vmx|svm)' /proc/cpuinfo.

RHEL vs CentOS: What’s Different?

While the installation steps are nearly identical, there are key differences. CentOS is free and has no support contract, while RHEL requires a subscription but offers official support. For RHEL, you must register with subscription-manager register and attach a subscription that includes the OpenStack platform. The RDO repositories for RHEL are hosted on the same servers, but you may need to enable the rhel-7-server-openstack-queens-rpms repository. CentOS users get the same packages without any registration. Also, RHEL updates are more conservative, while CentOS tracks them closely. For a production environment on RHEL, you should consider Red Hat OpenStack Platform (RHOSP), which is a more hardened and supported distribution, but it’s a separate product with its own installation method (director).

Alternatives to Packstack

Packstack is not the only way to install OpenStack. Depending on your needs, you might consider:

  • TripleO (OpenStack on OpenStack): The official Red Hat deployment tool, which uses OpenStack itself to deploy nodes. It’s more complex but more production-ready.
  • Kolla-Ansible: Deploys OpenStack using Docker containers and Ansible. It’s popular for its modularity and ease of upgrades.
  • DevStack: A script that creates a development environment for OpenStack. It’s not for production, but great for hacking on the code.
  • Manual installation: For learning purposes, you can install each service individually. This is time-consuming but gives you deep understanding.

Frequently Asked Questions

How long does a Packstack installation take?

On a modern server with good disk I/O, a single-node all-in-one installation typically takes 15 to 30 minutes. The time depends on your CPU speed, RAM, and whether you’re installing on SSDs or spinning disks. The process is mostly automated, so you can leave it running.

Can I install OpenStack on CentOS 8 or 9?

Yes, but the RDO project has shifted focus. For CentOS 8, you can use the centos-release-openstack-train or later. For CentOS 9 Stream, you’ll need the centos-release-openstack-yoga or newer. However, Packstack support for these versions is less reliable; consider Kolla-Ansible for newer releases.

What is the default admin password after installation?

Packstack generates a random password and stores it in the file ~/keystonerc_admin. You can view it with cat ~/keystonerc_admin. The file also contains the OS_AUTH_URL and other environment variables you need to source.

How do I add a compute node after the initial installation?

You can run Packstack again with an answer file that specifies the new compute node. Generate a new answer file with packstack --gen-answer-file=add-compute.txt, set CONFIG_COMPUTE_HOSTS to the new node’s IP, and run packstack --answer-file=add-compute.txt. This will install and configure Nova and Neutron on the new node.

Is Packstack safe for production?

Packstack is designed for proof-of-concept and testing. It configures services with default passwords and may not follow all security best practices. For production, Red Hat recommends using Red Hat OpenStack Platform (RHOSP) with director, or at least hardening the Packstack deployment by changing passwords, enabling TLS, and configuring proper network isolation.

Can I install OpenStack without internet access?

It’s difficult but possible. You’d need to download all RPM packages and their dependencies on a machine with internet, then create a local repository. The RDO documentation provides a guide for offline installation, but it’s complex. For most users, having internet access is a prerequisite.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →