[katello-devel] Update to database.yml

Garik Khachikyan gkhachik at redhat.com
Tue Aug 30 08:04:00 UTC 2011


On 08/30/2011 03:56 AM, 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
>
>
> Partha
>
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
Partha,

I heard that that there is only *one* mode: production that will be used.

But even not considering this: I could not get why the db settings need 
to be shifted to the katello.yml ?
(only for convenience of devel-s?)

Garik.




More information about the katello-devel mailing list