Installing and Configuring OpenStack in Oracle® Solaris 11.2

Exit Print View

Updated: April 2015
 
 

Installing MySQL

Many OpenStack services maintain a database to keep track of critical resources, usage, and other information. By default, individual SQLite databases are specified for this purpose and are useful for the single-node configuration. For multi-node configurations, particularly in a production environment, other databases, such as MySQL database, are recommended for storing this information.

Communication between OpenStack services is performed over Advanced Message Queuing Protocol (AMQP). In Oracle Solaris, AMQP is implemented by RabbitMQ. RabbitMQ is a required service. Generally, a single node in the cloud is configured to run RabbitMQ. In this architecture, RabbitMQ is configured to run on the controller node.

How to Install a MySQL Database

  1. Install the MySQL server and packages.
    controller# pkg install mysql-55 mysql-55/client python-mysql \
    rabbitmq markupsafe rad-evs-controller
  2. Enable the RabbitMQ services.
    controller# svcadm enable rabbitmq
    controller# svcadm restart rad:local
  3. (Optional) If you are using a dedicated IP address for administration and API traffic, add that address in /etc/mysql/5.5/my.cnf:
    bind-address=$CONTROLLER_ADMIN_NODE_IP
  4. Enable the MySQL service.
    controller# svcadm enable mysql
  5. Set the MySQL server root password.
    controller# mysqladmin -u root password MySQL-root-password
  6. Configure MySQL.

    Create the tables that will be used by OpenStack. Grant privileges to the services on the controller node to provide exclusive access to these databases.

    controller# mysql -u root -p
    Enter password: MySQL-root-password
    mysql> drop database if exists nova;
    mysql> drop database if exists cinder;
    mysql> drop database if exists glance;
    mysql> drop database if exists keystone;
    mysql> drop database if exists neutron;
    mysql> drop database if exists heat;
    mysql> create database cinder;
    mysql> default character set utf8
    mysql> default collate utf8_general_ci;
    mysql> grant all privileges on cinder.* to 'cinder'@'$CONTROLLER_ADMIN_NODE' \
    identified by 'service-password';
    mysql> grant all privileges on cinder.* to 'cinder'@'$VOLUME_IP' \
    identified by 'service-password';
    mysql> create database glance;
    mysql> default character set utf8
    mysql> default collate utf8_general_ci;
    mysql> grant all privileges on glance.* to 'glance'@'$CONTROLLER_ADMIN_NODE' \
    identified by 'service-password';
    mysql> create database keystone;
    mysql> default character set utf8
    mysql> default collate utf8_general_ci;
    mysql> grant all privileges on keystone.* to 'keystone'@'$CONTROLLER_ADMIN_NODE' \
    identified by 'service-password';
    mysql> create database nova;
    mysql> default character set utf8
    mysql> default collate utf8_general_ci;
    mysql> grant all privileges on nova.* to 'nova'@'$CONTROLLER_ADMIN_NODE' \
    identified by 'service-password';
    mysql> create database neutron;
    mysql> default character set utf8
    mysql> default collate utf8_general_ci;
    mysql> grant all privileges on neutron.* to 'neutron'@'$CONTROLLER_ADMIN_NODE' \
    identified by 'service-password';
    mysql> create database heat
    mysql> default character set utf8
    mysql> default collate utf8_general_ci;
    mysql> grant all privileges on heat.* to 'heat'@'$CONTROLLER_ADMIN_NODE' \
    mysql> identified by 'service-password';
    mysql> flush privileges;
    mysql> quit