hey,
Please disregard my previous message (I created a separate tracker item)
Because of the complicated nature of the current auto installation methods (for the cvs demos, developer appliance, and ubuntu packages), I leveraged Andy’s new Installer class to improve this stuff. Should also lead the way for third parties to automate their installations. Code (for review) and more details can be found here: http://sourceforge.net/tracker/?func=detail&aid=3080582&group_id=60081&atid=1245239#
Very cool, so if want to use the Auto Installer from commandline, do the following:
1) Remove exit; command from top of script contrib/util/installScripts/InstallerAuto.php
2) Then run the script from commandline (several examples below):
php -f contrib/util/installScripts/InstallerAuto.php (this will install/configure openemr with default configuration)
php -f contrib/util/installScripts/InstallerAuto.php login=openemr pass=hwerf dbname=openemrdb (this will install/configure openemr with these settings; see the script for the settings that can be set)
To see it in use in a script setting, check out (from above github link):
contrib/util/installScripts/cvsDemoInstall
contrib/util/ubuntu_package_scripts/development/postinst
This should be very helpful for any users/maintainers that want to script installs of openemr. Plan to commit this stuff to the codebase tomorrow unless anybody notes any issues.
This looks great. I think I have only two minor issues:
1) There’s a typo in your change to acl.inc. Search for “ABOVB”
2) in the insert_globals definition in Installer.class.php, can we require translation.inc.php instead of stubbing out the xl() function? I think we’re far enough along in the install process that it will work.
I’m OK with committing this. In fact, I’m very excited about it.
Looks nice! I had not noticed the Installer class before this. Looks like setup.php should be modified to use it, to avoid all the duplicated code?
Also on 9/15 I added some code to setup.php to load an icd9.sql file if it exists and that did not seem to make it into the Installer class. Guess I’ll fix that after the smoke clears.
Just committed original patch along with a follow-up patch.
Thanks for looking at the code Andy. Fixed the acl.inc typo. I tried to convert the xl() stub to translation.inc.php, but this breaks it. Likely not a scope issue since in it’s own function; I’m guessing related to a sql connection problem since this will bring in the sql.inc library also. Athe globals.inic.php script plays a dual role; during install loads the database (doesn’t need a working xl function) and when run during openemr use it build the admin->globals options (needs xl() working).
Here’s a follow up patch that does the following:
1) Improved documentation in InstallerAuto.php.
2) Typo fix in acl.inc
3) Clarification of debug/error messages in Installer.class.php
4) Incorporated InstallerAuto class into ubuntu production package postinst script http://github.com/openemr/openemr/commit/fad2ec1cdc6a1d15ca838f4e5183667929d41de6
So, sounds like all that’s left is:
1) making icd9 codes an optional dropfile (looks like Rod has potentially volunteered for this)
2) incorporate into setup.php (Andy has already mostly done this previously; just need to update it and get it working. Andy, you up for this task? If not, I could potentially take a crack at it in 1-2 weeks)
Just committed some changes to fix the version bug and clarified some of the installation code.
Also added a really cool feature to openemr/contrib/util/installScripts/InstallerAuto.php which incorporates Rod’s multi-site code. Details of how to use this script along with examples (multisite is example number 5) can be found in openemr/contrib/util/installScripts/InstallerAuto.php. It allows creation of single and a multitude of multisite installations via simple commandline commands.
hey,
Committed another bug fix (bug brought in by my above fix) for the “I have already created the database” feature in setup.php . I hope this installation stuff is complete; rather coded out on this stuff.
-brady