-
Notifications
You must be signed in to change notification settings - Fork 15
Easy microsite management
In order to test microsites locally you need to set up the devstack, with some customizations:
-
In Vagrantfile add the following snippet inside the
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
..end
block:config.dns.tld = "dev" config.dns.patterns = [/^.*devstack.dev$/]
-
Install vagrant-dns:
vagrant plugin install vagrant-dns
-
Only then create & provision the VM:
OPENEDX_RELEASE="named-release/birch" vagrant up
-
Make sure the domain resolves to the VM's IP:
dig @127.0.0.1 -p 5300 devstack.dev
-
SSH into the devstack:
vagrant ssh
-
Create
/edx/app/edx_ansible/server-vars.yml
and add the following lines to it:EDXAPP_SESSION_COOKIE_DOMAIN: ".devstack.dev" edx_platform_repo: "https://github.com/appsembler/edx-platform.git" edx_platform_version: "feature/easy-microsite-management"
-
Update the installation:
/edx/bin/update edx-platform feature/easy-microsite-management
-
Turn user
staff
into Django superuser:sudo su edxapp cd /edx/app/edxapp/edx-platform python manage.py lms --settings=devstack shell from django.contrib.auth.models import User me = User.objects.get(username="staff") me.is_superuser = True me.is_staff = True me.save()
-
Migrate the DB, just in case:
python manage.py cms syncdb --migrate --settings devstack
-
Run
paver devstack [--fast] studio
, then, on the host, visit http://devstack.dev:8001/admin, log in as "staff" (password: "edx") and create some microsites -
Run
paver devstack [--fast] lms
, the microsites should be working now: http://site1.devstack.dev:8000/, http://site2.devstack.dev:8000/