Xperez
(Xabier Pérez Fernández)
May 26, 2020, 8:57pm
1
Hi, i already edited my common.py files to enable the neccesary flag to get my edx search working but still cant see a search box or a reindex button.
I installed django, pytz, ,elasticsearch and pymongo using pip, have no issues.
Any ideas? Thanks!!
Xperez
(Xabier Pérez Fernández)
May 26, 2020, 9:27pm
2
My “pip freeze” in case its helpful:
appdirs==1.4.4
asn1crypto==0.24.0
backports.ssl-match-hostname==3.5.0.1
cached-property==1.3.1
certifi==2018.1.18
chardet==3.0.4
configparser==4.0.2
contextlib2==0.6.0.post1
cryptography==2.1.4
distlib==0.3.0
Django==1.11.29
django-elasticsearch-dsl==0.4.5
docker==2.5.1
docker-compose==1.17.1
docker-pycreds==0.2.1
dockerpty==0.4.1
docopt==0.6.2
elasticsearch==5.5.3
elasticsearch-dsl==5.4.0
enum34==1.1.6
filelock==3.0.12
funcsigs==1.0.2
functools32==3.2.3.post2
gyp==0.1
idna==2.6
importlib-metadata==1.6.0
importlib-resources==1.5.0
ipaddress==1.0.17
jsonschema==2.6.0
keyring==10.6.0
keyrings.alt==3.0
mock==2.0.0
pathlib2==2.3.5
Paver==1.3.4
pbr==3.1.1
pipenv==2018.11.26
pycrypto==2.6.1
pygobject==3.26.1
pymongo==3.10.1
pyOpenSSL==17.5.0
python-dateutil==2.8.1
pytz==2020.1
pyxdg==0.25
PyYAML==3.12
requests==2.18.4
scandir==1.10.0
SecretStorage==2.3.1
singledispatch==3.4.0.3
six==1.14.0
texttable==0.9.1
typing==3.7.4.1
urllib3==1.22
virtualenv==20.0.20
virtualenv-clone==0.5.4
websocket-client==0.44.0
zipp==1.2.0
jramnai
(JayRam Nai)
May 27, 2020, 3:57am
3
Hello @Xperez ,
You do not need to install services separately, its part of the installation. May I know why did you install them separately?
And regarding the flags, please source your edxapp_env and move to edx-platform and use lms or cms shell to check your settings value:
python manage.py lms/cms shell --settings <your_settings>
from django.conf import settings
settings.FEATURES.get('ENABLE_COURSEWARE_INDEX')
If ENABLE_COURSEWARE_INDEX
is enabled then you will be able to see the Reindex button on the course index page.
Like this flag you can check the rest of your settings and follow this doc for Enabling Open edX Search.
3 Likes
Xperez
(Xabier Pérez Fernández)
May 27, 2020, 2:10pm
4
Hi JayRam:
I´ll try to answer your questions:
“May I know why did you install them separately?”:
I saw in the documentation that pytz, django elasticsearch and pymongo were a requirement, thats the only reason i had to install them separately…was this an error?
I´m a bit of a noob: What variable should i use in “<your_settings>”?
Thanks a lot for taking time to answer my questions
jramnai
(JayRam Nai)
May 27, 2020, 2:30pm
5
No, this is not an error but got curious that why did you install those services separately that’s why I asked. And yes, they are requirements for the open edX and all requirements got install when you do installation.
Xperez:
I´m a bit of a noob: What variable should i use in “<your_settings>”?
For the settings, you need to provide details like:
what kind of installation you have done? (native or devstack)
what is your open edX branch?
Xperez
(Xabier Pérez Fernández)
May 27, 2020, 2:43pm
6
I understand…So my command will be something like this, based on my settings:
python manage.py lms/cms shell --settings devstack
from django.conf import settings
settings.FEATURES.get(‘ENABLE_COURSEWARE_INDEX’)
My branch is ironwood.master
So now i go to my terminal and…
Sudo su
cd devstack
make lms-shell
python manage.py lms shell --settings devstack
And i get an error: ValueError: Unable to configure handler ‘local’: [Errno 2] No such file or directory.
jramnai
(JayRam Nai)
May 27, 2020, 2:48pm
7
What type of installation you have done? Native / devstack
Your settings also depends on the installation type.
If native then
python manage.py cms shell --settings production
If devstack docker
python manage.py cms shell --settings devstack_docker
And if you want to check your studio related settings then you should open your studio shell first not lms
make studio-shell
Xperez
(Xabier Pérez Fernández)
May 27, 2020, 2:53pm
8
Its a devstack installation.
I went into my lms shell (make lms-shell) and typed:
python manage.py cms shell --settings devstack_docker
And i get a new console.
Then typed:
from django.conf import settings
And for the last step:
settings.FEATURES.get(‘ENABLE_COURSEWARE_INDEX’)
But i get no message from the shell
Really, thanks for taking your time
1 Like
Xperez
(Xabier Pérez Fernández)
May 27, 2020, 11:53pm
9
When i go into “Explore Courses” this is all i see (No search bar)
I edited the next variables in lms/envs/common.py
ENABLE_COURSEWARE_SEARCH
: True,
ENABLE_DASHBOARD_SEARCH
: True,
ENABLE_COURSE_DISCOVERY
: True,
SEARCH_ENGINE
: “search.elastic.ElasticSearchEngine”
And the next variables in cms/envs/common.py:
ENABLE_COURSEWARE_INDEX
: True,
ENABLE_LIBRARY_INDEX
: True,
SEARCH_ENGINE
: “search.elastic.ElasticSearchEngine”
I think i have completed all the steps, in which section should i see a search bar? Why can´t i see a REINDEX button in my course?
Thanks
jramnai
(JayRam Nai)
May 29, 2020, 1:41pm
10
You are not able to see it becuase you have changed those variables in the wrong file.
You are on devstack docker installation so devstack_docker.py files settings will have most priority and in devstack_docker.py file those settings are false.
Try to update your settings in devstack_docker.py file and restart your services, it will work.
Xperez
(Xabier Pérez Fernández)
May 29, 2020, 2:39pm
11
You rock, simply as that
I guess variables like PLATFORM_NAME will have to be edited in the devstack_docker.py from the LMS shell too and not in the lms.env.json file right?
jramnai
(JayRam Nai)
May 29, 2020, 3:26pm
12
No, its not right to put everything in devstack_docker.py file.
Each setting file has its priority. Need to change Search related flags in the devstack_docker.py file 'cause they were set to false in it and in you devstack docker environment devstack_docker.py file has first priority. Always try to change in lms.env.json first if its not working then check in another settings file where it is overriding the value of it.
I will try to write one post about settings.
1 Like
Xperez
(Xabier Pérez Fernández)
May 29, 2020, 4:55pm
13
Thanks a lot for your guidance and help!