Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-04-28 03:46:25

scornflake
New Member
Registered: 2011-04-28
Posts: 4

[SOLVED] Multi stage deployment (test -> production, continuously)

Hi,

I’ve checked the forums (briefly) and the FAQ, as well as the “How do I …” lists. Don’t see anything about this, so before I go re-inventing the wheel I thought I’d ask.

I’m about to put a TP install live.

Thinking about the future, more dev on the test site, etc – I’d like to be able to “push” changes from the test site into production in the future. So rather than doing a install / copy DB / modify site properties (putting site name, paths, etc back to production settings), I’d like to ryb a script that does these things auto-goblin-magically.

Before I run off and write a script:
1) Am I re-inventing the wheel … ?
2) Is there anything that I cant do here?

I’m thinking that I’ll rsync the relevant TP folders across (like in an upgrade), excluding any files I don’t want to modify for production… then …. db. Hmmm. DB. I figure that’s where the per-site settings go (not looked yet). Things like site-name… paths.

I figure I’m either going to have to selectively drop/copy tables (which I don’t really want to do, in case additional tables are added and I then end up with a maintenance headache script) or drop/copy the entire DB, and post-modify (using SQL UPDATEs) the relevant rows/values to reflect what I want in production.

My real goal is to get a solution where even if it’s more work up-front, I don’t end up making lots of migration mistakes later on during upgrades of the site content.

Any tips or pointers appreciated (this is my first real experience with TP – so I don’t know it very well).

Regards from NZ (where it’s getting cold),
Neil

Last edited by scornflake (2011-05-01 23:39:14)

Offline

#2 2011-04-28 07:59:37

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: [SOLVED] Multi stage deployment (test -> production, continuously)

Hi Neil,

Here’s what I do:

  1. Make changes to local TXP website
  2. Use rss_admin_db_manager to take a backup
  3. Copy all files that have changed (CSS, DB backup, etc) to live site
  4. Restore DB backup (using rss_admin_db_manager)
  5. Modify site preferences using adi_prefs

It’s all pretty straightforward & quick.

Regards,

Adi

Offline

#3 2011-05-01 23:38:29

scornflake
New Member
Registered: 2011-04-28
Posts: 4

Re: [SOLVED] Multi stage deployment (test -> production, continuously)

Thank you – I think this will work fine.
I’ve created a script to do part (3) across multiple local/ssh hosts. Mixing this with the two plugins then makes it very easy to update any of staging, testing or live.

Thanks!

Offline

Board footer

Powered by FluxBB