Installing and Configuring OpenStack (Juno) in Oracle® Solaris

Exit Print View

Updated: June 2016
 
 

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 multinode 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. Enable the RabbitMQ services.
    controller# svcadm enable rabbitmq
    controller# svcadm restart rad:local
  2. (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
  3. Enable the MySQL service.
    controller# svcadm enable mysql
  4. Set the MySQL server root password.
    controller# mysqladmin -u root password MySQL-root-password
  5. 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 default character set utf8 default collate utf8_general_ci;
    mysql> grant all privileges on cinder.* to 'cinder'@'$CONTROLLER_ADMIN_NODE' identified by 'service-password';
    mysql> create database glance default character set utf8 default collate utf8_general_ci;
    mysql> grant all privileges on glance.* to 'glance'@'$CONTROLLER_ADMIN_NODE' identified by 'service-password';
    mysql> create database keystone default character set utf8 default collate utf8_general_ci;
    mysql> grant all privileges on keystone.* to 'keystone'@'$CONTROLLER_ADMIN_NODE' identified by 'service-password';
    mysql> create database nova default character set utf8 default collate utf8_general_ci;
    mysql> grant all privileges on nova.* to 'nova'@'$CONTROLLER_ADMIN_NODE' identified by 'service-password';
    mysql> create database neutron default character set utf8 default collate utf8_general_ci;
    mysql> grant all privileges on neutron.* to 'neutron'@'$CONTROLLER_ADMIN_NODE' identified by 'service-password';
    mysql> create database heat default character set utf8 default collate utf8_general_ci;
    mysql> grant all privileges on heat.* to 'heat'@'$CONTROLLER_ADMIN_NODE' identified by 'service-password';
    mysql> flush privileges;
    mysql> quit