Microsites README - Appsembler

Microsites README

In order to test microsites locally you need to set up the devstack, with some customizations:
1. In Vagrantfile add this inside the Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|..end block:
         config.dns.tld = "dev"
         config.dns.patterns = [/^.*devstack.dev$/]
2. Install vagrant-dns: vagrant plugin install vagrant-dns
3. Only then create & provision the VM:
         OPENEDX_RELEASE="named-release/birch" vagrant up
4. Make sure the domain resolves to the VM’s IP:
         dig @127.0.0.1 -p 5300 devstack.dev
5. SSH into the devstack (vagrant ssh)
6. Set Appsembler fork as git origin and update the repo, just in case:
	cd /edx/app/edxapp/edx-platform
	git remote set-url origin <a href="https://github.com/appsembler/edx-platform.git" target="_blank">https://github.com/appsembler/edx-platform.git</a>
	git fetch
7. Create /edx/app/edx_ansible/server-vars.yml and add the following line to it:
         EDXAPP_SESSION_COOKIE_DOMAIN: ".devstack.dev"
8. Update the installation (this will also install https://github.com/appsembler/edx-microsite-manager/ if it’s not already installed): 
         /edx/bin/update edx-platform feature/easy-microsite-management
9. 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()
10. Migrate the DB, just in case:
         python manage.py cms syncdb --migrate --settings devstack
11. 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

12. Run paver devstack [–fast] lms, the microsites should be working now: http://site1.devstack.dev:8000/, http://site2.devstack.dev:8000/