Configuration change from Ironwood to Juniper?

Hi Ned,

i just try using “open-release/juniper.master”, but i don’t know if something changed about configuration, because i used to edit /edx/app/edxapp/lms.env.json in “open-release/ironwood.master” but in juniper all configurations i used to do properly not working, sometimes i have to edit /edx/etc/lms.yml , but even that it do not always works.

Do i missed something?

Regards,

1 Like

I have been editing both /edx/app/edxapp/[lms|cms].env.json and /edx/etc/[lms|studio].yml respectfully to make changes, and then restart everything.

Hi Tom,

So, it means that, for example, for Enabling Course Prerequisites and Enabling Timed Exams, with “open-release/ironwood.master”, i used to just edit /edx/app/edxapp/lms.env.json like this:

'MILESTONES_APP': true,

"FEATURES": {
	....
	"ENABLE_PREREQUISITE_COURSES": true,
	"ENABLE_SPECIAL_EXAMS": true,
	....
}

So what you say is that, with juniper.master, i have to do the same configuration both in /edx/app/edxapp/lms.env.json and /edx/etc/lms.yml, then restart all services, is that?

I believe so. That was just my experience with some settings not seeming to work. I am not sure what the order of operations are for the configuration files. I believe from what I have seen when using the ansible method for updating the variables, is that it does update all of the files as well.

OK.

I’ll reinstall juniper.master, try again and see, using your method.

I will let you know…

My install is finished, and i try some configurations:

1- Studio Login via the LMS

Logging in to Studio is done by redirecting the user to the LMS to log in, and then redirecting back to Studio.
This can be disabled by site operators using the new DISABLE_STUDIO_SSO_OVER_LMS feature flag in lms.env.json.

/edx/app/edxapp/lms.env.json:

“FEATURES”: {

“DISABLE_STUDIO_SSO_OVER_LMS”: true,

}

/edx/app/edxapp/cms.env.json:

	"FEATURES": {
		...
	"DISABLE_STUDIO_SSO_OVER_LMS": true,
		...
	}

i restart lms and cms:

/edx/bin/supervisorctl restart lms
/edx/bin/supervisorctl restart cms

But when i do this on juniper, it doesn’t works, still redirecting to lms for login.

2- Enabling Open edX Search

To enable Open edX Search, i use to do this:

/edx/app/edxapp/cms.env.json:

	"FEATURES": {
		...
	"ENABLE_LIBRARY_INDEX": true,
	"ENABLE_COURSEWARE_INDEX": true,
	"SEARCH_ENGINE": "search.elastic.ElasticSearchEngine",
		...
	}

/edx/app/edxapp/lms.env.json:

“FEATURES”: {

“ENABLE_COURSE_DISCOVERY”: true,
“ENABLE_COURSEWARE_SEARCH”: true,
“ENABLE_DASHBOARD_SEARCH”: true,
“SEARCH_ENGINE”: “search.elastic.ElasticSearchEngine”,

}

i restart lms and cms:

/edx/bin/supervisorctl restart lms
/edx/bin/supervisorctl restart cms

But when i do this on juniper, it doesn’t works, the search bar do not appear on the page.

So i try your method, and also edit .yml files like this:

/edx/etc/studio.yml:

         FEATURES:
            ....
      ENABLE_COURSEWARE_SEARCH: true
      ENABLE_LIBRARY_INDEX: true
      SEARCH_ENGINE: search.elastic.ElasticSearchEngine
           ....

/edx/etc/lms.yml:

         FEATURES:
            ....
      ENABLE_COURSEWARE_SEARCH: true
      ENABLE_LIBRARY_INDEX: true
      SEARCH_ENGINE: search.elastic.ElasticSearchEngine
         ENABLE_COURSE_DISCOVERY: true
            ....

i restart lms and cms:

/edx/bin/supervisorctl restart lms
/edx/bin/supervisorctl restart cms

And now i got an error:

# Uh oh, we are having some server issues…server error

but nothing in the log files

