In my last post I talked about C4G BLIS and mentioned that I will be working on it this semester as part of an independent study for my Masters degree. I’m hoping to write some blogs to detail the process and key wins working on this project for the next few months.

In Spring semester 2022, I kind of took a hacksaw to BLIS. I felt a little bad because my usual approach to working with legacy code is not so haphazard. A properly modularized codebase (ideally with an at least half-functioning test suite) can be poked at and refactored in a similarly modular fashion. Unfortunately, BLIS has seen many years of different development styles come and go, and I found that often changing something in one area would have side-effects elsewhere. Identifying the places I could change without breaking things was a key difficulty.

Another key challenge was the architecture of BLIS itself. BLIS was originally designed to be run on a desktop computer, even though it was written using web technology (a LAMP stack1.) As I understood it, the original goal was to move BLIS sites to using a central server, but at the time it was written, reliable Internet connections were not the norm across labs in West Africa. For this reason, a portable, Windows-based AMP package was used. Unfortunately, this particular distribution of these tools has since stopped being supported, so the tools are pinned at old versions.

When I took on my project, which was to create a cloud-capable version of BLIS, I found the issues above to be the biggest blockers. I chose to use Docker because it will allow users to use any platform that supports it (ideally Linux, because it’s cheap and uses less resources than Windows!) and I can package up an old version of PHP to ship rather than using a new distro’s new version.

Someone in my class at the time said something to the effect of “All you did was create a Docker container for an application? That’s not very much work.”

Au contraire, mon frère.

Writing a Docker container that successfully booted BLIS - an old application already! - while keeping the codebase compatible with the old WAMP stack for desktop users was a lot of work. But I got it done.

Current Focus

The current BLIS Docker container is available for use. Some of the students that took C4G after me have helped contacts in labs do trials of this version, but there is still work to be done.

One thing I’ve noticed in talks with our stakeholders is that setting BLIS up is still difficult. Our users don’t necessarily spend a lot of time in the terminal - nor should they need to. When it comes to running web applications, outside of a managed service like a Wordpress blog or something, I just don’t know of a way to avoid it for the least amount of money.

Can you jam with the console cowboys in cyberspace?

My initial proposal to aid this problem was creating a bootstrap script. In the perfect scenario, this script installs everything necessary to run BLIS and starts it up. However, predictably, when this script fails for whatever reason (which is not never,) it is hard to debug unless you know the inner workings of BLIS.

For this reason, I am working on a new version of my installation and management script. I am writing it in Python since that is a popular language for professionals and students alike, and hopefully will be more maintainable for future generations of C4G students.

Work Accomplished

My work for this week has been something along the lines of:

  1. Create a version of blis-cloud-cli with all the features (installation) of the Bash script
  2. Use a package manager to write blis-cloud-cli to manage dependencies and enable upgrades. I opted for Poetry which is actually pretty awesome.
  3. With my team for the semester, write a survey which our professor will send to labs to assess their readiness for a cloud-enabled version of BLIS.

Right now, you can run:

$ pip install --user git+https://github.com/mrysav/blis-cloud-cli.git
# blis-cloud-cli installs with dependencies
$ blis install

and the BLIS container environments will be installed, although not started!

Goals for next week

  1. Finish the installation command
  2. Meet with stakeholders
  3. Assess the needs of stakeholders and whether or not a “migration” workflow should be added to import the BLIS environment already on the machine
  4. Create a self-update command that will update the version of the blis-cli on the machine

  1. Linux, Apache, MySQL, PHP