Re: database upgrades

2013-08-27 Thread Prasanna Santhanam
On Tue, Aug 27, 2013 at 04:48:02PM -0700, Darren Shepherd wrote: > It seems like on startup of the management server > DatabaseUpgradeChecker runs and upgrades the database performing DDL > and DML. Is there a way to upgrade the database that doesn't > include starting the management server? > T

Re: database upgrades

2013-08-27 Thread Darren Shepherd
Custom java code to manage the database is every DBAs worse nightmare. I'd be very very interested into moving to an off the shelf DB migration tool. I'd recommend flyway given the fact that CloudStack only supports mysql and is very SQL DDL oriented as it stands. I'll probably look into this

Re: database upgrades

2013-08-27 Thread Prasanna Santhanam
The whole upgrade process can probably be divided into a few parts: 1. Apply new schema 2. Data Migration (this is the stored proc updates if you will) 3. Upgrade of system scripts and templates 4. Phased service (agent/management) shutdown and java updates. As a first step if 1. and 2. can be de

RE: database upgrades

2013-08-28 Thread Alex Huang
There's DatabaseCreator.java which upgrades the database. That's how we're creating the database. We can pretty much replace the checker with something that only checks the version rather than upgrades the database from the xml file. --Alex > -Original Message- > From: Darren Shepher

Re: database upgrades

2013-08-28 Thread Darren Shepherd
Having the ability to do DB migrations on startup isn't bad. Frankly it's nice when you don't care, like dev/test. You should just be able to additionally do it as a step before. I know this is technically possible as the mvn deploydb does this somehow. The larger problem is that 1) it is

RE: database upgrades

2013-08-28 Thread Alex Huang
sage- > From: Darren Shepherd [mailto:darren.s.sheph...@gmail.com] > Sent: Wednesday, August 28, 2013 9:20 AM > To: dev@cloudstack.apache.org > Cc: dev@cloudstack.apache.org > Subject: Re: database upgrades > > Having the ability to do DB migrations on startup isn't bad.