(Created page with "{{QA/Test_Case |description=A brief description of the functionality being tested. |setup=Optionally include information on preparing the test environment |actions= Be as specifi...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{QA/Test_Case | {{QA/Test_Case | ||
|description= | |description=Rather than using the default sqlite DB, you can use MySQL. | ||
|setup= | |setup= | ||
First install and enable MySQL: | |||
$> sudo yum install -y mysql-server | |||
$> sudo service mysqld start | |||
$> sudo chkconfig mysqld on | |||
|results= | |||
Set a password for the root account and delete the anonymous accounts: | |||
$> mysql -u root | |||
mysql> update mysql.user set password = password('iamroot') where user = 'root'; | |||
mysql> <nowiki>delete from mysql.user where user = ''</nowiki>; | |||
Create a database and user account specifically for nova: | |||
mysql> create database nova; | |||
mysql> create user 'nova'@'localhost' identified by 'nova'; | |||
mysql> create user 'nova'@'%' identified by 'nova'; | |||
mysql> grant all on nova.* to 'nova'@'%'; | |||
(Note nova@localhost is required even though the anonymous accounts have been deleted?) | |||
Then configure nova to use the DB: | |||
$> <nowiki>echo '--sql_connection=mysql://nova:nova@localhost/nova' | sudo tee -a /etc/nova/nova.conf</nowiki> | |||
|actions=Instruct nova to use the DB: | |||
$> sudo nova-manage db sync | |||
|results=Query the database using: | |||
$> mysql -u nova -pnova nova | |||
mysql> select * from migrate_version; | |||
Ensure a record with $repository_id = 'nova' is returned | |||
}} | }} | ||
[[Category:OpenStack Test Cases]] | [[Category:OpenStack Test Cases]] | ||
[[Category:Cloud SIG]] | [[Category:Cloud SIG]] |
Revision as of 10:20, 19 October 2011
Description
Rather than using the default sqlite DB, you can use MySQL.
Setup
First install and enable MySQL:
$> sudo yum install -y mysql-server $> sudo service mysqld start $> sudo chkconfig mysqld on
Set a password for the root account and delete the anonymous accounts:
$> mysql -u root mysql> update mysql.user set password = password('iamroot') where user = 'root'; mysql> delete from mysql.user where user = '';
Create a database and user account specifically for nova:
mysql> create database nova; mysql> create user 'nova'@'localhost' identified by 'nova'; mysql> create user 'nova'@'%' identified by 'nova'; mysql> grant all on nova.* to 'nova'@'%';
(Note nova@localhost is required even though the anonymous accounts have been deleted?)
Then configure nova to use the DB:
$> echo '--sql_connection=mysql://nova:nova@localhost/nova' | sudo tee -a /etc/nova/nova.conf
How to test
Instruct nova to use the DB:
$> sudo nova-manage db sync
Expected Results
Query the database using:
$> mysql -u nova -pnova nova mysql> select * from migrate_version;
Ensure a record with $repository_id = 'nova' is returned