A collection of Bash scripts to automate the installation and initial configuration of an OpenStack Rocky environment on CentOS/RHEL-based systems. These scripts streamline prerequisites, network setup database provisioning, and Packstack-based deployment for a quick, repeatable OpenStack installation.
- Features
- Prerequisites
- Repository Structure
- Quick Start
- Detailed Installation Steps
- Post-Deployment
- Troubleshooting
- Contributing
- License
- Chrony time synchronization
- SELinux disabled and firewall/network manager turned off
- Custom network bridge set up via
br-ex - MariaDB installation and secure configuration
- Memcached installation for OpenStack services
- Packstack answer file generation and automated deployment
- One-command “all.sh” orchestrator for end-to-end setup
- A CentOS/RHEL 7 or 8 server with at least:
- 4 GB RAM (8 GB+ recommended)
- 2 CPU cores
- Two network interfaces (e.g.,
ens33,ens34) - 20 GB disk available
- Root or sudo privileges
- Access to the Internet for package repositories
openstack/
├── all.sh # Master orchestrator
├── pre-install.sh # Installs dependencies, Chrony, repos, disables SELinux & firewall
├── ipconfigs.sh # Prompts for IPs and generates bridge/network scripts
├── mysql.sh # Installs and secures MariaDB for OpenStack
├── memcached.sh # Installs and configures Memcached (see file)
├── all-script.txt # Alternate master script variant
├── IP-s.txt # Sample IP mapping for interfaces
└── README.md # Project documentation (this file)
- Clone the repository:
git clone https://github.com/volomi/openstack.git
cd openstack
chmod +x *.sh- Run the orchestrator:
sudo ./all.sh- Follow prompts for network IPs, gateway, DNS, and secure database password.
- After Packstack completes, source the admin credentials:
source /root/keystonerc_adminScript: pre-install.sh
- Installs Chrony time service and configures it to sync with the management interface.
- Enables the OpenStack Rocky repository and updates the system.
- Installs
python-openstackclientandopenstack-selinux. - Disables SELinux enforcement, FirewallD, and NetworkManager.
Script: ipconfigs.sh
- Prompts for:
- Management interface IP (
ens33) - External interface IP (
ens34) - Gateway
- DNS
- Management interface IP (
- Generates:
ifcfg-br-ex(external bridge)ifcfg-ens33,ifcfg-ens34- Updates
/etc/sysctl.conffor IPv4 forwarding
Script: mysql.sh
- Installs
mariadb,mariadb-server, and Python PyMySQL driver. - Enables and starts MariaDB service.
- Runs
mysql_secure_installationfor root password, remote root access, and sample database cleanup. - Creates
/etc/my.cnf.d/openstack.cnfwith recommended InnoDB settings.
Script: memcached.sh
- Installs and configures Memcached for Keystone token caching.
- Binds Memcached to the management interface for security.
- Enables and starts the service.
- Installs the
openstack-packstackpackage. - Generates an answer file:
sudo packstack --gen-answer-file /root/answers.txt- Edit
/root/answers.txtto customize parameters (network, passwords, services). - Run Packstack with the answer file:
sudo packstack --answer-file /root/answers.txt- On completion, source the admin credentials:
source /root/keystonerc_admin- Verify services:
openstack service list
openstack network list- Access Horizon dashboard at
http://<controller-ip>/dashboardusingadmincredentials.
- Chrony unsynchronized: Check
/var/log/chrony/chrony.logand verify interface IP in/etc/chrony.conf. - Packstack errors: Review
/var/log/packstack/packstack*.logfor detailed failure information. - Database connection refused: Ensure MariaDB is listening on the management network and firewall is disabled.
- Fork this repository.
- Create a feature branch:
git checkout -b feature/your-feature. - Commit changes with descriptive messages.
- Submit a pull request detailing improvements.
This project is licensed under the Apache 2.0 License. See LICENSE for details.
⁂