[Crowbar] postgresql support
Ralf Haferkamp
rhafer at suse.de
Wed Mar 28 09:51:39 CDT 2012
Am Mittwoch 28 März 2012, 09:28:51 schrieb Gregory_Althaus at Dell.com:
> So, yes, this is where I want to head. The provider method is really
> good.
Good to see that I seem to be heading in the right direction :).
> I'd love a new database resource that takes the database barclamp name
> and type and uses that to wrap the common similar calls to the other
> databases. This way the database users just have the functions and
> don't care what they really get underneath.
Which barclamp should such a resource be part of? Does barclamp_openstack
make sense for that?
regards,
Ralf
> -----Original Message-----
> From: crowbar-bounces On Behalf Of Ralf Haferkamp
> Sent: Wednesday, March 28, 2012 9:12 AM
> To: crowbar
> Subject: [Crowbar] postgresql support
>
> Hi,
>
> I am currently trying to figure out ways for adding support to deploy
> openstack with PostgreSQL used as the database for keystone, glance
> etc. For that I created a basic PostgreSQL barclamp (based on the
> postgresql cookbook in https://github.com/opscode/cookbooks).
>
> However, I'd like to avoid bloating the barclamps that currently use
> the mysql_database chef-resource for e.g. creating databases (such as
> keystone, glance, nove and dashboard) with too many if
> node[:keystone][:sql_engine] == "postgresql"
> branches to call the new postgresql_database chef-resource I created.
>
> One way to achieve that seems to be to create a new resource say
> "openstack_database" that provides the needed actions (e.g. create_db,
> create_user) and create two separate providers for that resource
> (openstack_postgresqldb and openstack_mysqldb), which would just map
> to the specific resources from the mysql and postgresql cookbooks.
> That way it should be possible to make large parts of the current
> mysql specific code independent of the actually used database
> implementation by replacing the mysql_database invocations with calls
> to openstack_database (+ setting the "provider" attribute to the
> correct implementation). Does that make sense? Are there better ways
> to achieve this?
>
> regards,
> Ralf
More information about the Crowbar
mailing list