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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Running a SilverStripe instance in a load balanced environment


Go to End


2 Posts   1284 Views

Avatar
Rudiger

Community Member, 8 Posts

26 June 2016 at 5:09pm

I would like to setup a SilverStripe instance in a load balanced environment. The database isn't an issue but I'm trying to figure out how to run a shared location for the assets. I've found this [https://github.com/edlinklater/silverstripe-cloudassets-s3]S3 cloud assets plugin however after installation and configuration it gives the error

Object->__call(): the method 'parent' does not exist on 'Image'
.

There isn't much to it and I've configured the yml as follows:

---
name: assetsconfig
---
CloudAssets:
  map:
    'assets/Uploads':
      Type: S3Bucket
      BaseURL: 'https://s3-ap-southeast-2.amazonaws.com/'
      Container: asset-container-test
      Region: ap-southeast-2
      ApiKey:
      ApiSecret:
      LocalCopy: true

Where have I gone wrong with this plugin or is there a better way to share the assets in a load balanced environment?

Avatar
ZarockNZ

Community Member, 17 Posts

18 October 2016 at 11:10am

No need for modules, our network admins just set up a symlink via NFS for the assets directory which points to some other common place on the network which both sites can share.

Also, one other thing you probably need to look at is sessions as there are issues around this in load balanced environments. There is a good module for that which takes care of this called "Hybrid Sessions", see: https://github.com/silverstripe/silverstripe-hybridsessions