<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Containerizing an eTextbook Infrastructure</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexander Hicks</string-name>
          <email>alexhicks@vt.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Clifford A. Shaffer</string-name>
          <email>shaffer@vt.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Virginia Tech</institution>
          ,
          <addr-line>Blacksburg</addr-line>
          ,
          <country country="US">United States</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The CS Education community has developed many educational tools in recent years, such as interactive exercises. Often the developer makes them freely available for use, hosted on their own server, and usually they are directly accessible within the instructor's LMS through the LTI protocol. As convenient as this can be, instructors using these thirdparty tools for their courses can experience issues related to data access and privacy concerns. The tools typically collect clickstream data on student use. But they might not make it easy for the instructor to access these data, and the institution might be concerned about privacy violations. While the developers might allow and even support local installation of the tool, this can be a di cult process unless the tool carefully designed for third-party installation. And integration of small tools within larger frameworks (like a type of interactive exercise within an eTextbook framework) is also di cult without proper design.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Containerization</kwd>
        <kwd>Caliper Analytics</kwd>
        <kwd>Learning Tools Interoperability</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>This paper describes an ongoing containerization e ort for
the OpenDSA eTextbook project. Our goal is both to serve
our needs by creating an easier-to-manage decomposition of
the many tools and sub-servers required by this complex
system, and also to provide an easily installable production
environment that instructors can run locally. This new
system provides better access to developer-level data analysis
tools and potentially removes many FERPA-related privacy
concerns. We also describe our e orts to integrate Caliper
Analytics into OpenDSA to expand the data collection and
analysis services. We hope that our containerization
architecture can help provide a roadmap for similar projects to
follow.
Copyright ©2021 for this paper by its authors. Use permitted under
Creative Commons License Attribution 4.0 International (CC BY 4.0)</p>
    </sec>
    <sec id="sec-2">
      <title>1. INTRODUCTION</title>
      <p>
        Currently, the OpenDSA eTextbook project gives
instructors and students access to a hosted version of the
application for free. But this is not su cient for all institutional
users, or even for our own installation as demand and
subsequent computational load grows. In principle, OpenDSA
(being an open-source project) has supported users or
universities seeking to deploy their own copy. But this could
only be done by following a complex set of instructions.
This paper describes our work to simplify the installation
process. We have many motivations for this. At rst we
wanted to allow instructors to host this tool on their own,
both to reduce our server load and to avoid complications
when their University requires strong privacy restrictions.
Outsourcing in this way also lets them gain access to
additional student data that is being collected. So, this work
began as an e ort to create a new development environment
for OpenDSA that would work on any platform. Once we
saw the bene ts of this new development environment, and
realized the bene ts of keeping our development and
production environments as similar as possible, we started creating
the production environment described below. In particular,
we have now made it easy for the many students who work
on the project to easily spin up a complete development
environment for any part of the system, a great savings in
e ort for both those students and the project managers.
The OpenDSA system has two major parts that needed to
be containerized: a front-end content delivery server and a
back-end LTI and data collection server [
        <xref ref-type="bibr" rid="ref1 ref11">1, 11</xref>
        ]. In this
