Skip to content

Commit

Permalink
AtoM 2.9 Updates
Browse files Browse the repository at this point in the history
- Ubuntu 22.04
- PHP 8.x
- Elasticsearch 6.8
  • Loading branch information
melaniekung committed Feb 18, 2025
1 parent 8cf6e76 commit 388490d
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 79 deletions.
4 changes: 2 additions & 2 deletions admin-manual/customization/config-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,8 @@ has its own configuration file that defines some important global PHP settings
like timeouts, and environment variables that may also modify the way that
AtoM works as documented in accesstomemory.org.

The file of the pool is located at ``/etc/php/7.4/fpm/pool.d/atom.conf``. Edit
with ``nano``. Once saved, run: ``sudo systemctl restart php7.4-fpm``, and the
The file of the pool is located at ``/etc/php/8.1q/fpm/pool.d/atom.conf``. Edit
with ``nano``. Once saved, run: ``sudo systemctl restart php8.1-fpm``, and the
changes will apply.

.. SEEALSO::
Expand Down
3 changes: 2 additions & 1 deletion admin-manual/customization/theming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ Additional steps for tarball installations:
*******************************************

If not already installed, first `download the node.js binary distributuion
<https://nodejs.org/en/download>`_ and export the PATH variable.
<https://nodejs.org/en/download>`_ and export the PATH variable. AtoM requires
the latest LTS version of node.

The tarball is missing three required files for this:

Expand Down
4 changes: 2 additions & 2 deletions admin-manual/installation/execution-limits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ useful guide we recommend reading: `Common pitfalls
Some of these values are set during installation, in the PHP configuration
pool you set up here:

* :ref:`20.04 PHP-FPM Configuration <installation-ubuntu-serve-php-fpm>`
* :ref:`22.04 PHP-FPM Configuration <installation-ubuntu-serve-php-fpm>`

.. _execution-php-ini:

Expand Down Expand Up @@ -168,7 +168,7 @@ caches and restart Memcached (if you're using it as cache engine).

.. code-block:: bash
sudo systemctl restart php7.4-fpm
sudo systemctl restart php8.1-fpm
php symfony cc
**Optionally, to restart Memcached**:
Expand Down
9 changes: 5 additions & 4 deletions admin-manual/installation/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ of each component.
* A webserver like `Apache <https://httpd.apache.org/>`__ or
`Nginx <http://nginx.com/>`__; Artefactual prefers the latter in
development
* `Elasticsearch <https://www.elastic.co/products/elasticsearch>`__ 5.x (we use
ES 5.6 in development). Elasticsearch 6.0 or newer is not supported as they
have deprecated a number of APIs still used in AtoM
* `Elasticsearch <https://www.elastic.co/products/elasticsearch>`__ 6.x (we use
ES 6.8 in development). ES 7 is not supported as ES 7.11+ uses Server
Side Public License (SSPL) and Elastic License 2.0 (ELv2), which are not
approved by the Open Source Initiative.
* `Java <https://www.java.com/en/>`__ 8 (required for Elasticsearch)
* `MySQL <https://www.mysql.com/>`__ 8.0
* `PHP <http://php.net/>`__ 7.4
* `PHP <http://php.net/>`__ 8.x (8.1, 8.2, 8.3 are all supported)
* `Gearman job server <http://gearman.org>`__

Optionally, Memcached can be used as cache engine:
Expand Down
45 changes: 25 additions & 20 deletions admin-manual/installation/ubuntu.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _installation-ubuntu:

======================================
Linux - Ubuntu 20.04 LTS (Focal Fossa)
Linux - Ubuntu 22.04 LTS (Jammy Jellyfish)
======================================

Most of the configuration steps described in this document apply to any modern
Expand All @@ -11,7 +11,7 @@ development and testing using Ubuntu LTS releases, and cannot guarantee that
other versions, distributions, or operating systems will work as expected with
the following instructions.

