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, a MySQL database is recommended for storing this information.

How to Install a MySQL Database

  1. Determine the primary name associated with the Controller node.

    Use the primary IP address of the Controller node to determine the primary name associated with that node.

    controller# getent hosts controller-IP
    controller-IP controller-name
  2. Install the MySQL server package.
    controller# pkg install mysql-55
  3. Install the MySQL client package.
    controller# pkg install mysql-55/client
  4. Enable the MySQL server SMF service.
    controller# svcadm enable mysql:version_55
  5. Set the MySQL server root password.
    controller# mysqladmin –u root password MySQL-root-password
  6. Configure the MySQL server.

    Create the tables that will be used by OpenStack. Grant privileges to the services on the Controller node in order to provide exclusive access to these databases. Use the controller-name that was output by the previous getent hosts command.

    controller# mysql –u root –p
    Enter password: MySQL-root-password
    mysql> create database cinder;
    mysql> grant all privileges on cinder.* \
    -> to 'cinder'@'controller-name' \
    -> identified by 'cinder';
    mysql> create database glance;
    mysql> grant all privileges on glance.* \
    -> to 'glance'@’controller-name’ \
    -> identified by 'glance';
    mysql> create database keystone;
    mysql> grant all privileges on keystone.* \
    -> to 'keystone'@’controller-name’ \
    -> identified by 'keystone';
    mysql> create database nova;
    mysql> grant all privileges on nova.* \
    -> to 'nova'@’controller-name’ \
    -> identified by 'nova';
    mysql> flush privileges;
    mysql> quit
  7. Install the MySQL Python client library package.
    controller# pkg install python-mysql