paper, the front-end server will be referred to as OpenDSA and
the back-end server is called OpenDSA-LTI or LTI. These
two parts work together to serve content using the LTI
protocol [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. These two systems work together to serve content
to students. OpenDSA compiles the book instances from
RST les into html les (using Sphinx [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]) that can be
displayed in a user's browser. Then OpenDSA-LTI
communicates with the learning management system (LMS) to serve
content les located on the server to the student.
      </p>
    </sec>
    <sec id="sec-3">
      <title>2. BACKGROUND</title>
      <p>
        Containers are lightweight and portable packages of
software than can run anywhere their runtime is supported [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
There are several di erent container providers, but we
selected Docker as our container platform due to its familiarity
and its current status as an industry standard for
containerization [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
A containerized application has several bene ts over
traditionally packaged applications including portability and ease
of setup. With Docker, the only program a user will need
to install on their server is Docker, and everything else will
be installed and run within Docker containers using built-in
orchestration through Docker-Compose. This makes it
particularly easy for new developers to start working on copies
of the system.
      </p>
    </sec>
    <sec id="sec-4">
      <title>3. ARCHITECTURE</title>
      <p>
        In order to containerize the existing OpenDSA architecture,
we rst had to investigate how the technologies that make
up the current stack could be split and containerized. The
current stack consists primarily of a Ruby on Rails
application (OpenDSA-LTI), a MySQL database, and an Nginx
web server along with several other tools and requirements.
Since OpenDSA and OpenDSA-LTI work by serving
content les to the LMS, these containers, described below in
Section 3.1, need to share a lesystem. Originally, these two
processes ran on the same host natively, so there were no
issues with where les were located as long as both
components were installed in the correct location [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. As shown in
gure 1, the previous OpenDSA system architecture had a
copy of OpenDSA (the content part) within OpenDSA-LTI
(the server), and maintained external connections on the
host machine with the database and the web server.
Additionally, a supporting visualization tool named OpenPOP
ran as a separate server on the same machine, but not in a
dedicated environment. Under the new organization shown
in gure 2, all of the systems are running in Docker on the
same host, meaning we no longer have to worry about
compatibility between OpenDSA and OpenPOP's dependencies.
All of the networking is handled by Docker rather than an
Nginx con guration le. In the rst attempt at
containerizing this system, these two processes were combined into only
one Docker container, which was functional but slow because
the container required three language runtimes and thus ran
many di erent processes. In order to split this container into
two, we created a REST API around the OpenDSA
functionality that handles book compilation. This API is accessed
by the LTI container using HTTP requests and places the
compiled books in the Docker shared directory that LTI can
access.
The OpenDSA production environment currently consists
of ve containers: OpenDSA, OpenDSA-LTI, OpenPOP, a
database, and a web server. All of these images that we
created are published and accessible on Docker Hub at https:
//hub.docker.com/orgs/opendsa/repositories and
described in section 3.1.
      </p>
    </sec>
    <sec id="sec-5">
      <title>3.1 Component Containers</title>
      <p>
        The OpenDSA container includes the OpenDSA repository
(https://github.com/OpenDSA/OpenDSA). Python scripts
support compiling books to a speci c location on the shared
lesystem that OpenDSA will serve using the LTI container.
This repository also stores con gurations for the books to be
compiled from. The OpenDSA-LTI container contains the
code from https://github.com/OpenDSA/OpenDSA-LTI in a
Ruby container designed by Bitnami for Rails production
deployments [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. This container consists of the Rails server,
and delivers the compiled content as required by an LMS
such as Canvas using the LTI protocol.
      </p>
      <p>OpenPOP's (https://github.com/OpenDSA/OpenPOP)
container is structured in a way similar to the OpenDSA-LTI
container. OpenPOP is an external tool that is used by
OpenDSA through a di erent external tool, CodeWorkout,
and this work includes OpenPOP in the installation rather
than keeping it separate as it was done previously. OpenDSA
uses MySQL as the database and provides that in a separate
container.</p>
      <p>
        In order to avoid negative impacts from using a database in
an ephemeral container, we use a Docker volume to mount
the database onto the host lesystem to preserve the data if
the container fails, and to allow the container to be restarted
separately for routine maintence. Finally, we include two
options for a web server container. For users who can acquire
their own SSL certi cates, this stack will have an option
to import those certi cates and use them in a Trae k web
server [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. For users that do not have their own SSL certi
cates, there is an option to use Let's Encrypt to automate
their SSL encryption, as long as they provide a domain [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
Both of these options have minimal overhead required to set
up and help keep the overall set up e ort for the complete
application to a minimum.
      </p>
    </sec>
    <sec id="sec-6">
      <title>4. DISCUSSION AND FUTURE WORK</title>
      <p>As the CS Education community grows, there is an
increasing availability both for individual tools that need to be
integrated into broader systems, and also integrated systems
such as OpenDSA. In both cases, containerization can
extend their use by other parties. As the number of these
systems grow, the CS Education community needs to address
how to keep all of these tools interoperable, and more
available to instructors. We hope to provide a roadmap for other
tools to follow to extend their reach. As issues around data
access and privacy become more prevalent, hosting software
on premises becomes more attractive to administrators, and
the work presented here provides one method for doing so.
In addition to the privacy bene ts, the roadmap explored
in this paper provides a centralized data repository that is
closer to the consumers and allows for greater access and
additional analysis by the instructors. Containerization also
provides a cloud-based install option using AWS or a more
robust container orchestration system such as Kubernetes
as a possibility.</p>
      <p>
        While the e orts described in section 3 are ongoing, there
are several other future enhancements planned for the
platform. Currently, OpenDSA uses LTI 1.1, which is due to be
deprecated and will be upgraded into LTI 1.3. Along with
providing additional security, LTI 1.3 adds a new feature set
and an opportunity to connect OpenDSA with other
learning tools and platforms such as Caliper Analytics [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ].
Integrating Caliper will allow OpenDSA to collect additional,
standardized, data on student progress that can be shared
when appropriate across platforms that use the LTI system.
Further work would include breaking the Rails application
into a more containerizable microservice architecture.
Currently, OpenDSA-LTI is a monolith that cannot take
advantage of some bene ts of containerization, including
scalability.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <fpage>12</fpage>
          .
          <string-name>
            <surname>OpenDSA-Introduction | OpenDSA System</surname>
          </string-name>
          <article-title>Documentation</article-title>
          . https://opendsa.readthedocs.io/ en/latest/Introduction.html.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>[2] Basic Overview of How LTI works j IMS Global Learning Consortium</article-title>
          . https://www.imsglobal.
          <article-title>org/ basic-overview-how-lti-works.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Caliper</given-names>
            <surname>Analytics j IMS Global</surname>
          </string-name>
          <article-title>Learning Consortium</article-title>
          . https://www.imsglobal.org/activity/caliper.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>LTI</given-names>
            <surname>Security</surname>
          </string-name>
          <article-title>Announcement and Deprecation Schedule j IMS Global Learning Consortium</article-title>
          . https://www.imsglobal.
          <article-title>org/lti-security-announcementand-deprecation-schedule.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <article-title>[5] Overview | Sphinx documentation</article-title>
          . https://www.sphinx-doc.org/en/master/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>[6] Secure and Optimize a Rails Web Application with Bitnami's Production Containers</article-title>
          . https://docs.bitnami.com/tutorials/secure-optimizerails
          <article-title>-application-bitnami-ruby-production/.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <article-title>Trae k</article-title>
          . https://doc.trae k.io/trae k/.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <article-title>[8] What is a Container? j App Containerization j Docker</article-title>
          . https://www.docker.com/resources/what-container.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9] Linuxserver/docker-swag.
          <source>LinuxServer</source>
          .io, May
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Dave</given-names>
            <surname>Bartoletti</surname>
          </string-name>
          and
          <string-name>
            <given-names>Charlie</given-names>
            <surname>Dai</surname>
          </string-name>
          .
          <source>The Forrester New Wave™: Enterprise Container Platform Software Suites, Q4</source>
          <year>2018</year>
          ,
          <year>2020</year>
          . https://www.docker.com/resources/report/ the-forrester
          <article-title>-wave-enterprise-containerplatform-software-suites-</article-title>
          2018
          <source>, accessed on September 15</source>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>H. L.</given-names>
            <surname>Shahin</surname>
          </string-name>
          .
          <article-title>Design and Implementation of OpenDSA Interoperable Infrastructure</article-title>
          . Thesis, Virginia Tech, Aug.
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>