Skip to content

Installing Adapt Origin

Chuck Lorenz edited this page Mar 29, 2015 · 36 revisions

##Introduction The authoring tool is in pre-release development and testing. That means the developers are proud of how far their work has progressed, but are not yet satisfied with where it is. There are still features to be added and bugs to be worked out. But it works!

Installing the authoring tool is getting easier and easier; however, it still requires the installer to take steps that are typically hidden within a packaged installer. If you’re not intimidated by techie things, following these directions will get you up and running the authoring tool. And that’s when the fun starts.

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. 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.

  4. 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 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.

The node version required by the authoring tool is v0.10.33. It is likely that other versions will be acceptable in the future, but not today. How to change your version of Node? Broadly speaking, you uninstall the current version (from Windows; from OS X and Linux) and install the required version. However, if you spend a few extra minutes to install a node version manager, we think you’ll be saving time and energy in the long run.

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, and finish by loading v0.10.33 as the global node version.

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 The node package manager (npm) 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 the Grunt and Adapt Command Line Tools A command line interface (CLI) allows us to issue commands to a particular program using the command line of a terminal window. Grunt.js is used to build the course. The Adapt CLI is used for a variety of tasks.

To install:
npm install -g grunt-cli
npm install -g adapt-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.

Note:
Although it is usual to copy the Master branch of repositories on GitHub, the authoring tool is still in pre-release development and testing. The Develop branch is currently the default branch. That's the branch you want and will get using the git clone command below.

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. Run the Install Script

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 folder where you copied the adapt_authoring project and run the following command:
npm install
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.

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:
In the future the authoring tool will be able to send notifications via e-mail. Configuration questions will ask about SMTP service, SMTP username, SMTP password, and Sender email address. Because this is not yet functioning, your responses have no impact. 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' (or 'foreman start' if using heroku toolbelt) to start your instance.

##4. 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.


Tip:
You can run the install script again at anytime. However, while rerunning the install script, if you enter the same configuration values for the master tenant (i.e., by accepting the defaults both runs), the master tenant will be recreated and you will lose existing data. This is occasionally desired, especially when you want to start again with a clean installation.

Clone this wiki locally