Version 16 (modified by anirban, 8 years ago)


Setting up ORCA database environment

Create the database

0. Install and start mysql server. For example, on a Debian/Ubuntu Linux system:

bash:~$ sudo apt-get install mysql-server
bash:~$ sudo /etc/init.d/mysql stop
bash:~$ sudo /etc/init.d/mysql start

1. Create user 'orca' in mysql and grant it all privileges on database 'orca':

$ mysql -u root
mysql> grant all privileges on orca.* to orca;
mysql> grant all privileges on orca.* to orca@localhost;
mysql> flush privileges;

2. Create a database called 'orca'

mysql> create database orca;

3. Populate the database with initial state (full.schema.sql and Either download these files from these links, or if you have downloaded full ORCA source, you can get it there (assuming $ORCA_SRC points to the root of downloaded ORCA source tree). The order in which they are loaded into MySQL is important:

$ mysql -u orca < $ORCA_SRC/core/schema/mysql/full.schema.sql
$ mysql -u orca < $ORCA_SRC/core/schema/mysql/

4. NOTE: Make sure that the following property is set in your mysqld daemon's config file, generally in /etc/mysql/my.cnf or /etc/mysqld/my.cnf or /etc/my.cnf under [mysqld] . If not, set it and restart mysql server.


Adding inventory

For older versions of ORCA substrate inventory was stored in the database, instead of the RDF store. These steps describe how to add inventory to the database. Note that these are not needed for Bella 2.2 and higher versions.

1. Optionally add inventory (e.g., for emulation demo in Bella 2.0 and before)

$ mysql -u orca < $ORCA_SRC/core/schema/mysql/demo.inventory.sql

2. Optional Alternative demo inventory (e.g. for emulation demo in Bella 2.1 and before): use with care. Instead of step 4, load this file instead:

$ mysql -u orca < $ORCA_SRC/tools/cmdline/renci/demo2.inventory.sql