overhangio / tutor-discovery

Course Discovery plugin for Tutor
GNU Affero General Public License v3.0
12 stars 41 forks source link

using this plugin with "tutor dev init" #33

Closed nimsacode closed 2 years ago

nimsacode commented 2 years ago

after installing and enabling this plugin and saving the config file:

pip install tutor-discovery
tutor plugins enable discovery
tutor config save

I issued the following command:

tutor dev init

and end up with this error:

requests.exceptions.ConnectionError: HTTPConnectionPool(host='local.overhang.io', port=80): Max retries exceeded with url: /api/courses/v1/courses/?page=1&page_size=50&username=discovery (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f60de487dc0>: Failed to establish a new connection: [Errno 111] Connection refused'))
CommandError: One or more of the data loaders above failed.
Error: Command failed with status 1: docker-compose -f /home/z/.local/share/tutor/env/local/docker-compose.yml -f /home/z/.local/share/tutor/env/dev/docker-compose.yml -f /home/z/.local/share/tutor/env/dev/docker-compose.tmp.yml --project-name tutor_dev -f /home/z/.local/share/tutor/env/local/docker-compose.jobs.yml -f /home/z/.local/share/tutor/env/dev/docker-compose.jobs.yml -f /home/z/.local/share/tutor/env/dev/docker-compose.jobs.tmp.yml run --rm discovery-job sh -e -c make migrate     

# Development partners                                                                                                                                               
./manage.py create_or_update_partner  \                                                                                                                              
  --site-id 1 \                                                                                                                                                      
  --site-domain discovery.local.overhang.io:8381 \                                                                                                                   
  --code dev --name "Open edX - development" \                                                                                                                       
  --lms-url="http://lms:8000" \                                                                                                                                      
  --studio-url="http://cms:8000" \                                                                                                                                   
  --courses-api-url "http://local.overhang.io:8000/api/courses/v1/" \                                                                                                
  --organizations-api-url "http://local.overhang.io:8000/api/organizations/v1/"                                                                                      

# Production partner                                                                                                                                                 
./manage.py create_or_update_partner  \                                                                                                                              
  --site-id 2 \                                                                                                                                                      
  --site-domain discovery.local.overhang.io \                                                                                                                        
  --code openedx --name "Open edX" \                                                                                                                                 
  --lms-url="http://lms:8000" \                                                                                                                                      
  --studio-url="http://cms:8000" \                                                                                                                                   
  --courses-api-url "http://local.overhang.io/api/courses/v1/" \                                                                                                     
  --organizations-api-url "http://local.overhang.io/api/organizations/v1/"                                                                                           

./manage.py refresh_course_metadata --partner_code=openedx                                                                                                           
./manage.py update_index --disable-change-limit

these urls: http://local.overhang.io/api/courses/v1/ and http://local.overhang.io/api/organizations/v1/, are not valid in dev mode. I guess that this is a bug.

pcliupc commented 2 years ago

@nimsacode Have you tried runningtutor local init and then start the platform with tutor dev start?

nimsacode commented 2 years ago

Thanks

tutor local init
tutor local stop
tutor dev start

works, but I don`t know why?