Giter Club home page Giter Club logo

Comments (3)

bradenmacdonald avatar bradenmacdonald commented on July 28, 2024 1

@jpamdeth It actually sounds to me like you set things up correctly ("You are authenticated as edx").

What I think is happening is that your "edx" user doesn't have permission to access the Blockstore Django admin.

Accessing it is not really necessary to use blockstore, but if you'd like to fix that, run make blockstore-shell from the blockstore directory, and then in the blockstore shell, run ./manage.py shell and then these commands:

from django.contrib.auth import get_user_model
User = get_user_model()
User.objects.filter(username="edx").update(is_superuser=True, is_staff=True)

Whether you do that or not, you should still be able to use Blockstore. I think the setup instructions are missing some key steps to get Studio+LMS talking to blockstore though; you may need to run these commands from your devstack directory:

docker exec -t edx.devstack.blockstore bash -c "source ~/.bashrc && echo \"from django.contrib.auth import get_user_model; from rest_framework.authtoken.models import Token; User = get_user_model(); edxapp_user, _ = User.objects.get_or_create(username='edxapp'); Token.objects.get_or_create(user=edxapp_user, key='edxapp-insecure-devstack-key')\" | ./manage.py shell"

docker exec -t edx.devstack.lms bash -c "grep BLOCKSTORE_API_AUTH_TOKEN /edx/app/edxapp/edx-platform/lms/envs/private.py || echo BLOCKSTORE_API_AUTH_TOKEN = \'edxapp-insecure-devstack-key\' >> /edx/app/edxapp/edx-platform/lms/envs/private.py"

docker exec -t edx.devstack.lms bash -c "grep BLOCKSTORE_API_AUTH_TOKEN /edx/app/edxapp/edx-platform/cms/envs/private.py || echo BLOCKSTORE_API_AUTH_TOKEN = \'edxapp-insecure-devstack-key\' >> /edx/app/edxapp/edx-platform/cms/envs/private.py"

# Create a "collection" that all new content can be created within:
docker exec -t edx.devstack.blockstore bash -c "source ~/.bashrc && echo \"from blockstore.apps.bundles.models import Collection; coll, _ = Collection.objects.get_or_create(title='Content Collection', uuid='56789876-2111-4111-8111-123456789000')\" | ./manage.py shell"

make lms-restart studio-restart

Let me know how you make out and then we can update the README. Thanks!

from blockstore.

jpamdeth avatar jpamdeth commented on July 28, 2024

@bradenmacdonald Thanks for the reply! The first docker exec command you listed ran without error but the second produced this:

devstack jessica.pamdeth$ docker exec -t edx.devstack.lms bash -c "grep BLOCKSTORE_API_AUTH_TOKEN /edx/app/edxapp/edx-platform/lms/envs/private.py || echo BLOCKSTORE_API_AUTH_TOKEN = 'edxapp-insecure-devstack-key' >> /edx/app/edxapp/edx-platform/lms/envs/private.py"
grep: /edx/app/edxapp/edx-platform/lms/envs/private.py: No such file or directory
bash: /edx/app/edxapp/edx-platform/lms/envs/private.py: No such file or directory

from blockstore.

bradenmacdonald avatar bradenmacdonald commented on July 28, 2024

@jpamdeth Ah, ok, you'll need to create the file edx-platform/lms/envs/private.py (Just an empty file), then try again. Sorry for the oversight.

from blockstore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.