Jump to content

Meza/Deploy

From mediawiki.org

meza deploy can be run to:

  1. Initially install everything
  2. Continue installing if an error occurs during install[1]
  3. To apply changes after modifying configuration
  4. To apply changes after pulling a new version of Meza (e.g. cd /opt/meza && sudo git fetch origin && sudo git reset --hard origin/master)
  5. Maybe more scenarios

Perhaps another way to say it is that meza uses Ansible's way of thinking about things: instead of each step being in the form "install X" it is in the form "ensure X is installed'. The former cannot be performed more than once, but the latter can. This is called Idempotence.

See Meza/Commands for more detail on using Meza.

Troubleshooting Deployments

[edit]

There are countless things that can cause a meza deploy to fail.

Logs are your friend

[edit]

Meza logs and system logs are your best friend to determine what potentially could have cause a failure. By default, most of meza's logs are located in /opt/data-meza/logs.

[root@mezatest ~]# ls -la /opt/data-meza/logs/
total 0
drwxr-xr-x. 8 meza-ansible wheel  94 Jan 24 15:52 .
drwxr-xr-x. 8 meza-ansible wheel 127 Jan 24 15:56 ..
drwxr-xr-x. 2 meza-ansible wheel   6 Jan 24 15:52 cleanup
drwxr-xr-x. 2 meza-ansible wheel  24 Jan 24 15:51 deploy
drwxr-xr-x. 2 meza-ansible wheel  44 Jan 24 15:51 deploy-output
drwxr-xr-x. 2 meza-ansible wheel   6 Jan 24 15:52 jobqueue
drwxr-xr-x. 2 meza-ansible wheel   6 Jan 24 15:52 php
drwxr-xr-x. 2 meza-ansible wheel   6 Jan 24 15:52 usr

deploy-output

[edit]

The screen output that meza displays during a deploy is located in /opt/data-meza/logs/deploy-output. Logs in this directory are named based on the deploy name (e.g. monolith) and are date and timestamped:

[root@mezatest ~]# ls -la /opt/data-meza/logs/deploy-output/
total 60
drwxr-xr-x. 2 meza-ansible wheel    44 Jan 24 15:51 .
drwxr-xr-x. 8 meza-ansible wheel    94 Jan 24 15:52 ..
-rw-r--r--. 1 root         root  60956 Jan 24 15:57 monolith-2023-01-24_155121.log

If for some reason the screen output from a failed deployment is lost, the date/timestamped log will contain all of the output from the attempted deployment. Check in this location to look back on former deployments.

System and Application Logs

[edit]

Depending on which application may have been the root cause of a deployment, the logs for the application may be in a number of locations on the system on which meza is deployed. Here are some of the most common locations to locate system and application logs:

/var/log/elasticsearch/           - SOME elasticsearch logs. Also see below.
/var/log/httpd                    - SOME web server logs
/var/log/mariadb                  - mariadb/MySQL logs
/var/log/messages                 - Various system, daemon, and application messages
/var/log/php-fpm                  - PHP FastCGI Process Manager logs (for newer versions of meza 35.x+)
/opt/data-meza/elasticsearch/log/ - More elasticsearch logs

These are not the ONLY locations to looks for logs, however they are the ones that may provide the most information when trying to troubleshoot deployments.

Notes

[edit]
  1. This happens ~2.5% of the time due to connections failing (e.g. Git failures) and ~2.5% of the time due to some Parsoid restart issue that has only been seen in Travis Continuous Integration builds, not locally. Ref Issue #604