1EdTech / casa-ref

Other
1 stars 0 forks source link

CASA Reference Implementation

The Community App Sharing Architecture (CASA) provides a mechanism for discovering and sharing metadata about web resources such as websites, mobile apps and LTI tools. It models real-world decision-making through extensible attributes, filter and transform operations, flexible peering relationships, etc.

Setup

Requirements

Both engine and admin outlet require:

The engine additionally requires:

The engine additionally recommends:

The admin outlet additionally requires:

Installation of RubyGems

Install from RubyGems:

gem install casa --dev
Persistence Layer Availability

The CASA engine additionally includes persistence layers:

These have to be running when the engine is started.

The Ruby gem for the database you're using must also be installed (mysql2, freetds or sqlite3).

Attribute Installation

Finally, you should also make sure to install any gems needed for the attributes you'll be using. The default attribute set, which is configured into ~/.casa/attributes by default after you run casa engine setup, requires:

gem install casa-attributes-common
SSL Certificate

This reference implementation runs CASA over HTTPS. Consequently, an SSL certificate is necessary.

For test environments, you can generate one locally as:

openssl req  -nodes -new -x509  -keyout localhost.key -out localhost.crt

For production environments, a real certificate should be acquired.

Usage

General

Whether running the engine or the admin outlet, you should call:

casa server setup

This will allow you to specify the SSL configuration for your server where the engine and/or admin outlet are running.

Engine

To define the engine settings:

casa engine setup

To start the engine:

casa engine start

To get the status of the engine:

casa engine status

To stop the engine:

casa engine stop

To view options from configuration paths to pid files:

casa engine help

Admin Outlet

To define the admin outlet configuration:

casa admin_outlet setup

To start the admin outlet:

casa admin_outlet start

To get the status of the admin outlet:

casa admin_outlet status

To stop the admin outlet:

casa admin_outlet stop

To view options from configuration paths to pid files:

casa admin_outlet help

Configuration

By default, the base directory containing all CASA configuration files and sub-directories is ~/.casa. Alternatively, a different path may be specified with the --settings-dir argument.

Engine

Engine Configuration

By default, the engine configuration should be defined in engine.json within the settings directory. If all defaults are used, attributes will be located under ~/.casa/engine.json. Alternatively, a path relative to the base configuration directory may be specified with the --engine-settings-file argument.

The casa engine setup command walks the user through the process of creating this file.

The following are descriptions of each configuration setting during casa engine setup:

Attribute Configuration

By default, the attribute configuration files should be defined under the attributes/ directory within the CASA base directory. If all defaults are used, attributes will be located under ~/.casa/attributes/.

The casa engine setup command creates empty attribute settings file for each attribute in casa-attributes-common. Any additional attributes added to CASA should have an attribute file added here.

Admin Outlet

Admin Outlet Configuration

By default, the admin outlet configuration should be defined in admin_outlet-engine_config.js within the settings directory. If all defaults are used, this file will be located at ~/.casa/admin_outlet-engine_config.js. Alterantively, a path relative to the base configuration directory may be specified with the --outlet-settings-file argument.

The casa admin_outlet setup command walks the user through the process of creating this file.

The following are descriptions of each configuration setting during casa engine setup:

FAQ

Why are the search APIs not working?

The most common reason for this is that the engine was unable to resolve an Elasticsearch database. Please ensure Elasticsearch is running and that the engine settings properly reference it, and then restart the CASA engine.

License

The CASA Protocol is open-source and licensed under the Apache 2 License. The full text of the license may be found in the LICENSE file.