devstack icon indicating copy to clipboard operation
devstack copied to clipboard

Insights-configuration for docker

Open aht007 opened this issue 2 years ago • 1 comments


I've completed each of the following or determined they are not applicable:

  • [ ] Made a plan to communicate any major developer interface changes (or N/A)

aht007 avatar Oct 07 '22 07:10 aht007

things are going wrong as I test in ways that seem beyond my lack of docker expertise - short version is /edx/app/insights/insights/ seems to now be at /edx/app/insights/edx_analytics_dashboard/ and a few things need to be changed accordingly. That move seems to be part of https://github.com/openedx/edx-analytics-dashboard/pull/1333

what follows is what I did thrashing around with my limited docker experience in devstack:

changed my docker-compose to image: openedx/insights-dev:${OPENEDX_RELEASE:-latest} per slack and ran successfully with my local checkout after resolving a bunch of needed migrations and provisioning

then I removed the local checkout and insights would not come up: python: can't open file '/edx/app/insights/insights/manage.py': [Errno 2] No such file or directory

when I went to the insights shell I found that there was no edx/app/insights/insights/ instead code was at edx/app/insights/edx_analytics_dashboard/

Searching for insights/insights I changed the call in docker-compose.yml to point at edx/app/insights/edx_analytics_dashboard/manage.py instead and insights can now start but cannot call

so I go to provision again and find that the provision script also points at insights/insights and has to be changed to point at insights/edx_analytics_dashboard which goes fine until it has to talk to the lms to provision. The provision script recreates the lms container and seems to break it: python: can't open file '/edx/app/edxapp/edx-platform/manage.py': [Errno 2] No such file or directory

but dev.up.lms works fine by itself, it's only the provision script that brings up a mangled container. I went through the rest of provisioning manually and that seems to work, and then reprovisioned the analytics API.

Also had to make static directly in the container after trying to just use the command in the weirdly broken provisioning flow, that does not seem to have actually webpacked right. I'm not sure what's going on there.

So eventually I got it running but I'm pretty sure that these two repos have to agree on insights/insights vs insights/edx_analytics_dashboard/ and that ends up in a weird number of places. It's unfortunate insights was ever named differently than the repo name but that's long in the past.

ashultz0 avatar Oct 14 '22 17:10 ashultz0

@ashultz0 edx/app/insights/insights is still at its place as well as edx/app/insights/edx-analytics-dashboard. The difference between both of them is that edx-analytics-dashboard directory is the code directory which was also previously present in Ansible based Images and it hosts the code that is copied while building the image. On the other hand, edx/app/insights/insights is the directory that is mounted from docker-compose and this behavior was same previously as well. It is still mounted and it is still present in the new Docker based image. References for above mentioned files and Ansible configurations:

Can you please explain a bit more about the steps that you performed while testing this and what checkout are you talking about?

aht007 avatar Oct 31 '22 09:10 aht007

@aht007 the checkout is that because I've done a bunch of work on insights in the past year I had an existing insights checkout, so my initial run was just on that and then I moved it out of the way to try to use the provided dashboard. Maybe the only way to test this would be on a completely clean devstack but I was hoping to spend less than a day on the test.

ashultz0 avatar Oct 31 '22 13:10 ashultz0

@ashultz0 Maybe your checkout somehow messed up with the mounted directory at /edx/app/insights/insights, nevertheless it should still be present no matter what. Would it be possible for you to test the changes out again?

aht007 avatar Oct 31 '22 13:10 aht007

I'm trying to make a separate clean devstack locally to test, we'll see if that works or if they just get tangled together at the docker layer

ashultz0 avatar Oct 31 '22 14:10 ashultz0