Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-13 05:16:36

TheEric
Plugin Author
From: Colorado & Montana.
Registered: 2004-09-17
Posts: 603
Website

Staging Plugin

I just completed a plugin for a client that is installed on a staging site. The client makes all their changes to the staging site, and upon testing it and verifying it all works, they click on the “Push Live” button which copies the tables from that staging site, to the live site. It does requires two separate installs of TXP.

Would anyone be interested in this plugin if I were to make it public?

- Eric

Offline

#2 2009-09-13 05:45:46

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,376
Website GitHub Mastodon Twitter

Re: Staging Plugin

Eric,

Maybe I’m understanding it wrong but could this plugin also be used for design updates?
If so I think that it would be of great use for the community
Here’s the situation

Site v1, DB1
Site v2, DB1a

Site v2 uses the content from v1, DB1 but the presentation tables are used from DB1a. Once the design is finished the update button is clicked and DB1a is copied on DB1.

I understand that the plugin is doing more or less the opposite. right?

Last edited by colak (2009-09-13 05:47:42)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-09-13 07:12:00

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: Staging Plugin

Yes please!

Offline

#4 2009-09-13 07:15:29

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: Staging Plugin

Btw, have you considered using the new multi-site feature for the staging area?

Offline

#5 2009-09-13 15:24:52

TheEric
Plugin Author
From: Colorado & Montana.
Registered: 2004-09-17
Posts: 603
Website

Re: Staging Plugin

It uses two separate installs. one at staging.domain.com, and the other at www.domain.com, and two completely separate databases. Upon clicking the “push live” button, itt can move content tables, or presentation tables, or plugin tables. If there’s enough interest, I’ll pretty up the plugin for public consumption.

Offline

#6 2009-09-13 17:02:00

woof
Member
Registered: 2004-08-01
Posts: 128

Re: Staging Plugin

Sounds very useful Eric.
+1

Offline

#7 2009-09-13 18:31:08

TheEric
Plugin Author
From: Colorado & Montana.
Registered: 2004-09-17
Posts: 603
Website

Re: Staging Plugin

@Colak

It can copy over everything from Content (Categories, Articles, Images, Files, Links) to Presentation (Sections, Pages, Forms, CSS) as well as Plugins. It’s a bit rough, but it’s definitely something that I’m thinking of building upon and releasing as a public plugin.

It does use two separate databases V1 would be the staging install, and V2 would be the live install. Both would be indentical, but major changes would first be done on the staging site, and once they’re approved, pushed live. I thought about using the multiple site feature of 4.2, but this client (and others similiar) needed something completely removed from the live site.

Offline

#8 2009-09-13 18:37:18

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,376
Website GitHub Mastodon Twitter

Re: Staging Plugin

hi eric,

sounds very cool. Can it work with the ‘staging’ install/db in local comp and the other one online?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2009-09-13 19:18:24

TheEric
Plugin Author
From: Colorado & Montana.
Registered: 2004-09-17
Posts: 603
Website

Re: Staging Plugin

That would most likely not work, as generally databases are secured against any outside connections. Usually, though not always, they accept only connections from the internal network. Something similar could be built using a JSON interface that would accept connections from outside, but that’s beyond the scope of this particular plugin.

Offline

#10 2009-09-13 22:01:05

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: Staging Plugin

Sounds great!

Some quick thoughts:

  • Could you specify which tables are (and aren’t) copied across, in order to:
    • avoid overwriting comments on the live site
    • maintain different user tables to stop people accidentally updating the wrong site
    • avoid conflicts with plugin licenses
  • If you’re updating content tables like images/files, would you also need to manually update the file system?

Offline

#11 2009-09-14 00:30:24

kus
Member
From: madiun, Indonesia
Registered: 2007-03-15
Posts: 64
Website

Re: Staging Plugin

+1 yes please, sounds usefull

Offline

#12 2009-09-14 01:54:52

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: Staging Plugin

pieman wrote:

** avoid conflicts with plugin licenses

All plugins are licensed as GPL.

Offline

#13 2009-09-14 04:04:38

TheEric
Plugin Author
From: Colorado & Montana.
Registered: 2004-09-17
Posts: 603
Website

Re: Staging Plugin

artagesw wrote:

All plugins are licensed as GPL.

Not under all circumstances. E.g, if there is no shared code/hook, then it doesn’t have to follow the same licenses as Textpattern.

Offline

#14 2009-09-14 04:41:10

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: Staging Plugin

TheEric wrote:

Not under all circumstances. E.g, if there is no shared code/hook, then it doesn’t have to follow the same licenses as Textpattern.

All the plugin needs to do is call one Textpattern API to fall under the GPL terms. I would be hard-pressed to imagine a useful plugin that never calls into Textpattern. Also, I believe that the mere fact that the plugin is designed to be loaded by Textpattern’s loading mechanism, stored into Textpattern’s database and executed by Textpattern also subjects the plugin to the requirements of the GPL.

Offline

#15 2009-09-14 06:16:20

TheEric
Plugin Author
From: Colorado & Montana.
Registered: 2004-09-17
Posts: 603
Website

Re: Staging Plugin

Yes, if it uses any of the Textpattern code to run, then it falls under the TXP licensing. When it doesn’t, it does not. Theoretically, one can create a plugin that merely invokes a script that doesn’t make use of any Textpattern code, and that included file would not be bound by the GPL. (e.g, Files served by Apache aren’t bound by Apache’s license.) Just running the file off one system doesn’t make it bound by the GPL. It’s bound by the GPL ONLY if they share code.

The second part is false and related to the above as well. Take for instance the linux file-system, or a mysql database. Storing a file on the file system doesn’t not make that file bound by the same gpl licensing as linux, nor does storing a binary file within a table in MySQL bind it by it’s license.

Anyway, this thread is quickly getting off track. Might I suggest we start another for any additional questions?

Offline

Board footer

Powered by FluxBB