Installing OpenStack
Install RabbitMQ Server
RabbitMQ is an Advanced Message Queuing Protocol (AMQP) system that allows guaranteed delivery and ordering of messages in large distributed systems. OpenStack uses the RabbitMQ messaging service as its default queuing system.
sudo apt-get install rabbitmq-server
Change the default password for the default user.
sudo rabbitmqctl change_password guest <NEW_PASSWORD>
Confirm that RabbitMQ server is up and running.
sudo rabbitmqctl status
Install MySQL Database
MySQL database will be used for backend and status data storage.
sudo apt-get install mysql-server
This script helps you secure your MySQL installation by setting a root password and making other security-related changes.
sudo mysql_secure_installation
Change the root password for MySQL database manually by first opening MySQL shell.
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yournewpassword';
FLUSH PRIVILEGES;
EXIT;
To ensure that the new root password works, you can try logging in with it.
mysql -u root -p
Install Keystone Identity Service
Keystone provides identity service for OpenStack, managing all identities (users, roles, projects, etc.) across OpenStack framework.
sudo apt install keystone
Log into MySQL.
mysql -u root -p
Create Keystone database and user.
CREATE DATABASE keystone;
CREATE USER 'keystone'@'localhost' IDENTIFIED BY 'KEYSTONE_DBPASS';
CREATE USER 'keystone'@'%' IDENTIFIED BY 'KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%';
FLUSH PRIVILEGES;
EXIT;
Make sure you have the MySQL client and Python driver installed on your OpenStack controller node.
****sudo apt-get install mysql-client python3-mysqldb
Configure Keystone to Use MySQL
Edit the Keystone configuration file (keystone.conf
). The file is usually located at /etc/keystone/keystone.conf
.
Find and set the [database]
connection string to point to your MySQL database. Add or modify the following line.
[database]
connection = mysql://keystone:KEYSTONE_DBPASS@localhost:3306/keystone
Run the database synchronization command to initialize the Keystone database schema.
sudo keystone-manage db_sync