Open cewing opened 9 years ago
@natea: can you provide some examples of the types of customization that would be required to support arbitrary container launchers? What exactly does that mean?
@cewing We have a small snippet of javascript code (provided upon request) that will talk to our container launcher API and spin up new containers, and return a URL to the student.
Currently, the only parameters that are required are: owner_email: "%%USER_EMAIL%%", project: "Healthshare"
The "Project" parameter can be any project that has been pre-defined in our container launcher service, which has instructions for how to launch a particular Docker image.
I can imagine that the course author might also want to specify things like:
But these two parameters are nice-to-haves for now. The minimum needed is the project name. The owner_email is automatically extracted from request.user.
@cguardia i'll send you the javascript snippet by email instead of pasting it in here.
@cguardia sent you the js snippet by email.
@cguardia - Can you send me the js snippet from Nate?
bryan@woollyandwise.com
@natea - Some questions about the current xmodule implementation for launching containers.
What I see is a template which uses HTML5 postMessage
to post data to this url:
https://isc.appsembler.com/isc/deploy/
included in a hidden iframe
in the template. I get a 404 when browsing to that URL, but my understanding is that /isc/deploy is supposed to do all of the magic to instantiate the Docker image for the container and send back a postMessage to the containing window.
This postMessage triggers some JS in the containing window to create a success message with a link and instructions (username/pwd) to access the container.
Better to have available here, I think.
Thanks, @cguardia. @natea - I see now from this snippet that the URL for the iframe postMessage is https://isc.appsembler.com/isc/newdeploy/, which returns a web page with some related JS. So, that makes more sense now. So, now just wondering if that URL should be configurable. I'm guessing not...
@bryanlandia eventually we'll want the URL to be configurable, but for purposes of ISC, the URL (https://isc.appsembler.com/isc/newdeploy/) doesn't need to change.
What we might want to have configurable is the URL of the container that gets returns, or rather the suffix of the URL to direct the student to different pages within the site to complete a particular exercise.
@bryanlandia i can see that you pushed the xblock_launchcontainer repo, so i'll take a look as soon as I get my Birch environment setup.
@natea - It's not complete yet. I'll let you know when it's ready for review
@cewing - Please have a look at https://github.com/jazkarta/xblock-launchcontainer I've got coverage of the basics of the student view, studio edit view, and saving the xblock. I haven't added any Selenium tests, but the proper functioning is dependent on the isc.appsembler.com Django site anyhow.
@skleinfeldt - Just recording here @natea's request "Also, can you make the URL isc.appsembler.com configurable in xblock_containerlauncher?
I'm thinking it's either something that could be configured sitewide or even coursewide.
Cale suggested a way to do this on the LTI github issue."
About above request, see comment https://github.com/jazkarta/edx-platform-for-isc/issues/10#issuecomment-115304208 - Cale's suggestion isn't doable yet in Birch. It requires SettingsService
which wasn't available until after that named release. So this request should be put on hold til Cypress.
@bryanlandia this PR lets XBlocks use Django settings, so that's probably where we could define isc.appsembler.com as a configurable URL. https://openedx.atlassian.net/browse/OSPR-427
A one-off solution for creating a component that would allow a student to launch a container was created in these two commits:
Create a new XBlock add-on that will encapsulate this functionality with the abilities requested in this comment from @natea:
This should be in a separate xblock repository that can be added to the system.