Adventures Docking in the Cloud

Adventures Docking in the Cloud

July 17, 2020 Off By JR

At my first Judo club part of the warm-ups always consisted of ne-waza (ground work, sort of like wrestling if you’re unfamiliar with Judo). Sensei would stress that during this part of the warm-up you should not be going all out, which is much harder to understand at lower belt levels. There are two main ways to gas out during ne-waza, trying to maintain 100% effort the whole time, and not breathing. I definitely fell into the second camp, and I can often hear in the back of my head now when I practice one of my senpais saying, “JR breathe!”

I feel like I’m going to have that same kind of voice as I dive deeper into the possibilities in Reclaim Cloud. In one of the intro videos Tim says to “read the documentation”. I fall into that demographic of people that fiddles with stuff until it seems to work. There’s the infamous description of kids who grew up in the 80s just playing with VCRs to get the clock and recording features set up. As I fiddle around with environments in the cloud I’m starting to hear “read the documentation” in the back of my mind, and hopefully I’ll make my way to starting with that than my usual approach.

Today’s adventure, trying to set up a Learning Record Store. If you haven’t encountered these before, there is a whole industry of services you can subscribe to for an LRS and it enables you to use xAPI with different learning products. Adapt Authoring Tool had an xAPI extension I had turned on, and when you go to the sample Catsum Course you get an error indicating that there is no connected LRS. As an ID in higher ed you get a bit spoiled not having to think about systems like this necessarily because in the vast majority of cases you have a Learning Management System that is connected to a Student Information System that does so much work behind the scenes. Even if you build course material outside the LMS you can often bring it in with an LTI or SCORM. In some other training/teaching and learning environments you have the option of using SCORM to track learners’ activity, and in some cases xAPI. The question I was after was, could you host this yourself using Reclaim Cloud?

Learning Locker seemed to be an open source option for an LRS and had fairly robust looking documentation. At some point Learning Locker seems to have been procured by LearningPool and so the GitHub read me indicates it’s copyrighted but the docs for installation are all still around. After my previous adventures with the command line I wasn’t scared away from trying the custom install instructions but got a bit stuck when I got to the Yarn portion. Then it occurred to me that, hey maybe there’s a docker container that would be closer to a one click install. I recalled seeing a demo video from Reclaim on creating a self-hosted dropbox replacement.

Heading over to the environment builder I took a look at the docker section and read through what came up when searching for Learning Locker. Some related items appeared and some did not. And wow, do the pages ever have a range of specificity. The docker official ones like in the demo video have great documentation, and some in the docker hub have no descriptions. I found one that looked like it might be promising from Sproutlabs. I tried installing it once and then realized I also needed to set up Mongo DB. Cool, a chance to try this again:

From here, you get an email that tells you your environment is ready, as well as one that tells you that MongoDB is ready and how to access it. The email also provides a link to the jelastic instructions for how to set up your MongoDB. The way that the interface looks in jelastics documentation is a bit different than what I encountered. When I logged into Mongo I ended up in something called Mongo Express, which appears to be a simplified interface for the database.

This is where I first try the fiddle method. I need to create a new database and assign a user to it. The interface in Mongo Express is simple enough to create a new database, but there is no “add user” option. Many of the interfaces we have grown accustomed to made me think that this would be an option. No dice. So I figure I can add a user using command line. Back to the Reclaim environment to boot up the command line for Mongo. There is a line in the jelastic doc as well as in the Mongo DB manual that you can create a new user with the command:

db.createUser({ user: “user_name”, pwd: “password”, roles:[{ role: “readWrite”, db: “db_name“}]})

Running this generated an error of an unexpected “}”. Flashbacks to my recent web design classes. The backets get me every time. Also syntax. What’s nice about programs like Sublime and VisualCode are that you get coloured feedback on whether tags are open or not. After a few failed attempts and unable to find specific docs on Mongo Express I went back to the Mongo Express interface. There has to be a way to do this in there. I head into the admin area and although I don’t see an “add user” option I see one document in there and a “add document” button. I recalled from my most recent class at OCAD that the innovation of Mongo is that it stores data as documents. I clicked on the existing doc and saw it was the admin user for Mongo that was set up upon install. Now we’re in business! Using that, plus the Mongo Manual I piece together a new doc and spin up a new user with readWrite access to my new database.

Although I seemed to make headway with this, I still couldn’t piece together the connection between the database and the imported docker environment enough to get a UI for Learning Locker. Back to the drawing board. Still, felt very accomplished it learning just a tiny bit of Mongo. I ended up going back to Reclaim’s video on Docker Hub. There had to be something I missed.

Some of the documentation I saw in Docker Hub showed docker pull commands, but when I used the environment builder I couldn’t make use of them. Watching the video again I had forgotten than spinning up a Docker Engine was an option! Spun that up and got access to command line, now let’s try the documentation again. First time using the pull commands, and the suggested Mongo Db image was down so I grabbed the official Mongo image, then grabbed the SproutLearning image and both ran perfectly until the Sprout Learning install couldn’t connect to the db. Right, the script would have been looking for the other specific instance of Mongo, not the one I pulled. I think the changes need to be made in one of the docker files because the SproutLab docs states “There are a number of defaults for these in docker-compose.yml as well”, but without a search bar I don’t know if that is a file within the massive looking folder system infront of me or not.

A deadend for now, but everytime there is a deadend you just have to look for an emergency escape or wall to climb.


Photo by Wengang Zhai on Unsplash