Setup and Installation
Engine has three required components: a database to store Engine application data, a filesystem to store courses, and an application server to serve these courses. Detailed instruction on configuring these components follows. (Note: instructions about the filesystem are included in the section about configuration settings.)
Configuration in Engine
Configuration settings in Engine have four primary scopes--system, tenant, course, and registration.
System-level settings can be configured via a settings file in Engine. Your Engine delivery includes a template for this file.
- For .NET, the configuration file (SCORMEngineSettings.config) should be referenced by your web.config file.
- for Java, the configuration file (SCORMEngineSettings.properties) should be placed in your web server's classpath.
For each of tenant, course, and registration, Engine supplies a /configuration resource in the API, as per the API documentation.
To make use of /configuration, you will need to supply a setting ID. We do not include a complete list of these setting IDs (or possible values) in this documentation, but you can check with your integration developer or send a note to support@scorm.com if you want to know a setting ID or whether a particular Engine behavior is configurable.
API Configuration Examples
One of the most common default Engine behaviors that is overridden is SCO launch type.
Here are examples of requests that could be used to set this at each of tenant, course, and registration in the default tenant with a course ID of "RusticiGolf" and registration ID "RusticiGolf-JoeLearner":
- tenant: /default/configuration/PlayerScoLaunchType
- course: /default/courses/RusticiGolf/configuration/PlayerScoLaunchType
- registration: /default/registrations/RusticiGolf-JoeLearner/configuration/PlayerScoLaunchType
In each case, the body of the PUT request would look something like this:
{"value":"FRAMESET"}
Required Configuration Settings
In order for Engine to run, you must fill out a small number of configuration settings.
First, there are a few URL-based settings that you will need to fill out with the web path you configure on your server.
We recommend searching the configuration template for instances of "/ScormEngineInterface" and replacing it with the web path, starting with ScormEngineUrl
.
Apart from the URL settings, there are a few others that will need to be provided manually:
DataPersistenceEngine
: The type of database server you are using to support Engine. Acceptable values are provided in the configuration settings template.SystemDatabaseConnectionString
: The connection string to use to connect to your system database. (If your application uses a separate database for Engine's system and tenant schemas, you will need to set a connection string to use for the tenant tables instead inTenantDatabaseConnectionString
. Tenancy is further described elsewhere in this manual.)RedirectOnExitUrl
: This is a URL setting, but it is unlikely you will want to keep the provided default. The value of the setting should probably be a URL to a user dashboard page on your LMS.FilePathToContentRoot
: You will need a folder on your filesystem where Engine can keep the contents of imported packages. The contents of this folder must be able to be served by your server.FilePathToUploadedZippedPackage
: You will need a location on your filesystem where Engine can store the zip files that contain packages before they are imported. This setting should be a writable directory, preferably one that is not exposed by your web server.WebPathToContentRoot
: This is the path that your web server maps to shared contents underFilePathToContentRoot
.
FilePathToContentRoot
and WebPathToContentRoot
are good examples of settings that might be set on a per-tenant basis.
There is more information about how to do that in our Tenancy documentation.
Finally, there are two necessary settings if you want to use xAPI:
SystemHomepageUrl
: This should be an absolute URL to the homepage of your service/LMS. This setting is used to identify actors within the context of your application, including the "system"-level actor sometimes used as an Asserter.XapiFilesPath
: xAPI requires the filesystem to store certain kinds of data (viz., large documents and statement attachments). This setting should point to some writeable directory on your filesystem where Engine can store these files.
Replacement
Some settings are likely to have finer grained requirements but might not be set via the API, such as RedirectOnExitUrl
.
This presents a possible use case for a special ${RegistrationId}
replacement token available in Engine.
So, for example, if you set RedirectOnExitUrl
, which would look like this in SCORMEngineSettings.config:
<add key="RedirectOnExitUrl" value="http://example.org/lms?registrationId=${RegistrationId}" />
then your app would have the registration ID available to it when Engine redirected on exit.
It is also possible to do replacement based on ${TenantName}.
Any setting that can be configured at the tenant level in the API (i.e., any tenant-, registration-, or package-scoped setting) can accept the ${TenantName}
syntax in the configuration file.
Authentication
Authentication is handled via HTTP Basic Auth (username and password). For each request, the supplied credentials will be checked against the set of accounts specified by your ApiBasicAccounts
configuration setting.
In order to keep your credentials secure we strongly recommend using TLS (https) when accessing the API, and using long random strings for both the username and password components (these should not be real user accounts, no one should ever have to type these credentials!)
N.B. This API is designed to allow your application to integrate with Engine and does not provide the fine grained security control you'd want for an API available to users. Any API account can perform any operation. The ability to set up multiple accounts is only relevant for the purpose of having different sets of credentials that can be revoked separately.
Optional Configuration Settings
There are a number of scenarios where additional settings could prove useful for the operation of Engine.
Postback
Engine allows the integrating application to supply a custom URL to process registration results. If these settings are configured, Engine will post results back to the application server as provided.
ApiRollupRegistrationPostBackUrl
: Specifies a URL to which to post activity and status data within an interval in which dirty data is available or as soon as possible when the course is completed.ApiRollupRegistrationAuthType
: Indicates how to authorize against the given postback URL. Allowed values are "form"" or "httpbasic". If "form" authentication is used, the username and password for authentication are submitted as form fields "username" and "password", and the registration data as the form field "data". If "httpbasic" authentication is used, the username and password are placed in the standard Authorization HTTP header, and the registration data is the body of the message. This field is set to "httpbasic" by default.ApiRollupRegistrationAuthUser
: User name to use when posting registration data.ApiRollupRegistrationAuthPassword
: Password to use when posting registration data.ApiRollupRegistrationFormat
: Level of detail in the information that is provided when posting registration data. It may be one of three values: "course" (course summary), "activity" (activity summary), or "full" (full detail), and is set to "activity" by default. The information will be posted as JSON, using the schemas for the registration /progress or /progress/detail resources depending on the format selected, with an additional wrapper specifying the registration ID. N.B. It will be the responsibility of your application to parse the JSON and take appropriate action for recording the results.ApiRollupRegistrationTimeoutSeconds
: This is the network timeout (in seconds) for API rollup registration. I.e., how long we wait for a response from the server we're posting back to before we consider it a failure and re-queue to try again later (up to 8 times by default, with exponential backoff). Defaults to 10.ApiRollupRegistrationDuringSession
: Determines whether rollup registration postbacks should be sent during a learning session, instead of waiting for the learner to exit. Defaults to "true". If you prefer to get a postback only upon exit, set this to "false", but note that the server might receive no data (e.g., a lost completion) if there is a communication interruption of any kind between the learner's browser and Engine.
Database Setup
Requirements
Engine generally supports a given platform as long as the vendor offers public support for that platform. As of October 2015, Engine supports the following DBMSes:
- SQL Server 2008 or higher
- Oracle 11g2 or higher
- MySQL 5.5 or higher
- PostgreSQL 9.1 or higher
Database Connectors
For legal reasons, we are not generally allowed to redistribute the database connectors for most platforms.
On .NET, we are able to include the connectors for SQL Server, Oracle, and PostgreSQL.
If you are running Java or .NET with MySQL, you will need to download the database connector for your platform and include it in the Engine application's bin
folder/classpath.
- If you are running .NET with MySQL, you must download the official MySQL .NET connector.
- If you are running Java, you need to download a JDBC connector.
- For SQL Server, we recommend the official Microsoft SqlServer JDBC driver, although some customers have reported success using the JTDS driver.
- For Oracle, download the appropriate driver for your Oracle version and Java version directly from the Oracle corporation
- For MySQL, you will need to download MySQL Connector/J.
- For PostgreSQL, download the appropriate driver for your Java version directly from the PostgreSQL website.
Preliminary Considerations
As discussed in the Tenancy Overview, you will need to decide whether you will separate Engine's system and tenant tables. To summarize, you will need to separate the tenant and system tables if you ever plan on sharding Engine's tenant tables or otherwise separating different tenants into different databases. You will also need to decide whether you are keeping Engine's tables in the same database as your application's other tables, or if you are using a separate database. Before you use the installation tool, you will need to create any new databases, users, or tablespaces required for your setup.
Installation Tool
First, you will need to use your command line to navigate to the proper directory.
.NET customers should navigate to the ScormEngineInterface/bin
folder of the Engine distribution.
Java customers should navigate to the Installer
folder of the Engine distribution.
Second, you will need to copy any database connectors required by your installation.
For .NET customers, this applies only to MySQL users; copy the MySQL connector into your current directory.
For Java customers, copy your JDBC connector into the lib
folder of your directory.
Third, you will need to actually run the command. The command consists of four parts:
baseCommand persistenceEngine connectionString schemaPrefix
baseCommand
depends on your platform.- For .NET, this is simply
EngineInstall.exe
. - For Java, this is
java -Dlogback.configurationFile=logback.xml -cp "lib/*" RusticiSoftware.ScormContentPlayer.Logic.Upgrade.ConsoleApp
- For .NET, this is simply
- The first argument,
persistenceEngine
, should be your DBMS type (eithermysql
,oracle
,postgresql
, orsqlserver
). It should have the same value as theDataPersistenceEngine
setting in your configuration file. - The second argument,
connectionString
, should be your connection string. The provided connection string must have permission to create and alter tables. Be careful to quote the connection string so that none of its characters (or whitespace) are interpreted as special control characters by your shell.- For Java customers: The installer utility does not run in application container, so you cannot reference JNDI connection definitions.
You must define complete JDBC connection urls, as would be found in your server's configuration file.
The connection string must also be followed by a pipe (
|
) and your JDBC class name. - For example, a valid connection string might be:
jdbc:mysql://myHostName/myDbName?user=myUserName&password=mypassword|com.mysql.jdbc.Driver
- For Java customers: The installer utility does not run in application container, so you cannot reference JNDI connection definitions.
You must define complete JDBC connection urls, as would be found in your server's configuration file.
The connection string must also be followed by a pipe (
- The last argument,
schemaPrefix
, should be the schema prefix you use to specify tables. This should also be the same as the schema prefix specified by your Engine configuration file, and it should end in a period. If you do not use a schema prefix, this argument can be omitted.
Customers who wish to specify different system and tenant databases will need to use an XML configuration file.
An EngineInstall.xml.template
file will be given with your installation; fill it out and save a copy (without the .template
extension) in the folder where you are running the tool.
Then run the tool using basecommand EngineInstall.xml -install
Server Setup
Every customer application environment into which Engine is deployed is a snowflake. We don't pretend to be server configuration experts for every possible scenario, as our primary goal is to ensure that Engine can run comfortably according to your administrative preferences and expertise.
That said, we can typically ensure that Engine can be stood up in a given supported environment. The basics are covered below.
.NET/IIS
Engine for .NET runs as a web application. It requires .NET Framework 4.5. Engine ships by default as a binary distribution with an assembly intended to be the basis of a .NET web application.
You can drop the entire ScormEngineInterface folder onto your application server, point an IIS application to it, and try hitting an ASP.NET page (like console; see below).
You might want to map a content folder for use with Engine, depending on how you intend to store and serve content.
Java
Engine for Java needs a Java application container to run. It requires Java 7. Cloud, our hosted training delivery system, runs on Tomcat. Most of our development team uses Tomcat for testing, too. So we'll cover the basics of setting up Engine for Tomcat in this manual.
We generally support Engine's use with other Java application containers, but configuring Engine for use with all Java application containers is outside the scope of this document.
We ship Engine as a WAR file. This can be dropped in Tomcat's webapps directory.
As mentioned earlier, your SCORMEngineSettings.properties file should be somewhere in the web application classpath.
We also ship Engine with a context.xml template that you can use as a reference for configuring JDBC.
We specifically recommend that you do not use your Java application container to serve content through Engine. Instead, prefer a traditional web server. There are a variety of ways to map your web server so that the web paths referenced by Engine are served by a web server rather than the app server serving Engine.