Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Publish live content to multiple remote live servers


Reply


6 Posts   622 Views

Avatar
tazzydemon

Community Member, 124 Posts

22 July 2013 at 1:46pm

Does anyone have experience with using one copy of SS (either 2.4 or 3.x) as a staging server but when the live publish is done, the data and assets are pushed to a remote live server, possibly more than one.

Julian

Avatar
tazzydemon

Community Member, 124 Posts

23 July 2013 at 2:37pm

No replies?

By the way I know how to sync the assets with rsync etc, but to push the db changes is another deal, which with no port 3306 access generally allowed, would require some sort of bridge class on the receiving end. I just wonder if anyone has done it.

Avatar
Willr

Forum Moderator, 5513 Posts

23 July 2013 at 10:27pm

Closest I've setups I've done is had 1 machine as the CMS, containing the database / assets and the webservers with caches / copy of the templates. Asset folders on 3 of the webservers were mounted to the cms server (so no need to propagate anything (as they were in 1 place) and the database stayed on the same server.

If you're not worrying about the database (and using something like static publisher) then pushing the site out to multiple boxes is a snap. If the boxes are hosted on the same network then I image you could setup the firewall to allow mysql connections between the machines.

Avatar
tazzydemon

Community Member, 124 Posts

24 July 2013 at 11:16am

Edited: 24/07/2013 12:01pm

I'm not quite sure yet but my feeling is that this user will close port 3306 for security reasons so I have to find another way of pushing the data. That's why I was hoping somebody had done it before.

It's all on Centos so rsync will get the assets over but since the DB also contains asset references I really have to push the entire DB contents or somehow track the changes. Thats why I was hoping someone had one it before.

I have been playing with a product call eMagicOne to administer Virtuemart Stores on Joomla. It's very handy and offers an http or php bridge (via a php file on the target server) to get the data uploaded (or downloaded). I see this as being a possible route for Silverstripe replication.

Is there a hook like onBeforeWrite() for publishing so I can tie into that?

Avatar
Willr

Forum Moderator, 5513 Posts

24 July 2013 at 7:26pm

See onAfterPublish - http://doc.silverstripe.org/framework/en/topics/versioning.

If you're gonna run separate database installs (rather than 1 dedicated mysql server) I assume you won't have forms on your website? Since then you'll run into all sorts of issues. If you're not using forms or user changable content on the front end you might as well just use static publisher.

Avatar
tazzydemon

Community Member, 124 Posts

25 July 2013 at 8:59am

You're quite right and with this client I'm not sure yet. There are certainly going to be fairly active things on the site but replicating the db will mangle form input. That leaves me if I'm desperate just rsyncing assets and added just the db changes. But how? Just syncing the site tree and subclass tables plus assets. Messy. This is why I was hoping it has been done already!!