@nedbat @Cory_Lee Need ya help please, i’ve a deployment on pending, need you ta save this :sweat: :sweat: :sweat: :sweat: :sweat:

1 Like

Maybe, there is a log.

It help me run
sudo tail -f /edx/var/log/*/*log
without cancel it.

Reload the page and see the logs that changed (tail -f shows it)


https://openedx.atlassian.net/wiki/spaces/OpenOPS/pages/49873839/Debugging+Edxapp

1 Like

I finally be able to Enabling Open edX Search, there was an error in the file.

Finally, edit both env.json and yml files make it works.

So my question is, is it possible to regenerate the /edx/etc/lms.yml from what is entered in /edx/app/edxapp/lms.env.json ? because edit the 2 files every time…is not easy, and you can make a mistake so get a 500 ERROR

I will keep testing my juniper.master instance, try to configure everything i use to do with ironwood, and see if it all work

Can’t access to CMS, so 1- Studio Login via the LMS still pending.

I just read around the forum and i saw that DISABLE_STUDIO_SSO_OVER_LMS has been removed on juniper, then there is another solution to access CMS after installing SSL Certificate for subdomaine. I try it like this:

/edx/etc/lms.yml

LOGIN_REDIRECT_WHITELIST:
- lms.eduworld-cm.com
- cms.eduworld-cm.com
SESSION_COOKIE_DOMAIN = ‘.eduworld-cm.com’

/edx/etc/studio.yml

LOGIN_REDIRECT_WHITELIST:
- cms.eduworld-cm.com
SESSION_COOKIE_DOMAIN = ‘.eduworld-cm.com’

/edx/bin/supervisorctl restart all

Then results:

1- Django LMS ADMIN is ok:

CMS02020-08-29 15_04_46-Site administration _ LMS Administration - Opera

2- CMS:

(Studio Home Page using secure https, click on SIGN IN)

(Redirected to LMS LOGIN, LMS page using secure https, click on SIGN IN with staff account)

(Redirected to Studio Home Page, without logged in to Studio, but…)

(The Login process properly works to LMS Page)

Do i missed something? :sweat: :sweat: :sweat: :sweat:

Finally able to make it works:

1-Enable SSL on CMS 18010, by editing in /edx/app/nginx/sites-available/cms, make it use the same SSL CERT with the one installed on the LMS
2-Make some changes, in /edx/etc/lms.yml:

CSRF_COOKIE_SECURE: true
SESSION_COOKIE_SECURE: true
CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: ‘.mylms.domainname.com’
CROSS_DOMAIN_CSRF_COOKIE_NAME: ‘csrfcookie-mylms-domainname-com’
LOGIN_REDIRECT_WHITELIST:
- mylms.domainname.com
- mylms.domainname.com:18010
SESSION_COOKIE_DOMAIN: ‘.mylms.domainname.com’

3-Make some changes, in /edx/etc/studio.yml:

CSRF_COOKIE_SECURE: true
SESSION_COOKIE_SECURE: true
CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: ‘.mylms.domainname.com’
CROSS_DOMAIN_CSRF_COOKIE_NAME: ‘csrfcookie-mylms-domainname-com’
LOGIN_REDIRECT_WHITELIST:
- mylms.domainname.com:18010
SESSION_COOKIE_DOMAIN: ‘.mylms.domainname.com’

4-Edit /edx/app/edxapp/edx-platform/lms/envs/common.py, changed DCS_SESSION_COOKIE_SAMESITE = ‘None’, to DCS_SESSION_COOKIE_SAMESITE = ‘lax’
5-Reboot the server
6-Empty cache and cookie on my browsers Edge, Mozilla and Chrome, close them all and relaunch
7-Now secure connection on https://mylms.domainname.com:18010 works, and login to Studio works.

Finally, i think the issue was because the CMS was not running under HTTPS.

I will try whit a subdomain, so changing “mylms.domainname.com:18010” to “mycms.domainname.com” and retry this.

2 Likes

Thanks for updating this solution, it worked for me !!!

1 Like