← Back to team overview

dhis2-devs team mailing list archive

Re: DHIS2 live installer

 

On Wed, Feb 10, 2010 at 5:45 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:

> On 10 February 2010 15:53, Jason Pickering <jason.p.pickering@xxxxxxxxx>
> wrote:
> > I have made some more changes to the installer, and it now seems to
> > work pretty OK.
> >
> > Basically, you will need to populate some different directories with
> > prerequisites.
> >
> > 1) Put everything you need for postgres in the postgres directory.This
> > usually involves unzipping that installer on the Postgres website.
> > 2) Put an offline version of Java (to be sure you have a recent
> > version) in the /java directory. Be sure that the file name matches
> > that in the install.xml file
>
> You can't really do this.  Stupid sun java licence requires click
> through install.  The dhis2-live.exe wrapper will check for correct
> installed java version and suggest download if necessary.  Not the
> best but best I could do.
>

We could of course go through the pain of seeing if DHIS2 would run on
something non-Sun. But you must be allowed to trigger the click-thru, and
not require a download, right? Don't some Linux distros come with Java these
days?

K


>
> > 3) Put the dhis2_user_manual_en.pdf from the documentation branch into
> > the /docs directory
> > 4) Change the hibernate.properties file to set your needs.
> > 5) Compile with the IZPack compiler.
> >
> > There were numerous problem encountered trying to install this on
> > Windows Vista. XP was a breeze.  You must run the application with
> > elevated privileges.
> > http://wiki.evolvis.org/mvn-pkg-plugin/index.php/IzPack_on_Windows_Vista
> > has some discussion on this. I guess this needs to be worked out.
> > Strangely, when it was installed with elevated privileges, the user no
> > longer had permissions to write to the directories, so DHIS2 just
> > hung. I had to provide the user permissions.  You must also authorize
> > the port used by Java. Also, the restoration of the database was
> > manual. This could be easily automated with a batch script. I think
> > Knut has already done this with the BitRock installer.  There are
> > still several steps required for user intervention, which usually
> > spells disaster. But for a supervised installation (as will be the
> > case here) I think this installer pretty much suits our needs. The all
> > important shortcut is there. Perhaps it will be useful to others.
> >
> > Knut has also provided the BitRock installer he did a while ago, and I
> > will take a look at this one and commit to Launchpad as well. It
> > sounds like it may be a good alternative as well.
> >
> > Next step (but not urgent) is to automate the builds with Maven. Seems
> > possible, but if there is a Maven guru out there with not enough work
> > to do, I gotta job for ya.
> >
> > Ciao,
> > Jason
> >
> >
> > 2010/2/10 Jason Pickering <jason.p.pickering@xxxxxxxxx>:
> >> Oh, I forgot to add, I am going to try with a full postgres install,
> >> instead of H2. This is going to cause problems otherswise in the long
> >> run. Better to try and get it right the first time around.
> >>
> >> 2010/2/10 Jason Pickering <jason.p.pickering@xxxxxxxxx>:
> >>> I am certainly no maven guru either, but am much more comfortable with
> >>> XML,and since we are already using Maven, it seems to make sense, and
> >>> perhaps it is really not too difficult, as seen here..
> >>>
> >>> http://www.jroller.com/vschiavoni/entry/how_to_izpack_installer_with
> >>>
> >>> In the latest revision, done just right now, I can install the VC++
> >>> redistributable, and Postgresql msi. I think this can be done silently
> >>>  as detailed here
> >>> http://pginstaller.projects.postgresql.org/silent.html. Finally, a
> >>> batch file using psql could be used to populate the database. It is
> >>> not foolproof, but I will continue testing.
> >>>
> >>>
> >>> Either way we go, it is fine with me, as long as their is an
> >>> installer. I have something that meets my needs, well just about all
> >>> of them. Just need to go that little extra bit and get Postgres
> >>> installed, and then populated with the data, but it certainly seems
> >>> feasible at this point.
> >>>
> >>> Best regards,
> >>> Jason
> >>>
> >>>
> >>> 2010/2/10 Bob Jolliffe <bobjolliffe@xxxxxxxxx>:
> >>>> Hi Jason
> >>>>
> >>>> Thanks for the effort you have put into this.  Basically you are
> >>>> correct - all the steps for putting the pieces together should be
> >>>> easily automated.  Not being a maven guru, I have not taken this last
> >>>> important step.  So I have used maven as far as building the jars.
> >>>> Doing the launch4j wrapper, creating the directories and lzpack and
> >>>> stuff I could do very easily with a makefile but it should be doable
> >>>> with the dreaded maven as well.
> >>>>
> >>>> Packaging with a default hibernate.properties which points to a
> >>>> postgres database is also of course trivial.  Presumably you would
> >>>> install postgres with its native installer?  And do that first.  The
> >>>> missing piece of the puzzle would be to create the empty dhis pg
> >>>> database between the steps of installing postgres and installing
> >>>> dhis2-live.  I guess the logic of using H2 as default is that it is
> >>>> more foolproof for a simple install.
> >>>>
> >>>> One way of doing this (which would also be cross-platform) would be to
> >>>> make a tcl based installer.  Now I know this is not the latest
> >>>> buzz-hype language but there is a long history of creating installers
> >>>> this way (http://wiki.tcl.tk/1896) and it remains very actively
> >>>> maintained and developed.  The benefit is you can combine the ability
> >>>> to create windows shortcuts, registry entries etc with the ability to
> >>>> script postgres (and mysql) with a cross-platform gui.  I used to be a
> >>>> dab hand at embedding tcl in my previous life.  Would love to look at
> >>>> something like this when I get a breather ...
> >>>>
> >>>> Did you try importing dxf into h2?  The dxf2 project is not dead (just
> >>>> resting).  It would be good to get a list of requirements of crucial
> >>>> things people have found missing.  You will certainly get all your
> >>>> data values, datasets, orgunits etc.
> >>>>
> >>>> Cheers
> >>>> Bob
> >>>>
> >>>> 2010/2/10 Jason Pickering <jason.p.pickering@xxxxxxxxx>:
> >>>>> I have not dealt with Postgres yet. I think it should be possible. I
> >>>>> am going to see what the result of a DXF import is. Knut and Bob both
> >>>>> tell me these are lossy. So, the other strategy will be to install
> >>>>> postgres if needed, install a copy of the Zambia database, and then
> >>>>> the rest of the application.
> >>>>>
> >>>>> Anyway, the source is here.
> >>>>>
> >>>>> bzr branch lp:~jason-p-pickering/+junk/dhis2-live-installer
> >>>>> There are two files that are important. The install.xml file and the
> >>>>> shortcutSpec.xml.
> >>>>>
> >>>>> The description for maven integration is here
> >>>>>
> >>>>> http://izpack.codehaus.org/izpack-maven-plugin/
> >>>>>
> >>>>>
> >>>>>
> >>>>> Right now, I place all the needed files into the directories where
> >>>>> they should be, and compile with the Izpack compile.bat file,
> >>>>> something like this...
> >>>>>
> >>>>> C:\dhis2-live-shell>"c:\Program Files\IzPack\bin\compile.bat"
> install.xml -b . -
> >>>>> o dhis2-installer.jar
> >>>>>
> >>>>> Now, I just execute the dhis2-installer.jar, and everything works.
> >>>>>
> >>>>> What I mean in terms of the build is, it would be ideal to be able to
> >>>>> populate the /webapps/dhis directory with a fresh build, and the
> >>>>> /docs/ directory with a fresh build of the docs with maven.
> >>>>>
> >>>>> So, as we make changes to the application/docs/installer everything
> is
> >>>>> kept fresh and up to date. Capiche?
> >>>>>
> >>>>> Again, this will likely require modification by individual
> >>>>> implementers, but at least a skeleton project, able to be build by
> >>>>> maven, would be a nice to have...but not absolutely necessary.
> >>>>>
> >>>>> Best,
> >>>>> Jason
> >>>>>
> >>>>>
> >>>>> 2010/2/10 Lars Helge Øverland <larshelge@xxxxxxxxx>:
> >>>>>>
> >>>>>>
> >>>>>> 2010/2/10 Jason Pickering <jason.p.pickering@xxxxxxxxx>
> >>>>>>>
> >>>>>>> OK. For now, I am populating everything manually, but it works.  It
> >>>>>>> would be great to have this as part of the build process. Maybe a
> >>>>>>> maven guru can take this on, perhaps Jo? Not entirely urgent, as
> this
> >>>>>>> installer is really for my own purposes here, but it is general
> enough
> >>>>>>> to be reused elsewhere I think.
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>> A windows installer with Postgres and Jetty/DHIS2 Live would be
> useful,
> >>>>>> perfect for the scenario where rolling out a large number of offline
> >>>>>> installations. Don't know anything about izpack though. What exactly
> is it
> >>>>>> that you wanted to be part of the build process..?
> >>>>>>
> >>>>>>>
> >>>>>>> 2010/2/10 Lars Helge Øverland <larshelge@xxxxxxxxx>:
> >>>>>>> >
> >>>>>>> >
> >>>>>>> > 2010/2/10 Jason Pickering <jason.p.pickering@xxxxxxxxx>
> >>>>>>> >>
> >>>>>>> >> Hi there. I created a very basic installer last night using
> IZPack.
> >>>>>>> >>
> >>>>>>> >> Right now, this will install the system with dhis2-live.exe file
> you
> >>>>>>> >> gave me yesterday. I think it should be possible to do
> >>>>>>> >> an install with Postgres (there are some fragmented documents
> around).
> >>>>>>> >> It will be more work for sure, but maybe we can reuse what Knut
> has
> >>>>>>> >> done previously, once he finds it. I needed something quick and
> dirty
> >>>>>>> >> yesterday, thus the urgency with this. Basically, it just
> creates the
> >>>>>>> >> directory structure, and importantly for me, creates shortcuts
> and
> >>>>>>> >> other "ornamentation" critical for end-users.
> >>>>>>> >>
> >>>>>>> >> Just a few questions. Is there source for the dhis2-live.exe
> >>>>>>> >> application?
> >>>>>>> >>
> >>>>>>> >
> >>>>>>> > The exe file is generated using Launch4j and is just a wrapper
> for the
> >>>>>>> > live
> >>>>>>> > JAR file.  The xml file used to generate it (+ splash image etc)
> can be
> >>>>>>> > found in utils/launch4j in the repo.
> >>>>>>> > Lars
> >>>>>>> >
> >>>>>>> >>
> >>>>>>> >> Theoretically, the installer can be build with ant/maven as part
> of
> >>>>>>> >> the build process (one of the reasons I chose IZPack). It would
> be
> >>>>>>> >> great to be able to get the latest copy of the dhis.war file,
> >>>>>>> >> dhis2-live.jar, and all the docs, and put them in the right
> place. I
> >>>>>>> >> do this manually at the moment, but perhaps it could be
> automated.
> >>>>>>> >>
> >>>>>>> >> I am in the process of sending it to launchpad, but the internet
> is so
> >>>>>>> >> sucky here today, it may not work.
> >>>>>>> >> It will reside here for now.
> >>>>>>> >>
> >>>>>>> >>
> >>>>>>> >>
> >>>>>>> >>
> http://bazaar.launchpad.net/~jason-p-pickering/+junk/dhis2-live-installer/files
> >>>>>>> >>
> >>>>>>> >> Regards,
> >>>>>>> >> Jason
> >>>>>>> >
> >>>>>>> >
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
> >
> > _______________________________________________
> > 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
> >
>
> _______________________________________________
> 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
>



-- 
Cheers,
Knut Staring

References