← Back to team overview

dhis2-devs team mailing list archive

Re: New installer available: Testers wanted

 

2010/3/4 Lars Helge Øverland <larshelge@xxxxxxxxx>:
>
> Hi,
> I think Bob hits the needle on the head here.
Ouch.  That can be painful ..

>We can provide a generic hook
> into the Live app by making it look for a set of scripts during certain
> phases. E.g. database_start.bat at startup time, database_stop.bat at
> shutdown, and more. In these scripts we start the database or what we
> prefer.
> I am in favour of the binary/non-installer postgres approach. Simple is
> good. Being independent of admin rights and existing installations weighs
> more than pgadmin (which can be installed separately) in my opinion.
> Work flow for the Live package could be simple: When clicked it starts
> postgres, then jetty/dhis2. At system tray "exit" it stops jetty/dhis2, then
> postgres.
> If I read Jason correctly the database part of this is doable. I suggest we
> go for this. Objections?

I think it is all doable.  There are a few synchronisation type issues
to consider which would be beyond my windoze scripting ability.
Specifically we need to
(i) make sure we don't start postgres if its already started; and
(ii) don't start jetty till we know postgres has started - I guess
this can be a little more fine grained.  We can start jetty in
parallel but not start the dhis context till we know we have database
(this will save a second or two).  I guess a rough solution might be
to fire off the startup scripts then start pinging for database from
the tray app, though this would have to be done through hibernate to
keep database dependencies at bay.  A better solution is for the shell
script to poll for a connection using pg_xxx.  After it gets it, it
can release the connection and exit.  The java in the dhis2-live picks
up on when the exec finishes through java.lang.Process before going
about its business.  I guess we should also capture stdout and stderr
for logging and/or UI display.

For all of the above you can also substitute mysql for postgres.

Is anybody volunteering to have a go at writing the above with pg
and/or mysql commands?

If we have some strong scripts I can help with dhis-live integration
and execution control.

Cheers
Bob

> Lars
> PS using Live for modifying hibernate.properties (and thus a low-key
> change-of-database as required in SA) and update war file are great ideas,
> lets start a new thread for these.
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>



References