Closed zameel7 closed 8 months ago
That's by design. the manage.py command is looking for the following environment variables:
PLUGIN_API_USER_EMAIL,
PLUGIN_API_USER_NAME,
PLUGIN_API_USER_PASSWORD,
OPENEDX_COMPLETE_DOMAIN_NAME
you might consider searching for these in the cookiecutter code base. i believe that some/all of these are created w terraform and added to the tutor deployment(s)
@lpm0073 , I don't see these anywhere in the cookiecutter code base. Could you please confirm that it is to be there in the cookiecutter itself?
Confirmed. My mistake. The documentation is missing setup instructions for these. So in hindsight, to run this command you'll first need to set those four environment variables from the command line.
Shouldn't that be in the .env inside the container?
Not by default. it depends on how you deployed the pod. i checked a couple of installations earlier today and none of the four variables were set in the lms pods.
But, if you haven't created a .env file, or if these variables aren't present in the .env then you can easily set them on the command line just before running the manage.py command.
checking in on this issue. did you resolve the problems you were having?
Yep, I added those values and it worked!
On Mon, 1 Jan 2024 at 1:00 AM, Lawrence McDaniel @.***> wrote:
checking in on this issue. did you resolve the problems you were having?
— Reply to this email directly, view it on GitHub https://github.com/cookiecutter-openedx/openedx-plugin-example/issues/18#issuecomment-1873022475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNZFTOXOHTKC36EM5WXP43YMG4OTAVCNFSM6AAAAABAQYOQE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGAZDENBXGU . You are receiving this because you authored the thread.Message ID: @.*** com>
Excellent! closing this issue :)
Steps done:
private.txt
tutor k8s launch
Facing issue:
tutor k8s exec lms ./manage.py lms openedx_plugin_api_init
, got this errorThe error seems to be raised because the handle function inside openedx_plugin_api_init tries to get PLUGIN_API_USER_EMAIL, PLUGIN_API_USER_NAME, PLUGIN_API_USER_PASSWORD, OPENEDX_COMPLETE_DOMAIN_NAME, which is being taken from os.env.
https://github.com/cookiecutter-openedx/openedx-plugin-example/blob/1d343d5bc107ce3c9ff73923e046a449ee45b755/openedx_plugin_api/management/commands/openedx_plugin_api_init.py#L20C1-L25C78
Should we be adding these to the env or somewhere in the plugin?