vlead / vlabs-openedx-platform

Other
1 stars 0 forks source link

Set up and configure openedx dogwood version in local environment #8

Closed kraghupathi closed 6 years ago

kraghupathi commented 6 years ago

Set up and configure openedx dogwood version in local environment.

  1. Install vagrant in local environment.
  2. Download openedx dogwood version from files.vlabs.ac.in server.
  3. Take mysql and mongo databases dump from themeless.vlabs.ac.in server.
  4. Restore mysql and mongodb databases in vagrant box (i.e openedx dogwood empty box in local environment)
kraghupathi commented 6 years ago

Followed below steps to setup and configure openedx dogwood version in local environment

  1. Installed vagrant box in local environment.
  2. Downloaded openedx dogwood version from files.vlabs.ac.in server.
  3. Taken mysql and mongo databases from themeless.vlabs.ac.in server using below commands. sudo mongodump -o ./mongo-backup sudo mysqldump -u root -p --all-databases > ./backup.sql
  4. Copied mysql and mongo database files from themeless.vlabs.ac.in to ssh-tunnel.vlabs.ac.in using below command. rsync -avz --progress backup-edx raghupathi@ssh-tunnel.vlabs.ac.in:.
  5. Copied mysql and mongo database files from ssh-tunnel.vlabs.ac.in to local environment using below command. rsync -avz --progress backup-edx vagrant@10.2.57.162:.
kraghupathi commented 6 years ago

Working on restoring of mysql and mongo databases.

kraghupathi commented 6 years ago
  1. Restored mongo database in openedx dogwood version (empty vagrant box). Restoration is successfully but courses are not displaying in CMS (content management system).
  2. In the process of restoring mysql database the following error was caught.

vagrant@precise64:~/backup-edx-2017-11-25/backup-edx$ sudo mysql -uroot -p < ./backup.sql Enter password: ERROR 1064 (42000) at line 113: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) DEFAULT NULL, is_superuser tinyint(1) NOT NULL, username varchar(30)' at line 4

kraghupathi commented 6 years ago

We are working on above issues

kraghupathi commented 6 years ago

The following are the road blocks in resolving the above issues.

  1. MongoDB: Database is restored but unable to display the labs on CMS.
  2. Mysql: Mentioned in the above comment.
  3. In the process of manually importing courses in CMS the following error was caught

    Updating Course There was an error while importing the new course to our database. 'NoneType' object has no attribute 'data_dir'

kraghupathi commented 6 years ago

Steps followed for importing courses manually into CMS

  1. Exported the course from themeless.vlabs.ac.in.
  2. Untar the course and edit the course/policies/course/policy.json.file
  3. In the policy.json change the order of the tabs so that courseware is first.
  4. Tar it above course using below command $ tar -cvf course.tar.gz course.
  5. Imported course in CMS.
kraghupathi commented 6 years ago

The following steps are done

  1. Exported couple of courses from themeless.vlabs.ac.in.
  2. Untar the courses and replaced following text in policy.json file to change the order of the tabs so that courseware is first.

$ find . -name "policy.json" | xargs sed -i 's/Home/Home1/g' && find . -name "policy.json" | xargs sed -i "s/course_info/course_info1/g" $ find . -name "policy.json" | xargs sed -i "s/Course/Course1/g" && find . -name "policy.json" | xargs sed -i "s/courseware/courseware1/g" $ find . -name "policy.json" | xargs sed -i "s/Home1/Course/g" && find . -name "policy.json" | xargs sed -i "s/course_info1/courseware/g" $ find . -name "policy.json" | xargs sed -i "s/Course1/Home/g" && find . -name "policy.json" | xargs sed -i "s/courseware1/course_info/g"

  1. Tar it couple of courses using below command $ tar -cvf course.tar.gz course.
  2. Imported course in CMS.
kraghupathi commented 6 years ago

Created following boxes for test edx-dogwood version on local machine.

  1. Created a edx-dogwood box with couple of labs and users.
  2. Created a empty edx-dogwood box.
  3. Taken dump mysql and mongodb databases from edx-dogwood with labs edx-dogwood.vlabs.ac.in.
  4. Restore in empty edx-dogwood box edx-dogwood-test.vlabs.ac.in.
  5. Tested all labs and submitted couple of feedbacks.
kraghupathi commented 6 years ago

Done the following steps

  1. Exported 90 courses from themeless.vlabs.ac.in.
  2. Imported 90 courses in edx-dogwood.vlabs.ac.in.
  3. Taken mongo and mysql databases dump from edx-dogwood.vlabs.ac.in.
  4. Restored mongo and mysql databases in empty box edx-dogwood-test.vlabs.ac.in.

Tested all the courses and able to access the all experiments with feedback links.