Comments (3)
@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.
@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.
@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)
- Bundle Granularity HOT 32
- Import/Export Mapping Logic and a Dedicated CLI Client? HOT 18
- Exported Content Reuse and Human Readable Format Conventions HOT 4
- Comparisons: Modeling Hierarchy HOT 8
- Why Files? HOT 4
- Authentication and Authorization HOT 4
- Separating Policy from Content HOT 3
- Proposal: Taking Down Content HOT 6
- Blockstore Test Cases in edxapp HOT 3
- Nuances of the bundle format HOT 5
- PATCHing a Draft's files deletes its links HOT 1
- Race condition when adding files to a draft via PATCH HOT 2
- Relationship to edx-val (Video Abstraction Layer) HOT 3
- Blockstore can't serve SVG images correctly over S3 HOT 11
- Signing in to blockstore raise an error of invalid scope HOT 2
- Publish to PyPI & install from PyPI in edx-platform HOT 5
- Remove Collections Model? HOT 1
- Django 4.2 Upgrade HOT 1
- [DEPR]: Deployment of Blockstore as an independent service HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blockstore.