Charm needed: Moodle

Bug #806044 reported by Jorge Castro
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juju Charms Collection
Incomplete
Wishlist
Ryan Kather

Bug Description

Universities and schools need a nice way to try out Moodle.

Jorge Castro (jorge)
Changed in principia:
importance: Undecided → Wishlist
Jorge Castro (jorge)
tags: added: bitesize
summary: - Formula needed: Moodle
+ Charm needed: Moodle
Jorge Castro (jorge)
Changed in charms:
assignee: nobody → Ryan Kather (rkather)
Revision history for this message
Ryan Kather (rkather) wrote :

In the works, let's hope it doesn't suck.

Changed in charms:
status: New → In Progress
Revision history for this message
Jorge Castro (jorge) wrote :

Ryan tells me he's having a problem with the db-relation, so I'm tagging this to get him an early-review!

tags: added: new-charm
removed: bitesize
Changed in charms:
assignee: Ryan Kather (rkather) → Clint Byrum (clint-fewbar)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Ryan, this one was definitely a pretty tough nut to crack, and I appreciate how far you got. Here were the problems I had to get by to get moodle deployed:

*) need to install mysql-client during install so this will work:

CUR_TABLE_COUNT=`mysql -h $DBHOST -u $USER -p $PASSWORD -Nse "SELECT count(TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=\"$DATABASE\""`

*) /usr/local/share/moodle/admin/cli/install.php is not executable, so prefix it with 'php' so you run it with the PHP cli.

*) You *must* set an admin password in the site configuration. This is a good thing, but confusing, perhaps check for its existence before letting install.php say that.

*) MySQL refuses to finish the install because the default binlog_format value is 'STATEMENT'. You have to change it on the mysql server to 'MIXED'. The mysql charm does not have this ability yet but I started working on it. For now you have to manually do it before relating moodle to the mysql server. You can do that by just doing :set global binlog_format='MIXED'" in a mysql client as root. You can login as root on the mysql server by doing

juju ssh mysql/0
sudo su -
mysql -uroot -p`cat /var/lib/juju/mysql.passwd`

*) APACHE_LOGDIR is also not set. I'd recommend ditching the extra Log* directives for apache.. they are handled by the basic configuration in the package already.

That should get you back on track to getting the db-relation-changed hook working.

Changed in charms:
assignee: Clint Byrum (clint-fewbar) → Ryan Kather (rkather)
Revision history for this message
Ryan Kather (rkather) wrote :

Thanks Clint! Thorough work here, I'll be trying to merge your findings hopefully today and see if we can get this thing ready.

Revision history for this message
Jorge Castro (jorge) wrote :

Ryan, any updates on this?

(When you're ready for a new review subscribe the "charmers" team and it'll stick this back in the review queue)

tags: removed: new-charm
Revision history for this message
Ryan Kather (rkather) wrote : Re: [Bug 806044] Re: Charm needed: Moodle

Not yet. I need to sit down with it. I'll update it as I can look.
On May 22, 2012 11:05 AM, "Jorge O. Castro" <email address hidden> wrote:

> Ryan, any updates on this?
>
> (When you're ready for a new review subscribe the "charmers" team and
> it'll stick this back in the review queue)
>
> ** Tags removed: new-charm
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/806044
>
> Title:
> Charm needed: Moodle
>
> Status in Juju Charms:
> In Progress
>
> Bug description:
> Universities and schools need a nice way to try out Moodle.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/charms/+bug/806044/+subscriptions
>

Revision history for this message
Ryan Kather (rkather) wrote :

Lots of changes, seems to work for deployment and load balancing. Only tested on EC2 thus far.

Things to do:
-SSL support plan
-DB Import Support
-Nginx/Apache Choices
-Optimizations (Caching/APC/etc...)
-Security Bits (Beyond directory perms, maybe extra enforcement)
-Cleanup

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Reviewing this now!

Revision history for this message
Jorge Castro (jorge) wrote :
Revision history for this message
Ryan Kather (rkather) wrote :

I've had an email from someone testing this on MaaS encountering some issues with adding the DB relation. I'm not sure if it's his MaaS setup or the charm at this point. Hoping to get some time in to test MaaS or get more feedback. APC is coming, I just wanted to get deploy-able and handle upgrade etc.. processes before getting too far along optimizations.

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Hi Ryan!

Thanks for your work on this so far, it's really shaping up! I've got a few things so far and I know this is a work in progress.

The main problem I have with the deployment is that the configuration is required before any of the hooks can run successfully. Furthermore, changing those values after a deployment fail because there's no config-changed hook to handle the changes. So the configuration is more of a prerequisite than an actual configuration tool. I don't think this is a blocker per se but it goes against the whole general understanding of configuration in Juju. I think we have a few charms that "require" configuration values to be set (like and adminpass) but there's always a way to change that value later on during the services cycle. So require initial values, okay. No way to change them during the deployments lifetime, blocker.

As for your planned implementations. I wouldn't worry /too/ much about things like "Apache or Nginx" as a setting. Things like that, which don't really affect anything should be more up to the charm author as 'This is how Moodle runs best'. The webserver part is just an underlying component that the end user shouldn't need to worry about. They ultimately just want moodle to run and to run really well. Optimizations, security, and SSL are all promising additions though!

Otherwise I think this is a great start for the charm! I look forward to the next few revisions as this becomes an excellent charm.

Changed in charms:
status: In Progress → Incomplete
Revision history for this message
Ryan Kather (rkather) wrote :

Marco,

Thanks for the review. I knew it wasn't quite there, but you gave me exactly the feedback I needed (where to focus effort). I definitely need the config-changed and upgrade hooks. I'll work on those next. They might have to get a bit complicated in regards to the handling of admin pass changes. I think I will start to pull away some of those configuration directives so we can set the deployment once without it being so much of a prerequisite. The only hard part there is the handling of adminpass and FQDN access.

I suppose I could generate the password dynamically, and provide some details to the user for how they can find it. More thoughts to map out. Thank you again.

Ryan

Revision history for this message
Jorge Castro (jorge) wrote :

Hi Ryan, any updates on this?

Revision history for this message
Ryan Kather (rkather) wrote :

No, I need to put some time in. Got rather side tracked. I'll see about
working it out this week maybe and some of RStudio too that I ws touching.

On Tue, Sep 2, 2014 at 3:09 PM, Jorge O. Castro <email address hidden> wrote:

> Hi Ryan, any updates on this?
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/806044
>
> Title:
> Charm needed: Moodle
>
> Status in Juju Charms:
> Incomplete
>
> Bug description:
> Universities and schools need a nice way to try out Moodle.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/charms/+bug/806044/+subscriptions
>

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Thanks Ryan, when you're ready for another review please move this to "Fix Committed" otherwise we look forward to this getting updated!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.