Skip to content

Install on Server

Louise McMahon edited this page Nov 30, 2017 · 22 revisions

The Adapt authoring tool is intended to be installed on a server for use by an e-learning team. It may also be installed on personal computers and laptops for use by individuals. This installation method requires the user to manually install and configure software including git, node, and MongoDB. It requires the installer to take steps that are typically hidden within a packaged installer. A more succinct version of installation instructions is available on this wiki page: Developer's Install.

Installation Overview

  1. Install prerequisites.
    The authoring tool and the Adapt framework depend on other software to run. We’ve got to make sure these are in place first.

  2. Clone the adapt_authoring project.
    We’ll download the code from its repository on GitHub.

  3. Install the required npm packages. We'll install some packages required by the adapt_authoring code.

  4. Run the install script.
    The install script will use the prerequisite software you installed to find instructions within the project code. It will download more components and make connections between all the pieces.

  5. Run the application.
    By this point we’ll have all the project pieces in place. In order to access the authoring tool, we need three things running: the database, a web server, and a browser. We’ll get these going, then log in to the authoring tool.


1. Install Prerequisites

Tip:
Some of these prerequisites come preinstalled with certain operating systems. Before installing, verify if it is already installed by checking for its version.

The authoring tool will not run without the following:

The following is optional but makes life more enjoyable:

Using the command line. If you are new to using the command line or if your command line skills are rusty, read this explanation before proceeding.

Install Git

Git is a free source code versioning and control program. It also facilitates downloading software that is hosted on GitHub.com.

Adapt source code and most of the code it depends on is hosted here on GitHub. Git makes it easy download and update source code. The Adapt code will use it later during installation.

To check if Git is already installed, run the following command.
git --version
To install Git, download it and install following the instructions on Git's website.

If you are installing Git for the first time, don't forget to configure it:
git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"

Install Node.js

IMPORTANT: At the time of writing, the authoring tool supports the v6.x LTS release of Node.js. Please do not use the 'Current' release as this is unlikely to work!

Node plays two important roles: it gives us the node package manager (npm) that will download and install other modules & plugins that the authoring tool requires; and it provides a light-weight web server that will run the tool’s code.

Open a terminal window. Check if node is already installed by entering the following command.
node -v
If node is installed, a version number will be displayed.

Node version managers, such as nodist (Windows) or nvm (OS X, Linux), make it easy to switch between versions of node. It is recommended that you use one. Follow their instructions to install.

If you prefer not to use a version manager, the community wiki of Node.js provides installation instructions for various operating systems and various package managers.

Verify npm is installed

npm (a node package manager) is used to download and install the stuff the authoring tool depends on. It comes with Node.js, so we simply want to make sure that nothing prevented it from installing.

Open a terminal window. Check if npm is installed by entering the following command.
npm -v
If npm is installed, a version number will be displayed. If not, you’ll need to troubleshoot. Because npm is installed along with Node.js, it is likely that node did not install correctly. Consider reinstalling node.

Install FFmpeg

Using FFmpeg with the authoring tool is not required, but it will produce nice thumbnails for the images and video assets you upload to the tool.

Installing FFmpeg in Windows.
Installing FFmpeg in OS X.
Installing FFmpeg in Ubuntu.

Install Grunt

Tip:
Windows Users Note: Run these commands in GIT Bash if you installed GIT using default settings

A command line interface (CLI) allows us to issue commands to a particular program using the command line of a terminal window. Grunt is a 'task runner' that handles all the necessary actions required to build the course.

To install:
npm install -g grunt-cli
Including the -g tells npm to install the CLI globally. That means you will be able to issue commands to these programs no matter what folder is your current working directory. If the command fails, try running it again with elevated permissions.

Install MongoDB

When you make selections in the authoring tool and enter course content, all of it is saved in a database called MongoDB.

MongoDB Installation Guides

Tip:
System administrators might find Robomongo helpful. Adapt core developers have.

2. Clone the Adapt_Authoring Project

The Adapt authoring tool is hosted here on GitHub. You need a copy of it on your computer.

Running the following command will create a folder named "adapt_authoring" that will contain the project source code. Using the command prompt, navigate to a folder where you want this to be created. Then run the following command.
git clone https://github.com/adaptlearning/adapt_authoring.git

3. Install the Required npm Packages

It is essential that you verify that the MongoDB service has started and is running. Installation will fail if the MongoDB service has stopped. (If you installed on Linux, the service should automatically start. OSX users may have to manually run mongod from a terminal. Windows users may have to start it manually; verify using the Services tab of the Task Manager.)

Navigate to the adapt_authoring folder you cloned earlier to make it the current working directory. Run the following command:
npm install --production

Note: The --production option bypasses the installation of PhantomJS. PhantomJS is not required nor useful for authoring courses. Software developers who want to include it should omit the --production option.

Be patient; it can take a few minutes to complete. If any error occurs, read the output. Determine if you forgot to install one of the prerequisites or if one failed to install properly. If you need assistance troubleshooting, consult the Adapt community's Technical Discussion Forum. If this script completes successfully, you get to run the install script.

4. Run the Install Script

The final script will help you configure the authoring tool. Most configuration questions will appear with a default answer already in place. And most times you can just accept the default values by pressing the Enter key. The only input you are required to provide are an email address and password for the super user account. (The questions about the super user account is not the same as the SMTP service or the master tenant.) The super user's email address and password will be used to login to the authoring tool.

Note:
FFmpeg is not used by default. When the question "Will ffmpeg be used?" N for no will appear as the default. If FFmpeg is installed and you want to use it, type Y before pressing the Enter key.

Note:
Configuration questions will ask about SMTP service, SMTP username, SMTP password, and Sender email address. The authoring tool uses email addresses as user names and password resets via e-mail. In the future other notification may be possible. If password resets are not important to you or if you do not have information about your SMTP server, accept the default of "none" for the SMTP service and leave the others blank.

Run the following command.
node install

If all goes well, you'll receive the following message:
Done, without errors.
And you'll be instructed to
Run the command 'node server'

5. Run the Application

First you're going to start the web server that comes with Node; and then you're going to use a browser to access the authoring tool.

  1. Run the following command. node server
    As the server starts, it will report in the terminal:
    Server started listening on port 5000
    If your server is listening on a different port, take note of it. (To stop the server, make the terminal the active window, then press Ctrl+C.)

  2. Now open your favorite (standards compliant) web browser. In the address bar type:
    localhost:5000 (If your server is listening on a different port, substitute that number for 5000.)
    Press Enter.

When the login page appears, enter the super user's e-mail address and password.


Help Us Improve:
If you notice errors or omissions in these instructions, please inform us by leaving a comment in Issues.

Clone this wiki locally