This document is based in `Ubuntu 20.04 LTS (Focal Fossa)`_. Once you have
This document is based in `Ubuntu 22.04 LTS (Jammy Jellyfish)`_. Once you have
installed it, you should be able to follow the instructions described below.
In particular, we are going to use Ubuntu packages that can be found under the
`repositories`_ *main* and *universe*.
Expand Down Expand Up @@ -118,7 +118,7 @@ Now add their repository:

.. code-block:: bash
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
Ready to be installed. Run:

Expand All @@ -139,13 +139,14 @@ Start the service and configure it to start when the system is booted.
PHP
---

Ubuntu 20.04 bundles PHP 7.4, which is much faster than older releases. The
following command will install it along with the rest of PHP extensions
Ubuntu 22.04 bundles PHP 8.1, which is much faster than older releases.
The following command will install it along with the rest of PHP extensions
:ref:`required <installation-requirements>` by AtoM:

.. code-block:: bash
sudo apt install php-common php7.4-common php7.4-cli php7.4-curl php7.4-json php7.4-ldap php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml php7.4-mbstring php7.4-xsl php7.4-zip php-apcu php-apcu-bc
# For Ubuntu 22.04, running PHP 8.1
sudo apt install php-common php8.1-common php8.1-cli php8.1-curl php-json php8.1-ldap php8.1-mysql php8.1-opcache php8.1-readline php8.1-xml php8.1-mbstring php8.1-xsl php8.1-zip php-apcu php-apcu-bc
If you are using Memcached as cache engine, you will also need to install
`php-memcache`:
Expand Down Expand Up @@ -304,6 +305,10 @@ After downloading the code, you will need to compile the themes files:
Compile Bootstrap 5 Theme Files:
********************************

.. note::
When working with Bootstrap 5 themes, AtoM requires the latest LTS version of node.
Node v18 or above is required for AtoM 2.8+.

.. code-block:: bash
sudo npm install
Expand Down Expand Up @@ -523,16 +528,16 @@ file :file:`/usr/lib/systemd/system/atom-worker.service`:
User=www-data
Group=www-data
WorkingDirectory=/usr/share/nginx/atom
ExecStart=/usr/bin/php7.4 -d memory_limit=-1 -d error_reporting="E_ALL" symfony jobs:worker
ExecStart=/usr/bin/php8.1 -d memory_limit=-1 -d error_reporting="E_ALL" symfony jobs:worker
KillSignal=SIGTERM
Restart=on-failure
RestartSec=30
.. IMPORTANT::

If you are not using PHP 7.4, be sure to update the `ExecStart` filepath
in the `[Service]` section of the sample configuration block above!
Currently it assumes PHP 7.4 is being used, and will not work for
If you are not using PHP 8.1, be sure to update the `ExecStart` filepath
in the `[Service]` section of the sample configuration block above!
Currently it assumes PHP 8.1 is being used, and will not work for
installations using a different PHP version without modification.

Now reload systemd, enable and start the AtoM worker:
Expand All @@ -556,10 +561,10 @@ scales better than other solutions like FastCGI.

.. code-block:: bash
sudo apt install php7.4-fpm
sudo apt install php8.1-fpm
Let's add a new PHP pool for AtoM by adding the following contents in a new
file called :file:`/etc/php/7.4/fpm/pool.d/atom.conf`:
file called :file:`/etc/php/8.1/fpm/pool.d/atom.conf`:

.. code-block:: ini
Expand All @@ -570,7 +575,7 @@ file called :file:`/etc/php/7.4/fpm/pool.d/atom.conf`:
group = www-data
; Use UNIX sockets if Nginx and PHP-FPM are running in the same machine
listen = /run/php7.4-fpm.atom.sock
listen = /run/php-fpm.atom.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0600
Expand Down Expand Up @@ -625,23 +630,23 @@ The process manager has to be enabled and started:

.. code-block:: bash
sudo systemctl enable php7.4-fpm
sudo systemctl start php7.4-fpm
sudo systemctl enable php8.1-fpm
sudo systemctl start php8.1-fpm
If the service fails to start, make sure that the configuration file has been
has been pasted properly. You can also check the syntax by running:

