bcgov / moodle

Repo to store codebase for the Moodle app
Apache License 2.0
1 stars 1 forks source link

Strategy for promoting CMS contents up from earlier environments #27

Open cohiggins opened 3 years ago

cohiggins commented 3 years ago

E.g. dev to test, test to prod

warrenchristian1telus commented 2 years ago

I think we should determine what the scope of this content is.

Course content is simple to migrate (backup and restore to another environment), but theming and other settings could be more difficult.

Theme will depend on whether we create a new theme, or just configure an existing one. I believe a custom theme based on an existing one such as Boost would be easier to maintain and migrate. Migrating settings / files from within a core theme would involve manual effort to migrate individual settings and files (unless we are migrating the entire site).

My initial recommendation for a custom theme would be to create a new / separate Git repo for this purpose. As is explained here:

https://docs.moodle.org/dev/Creating_a_theme_based_on_boost

This will also relate to our decisions around user permissions for editing in https://github.com/bcgov/moodle/issues/68.

warrenchristian1telus commented 2 years ago

I think we should investigate the above method (using custom theme repos) along with Course settings > Force theme option to allow Teachers or "Power Users" to manage themes, based on a list that has been approved and installed by Admin.

https://docs.moodle.org/311/en/Course_settings#Force_theme

This may not be ideal, but would at least provide the ability to manage updates with our current workflows, approvals, etc. It would also allow theme editors to develop themes (largely) independently of the Moodle project, if necessary.

Themes would be installed and updated via GitHub Actions this way, which is preferable to manual or [partial] database migrations. Theme edits within the database / admin interface are also not version controlled, and could cause issues when migrating to varying versions of Moodle / Plugins.

jwarrenbc commented 2 years ago

@warrenchristian1telus : Can you please confirm that this issue is still relevant? Thank you!

warrenchristian1telus commented 2 years ago

@freshjwarren I believe this is still relevant. We still don't have (much of) a strategy for migrating settings, files, themes or content. Basically, right now it is up to admins to make sure things get copy-pasted, backed up and restored, or otherwise migrated to the required environments. With multiple admins in multiple environments, I'm concerned things could get lost in transit.

@allanhaggett Do you have any feedback here? I'm not sure where we are with themes and content, as far as migration "standards". I know some work has been done on both, but not sure if we have anything we can work with as of yet. Mostly, I'm just hoping that by taking lots of backups, we can't lose anything (file + DB backups + Course backups).

I think this approach is risky with things such as admin / plugin settings. For example SSO, etc. rely on manual configuration, and there is no (easy / automatic) way to track or revert changes. I think themes will also be problematic if/when we need to manage significant changes.

Something like the Admin Presets plugin may be worth looking into: https://moodle.org/plugins/block_admin_presets

I think we should consider managing important data such as admin settings and themes in a repository wherever possible/practical. Either an existing one, such as bcgov/moodle, or a new one - for example, a theme could have its own repository.