[opencms-dev] Best Practices for Setting up 'staging' environment for Content?

Art Shectman art at elephantventures.com
Mon Aug 25 05:05:43 CEST 2008


Hi Mathias,
Good Question, basically I think I am running into a knowledge gap on my
end.

What exactly is offline and online?  And really I suppose I don't understand
logically what a 'project' is in the eyes of OpenCMS (online project and
offline project for example).  

It feels like OpenCMS is maintaining two replicated 'branches' (in a SVN
sense, or 'folders' or projects in OpenCMS sense) of the content, one
'folder'/project called 'offline' and one 'folder'/project called 'online'
that it considers to be branches of the same content.  It tracks what you've
changed in the 'offline' folder compared to the last time you synced with
the 'online' folder, and then allows you to 'publish' content (like an SVN
Diff/Merge) to the online folder/project.

Am I getting that right?

If that's the case, then I think we wouldn't have any problems at all using
that mechanism.  We could replicate our front-end/application tier and have
2 instances, one that points at the online project and one that points at
the offline project.  That way 'publication dates' are still respected, but
we could still preview work in progress content in the staging project
without fear that it was part of the online project.  I suppose I was
separating the date based "publication" in my head from the concept of
'approved to go to production', however it does feel like the concepts of
paired online/offline projects should allow me to exercise the date based
restrictions of the system for future previewing, and for previewing work in
progress content, without fear that assets that shouldn't be in production
somehow get there.

As to the XML, it is generated by a middle tier that will use the OpenCMS
API to retrieve lists of content that should respect publication
status/dates/project.  I didn't see a way to programmatically set the
timewarp from the API calls. If this is baked into the OpenCMS API I think I
am almost home free.  

Here's a hypothetical for you, if I make my staging middle tier code make
content requests to the API, but build in some kind of timewarp global
config setting to all of those calls, I can see how my 'get content list' or
'get content item details' calls would respect the timewarp date offset and
return the right lists of content or content details (wrapped in XML so my
video player can parse it).  What I don't see is how the 'cached content'
requests for say a video on the webserver would be front-ended by any kind
of OpenCMS filter to respect the timewarp.  For example, let's say I had a
video that expired next week.  It's already published so it's been cached on
the webserver as a file in the filesystem.  When I make a timewarp request
with a date offset after the expiration of the video, for the video file,
I'm just getting the file, I don't see any OpenCMS interpretation layer
going on there so I think I WOULD see actual content files that shouldn't
have been available in preview date offset request?   

In the opposite case, where I have content that isn't published yet, but I
want to preview, what it will be 'next week' after release, to try to get
client approval, is tricky too (and more common).  If I set up my staging
content request middle tier so the content lists respect the date
offset(timewarp), and show me what is going to be available next week, the
issue will be that the publication queue still thinks it's today, and as
such hasn't made the actual file assets available on the webserver.  When
requests for the actual video come in from the previewer based on the
content lists returned by the staging middle tier (remember it's date offset
so the 'list' has content that isn't currently published).  I think they
can't actually access the actual video file they are trying to preview.

Sorry for the longwindedness, but I'm hoping the list can push me in the
right direction. This seems to be a core CMS concept and I've been
struggling to find the 'right' approach for OpenCMS to handle this.(mostly
my ignorance and not an indictment of the product)

Thanks!
-Art
 


Art Shectman
 
President
Elephant Ventures
http://www.elephantventures.com
C:917 714 3103
O:212 730 6710
F:917 591 2809

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Mathias Lin
Sent: Sunday, August 24, 2008 9:24 PM
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] Best Practices for Setting up 'staging'
environment for Content?


Hi Art,

where is the XML stored - in OpenCms? If you want to use the time warp, it's
probably important to use the OpenCms API to retrieve the content, rather
than a direct DB access, in order for the timewarp to work.

Generally I would have said, use the 'offline' and 'online' project mode for
the two site versions, but earlier you mentioned "These concepts are
separate from the Published/Unpublished concepts in OpenCMS. ". Why wouldn't
the built-in offline/online mode work for you, I didn't get that completely.

Instead of setting up two OpenCms instances, you might also just work with
two different sites in one OpenCms instance, since OpenCms support
multi-site. So you don't need to maintain two systems.


Mathias Lin
VP Products & Technologies
SYSVISION USA, INC.
www.sysvisionusa.com
Tel: 888-SYSVISION



