Building an automated install, need some advice


I'm attempting to build an automated install of Omeka for our control panel (Plesk). We use a plugin called Installatron which is a pretty nice application vault for control panels and they have an SDK for building packages so I decided to give it a go this weekend.

I need a bit of help getting it put together, namely figuring out exactly what happens when the install is happening so I can see if I can automate it using PHP and the variables I set. Here's where I am so far:

  • I can automate the creation of db.ini so that gets setup with no issues
  • I can rewrite the sql files in application/core/schema to use the prefix defined in db.ini
  • I can run those sql commands to populate the database
  • I can remove the install folder when the install is complete
  • If necessary I can even modify the files of the install that gets used

Where I'm stuck is that obviously information gets written to the options table and I think I can figure out how to write that. I'm trying to figure out if there's anything I might be missing or even if there's an install script I didn't find when looking through the install. I can set variables from a form that the installer uses to mimic anything being requested from the install form.

So can a dev give me the layman's play by play of exactly what happens after a user fills out the install form and hit's submit, and whether it would be possible to automate some of that?

application/models/Installer/Default.php is where the real work of the installer mostly happens.

If you've created a proper db.ini, the installer will just read that and substitute the prefix into the schema files by itself.

The other main things the installer does are create the initial user and set up the options. The code for each of these is pretty simple in that installer file.

If you create a Zend_Form instance with the required values the installer's looking for, you should be able to just create a new Installer_Default, call setForm on that object, then call install.