2

We have a small company and we have developed our own CMS in PHP/MySQL. The code is stored in local files and in the database.

We'd like to be able to update the code of the CMS on our client's servers. This process should be semi-automatic, once we 'publish' the update, the code gets replaced on the client's server and in the database.

I was thinking about using Bazaar in combination with Bazaar Upload. This would take care of the files. But what about the database? Is there a standard method already available or should I upload a .sql file that gets installed when a user logs in to the CMS?

Thanks in advance for your suggestions!

rbnvrw
  • 347
  • 3
  • 15

2 Answers2

1

For this sort of thing I'm considering liquibase, but it needs java to run so you either need java on the server or maybe on the machine from where you are triggering the deployment.

AmanicA
  • 4,659
  • 1
  • 34
  • 49
0

Use combination of SVN/SVN and Cron

use install package (.rpm,.sh,.deb, whatever) and setup cron job to run your update script

UML:

#!/bin/sh
fetch $version
if(version > current_version); do
    cd /path/on/client/server
    svn update
    /path/on/client/server/update_script.sh
done;

where update_script.sh will take care about whatever you need (sql,cron,files,certificates, ...)

Second variant

You can use something like fake cron job

In Administration you can create "Autoupdate" feature, which can be triggered by button/link or by timer. Timer is activated by running autoupdate script after login to CMS Administration

Simple check time from last update check and perform download of files, running .sql scripts or whatever you need.

Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
  • Thanks for your suggestion. However, I have only ftp access to most of the servers, they are hosted via a reseller package. – rbnvrw Jul 04 '11 at 14:50