Run database migration certificate creation

Hello,
I am trying to enable certificates on the Ironwood platform on native open edx installation. The documentation here says:

Step 3. If it does not exist already, create the folder /tmp/certificates owned by the user and group www-data . Depending on your configuration, this folder might not survive reboots, and so might need to be created by a script.

I did this way after trying a few things:

  1. create the script:
    sudo nano /etc/init.d/certificates.sh

  2. Contents of the script:

#!/bin/bash
if [ ! -d /tmp/certificates ]
  then
    sudo mkdir /tmp/certificates
    sudo -u root chown www-data:www-data /tmp/certificates
    sudo -u www-data chmod 755 /tmp/certificates
fi
  1. add to startup init:
    sudo update-rc.d certificates.sh defaults
    but after the third step I got a warning like this
    insserv: script certificates.sh is not an executable regular file, skipped!

certificates.sh showing running status, but it is not created inside the tmp folder. So I did the following steps:
mkdir /tmp/certificates
chown -R www-data:www-data /tmp/certificates

after this steps, the document says to run database migrations… but I don’t know how to do this migrations?

also my sudo /edx/bin/supervisorctl status contains only following parameters


What should I do next?
Your help in this matter would be greatly appreciated.
Thanks in advance :smiley:

1 Like

Hey @Shiva-prog123

The steps should be

source /edx/app/edxapp/edxapp_env
python /edx/app/edxapp/edx-platform/manage.py lms makemigrations --settings=production
python /edx/app/edxapp/edx-platform/manage.py lms migrate --settings=production
python /edx/app/edxapp/edx-platform/manage.py cms makemigrations --settings=production
python /edx/app/edxapp/edx-platform/manage.py cms migrate --settings=production

here the --settings option should be the settings that you are using, it could even be development.

I am assuming here that your virtualenv is activated if not you also need to run source /edx/app/edxapp/edxapp_env/bin/activate

Let me know if this helped you. :slight_smile:

Hi @farhaanbukhsh ,
Thanks for the reply…
I tried the commands…what I am getting is like this :point_down:



what should I do? upgrading this existing platform will help me? I am a bit confused what to do next? My goal is to activate the certificate module…

Hey, @Shiva-prog123 this means that there is no migration to run. You can restart the LMS and try creating a certificate. To restart lms you need to run sudo /edx/bin/supervisorctl restart lms. You can also monitor LMS and studio logs and see if you notice any error.