OpenStack Architecture
OpenStack is currently being integrated into Funtoo Experimental.
This page exists to document OpenStack configuration.
Note that the current approach is to use devstack, which is not a good way to learn OpenStack. So much of this document will be about doing a devstack-like configuration for Funtoo.
This document will split OpenStack configuration into each architectural component, describing configuration steps for each component separately.
Contents |
SQL Database
A number of OpenStack services use a SQL back-end for storing various bits of data. Devstack (the official deployment script for OpenStack) uses MySQL as its deployment database, and creates a database for each service that needs to store data, and grants the root MySQL user full privilieges in the database:
sudo mysql -uroot -p$MYSQL_PASSWORD -h127.0.0.1 -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASSWORD';"
Using a single root user account for all services is not a good policy for production deployment. Ideally, each service should have its own restricted user account with only the ability to access its own database.
While DevStack uses MySQL for its SQL deployment, multiple database back-ends are actually supported thanks to SQLAlchemy being used behind the scenes, which is a re-targetable Python database API. Thus, it should be possible to use Postgres, etc, by simply using different connection strings. A list of SQLAlchemy connection types can be found on this SQLAlchemy documentation page.
Let's look at how each service is configured in regards to SQL:
glance
From glance.openstack.org:
The Glance project provides services for discovering, registering, and retrieving virtual machine images. Glance has a RESTful API that allows querying of VM image metadata as well as retrieval of the actual image.
Glance uses a MySQL database called glance.
SQL connection settings might be stored in a glance configuration file located at /opt/stack/glance/etc/glance-registry.conf. In the devstack installation process, /opt/stack/glance contains a git checkout of the glance software.
The SQL connection configuration string might look something like this:
sql_connection = mysql://glance:yourpassword@192.168.206.130/glance
More info on glance configuration is available here.
nova
Nova, the compute service, has its SQL connection specified in /etc/nova/nova.conf, using the --sql_connection=connection format. Connection string is identical to Glance, in SQLAlchemy format.
keystone
Keystone, the OpenStack identity service, also uses SQL. etc/keystone.conf keystone install/git repo directory is used to store the SQL configuration:
sql_connection = %SQL_CONN%
As everything else, the SQL connection string uses SQLAlchemy syntax.