Run database migration certificate creation

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/

  2. Contents of the script:

if [ ! -d /tmp/certificates ]
    sudo mkdir /tmp/certificates
    sudo -u root chown www-data:www-data /tmp/certificates
    sudo -u www-data chmod 755 /tmp/certificates
  1. add to startup init:
    sudo update-rc.d defaults
    but after the third step I got a warning like this
    insserv: script is not an executable regular file, skipped! 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/ lms makemigrations --settings=production
python /edx/app/edxapp/edx-platform/ lms migrate --settings=production
python /edx/app/edxapp/edx-platform/ cms makemigrations --settings=production
python /edx/app/edxapp/edx-platform/ 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.