edx-platform - Re-install Open EdX in Ubuntu 12.04 using the Configuration repo

As I mentioned in the previous blog post about installing Open EdX using the Configuration repository, you can only run the bootstrap script successfully on a freshly installed Ubuntu server. Actually, you can do a re-installation of the Open EdX stack on the same server with an extra effort. There will be a couple of issues you need to solve in order to move forward. Here are some of them:

1. MySQL error:

TASK: [edxlocal | create a database for edxapp] ******************************* 
failed: [localhost] => {"failed": true, "item": ""}
msg: unable to connect, check login_user and login_password are correct, or alternatively check ~/.my.cnf contains credentials

This means that your server has already been installed mysql server and have a different login privilege from the default.
=> Read this blog post to solve the error: http://iambusychangingtheworld.blogspot.com/2014/09/edx-platform-how-to-fix-mysql-error.html

2. If the process fail at importing demo course step:

=> remove/comment out the demo role from /var/tmp/configuration/playbooks/edx_sandbox.yml
(because I don't need this course)

=> re-run the installation script
# sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," --limit @/root/edx_sandbox.retry

3. If fail at installing xqueue's "install python post-requirements" step:

=> source to the xqueue virtualenv:
# source /edx/app/xqueue/venvs/xqueue/bin/activate

=> Install the post-requirements
(xqueue)# pip install -r /edx/app/xqueue/xqueue/requirements.txt

=> Restart xqueue
# /edx/bin/supervisorctl restart xqueue xqueue_consumer

=> remove/comment out this step from xqueue's /var/tmp/configuration/playbooks/roles/xqueue/tasks/deploy.yml

=> re-run the installation script
# sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," --limit @/root/edx_sandbox.retry


So, to be concluded, if you get any error when re-installing the Open EdX stack, just read the error message carefully and then check out the Ansible playbooks for that specific portion (roles), you will find out the solution to fix that issue.

Cool!

Comments

  1. Hi Trinh,

    Here at school I so happen to need to reinstall Open EDX. I have read your article and found it very informative. I would like to know if you deleted the EDX folder before reinstalling. Also if you had to backup MySQL and MongoDB. Thanks.




    Regards,
    Edward Hanna

    ReplyDelete
  2. No, you don't need. As far as I know, the provisioning process will overwrite it. Just to make sure that you have backed up your configuration, settings by copying or committing to your own repo.

    ReplyDelete

Post a Comment