Skip to content

Commit

Permalink
all optional dependencies documented
Browse files Browse the repository at this point in the history
  • Loading branch information
sdc50 committed Sep 26, 2023
1 parent e0765a8 commit 6d0813c
Show file tree
Hide file tree
Showing 29 changed files with 430 additions and 74 deletions.
2 changes: 1 addition & 1 deletion docs/installation/application.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This file is generated with your application scaffold. Dependencies that are lis

.. important::

The ``conda`` sections of the ``install.yml`` file require the `conda` library and optionally the `conda-libmamba-solver` library to be installed. Starting with Tethys 5.0 or if you are using `microtethys`, you will need to install these libraries using conda or pip as follows:
The ``conda`` sections of the ``install.yml`` file require the ``conda`` library and optionally the ``conda-libmamba-solver`` library to be installed. Starting with Tethys 5.0 or if you are using ``microtethys``, you will need to install these libraries using conda or pip as follows:

.. code-block:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Lockout (Optional)

.. important::

This feature requires the `django-axes` library to be installed. Starting with Tethys 5.0 or if you are using `microtethys`, you will need to install `django-axes` using conda or pip as follows:
This feature requires the ``django-axes`` library to be installed. Starting with Tethys 5.0 or if you are using ``microtethys``, you will need to install ``django-axes`` using conda or pip as follows:

.. code-block:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Multi Factor Authentication (Optional)

.. important::

These settings require the `django-mfa2`, `arrow`, and `isodate` libraries to be installed. Starting with Tethys 5.0 or if you are using `microtethys`, you will need to install these libraries using conda or pip as follows:
These settings require the ``django-mfa2``, ``arrow``, and ``isodate`` libraries to be installed. Starting with Tethys 5.0 or if you are using ``microtethys``, you will need to install these libraries using conda or pip as follows:

.. code-block:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Single Sign On (Optional)

.. important::

This feature requires the `social-auth-app-django` library to be installed. Starting with Tethys 5.0 or if you are using `microtethys`, you will need to install `social-auth-app-django` using conda or pip as follows:
This feature requires the ``social-auth-app-django`` library to be installed. Starting with Tethys 5.0 or if you are using ``microtethys``, you will need to install ``social-auth-app-django`` using conda or pip as follows:

.. code-block:: bash
Expand Down Expand Up @@ -313,7 +313,7 @@ HydroShare

.. important::

This feature requires the `hs_restclient` library to be installed. Starting with Tethys 5.0 or if you are using `microtethys`, you will need to install `hs_restclient` using conda or pip as follows:
This feature requires the ``hs_restclient`` library to be installed. Starting with Tethys 5.0 or if you are using ``microtethys``, you will need to install ``hs_restclient`` using conda or pip as follows:

.. code-block:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Web Analytics (Optional)

.. important::

This feature requires the `django-analytical` library to be installed. Starting with Tethys 5.0 or if you are using `microtethys`, you will need to install `django-analytical` using conda or pip as follows:
This feature requires the ``django-analytical`` library to be installed. Starting with Tethys 5.0 or if you are using ``microtethys``, you will need to install ``django-analytical`` using conda or pip as follows:

.. code-block:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In this part of the production deployment guide, you will learn how to initializ
1. Install Python dependencies
==============================

Using a PostgreSQL database for production requires the ``psycopg2`` Python package. Also, While we do not recommend having your database on the same server as Tethys Portal, the commands to automate setting up and configuring the database require that the PostgreSQL database and the `psycopg2` library be installed on the web server. Starting with Tethys 5.0 or if you are using `microtethys`, you will need to install `postgresql` and `psycopg2` using conda as follows:
Using a PostgreSQL database for production requires the ``psycopg2`` Python package. Also, While we do not recommend having your database on the same server as Tethys Portal, the commands to automate setting up and configuring the database require that the PostgreSQL database and the ``psycopg2`` library be installed on the web server. Starting with Tethys 5.0 or if you are using ``microtethys``, you will need to install ``postgresql`` and ``psycopg2`` using conda as follows:


.. code-block:: bash
Expand Down
78 changes: 66 additions & 12 deletions docs/installation/production/manual/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,81 @@ This article will provide an overview of how to install Tethys Portal in a produ
Install Miniconda
=================