.. code-block:: bash
sudo php-fpm7.4 --test
sudo php-fpm8.1 --test
If you are not planning to use the default PHP pool (``www``), feel free to
remove it:

.. code-block:: bash
sudo rm /etc/php/7.4/fpm/pool.d/www.conf
sudo systemctl restart php7.4-fpm
sudo rm /etc/php/8.1/fpm/pool.d/www.conf
sudo systemctl restart php8.1-fpm
.. _installation-ubuntu-serve-nginx:

Expand Down Expand Up @@ -699,7 +704,7 @@ contents in :file:`/etc/nginx/sites-available/atom`.
.. code-block:: nginx
upstream atom {
server unix:/run/php7.4-fpm.atom.sock;
server unix:/run/php8.1-fpm.atom.sock;
}
server {
Expand Down Expand Up @@ -791,7 +796,7 @@ information on your first steps using AtoM.
:ref:`Back to top <installation-ubuntu>`


.. _`Ubuntu 20.04 LTS (Focal Fossa)`: http://releases.ubuntu.com/focal/
.. _`Ubuntu 22.04 LTS (Jammy Jellyfish)`: http://releases.ubuntu.com/jammy/
.. _`repositories`: https://help.ubuntu.com/community/Repositories/Ubuntu
.. _`download section`: http://www.accesstomemory.org/download
.. _`public repository`: https://github.com/artefactual/atom
Expand Down
11 changes: 5 additions & 6 deletions admin-manual/installation/upgrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ purpose of the release and how best to install it.
Make sure the dependencies are updated
======================================

Since the 2.5 version, AtoM uses Elasticsearch 5.x. If you're upgrading from an
As of version 2.9, AtoM uses Elasticsearch 6.8. If you're upgrading from an
earlier version, please make sure to upgrade your Elasticsearch installation.
You don't need to backup your index data as it will be recreated from the
database later in the upgrade.

You will also need to upgrade to Java 8 if the system is using a previous
version, as this is a requirement for Elasticsearch 5.x.
Elasticsearch is built using Java, and requires at least Java 8 in order to run.

Since the 2.6 version, AtoM requires MySQL 8.0. Bellow we'll explain the steps
Since the 2.6 version, AtoM requires MySQL 8.0. Below we'll explain the steps
needed to move and upgrade the AtoM database to properly work with that version.

Install the latest version of AtoM
Expand Down Expand Up @@ -313,7 +312,7 @@ and the atom-workers managed by the job scheduler.

.. code-block:: bash
sudo systemctl restart php7.4-fpm
sudo systemctl restart php8.1-fpm
**Optionally, to restart Memcached**:

Expand Down Expand Up @@ -489,7 +488,7 @@ To restart PHP-FPM:

.. code-block:: bash
sudo systemctl restart php7.4-fpm
sudo systemctl restart php8.1-fpm
If you are using Memcached with AtoM, you may also want to restart it:

Expand Down
2 changes: 1 addition & 1 deletion admin-manual/maintenance/cli-tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2441,7 +2441,7 @@ there is also a ``--demo`` option available:
.. code-block:: bash
php symfony cc
sudo systemctl restart php7.4-fpm
sudo systemctl restart php8.1-fpm
Optionally, if you're using Memcached as cache engine:
Expand Down
2 changes: 1 addition & 1 deletion admin-manual/maintenance/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ becomes
information.**

A :term:`developer` can edit the PHP configuration file (frequently located at
``/etc/php/7.4/fpm/pool.d/atom.conf``) to add further IP addresses to the
``/etc/php/8.1/fpm/pool.d/atom.conf``) to add further IP addresses to the
``ATOM_DEBUG_IP`` variable - this is called by ``qubit_dev.php`` and checked
for allowed IP addresses. Doing so will allow you to access Debug mode from a
different IP address than that of the server.
Expand Down
10 changes: 5 additions & 5 deletions admin-manual/maintenance/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ You should consider restarting PHP-FPM if:

