[kforge-dev] auto update and deploy of KForge for testing purposes now running

Rufus Pollock rufus.pollock at okfn.org
Thu Apr 20 09:34:08 UTC 2006

Over the weekend I created a test installation of KForge that updates 
nightly to the latest code in trunk, rebuilds, deploys, run tests and 
restarts the web server. After a bit of tweaking over the last few days 
(primarily to do with permissions on the host machine) it now seems to 
be fully functional. The install is available at:


Since it is a test install running unstable code and requiring the web 
server to be stopped and started (so that database can be rebuilt) it is 
**not** running on the production server but on a 'domestic' machine.

Details of the script are below for anyone else who is interested.

Finally I am happy to note that all tests were passing direct out of svn 
(though today in core tests i was getting logging errors of the form: 
kforge [ERROR] There was an error importing plugin package 
'kforge.core.plugin.example': No module named example.)




After a bit of tweaking of kforge-integrationtest-loader I was able to 
reuse this for the deploy script unchanged except for a few changes in 

if __name__ == '__main__':
     basePath = '/home/kforge/test.kforgeproject.com'
     instancePath = os.path.join(basePath, 'instance')
     domainName = 'test.kforgeproject.com'
     argv = ['<name-of-this-script>', '--base', basePath,
             '--domain-name', domainName ]

     # we need to stop the web server or we won't be able to delete the db
     os.system('sudo /etc/init.d/apache2 stop')
     cmd = 'sudo /bin/chown -R kforge:kforge %s' %  instancePath
     if os.system(cmd):
         _print('Command [%s] failed' % cmd, True)
     status = main(argv)
     cmd = 'sudo /bin/chown -R www-data:www-data %s' % instancePath
     if os.system(cmd):
         _print('Command [%s] failed' % cmd, True)
     os.system('sudo /etc/init.d/apache2 restart')
     if status:

More information about the kforge-dev mailing list