High Availability: shared folders between chamilo instances?

Please always state the Chamilo version you are referring to when reporting issues or asking questions.

Moderator: Coursenligne

High Availability: shared folders between chamilo instances?

Postby phuber » 30 Jul 2018, 20:43

Dear chamilo community

I try to setup chamilo in a high availability and load balanced setup using AWS Elastic Beanstalk with a shared filesystem (EFS) and centralized ElastiCache (memcached) for session storage and Amazon RDS for the Database.
Elastic Beanstalk uses EC2 instances with docker containers.
The current setup uses auto scaling if higher load occurs.. When scaled, a new instance is spun up and then 2 chamilos will run. A load balancer in front manages the incoming requests to both instances.
So my problem is now:
  • Which folders can have user generated content and need to be shared among instances via shared filesystem (EFS)? e.g. courses/?/? & users folder (main/upload/users) or the whole main/upload folder?
currently i don't want to put the whole installation on the shared filesystem, just the needed folders (if not to many or to complicated).

Who can give me some advice on this topic :?:

Chamilo Version: 1.11.6

Best Patrick
phuber
Newbie
 
Posts: 4
Joined: 28 Jul 2018, 12:15

Re: High Availability: shared folders between chamilo instan

Postby yannick » 31 Jul 2018, 18:34

Hi Patrick,

Can you actually share the EFS space with several EC2 instances? I was under the impression that was impossible.

You can find a hint of what folders are "user-updatable" by looking at the security guide, in particular the section about .htaccess, which sets permissions to avoid PHP being executed from the directories where users can upload stuff. From there, you can pretty much guess that all of these can be updated by the user: https://11.chamilo.org/documentation/security.html#5.Files-permissions

There are a few of these, but you could put the entire app/ folder in the shared partition, and then you're only left with web/css/ and main/lang/. The default_course_documents/images folder is only updated by Chamilo itself, so it can be shared (I think, I'm only 95% sure).

Let us know how it works out for you, because the non-shareable EFS stuff has always been an issue for us in dynamic resizing.

Also worth noting: Chamilo 2.0 comes with less shared folders and hopefully files management through a Symfony layer that would allow us to use S3.
Yannick Warnier
Chamilo Project Leader & Association President
yannick
Enthousiast
 
Posts: 385
Joined: 02 Jun 2014, 11:03

Re: High Availability: shared folders between chamilo instan

Postby phuber » 31 Jul 2018, 20:40

Thank you for the reply yannick

I'll try the folders in the security guide you mentioned. Thanks for the hint.

Storing files directly in S3 would be pretty awesome for chamilo. Looking forward to this.

Afaik => EFS is made/designed for a shared filesystem between ec2 instances and could also be used with a custom AMI for autoscaling EC2 instances with mounted EFS (example: https://stackoverflow.com/questions/42596531/aws-auto-scaling-group-efs).
I use EFS together with Elastic Beanstalk. Elastic Beanstalk has two configuration files to use EFS: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/services-efs.html
phuber
Newbie
 
Posts: 4
Joined: 28 Jul 2018, 12:15

Re: High Availability: shared folders between chamilo instan

Postby yannick » 01 Aug 2018, 21:19

Apparently I failed to catch the launch of EFS and was still thinking about EBS. Nice to know EFS can be shared. Will test that soon!

Fancy doing a setup guide for what you're mounting there once you're done, or do you prefer to keep the procedure private?
Yannick Warnier
Chamilo Project Leader & Association President
yannick
Enthousiast
 
Posts: 385
Joined: 02 Jun 2014, 11:03

Re: High Availability: shared folders between chamilo instan

Postby phuber » 03 Aug 2018, 21:29

I now have a running setup with Elastic Beanstalk and shared folders. Scaling up and down works smooth.

@yannick I can share the config with you if you are interested. But it's specific for Elastic Beanstalk.
phuber
Newbie
 
Posts: 4
Joined: 28 Jul 2018, 12:15

Re: High Availability: shared folders between chamilo instan

Postby yannick » 03 Aug 2018, 22:27

I meant sharing to put it online on Chamilo's website for example. But I'd be interested in reviewing your procedure in private anyway: ywarnier at chamilo dot org.
Yannick Warnier
Chamilo Project Leader & Association President
yannick
Enthousiast
 
Posts: 385
Joined: 02 Jun 2014, 11:03

Re: High Availability: shared folders between chamilo instan

Postby phuber » 10 Aug 2018, 08:15

@yannick
I'm currently very busy. I'm writing the docu for the setup probably till end of august.
phuber
Newbie
 
Posts: 4
Joined: 28 Jul 2018, 12:15


Return to All topics, all versions

Who is online

Users browsing this forum: No registered users and 1 guest