.. code-block:: bash
sudo systemctl restart php7.4-fpm
sudo systemctl restart php8.1-fpm
.. SEEALSO::

Expand Down Expand Up @@ -375,7 +375,7 @@ while monitoring.

More information on using top:

* http://manpages.ubuntu.com/manpages/focal/man1/top.1.html
* http://manpages.ubuntu.com/manpages/jammy/man1/top.1.html
* https://www.lifewire.com/linux-top-command-2201163

More information on using htop:
Expand Down Expand Up @@ -415,7 +415,7 @@ information, see:
Some PHP settings are configured in the PHP pool set up during installation,
and should be adjusted there. See for example:

* :ref:`Ubuntu 20.04 PHP-FPM pool setup <installation-ubuntu-serve-php-fpm>`
* :ref:`Ubuntu 22.04 PHP-FPM pool setup <installation-ubuntu-serve-php-fpm>`

Remember, if you make any changes to your PHP settings (either in the ``php.ini``
file, or in your application PHP pool), you will need to restart PHP-FPM after
Expand Down Expand Up @@ -1382,7 +1382,7 @@ has its own configuration file - you might want to review the relevant ES
set-up and configuration documentation:

* ES 1.7: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/setup-configuration.html
* ES 5.x: https://www.elastic.co/guide/en/elasticsearch/reference/5.2/settings.html
* ES 6.8: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/settings.html

For more information on troubleshooting Elasticsearch, see:

Expand Down Expand Up @@ -1631,7 +1631,7 @@ ensure that the ``read_only`` setting is set to ``false``. See:

.. IMPORTANT::

There is also an environment variable maintained in ``/etc/php/7.4/fpm/php-fpm.conf``
There is also an environment variable maintained in ``/etc/php/8.1/fpm/php-fpm.conf``
that can override the one in ``config/app.yml``. We recommend checking both
files. In the ``atom.conf`` file, ensure that ``env[ATOM_READ_ONLY]`` is set
to "off" to disable this setting and allow users to log in again.
Expand Down
8 changes: 4 additions & 4 deletions admin-manual/security/application.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ fundamental changes to things like how errors are handled.

We defined some sane configuration defaults in our :ref:`installation instructions
<installation-ubuntu>`. Namely, these settings are defined in the PHP pool
(:file:`/etc/php7.4/fpm/php-fpm.conf`) and they are prioritized over those
defined in :file:`/etc/php/7.4/fpm/php.ini`. Be aware that multiple configuration
(:file:`/etc/php8.1/fpm/php-fpm.conf`) and they are prioritized over those
defined in :file:`/etc/php/8.1/fpm/php.ini`. Be aware that multiple configuration
files are read when PHP starts up, therefore it is a good practice to check the
final configuration state when you are deploying AtoM. You can use
`phpinfo() <https://www.php.net/manual/en/function.phpinfo.php>`__ for that
Expand Down Expand Up @@ -60,8 +60,8 @@ to check both locations.

The first is an environment variable defined in the PHP pool set up during
installation. The location of this file may vary depending on your PHP
version and installation method, but typically for PHP 7.4, you can find this
file at ``/etc/php/7.4/fpm/pool.d/atom.conf``.
version and installation method, but typically for PHP 8.1, you can find this
file at ``/etc/php/8.1/fpm/pool.d/atom.conf``.

The file contains an environment variable called ``ATOM_READ_ONLY``. To put
AtoM into read-only mode (so login is disabled), change this value to "on," like
Expand Down
2 changes: 1 addition & 1 deletion dev-manual/api/api-intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ not, check the box and then save the change using the Save button located in the
.. code:: bash
sudo service nginx restart
sudo systemctl restart php7.4-fpm
sudo systemctl restart php8.1-fpm
php symfony cc
After enabling the plugin, you will want to make sure that you generated
Expand Down
Loading

0 comments on commit 388490d

Please sign in to comment.