Mailing List Archive

Creating multiple Trac projects
Hi,
First of all congratulations on a great project! I had a Trac database
up and running in a couple of days. Admittedly I had already
implemented a Subversion system, but other than that I am a web server
newbie.

Now I am trying to set up a multi project system for the company. What
I envision is allowing suitably authorised users to create projects via
a web page. When a project is created a subversion repository will be
set up and a trac database created and configured. The
TracMultipleProjects page of the wiki goes part of the way and I have
got that Apache config up and running. The bit I am struggling with now
is automatically setting up the Trac database. There is no
non-interactive way of doing an initenv. Once the environment is
initialised I can get the project ini file and edit that, but changing
user access privileges and other trac-admin config is a bit harder
(requiring direct access to the database I think. arrgh!).

Has anyone written any code that will set up priviledges based on
command line arguments or a file?

Another idea which should be quite easy to implement is to add more
power to the priviledges "add" and "remove" commands by allowing regexp
matching. Does SQLite support some sort of wild cards? If so you could
just pass that straight through.

It would be useful to be able to change all of the configuration using
command line arguments to trac-admin as this would enable easy scripting
for administration purposes.

If no one has done any of this I might just have to learn python and
dust of my severley limited SQL knowledge. ;-) Is the database schema
documented anywhere?

Thanks for your time...

Felix
Creating multiple Trac projects [ In reply to ]
I would like to do groups, but don't know how to do it (admittedly my
project is small, so I was lazy about looking at the documentation on how to
do it, if possible)

The way I set up permissions is to create a file, and copy and paste the
list of commands into the trac-admin session - so yes, it requires
interaction.

The approach I'd suggest is looking at the python code for trac-admin, and
coding something based around it.

That said, it seems to be possible to make trac-admin command-line calls in
UNIX - our current config is Windoze.

Cheers,

:D

--------------------------------------------------------------------
Daragh Fitzpatrick Daragh@UChicago.edu (773) 702-8976

Solutions Architect NSIT Administrative Systems
Renewal Projects and Architecture University of Chicago
--------------------------------------------------------------------
-----Original Message-----
From: trac-bounces@bobcat.edgewall.com
[mailto:trac-bounces@bobcat.edgewall.com] On Behalf Of Felix Collins
Sent: Wednesday, June 02, 2004 6:57 PM
To: trac@bobcat.edgewall.com
Subject: [Trac] Creating multiple Trac projects

Hi,
First of all congratulations on a great project! I had a Trac database up
and running in a couple of days. Admittedly I had already implemented a
Subversion system, but other than that I am a web server newbie.

Now I am trying to set up a multi project system for the company. What I
envision is allowing suitably authorised users to create projects via a web
page. When a project is created a subversion repository will be set up and
a trac database created and configured. The TracMultipleProjects page of the
wiki goes part of the way and I have got that Apache config up and running.
The bit I am struggling with now is automatically setting up the Trac
database. There is no non-interactive way of doing an initenv. Once the
environment is initialised I can get the project ini file and edit that, but
changing user access privileges and other trac-admin config is a bit harder
(requiring direct access to the database I think. arrgh!).

Has anyone written any code that will set up priviledges based on command
line arguments or a file?

Another idea which should be quite easy to implement is to add more power to
the priviledges "add" and "remove" commands by allowing regexp matching.
Does SQLite support some sort of wild cards? If so you could just pass that
straight through.

It would be useful to be able to change all of the configuration using
command line arguments to trac-admin as this would enable easy scripting
for administration purposes.

If no one has done any of this I might just have to learn python and dust of
my severley limited SQL knowledge. ;-) Is the database schema documented
anywhere?

Thanks for your time...

Felix
_______________________________________________
Trac mailing list
Trac@lists.edgewall.com
http://lists.edgewall.com/mailman/listinfo/trac
Creating multiple Trac projects [ In reply to ]
Daragh Fitzpatrick wrote:

> The way I set up permissions is to create a file, and copy and paste the
> list of commands into the trac-admin session - so yes, it requires
> interaction.

What about doing an "initenv"?

> The approach I'd suggest is looking at the python code for trac-admin, and
> coding something based around it.

Already had a look at the source. It doesn't look to hard so maybe I'll
have a hack at it.

> That said, it seems to be possible to make trac-admin command-line calls in
> UNIX - our current config is Windoze.

Woops, yep you can make command line calls. I guess all I need is for
initenv to take a command line arg. Maybe a file like in .ini format
that specifies all the stuff that it asks for.


Felix