Art Shectman wrote:
> 
> 1.  Re: Time Warp, our application has generated XML files based on 
> available content, and that then reference actual assets like 
> videos.(think CMS managed desktop video player library), where a 
> desktop app is fetching lists of content over the 'web' (really, 
> that's the XML coming from our CMS about what content is available), 
> and then that actual video assets from OpenCMS.  Is there some way to 
> tell our Application middle tier to make requests to the DB in 'Time 
> Warp' mode?  It seems like this setting effects the OpenCMS admin tool 
> to 'shift' it's date perspective, is there a way to similarly shift 
> the date perspective of the JSP libraries/application server that is 
> querying the CMS db?
> 
> 2.  Can you expand on this, I'm not quite understanding. I suppose I 
> don't know what you mean by 'Online project' in contrast to static 
> HTML?  We've got a mix of dynamic data sets that the application 
> server will return as XML content lists that need to be controlled by 
> content availability in the CMS (like search, or user profile based 
> content matches), but most of our 'category' lists or content lists 
> can be generated and cached, and moved off to the web tier as a cached 
> XML file.  In that sense those can be 'static html'.  However the 
> underlying video and content assets would also be pushed out to the 
> real filesystem I supposed and served as static 'files'.  It's the 
> question of how to sync what should be showing in Staging/Preview vs 
> what has been approved to go 'live' that I'm struggling with.  Thanks 
> for the help!
> 
> 3.  We'd 'sort of' looked at that, but that would make prod exactly 
> equal to staging, and we need to accommodate work in progress on 
> staging that isn't ready for primetime.  We're currently approaching 
> the problem by looking at customizing the 'synchronize' scripts that 
> are meant to keep 1 CMS in sync with another.  We've got a flag on all 
> content of 'approved' and 'unapproved' that exists outside of the 
> concept of published/unpublished/publication start&end dates.  What we 
> are thinking of doing is running a sync script that looks for all 
> approved content and makes sure it's data and files are all pushed to 
> the production server on a nightly basis.  In this process we are 
> careful to update the publication dates of the production content as 
> well to be sure we pick up any publication changes (basically after 
> the content sync we completely regenerate the publication queue).  
> Then we look at all unapproved content in staging and makes sure it is 
> removed from the production server in all locations, db, webserver 
> cache, etc.
> 
> Thanks again for the info,
> Art
> 
> 
> Art Shectman
>  
> President
> Elephant Ventures
> http://www.elephantventures.com
> C:917 714 3103
> O:212 730 6710
> F:917 591 2809
> 
> -----Original Message-----
> From: Kim, Allan [mailto:jak009 at ucsd.edu]
> Sent: Sunday, August 24, 2008 7:41 PM
> To: art at elephantventures.com; The OpenCms mailing list
> Subject: RE: [opencms-dev] Best Practices for Setting up 'staging'
> environment for Content?
> 
> Having looked at the same thing recently, I'd suggest:
> 
> 1. Content availability dates and the Time Warp feature.
> 
> 2. Serving your live content as static HTML, and using the Online 
> project as your "staging" site
> 
> 3. Totally speculative ... but you may be able to sync the two 
> environments by manually starting/stopping MySQL replication
> 
> ________________________________________
> From: opencms-dev-bounces at opencms.org 
> [opencms-dev-bounces at opencms.org] On Behalf Of Art Shectman 
> [art at elephantventures.com]
> Sent: Sunday, August 24, 2008 8:43 AM
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] Best Practices for Setting up 'staging' 
> environment for Content?
> 
> Hi,
> I'm a newbie to OpenCMS, and am trying to vet a design we are working 
> on where content will need to be 'staged' prior to being made publicly 
> available.  Basically we are trying to allow for the end client to be 
> able to preview what content will look like at a future date, or
'post-release'
> when the current batch of to be approved content is released into our 
> production environment.
> 
> The solution we are converging toward seems to be to maintain two 
> instances of the CMS, one in staging where preview is driven from that 
> we change the server date on to allow for 'future views', and then a 
> complex synchronization script that syncs the current content snapshot 
> of all the currently 'approved' content with the Production CMS while 
> removing all 'unapproved' content.  These concepts are separate from 
> the Published/Unpublished concepts in OpenCMS.
> 
> 

--
View this message in context:
http://www.nabble.com/Re%3A-Best-Practices-for-Setting-up-%27staging%27-envi
ronment%09for-Content--tp19136042p19136663.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list