Tethys Platform
Table Of Contents
Table Of Contents

Production Installation

Last Updated: June 2017

This article will provide an overview of how to install Tethys Portal in a production setup ready to host apps. Currently production installation of Tethys is only supported on Linux. Some parts of these instructions are optimized for Ubuntu 16.04, though installation on other Linux distributions will be similar.

1. Install Tethys Portal

Follow the default Getting Started instructions to install Tethys Portal with the following considerations

  • Make sure to install the correct version.

  • Assign strong passwords to the database users.

  • You must edit the portal_config.yml file to ensure production settings (i.e. DEBUG: False, etc.)

  • Optionally, Follow the Distributed Configuration instructions to install Docker and the components of the software suite on separate servers.

2. Customize Production Settings

The internet is a hostile environment and you need to take every precaution to make sure your Tethys Platform installation is secure. There are several settings in the portal_config.yml file that should be added for a production environment. Django provides a Deployment Checklist that points out critical settings. You should review this checklist carefully before launching your site. Follow the process described below to review and edit settings. Only a few examples are included here, but be sure to review and update any settings that are needed to provide a secure production server environment.

Open the portal_config.yml module for editing using vim or another text editor:

sudo vim $TETHYS_HOME/portal_config.yml

Press i to start editing and change settings as necessary for your production environment. Some settings you may want to customize include:

  1. Social authentication settings

If you wish to enable social authentication capabilities in your Tethys Portal, follow the Social Authentication instructions.

  1. Email settings

    If you would like to enable resetting passwords then an email server needs to be configured. See the next section for details.

Press ESC to exit INSERT mode and then press :x and ENTER to save changes and exit.

Important

Review the Django Deployment Checklist carefully.

3. Setup Email Capabilities (optional)

Tethys Platform provides a mechanism for resetting forgotten passwords that requires email capabilities, for which we recommend using Postfix. Install Postfix as follows:

sudo apt-get install postfix

When prompted select "Internet Site". You will then be prompted to enter you Fully Qualified Domain Name (FQDN) for your server. This is the domain name of the server you are installing Tethys Platform on. For example:

foo.example.org

Next, configure Postfix by opening its configuration file:

sudo vim /etc/postfix/main.cf

Press i to start editing, find the myhostname parameter, and change it to point at your FQDN:

myhostname = foo.example.org

Find the mynetworks parameter and verify that it is set as follows:

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

Press ESC to exit INSERT mode and then press :x and ENTER to save changes and exit. Finally, restart the Postfix service to apply the changes:

sudo service postfix restart

Several email settings need to be configured for the forget password functionality to work properly. The following exampled illustrates how to setup email in the portal_config.yml file.

EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: localhost
EMAIL_PORT: 25
EMAIL_HOST_USER: ''
EMAIL_HOST_PASSWORD: ''
EMAIL_USE_TLS: False
DEFAULT_FROM_EMAIL: Example <noreply@exmaple.com>

For more information about setting up email capabilities for Tethys Platform, refer to the Sending email documentation.

For an excellent guide on setting up Postfix on Ubuntu, refer to How To Install and Setup Postfix on Ubuntu 14.04.

5. Install Apps

Download and install any apps that you want to host using this installation of Tethys Platform. For more information see: Installing Apps in Production.

Tip

Troubleshooting: If you are experiencing problems please search for a solution or post a question on the Tethys Platform Forum.