Look back at our Pushing Keystone over the Edge presentation from the OpenStack Summit. Many of the points we make are problems faced by any application trying to scale across multiple datacenters. Cassandra is a database designed to deal with this level of scale. So Cassandra may well be a better choice than MySQL or other RDBMS as a datastore to Keystone. What would it take to enable Cassandra support for Keystone?
Continue readingCategory Archives: Database
Running Cassandra on Fedora 32
This is not a tutorial. These are my running notes from getting Cassandra to run on Fedora 32. The debugging steps are interesting in their own right. I’ll provide a summary at the end for any sane enough not to read through the rest.
Introduction to Ironic
“I can do any thing. I can’t do everything.”
The sheer number of projects and problem domains covered by OpenStack was overwhelming. I never learned several of the other projects under the big tent. One project that is getting relevant to my day job is Ironic, the bare metal provisioning service. Here are my notes from spelunking the code.
Continue readingLet’s Buildah Keystoneconfig
Buildah is a valuable tool in the container ecosystem. As an effort to get more familiar with it, and to finally get my hand-rolled version of Keystone to deploy on Kubernetes, I decided to work through building a couple of Keystone based containers with Buildah.
Continue readingFrom WebUI to CLI: MariaDB in OpenShift
Web base user interfaces are great at walking a user through tasks they do not know how to perform yet. In my case, I want to launch a MariaDB instance on OpenShift. Eventually, I want to do this from the command line. Here are my steps.
Connecting to MariaDB with a network configuration Docker
Since the “link” directive has been deprecated, I was wondering how to connect to a mariadb instance on a non-default network when both the database and the monitor are running is separate networks. Here is what I got:
Continue reading
Deploying Keystone via Puppet on F19
For Puppet on Fedora, we have Packstack and The Foreman. But if you are doing development, you need to know what is going on at the nuts and bolts level. I need to do some work on the Puppet modules for Keystone. This is a developers setup, running out of git repositories.
Continue reading
Kerberizing PostgreSQL with FreeIPA for Keystone
There are many factors to weight when choosing which relational database management system (RDBMS) to deploy for a given application. One reason I have been working with PostgreSQL for Keystone is that it support Kerberos Authentication.
Using Puppet to setup PostgreSQL for Keystone on Fedora
Using Puppet to manage software configuration makes sense. Setting up PostgreSQL support for Keystone development and testing has been my excuse to learn it.
sudo yum install puppet sudo puppet module install puppetlabs/postgresql
Then create a file /etc/puppet/site.pp
Put this line in it:
class { 'postgresql::server': } postgresql::db{ 'keystone': user => 'keystone', password => 'keystone', grant => 'all', }
sudo puppet apply --verbose /etc/puppet/site.pp
Confirm that postgresql is running:
systemctl status postgresql.service
Should get you
postgresql.service - PostgreSQL database server Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled) Active: active (running) since Thu, 03 Jan 2013 13:26:46 -0500; 43min ago Process: 17529 ExecStop=/usr/bin/pg_ctl stop -D ${PGDATA} -s -m fast (code=exited, status=0/SUCCESS) Process: 17553 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS) Process: 17545 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS) Main PID: 17556 (postgres) CGroup: name=systemd:/system/postgresql.service ├ 17556 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432 ├ 17557 postgres: logger process ├ 17559 postgres: writer process ├ 17560 postgres: wal writer process ├ 17561 postgres: autovacuum launcher process └ 17562 postgres: stats collector process
Test we can connect to the PostgreSQL command line tool:
psql -h localhost -U keystone keystone Password for user keystone: psql (9.1.7) Type "help" for help. keystone=> \d
To run the Keystone unit test test against the database, alter the file /opt/stack/keystone/tests/backend_sql.conf. Comment out the sqlite connection line, and uncomment the postgresql line.
[sql] #connection = sqlite:// #To Test MySQL: #connection = mysql://root:keystone@localhost/keystone?charset=utf8 #To Test PostgreSQL: connection = postgresql://keystone:keystone@localhost/keystone?client_encoding=utf8 idle_timeout = 200
Then you can run the unit tests with
./run_tests.sh -N test_sql_upgrade
If the tests fail (and they will), they will leave the database in an unusable state. You can drop the database and recreate with puppet:
sudo su postgres -c "dropdb keystone" sudo puppet apply --verbose /etc/puppet/site.pp
Speeding up SQLite based unit tests
If you write database driven applications, you probably have used SQLite at some point. Since it is a simple embedded database, it is a logical choice to use for unit tests that go to the database. However, SQLite performance on Ext4 (default Fedora File system) is lack-luster.
A cheap way to speed things up is to use a ramdisk as the backing store for the database.
Continue reading