Foren / Cotonti / Core Labs / Archive / Install/Upgrade script

Is what we actually need

Trustmaster
#1 24. November 2008, 02:51
We have been skipping this for quite a long time, but now I see that having a handy Install/Upgrade script would save a lot of time and help to involve more people to be using Seditio-N.

The main requirements are:
  • Make new installations completely automated in a few steps.
  • Possible to upgrade from Seditio starting with v110 (also v120, v121 and v125) to very recent version by using SQL patches shipped in docs/sql.
  • Providing both version upgrades (for stable releases) and revision updates (for SVN trunk).
  • Should use existing configuration and skin if possible.
  • Template layout (no built-in HTML).
  • The script itself doesn't depend on current version.

On the very first step it should try to detect an existing installation. It prompts for MySQL account details and checks for existing Seditio(-N) database. If a previous installation can be found, there will be 2 options: Install and Upgrade. Otherwise, it will automatically start with Install.

Install process goes this way:
[list=1]
  • Try to set write permission to folders in datas and tell a user do it manually if the script has failed doing it.
  • Ask database and other configuration options and write the config.php file.
  • Import the latest SQL dump.
  • Ask main site's configuration options and set them in the database.
  • Ask Administrator's account details and create it.
  • Tell a user to remove the script and log into his newly created account.

  • Upgrade process goes this way:
    [list=1]
  • Get full version number from current installation.
  • If it is an old Seditio (like v110), apply patches to update it to v125. Then, as it is still Seditio, run patches to update it to N-0.0.1.
  • Continuously apply SQL patches to update it from existing Seditio-N revision up to the latest revision contained in the package (according to datas/sql scripts).
  • Inform the user of the progress and errors if any.
  • When patching is done, tell him to remove the script.

  • In fact, this task is a high priority because it would help testers and developers a lot, so it is a must for 0.0.2.
    May the Source be with you!
    Kilandor
    #2 24. November 2008, 17:18
    Actually the converter i'm making, would be perfect to make some few modifcations to it. To make a beautiful install script. And would allow us to easily add the upgrade changes from version to version, say 121-125, or if somone really wanted to do 110-125. Thats just for example. And even run verification process to find the version.

    It would be dead perfect for this.

    I did also think though, you know it would be very easy, to create a script, to curl/fopen the files on the svn (can be accessed via your SVN pw, directly), it could if we added a revision file to keep track detect your current revision, From there you could choose to upgrade to the latest (to upgrade to a specific version, would take using TRAC to pull the specific version, as you can't do it straight from svn.cotonti.com that i know of? maybe there is a way)

    This would also detect the SQL files as we have them by r###.sql now, and apply the appropriate files to update. This would be a generic updater of course, It couldn't give you specific details on everything that was possibly changed.

    But yes my converter script would be perfect for upgrading from older sed versions, to hep get up to our version.
    Trustmaster
    #3 26. November 2008, 14:12
    I didn't mean any sort of online updater that would fetch files and install them (because many installs are done offline). What I meant is quite more simple, which updates, say, between 2 revisions this way:
    • User gets a latest trunk/stable from SVN or as a tarball.
    • He unpacks it to the same directory his previous revision is located, so the files get updated (simply replaced).
    • Then he needs to update the SQL which he has no idea about, so he just runs setup.php to do it all for him.
    • setup.php finds existing version/revision from the database, then it gets latest revision from a specific file in docs folder and applies all patches between existing and latest.

    What's more, your converter would even be capable of "upgrading" other scripts (like phpBB) to Cotonti, which is amazing.
    May the Source be with you!
    Trustmaster
    #4 26. November 2008, 20:10
    Another thing to do in installer: an utility to convert the database to UTF-8.
    May the Source be with you!
    oc
    #5 3. März 2009, 07:55
    @Kilandor

    I hear you have a script in development, why don't you just release it to be developed ? If you do not like what other's have done, you can still code yourself..

    If you think it is raw, it is better than nothing that I have, and also starting all over to the script.