OTB v. 2.0 Installation Instructions - ecds/OpenTourBuilder GitHub Wiki

OpenTourBuilder v. 2.0 Installer

This information is taken from the README.md.

This is a Python Fabric script that aims to automate much of the system configuration needed to install and deploy the OpenTourBuilder stack.

Currently, the only server platforms supported by this script are Ubuntu, Red Hat and CentOS. The installer also provides a sample Apache configuration file. Support for other web servers is currently beyond the scope of this installer.

We highly recommend you use Ubuntu. Current versions of Red Hat and CentOS ship with older versions of Python and will require you to install an alternative version of Python. OpenTourBuilder requires Python 2.7. You cannot replace the system's Python or you will break yum. There are many ways to install and run alternative versions of Python.

OpenTourBuilder has two parts. The OpenTourBuilder Server developed in Python Django and the OpenTourBuilder Client developed in Ember JS.

What you need to do before starting the install

You will need:

  • A server running Ubuntu, Red Hat or CentOS (see note above)

  • Access and credentials to a MySQL database

    • Username
    • Password
    • Name of database
    • Hostname (defaults to localhost)
    • Port
  • Domain for the front end, eg. myawesometour.com

  • Subdomain for the backend API. This must be api., eg. api.myawesometour.com

Install a few things

These packages may have already been installed but let's just make sure by running the following comands.

Ubuntu

sudo apt-get update

sudo apt-get install -y python-setuptools python-dev git libmysqlclient-dev mysql-client

sudo easy_install pip

sudo pip install fabric MySQL-python

Red Hat/CentOS

sudo yum update

sudo yum install -y python-setuptools python-devel git mysql mysql-devel

sudo easy_install pip

sudo pip install fabric MySQL-python

Download the installer

Navigate to the directory where you want to install OpenTourBuilder and download the installer from GitHub.

git clone https://github.com/emory-libraries-ecds/OpenTourBuilder-Installer.git

Change to the installer directory:

cd OpenTourBuilder-Installer

Check your system for dependencies

Run the following command to check whether you have all dependencies installed. If the dependencies are not installed, you will be prompted to install them automatically. YOU MUST HAVE SUDO ACCESS TO THE SERVER.

fab check_for_dependencies

Run the installer

fab install

While the installer is running you will be prompted for the following information:

  • The password for your user on the system (maybe)
  • The address for your MySQL database. Examples:
    • localhost
    • mydatabaseserver.com
  • Database username
  • Database password
  • Name of database
  • Port for database server (defaults to 3306)
  • You will be asked to set up a user for the Djano Admin. This can be whatever you want.
  • Fully qualified domain name

After the installer runs

After the installer successfully runs, you will need to navigate up one directory to see the files.

cd ../

If you list the contents on the directory (by running ls) you will see directories that contain all the files for the the server and the client.

  • OpenTourBuilder-Server
  • OpenTourBuilder-Client

Permissions

Apache

You will find a sample Apache config file; OpenTourBuilder-Server/apache/otb.conf. The sample config assumes you have mod_wsgi and mod_rewrite installed and enabled.

If this is your plan you will need to run the following commands.

Ubuntu

sudo apt-get install -y apache2 libapache2-mod-wsgi

sudo a2enmod rewrite

cd /etc/apache2/sites-enabled

sudo ln -s /<path-for-OpenTourBuilde\r>/OpenTourBuilder-Server/apache/otb.conf otb.conf

sudo service apache2 restart

Red Hat/CentOS

sudo yum install httpd mod-wsgi

sudo a2enmod rewrite

cd /etc/httpd/sites-enabled

sudo ln -s /<path-for-OpenTourBuilder>/OpenTourBuilder-Server/apache/otb.conf otb.conf

sudo service httpd restart

Other Web Servers

Providing configs to deploy OpenTourBuilder using other web servers is beyond the current scope of the installer. Any modern web server should be able to run a Django web application and serve a static site built by EmberJS.

Having Trouble?

Please feel free to open an issue here or contact [email protected].

⚠️ **GitHub.com Fallback** ⚠️