Skip to content

Commit

Permalink
Update Manual Production Installation for 4.3 (#1094)
Browse files Browse the repository at this point in the history
* Remove cloud option from production docs.

* Fix error with figures

* Update system dependencies for Ubuntu 24.04 and CentOS Stream 9.

* Remove unecessary pg_hba.conf changes.

* Add instructions for setting the TETHYS_HOME env var

* Update postgres installation for Rocky Linux
August -> September

* Update PostGIS for Rocky Linux

* Update other system dependencies for Rocky Linux

* Add alternative instructions for installing apache2

* Add django version to installation code blocks

* Add git lfs install instructions to docs readme

* Add django as dependency in example environment.yml

* Config review

* Quick start not use micro-tethys-platform

* update apache config template and docs

* remove todo

---------

Co-authored-by: sdc50 <sdc50@byu.net>
  • Loading branch information
swainn and sdc50 authored Oct 10, 2024
1 parent 32b20eb commit 9121e14
Show file tree
Hide file tree
Showing 67 changed files with 410 additions and 1,981 deletions.
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ conda env create -f docs_environment.yml
Use Git LFS to download the images:

```
# Install git-lfs (see: https://git-lfs.com/)
apt install git-lfs
# In the Tethys repository
git lfs install
git lfs pull
```
Expand Down
6 changes: 5 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ The quickest way to get started with Tethys Platform is via ``conda`` (`Minicond

.. code-block:: bash
conda create -n tethys -c conda-forge micro-tethys-platform
conda create -n tethys -c conda-forge tethys-platform
conda activate tethys
tethys quickstart
.. tip::

For more details on the installation process see :ref:`development_installation`.

Your browser will automatically open to http://127.0.0.1:8000/.

Expand Down
8 changes: 7 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ a. To install ``tethys-platform`` into a new conda environment then run the foll

.. code-block:: bash
conda create -n tethys -c conda-forge tethys-platform
conda create -n tethys -c conda-forge tethys-platform django=<DJANGO_VESION>
.. important::

**Django Version**

As of Tethys 3.4 and above, the version of Django is no longer pinned in the ``tethys-platform`` package. You will need to specify the version of Django that you want to use when creating the environment. This is especially important for production installations, as only the LTS versions of Django recieve bug and security fixes. For development installations, we recommend using the same version of Django that you plan to use in production. For production installations, we recommend using the current LTS version of Django (see: `How to get Django - Supported Versions <https://www.djangoproject.com/download/>`_. Failing to provide the Django version will result in installing the latest version of Django which may not be the LTS version.

.. tip::

Expand Down
13 changes: 10 additions & 3 deletions docs/installation/conda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Conda and Tethys Platform
*************************

**Last Updated:** May 2023
**Last Updated:** September 2024

This guide provides tips for using `Conda <https://docs.conda.io/en/latest/>`_ effectively in your Tethys environment.

Expand Down Expand Up @@ -59,13 +59,20 @@ To install Tethys Platform using the ``libmamba`` solver, run the command with t

.. code-block:: bash
conda create --solver libmamba -n tethys -c tethysplatform -c conda-forge tethys-platform
conda create --solver libmamba -n tethys -c tethysplatform -c conda-forge tethys-platform django=<DJANGO_VERSION>
Alternatively, if you set ``libmamba`` to be the default solver in step 2, run the install command as usual and ``libmamba`` will be used automatically:

.. code-block:: bash
conda create -n tethys -c tethysplatform -c conda-forge tethys-platform
conda create -n tethys -c tethysplatform -c conda-forge tethys-platform django=<DJANGO_VERSION>
.. important::

**Django Version**

As of Tethys 3.4 and above, the version of Django is no longer pinned in the ``tethys-platform`` package. You will need to specify the version of Django that you want to use when creating the environment. This is especially important for production installations, as only the LTS versions of Django recieve bug and security fixes. For development installations, we recommend using the same version of Django that you plan to use in production. For production installations, we recommend using the current LTS version of Django (see: `How to get Django - Supported Versions <https://www.djangoproject.com/download/>`_. Failing to provide the Django version will result in installing the latest version of Django which may not be the LTS version.

Install Packages
----------------
Expand Down
2 changes: 1 addition & 1 deletion docs/installation/developer_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For systems with `wget` (most Linux distributions):
wget :install_tethys:`sh`
bash install_tethys.sh -b |branch|
For Systems with `curl` (e.g. Mac OSX and CentOS):
For Systems with `curl` (e.g. Mac OSX and Rocky Linux):

.. parsed-literal::
Expand Down
22 changes: 4 additions & 18 deletions docs/installation/production.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Production Installation Guide
*****************************

**Last Updated:** November 2021
**Last Updated:** September 2024

A **production installation**, sometimes called **deployment**, is an installation of Tethys Platform that is configured to for being hosted on a live server. This guide provides an explanation of the difference between Production and Development installations and provides several methods for installing Tethys Platform in production.

Expand All @@ -13,14 +13,14 @@ Production vs. Development

Here are the primary differences between the :ref:`development installation <development_installation>` you have been using to develop your apps and a production installation:

* **Production Grade Servers**: The development server (``tethys manage start``) is not efficient nor capable of handling the traffic a production website receives, so a combination of the `NGINX <https://nginx.org/en/>`_ and `Daphne <https://github.com/django/daphne>`_ servers are used for production installations.
* **Production Grade Servers**: The development server (``tethys manage start``) is not efficient nor capable of handling the traffic a production website receives. A combination of the either the `NGINX <https://nginx.org/en/>`_ or `Apache <https://httpd.apache.org/>`_ web server and `Daphne <https://github.com/django/daphne>`_ ASGI server are used for production installations.
* **Database Engine**: The default database engine used in development is SQLite. SQLite may not be a good fit for use in your production site (see `Appropriate Uses For SQLite <https://www.sqlite.org/whentouse.html>`_). Consider using an alternative database backend such as PostgreSQL.
* **Changes Are Not Automatically Loaded**: When changes are made to a production installation, such as installing new apps or changing settings, the Daphne server must be restarted manually to load them. It does not restart automatically like the development server.
* **Debug Disabled**: `Debug <https://docs.djangoproject.com/en/5.0/ref/settings/#debug>`_ mode is turned off to prevent sensitive information from being leaked through the detailed error messages produced by debug mode.
* **Secure Credentials**: The internet is a hostile place, so secure passwords and unique usernames are used for all admin and database accounts, instead of the default usernames and passwords used for development.
* **Static Files Collected**: The files in the :file:`public` and :file:`static` directories of apps are collected to one location to be served more efficiently by NGINX.
* **Static Files Collected**: The files in the :file:`public` and :file:`static` directories of apps are collected to one location to be served more efficiently by NGINX or Apache.
* **Workspaces Collected**: The files in the app workspaces are collected to one location so they can be more easily backed up.
* **Permissions**: NGINX must be given permission to access the static files and workspaces to be able to serve them.
* **Permissions**: NGINX or Apache must be given permission to access the static files and workspaces to be able to serve them.

Production Installation Methods
===============================
Expand All @@ -40,20 +40,6 @@ If you have not performed a manual installation before, we recommend going throu

production/manual

Cloud Virtual Machine Images
----------------------------

This method involves creating a new virtual machine on a commercial cloud service using a virtual machine image that has Tethys Platform installed already and configured for production use. The advantage of this approach is that you can get a running Tethys Platform production installation up and running in only a few minutes. There are a few configuration steps that need to be performed after installation such as changing the default passwords, but other than that it is ready for installing your apps. They primary disadvantage is that the VM images are not produced for every version of Tethys Platform, so you will need to update Tethys to get the latest version.

We currently have images for the following commercial cloud providers:

* :ref:`Microsoft Azure <azure_vm_overview>`

.. toctree::
:maxdepth: 1

production/cloud


Docker Deployment
-----------------
Expand Down
22 changes: 0 additions & 22 deletions docs/installation/production/cloud.rst

This file was deleted.

25 changes: 0 additions & 25 deletions docs/installation/production/cloud/azure.rst

This file was deleted.

19 changes: 0 additions & 19 deletions docs/installation/production/cloud/azure/apps.rst

This file was deleted.

137 changes: 0 additions & 137 deletions docs/installation/production/cloud/azure/apps/app_store.rst

This file was deleted.

Loading

0 comments on commit 9121e14

Please sign in to comment.