Hey all--
I can't post a patch for various reasons beyond my control (sigh...), but updating plague to use a mysql backend was trivial. (Not that I don't like postgresql -- mysql is just easier for me in this environment.)
1) yum install MySQL-python 2) edit /usr/share/plague/server/DBManager.py: * copy the pgdbEngineClass definition verbatim, renaming it to 'mysqlEngineClass' * the correct type for mysql in get_uid_field_type is - "int(11) NOT NULL auto_increment PRIMARY KEY" * connect parameters are slightly different in _connect(): - host=host, db=database, user=user, passwd=password * add the new class to the db_engines array * add a try statement to importing the MySQLdb class 3) update your plague-server.cfg with a "[mysql Engine]" section
And, of course, create your mysql db somewhere, etc, etc.
Hope that helps someone! :)
-Chris
On Oct 21, 2005, at 9:30 AM, Chris Weyl wrote:
Hey all--
I can't post a patch for various reasons beyond my control (sigh...), but updating plague to use a mysql backend was trivial. (Not that I don't like postgresql -- mysql is just easier for me in this environment.)
- yum install MySQL-python
- edit /usr/share/plague/server/DBManager.py:
- copy the pgdbEngineClass definition verbatim, renaming it to
'mysqlEngineClass'
- the correct type for mysql in get_uid_field_type is
- "int(11) NOT NULL auto_increment PRIMARY KEY"
- connect parameters are slightly different in _connect():
- host=host, db=database, user=user, passwd=password
- add the new class to the db_engines array
- add a try statement to importing the MySQLdb class
- update your plague-server.cfg with a "[mysql Engine]" section
And, of course, create your mysql db somewhere, etc, etc.
Hope that helps someone! :)
-Chris
Hey Chris, thanks, that is helpful for me as well. Any reason I can't submit a patch doing the above? :)
-Jeff
On 10/21/05, Jeff Sheltren sheltren@cs.ucsb.edu wrote:
Hey Chris, thanks, that is helpful for me as well. Any reason I can't submit a patch doing the above? :)
Not that I know of. Have at it! ;)
-Chris
On Oct 21, 2005, at 1:28 PM, Chris Weyl wrote:
On 10/21/05, Jeff Sheltren sheltren@cs.ucsb.edu wrote:
Hey Chris, thanks, that is helpful for me as well. Any reason I can't submit a patch doing the above? :)
Not that I know of. Have at it! ;)
-Chris
I'm attaching a patch to allow plague-server to use MySQL (by following Chris' instructions). I'm still working on getting my buildsys working, so I haven't tested this out with building packages, but I can say that at least the tables get created when the server first starts.
It'd be nice if this could get added to CVS :)
-Jeff
On Sun, 2005-10-23 at 15:45 -0400, Jeff Sheltren wrote:
On Oct 21, 2005, at 1:28 PM, Chris Weyl wrote:
On 10/21/05, Jeff Sheltren sheltren@cs.ucsb.edu wrote:
Hey Chris, thanks, that is helpful for me as well. Any reason I can't submit a patch doing the above? :)
Not that I know of. Have at it! ;)
-Chris
I'm attaching a patch to allow plague-server to use MySQL (by following Chris' instructions). I'm still working on getting my buildsys working, so I haven't tested this out with building packages, but I can say that at least the tables get created when the server first starts.
It'd be nice if this could get added to CVS :)
Committed, thanks!
Dan
On Oct 24, 2005, at 11:32 AM, Dan Williams wrote:
On Sun, 2005-10-23 at 15:45 -0400, Jeff Sheltren wrote:
I'm attaching a patch to allow plague-server to use MySQL (by following Chris' instructions). I'm still working on getting my buildsys working, so I haven't tested this out with building packages, but I can say that at least the tables get created when the server first starts.
It'd be nice if this could get added to CVS :)
Committed, thanks!
Dan
Cool, thanks. I was just looking and noticed that the user information is always stored in sqlite no matter what backend is used for the job information. I think it would be nice to have everything stored in the same place no matter what DB backend is chosen. If I can figure out a way to get User.py to use DBManager, would you consider importing that into CVS, or is there a reason that sqlite is used exclusively?
Thanks, Jeff
On Mon, 2005-10-24 at 11:42 -0400, Jeff Sheltren wrote:
On Oct 24, 2005, at 11:32 AM, Dan Williams wrote:
On Sun, 2005-10-23 at 15:45 -0400, Jeff Sheltren wrote:
I'm attaching a patch to allow plague-server to use MySQL (by following Chris' instructions). I'm still working on getting my buildsys working, so I haven't tested this out with building packages, but I can say that at least the tables get created when the server first starts.
It'd be nice if this could get added to CVS :)
Committed, thanks!
Dan
Cool, thanks. I was just looking and noticed that the user information is always stored in sqlite no matter what backend is used for the job information. I think it would be nice to have everything stored in the same place no matter what DB backend is chosen. If I can figure out a way to get User.py to use DBManager, would you consider importing that into CVS, or is there a reason that sqlite is used exclusively?
Not really, just the fact that having users be in sqlite isn't a problem since nobody really writes to the userdb that often. That's not the case with the job database. But we should most likely use the same DB for everything. So if you've got a patch, I'll take it. It should be fairly straightforward since we don't need any of the Unique ID crap (email addresses are the index key here).
Dan
buildsys@lists.fedoraproject.org