A new tool for generating Custom Sites in an Open edX instance

Hi all,

Configuring and managing multiple sites in a single Open edX installation is really tricky. To set up a custom site, there are configurations that need to be set in multiple services (LMS, Discovery, and eCommerce). And if we change some of these configurations in some service, we will need to remember to change them to other services as well. And there is some config that gets reset during deployment.

So we came up with some scripts that can do this automatically based on a configuration file. These scripts are meant to be run on an App Server. Because they use python env and Django models from those services.

The project can be found at - opencraft / dev / sites-generator · GitLab

This config.yaml (sample) is meant to be tracked in Git (ex - configuration-secure repositories). And rather than setting up Custom site config in multiple services, we specify them in this config file.

Full detailed documentation on how to use this can be found in the Readme.md file.

Kudos to @farhaan & @guruprasad for reviewing those scripts and providing helpful insights. :slight_smile:

Ticket to log time - BB-4690

11 Likes

@shimulch, kudos on the outstanding work that you have done for this! The only suggestion that I have for this one (one that I have already mentioned it to you before) is to rename the repository and the tool to something better since “microsites” is the name of a deprecated feature in the platform.

Something like site-configuration-generator would be better, imho. But let’s not rush into making the changes for this if it requires a non-trivial amount of effort and time.

1 Like

@guruprasad How about simply sites-generator? Since Open edX calls them Sites.

1 Like

This is really cool, @shimulch ! Would this repository be better placed on GitLab, per our policies?

+1, reading this repo’s readme is quite confusing for me because it sounds like that old feature.

You can see it here if you’re curious: https://github.com/edx/edx-platform/pull/21336/files

Sounds good!

@guruprasad, @braden thanks for the link. I didn’t know that an old feature had that name.

@Fox, I’ve tried to import the repo in our GitLab. But seems I can’t import a project under opencraft/dev group in GitLab due to permissions I guess. I’ve imported it here - https://gitlab.com/opencraft/core/sites-generator

Can anyone with correct permission move it to the opencraft/dev group? :slight_smile:
I will open an MR after the transfer to make changes in README.md.

That is awesome! Congrats to this @shimulch, @guruprasad and @farhaan! :tada:

2 Likes

@shimulch Please remember to mention a task where to log time in this thread.

@shimulch, @farhaan, I think it might be a good idea to combine this tool with the terraform scripts that we have created for setting up the related resources on AWS to provide it as a complete solution. What do you think?

CC @giovannicimolin

1 Like

@shimulch very nice work :) I think we should definitely have a blog post about this. Would you be up for writing one sometime soon, to strike the iron while it’s hot? You can follow this procedure and schedule a ticket in one of your sprints, with me as 2nd reviewer. Let me know if that would work for you?

The project has been moved to GitLab and the Github one is archived.

@daniel Added a ticket to log time. BB-4690. Thanks for pointing that out.

I think it might be a good idea to combine this tool with the terraform scripts that we have created for setting up the related resources on AWS to provide it as a complete solution. What do you think?

@guruprasad Yes. I think that’s a good idea.

I think we should definitely have a blog post about this

@gabriel Yes sure, I would like to write a blog post about this. Created BB-4691. :slight_smile:

1 Like