1. As of version 3.0, Tethys Platform can be installed using `conda <https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`_. We recommend installing `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_ as it provides a minimal installation of conda that is appropriate for servers:
1. As of version 3.0, Tethys Platform can be installed using `conda <https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`_. We recommend installing `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_ as it provides a minimal installation of conda that is appropriate for servers:

.. code-block:: bash
.. code-block:: bash
cd /tmp
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ./Miniconda3-latest-Linux-x86_64.sh
cd /tmp
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ./Miniconda3-latest-Linux-x86_64.sh
2. Read the license and accept when prompted. Install to the default location (:file:`~/miniconda3`) and configure the shell to start on startup.
2. Read the license and accept when prompted. Install to the default location (:file:`~/miniconda3`) and configure the shell to start on startup.

Install Tethys Platform
=======================

1. Create a new conda environment called ``tethys`` with the ``tethys-platform`` package installed:
1. Create a new conda environment called ``tethys`` with the ``tethys-platform`` package installed:

.. code-block:: bash
.. code-block:: bash
conda create -n tethys -c conda-forge -c tethysplatform tethys-platform
conda create -n tethys -c conda-forge -c tethysplatform tethys-platform
2. Activate the ``tethys`` conda environment after it is created:
2. Activate the ``tethys`` conda environment after it is created:

.. code-block:: bash
.. code-block:: bash
conda activate tethys
conda activate tethys
Install Optional Dependencies
=============================

Beginning with Tethys v5.0 or if you are using ``microtethys`` many features of Tethys that require additional dependencies are optional. This allows you to select only the dependencies that you need for the features required in your deployment and maintains a minimal environment size. To the the list of optional features and their required dependencies see :ref:`optional_features`.

1. Gather the list of optional dependencies that you want to include in your portal. Refer to the :ref:`optional_features` documentation and ensure that you have any dependencies that are required by features used by the apps that you will install into your portal.


2. Ensure that your ``tethys`` conda environment is active:

.. code-block:: bash
conda activate tethys
3. Install the optional dependencies:

.. code-block:: bash
conda install -c conda-forge < DEPENDENCY_1 > < DEPENDENCY_2 > ...
For example, if the list of optional dependencies you wanted to install was: ``django-session-security``, ``django-axes``, ``django-gravatar2``, ``social-auth-app-django``, ``postgresql``, ``psycopg2``, ``sqlalchemy``, and ``tethys_dataset_services``, then you would install them with the following command:

.. code-block:: bash
conda install -c conda-forge django-session-security django-axes django-gravatar2 social-auth-app-django postgresql psycopg2 "sqlalchemy<2" tethys_dataset_services
.. tip::

To simplify the process of installing ``tethys-platform`` and any optional dependencies, consider creating a conda environment YAML file (:file:`environment.yml`) for your portal. For example:

.. code-block:: yaml
name: tethys
channels:
- conda-forge
dependencies:
- tethys-platform
- django-session-security
- django-axes
- django-gravatar2
- social-auth-app-django
- postgresql
- psycopg2
- sqlalchemy<2
- tethys_dataset_services
Use the following command to create your environment from an environment YAML file:

.. code-block:: bash
conda env create -f environment.yml
4 changes: 4 additions & 0 deletions docs/installation/resources/example-portal-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ settings:
# STATIC_ROOT: ''
# TETHYS_WORKSPACES_ROOT: ''
# STATICFILES_USE_NPM: True
# ADDITIONAL_TEMPLATE_DIRS:
# - tethysapp.myapp.templates
# ADDITIONAL_URLPATTERNS:
# - tethysext.myextension.urls

SESSION_CONFIG:
EXPIRE_AT_BROWSER_CLOSE: True
Expand Down
19 changes: 10 additions & 9 deletions docs/supplementary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ Supplemental
This section provides a list of miscellaneous reference material that can be used to help you understand Tethys Platform and Tethys app development in more detail.

.. toctree::
:maxdepth: 1
:maxdepth: 1

supplementary/key_concepts
supplementary/app_project
supplementary/terminal_quick_guide
supplementary/install_ubuntu
supplementary/docker_testing
supplementary/pgadmin
./glossary
./summary
supplementary/key_concepts
supplementary/optional_features
supplementary/app_project
supplementary/terminal_quick_guide
supplementary/install_ubuntu
supplementary/docker_testing
supplementary/pgadmin
./glossary
./summary

Loading

0 comments on commit 6d0813c

Please sign in to comment.