[katello-devel] Update to database.yml

Eric Helms ehelms at redhat.com
Tue Aug 30 13:53:49 UTC 2011


As an aside, git will allow you to ignore local changes to a tracked file:

git update-index --assume-unchanged <file>  

To undo,

git update-index --no-assume-unchanged <file>


-Eric

----- Original Message -----
From: "Partha Aji" <paji at redhat.com>
To: katello-devel at redhat.com
Sent: Monday, August 29, 2011 9:56:24 PM
Subject: [katello-devel] Update to database.yml


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




More information about the katello-devel mailing list