[katello-devel] Update to database.yml

Partha Aji paji at redhat.com
Tue Aug 30 15:38:55 UTC 2011



----- Original Message -----
> From: "Justin Sherrill" <jsherril at redhat.com>
> To: katello-devel at redhat.com
> Sent: Tuesday, August 30, 2011 11:34:05 AM
> Subject: Re: [katello-devel] Update to database.yml
> On 08/29/2011 09:56 PM, Partha Aji wrote:
> > As of
> > http://git.fedorahosted.org/git/?p=katello.git;a=commit;h=0ca987ef4b86c2143552ca1584e96013bfbdf8ea
> > I added the ability for one to specify the db configuration in
> > /etc/katello/katello.yml instead of database.yml. So you can for
> > example add
> >
> > test:
> >    database:
> >      adapter: postgresql
> >      username: katello
> >      password: katello
> >      database: katello-test
> >      host: localhost
> >      encoding: UTF8
> >
> > and ensure that the test database is postgres while your development
> > database is sqlite. I did this so that I didn't have to accidentally
> > check-in my database.yml to git while testing bugs related to
> > postgres. Similarly in the case we want our continuous build system
> > to use postgres in the future to get a more realistic check, we
> > would not be able to do so by relying on the database.yml in katello
> > git since that points to sqlite. So this solution will remedy that
> > issue.
> >
> > Unfortunately that means the database.yml that user will get in
> > their rpm will look very odd
> > (http://git.fedorahosted.org/git/?p=katello.git;a=blob;f=src/config/database.yml;h=f64adfd3218b8fccfa46ad4d627ede3396108812;hb=0ca987ef4b86c2143552ca1584e96013bfbdf8ea).
> > We have the following 2 options
> >
> > 1) Make the users use /etc/katello/katello.yml to specify the db
> > configuration. In which case we should update the document in the
> > wiki and add a sample db configuration comment in katello.yml.
> > 2) Have a different/cleaner version of the database.yml shipped with
> > the rpm.
> >
> > Any other suggestions ?. I tried to find the logic that says "if
> > /etc/katello/database.yml exists use that" but couldn't so had to
> > end up with this ugly version of database.yml
> >
> I like putting it in katello.yml, but why don't we move database.yml
> back to /usr/share//katello/config since it is no longer a user
> editable file?
> 
> 
> -Justin

This is a nice idea.. So we can just have one config file for everything including database connection information :). So database.yml will no longer show up in /etc/katello. A default config will be specified in /etc/katello/katello.yml and users are free to change it.
This will be the easiest fix from the present :)

Partha




More information about the katello-devel mailing list