Commit Graph

1082 Commits

Author SHA1 Message Date
cliffmccarthy
897d4f161b refactor: Move unit list to ChatmailVenvDeployer
- Split _configure_remote_venv_with_chatmaild() into two functions.
  _configure_remote_venv_with_chatmaild() handles details specific to
  the "venv", while the new _configure_remote_units() is a more
  general function that is applicable to several services.
- Renamed _activate_remote_venv_with_chatmaild() to
  _activate_remote_units() because doesn't have anything
  venv-specific.
- Removed list of units from helper functions (where it appeared
  twice); moved it to ChatmailVenvDeployer, where its is passed as an
  argument to _configure_remote_units() and _activate_remote_units().
2025-11-12 19:16:51 -06:00
cliffmccarthy
8afbea9b31 chore: Add CHANGELOG.md entry for cmdeploy refactor 2025-11-12 19:16:51 -06:00
cliffmccarthy
ca1bd77d37 feat: Reorder deployers
- Moved fcgiwrap before nginx.
- Exchanged order of turn and unbound.
- Moved journald as early as possible.
- Suggested in review by missytake.
2025-11-12 19:16:51 -06:00
cliffmccarthy
b2de410335 feat: Remove obs-home-deltachat.gpg
- We don't install Dovecot from OBS anymore.
- Removed files.put() that creates
  /etc/apt/keyrings/obs-home-deltachat.gpg; replaced this with a
  files.file() that sets present=False to remove the file from any
  existing installations where it already has been installed.
- Removed now-unused obs-home-deltachat.gpg file.
- Clarified description of sources.list operation.
- Suggested in review by missytake and hpk42.
2025-11-12 19:16:51 -06:00
cliffmccarthy
656cc71f08 fix: Block unbound from starting up on install
- On an IPv4-only system, if unbound is started but not configured, it
  causes subsequent steps to fail to resolve hosts.
- Revised UnboundDeployer.install_impl() to use policy-rc.d to prevent
  the service from starting when installed.  This is the same
  mechanism used to keep nginx from starting on install.
2025-11-12 19:16:51 -06:00
cliffmccarthy
181b7a6d5b docs: Add architectural information about deployer classes
- Updated overview.rst to describe the Deployer class hierarchy and
  the motivations behind it.
2025-11-12 19:16:51 -06:00
cliffmccarthy
0273768c0d refactor: Call install, configure, and activate methods in loops
- Revised deploy_chatmail() to use all_deployers to call the
  install(), configure(), and activate() methods on all the deployers,
  rather than listing them explicitly in the code.
2025-11-12 19:16:51 -06:00
cliffmccarthy
0a2ade038c refactor: Reorder deploy_chatmail()
- The previous commits that added Deployer classes mostly kept
  deployment operations in the same order that they were in before.
  To organize the process into separate stages for install, configure,
  and activate, we need to reorder the method calls.  This is the
  commit that does that, and thus this is the commit that has the
  largest effect on the order of operations.
- The calls for the deployer objects are all reordered here so that
  the methods are called in the same sequence for each stage.  This
  will allow us to collect the calls into loops in the next commit.
  This commit provides a way to see a diff showing exactly how the
  sequence changed.
- The sequence of deployers was largely based on preserving the order
  of the "activate" stage, as this seems like the place order might be
  the most likely to matter.  Installation of packages and
  configuration of files should generally be able to run in any order.
  (ChatmailDeployer handles updating the apt data, and therefore needs
  to be first, however.)
2025-11-12 19:16:51 -06:00
cliffmccarthy
67c5cf3204 refactor: Move curl installation from IrohDeployer to ChatmailDeployer
- The 'curl' program is used in TurnDeployer and IrohDeployer, so it
  makes more sense to install it at the beginning in ChatmailDeployer,
  rather than have each thing that uses it install it separately.
2025-11-12 19:16:51 -06:00
cliffmccarthy
e70c023541 refactor: Add TurnDeployer
- This splits the existing deploy_turn_server() routine into methods
  for the install, configure, and activate stages.
2025-11-12 19:16:51 -06:00
cliffmccarthy
7b75944f6b refactor: Add WebsiteDeployer
- This adds a step to create /var/www in the install stage, because
  the directory needs to exist for the rsync in the configure stage to
  work.
2025-11-12 19:16:51 -06:00
cliffmccarthy
3b44b61586 refactor: Add EchobotDeployer
- This class is a special case because it has a dependency on the
  Postfix and Dovecot deployers.  When deciding whether to restart the
  echobot service, it needs to know whether the Postfix and Dovecot
  deployers restarted their services.  To support this dependency, the
  PostfixDeployer and DovecotDeployer objects are passed to the
  EchobotDeployer object, so it can check their was_restarted
  attributes.
2025-11-12 19:16:51 -06:00
cliffmccarthy
533f0afde0 refactor: Add FcgiwrapDeployer 2025-11-12 19:16:51 -06:00
cliffmccarthy
3e4a602a5d refactor: Add ChatmailDeployer
- This moves the installation of cron earlier in the deployment sequence.
2025-11-12 19:16:51 -06:00
cliffmccarthy
e1d5d3e609 refactor: Add ChatmailVenvDeployer 2025-11-12 19:16:51 -06:00
cliffmccarthy
4dd041d799 refactor: Split _install_remote_venv_with_chatmaild into stages
- Split _install_remote_venv_with_chatmaild() into three routines, to
  handle the install, configure, and activate stages.
- This moves the upload of chatmail.ini later in the deployment
  process, because it is a configuration file specific to the
  instance, not software installation that would be uniform across all
  deployments.
2025-11-12 19:16:51 -06:00
cliffmccarthy
54c6bf6351 refactor: Add RspamdDeployer
- This replaces the existing _remove_rspamd() routine with a method
  for the install stage.
2025-11-12 19:16:51 -06:00
cliffmccarthy
f904c4e400 refactor: Add MtastsDeployer
- This splits the existing _uninstall_mta_sts_daemon() routine into
  methods for the configure and activate stages.
2025-11-12 19:16:51 -06:00
cliffmccarthy
a1972acf8f refactor: Add MtailDeployer
- This splits the existing deploy_mtail() routine into methods for the
  install, configure, and activate stages.
2025-11-12 19:16:51 -06:00
cliffmccarthy
afc1be2671 refactor: Add AcmetoolDeployer
- This splits the existing deploy_acmetool() routine into methods for
  the install, configure, and activate stages.
2025-11-12 19:16:51 -06:00
cliffmccarthy
6afd31fb17 refactor: Add JournaldDeployer 2025-11-12 19:16:51 -06:00
cliffmccarthy
93d9c0eb40 refactor: Add IrohDeployer
- This splits the existing deploy_iroh_relay() routine into methods
  for the install, configure, and activate stages.
2025-11-12 19:16:51 -06:00
cliffmccarthy
e3718eb4f8 refactor: Add UnboundDeployer 2025-11-12 19:16:51 -06:00
cliffmccarthy
b43059764b refactor: Add OpendkimDeployer
- Note that this moves the installation of the opendkim package
  earlier in the deployment sequence.  Previously, it was installed
  during the _configure_opendkim() routine.
2025-11-12 19:16:51 -06:00
cliffmccarthy
95edf42069 refactor: Add NginxDeployer
- Use policy-rc.d during nginx install.  This is needed to keep nginx
  from starting up and interfering with acmetool.  For more information see:
    - https://serverfault.com/questions/861583/how-to-stop-nginx-from-being-automatically-started-on-install
    - https://major.io/p/install-debian-packages-without-starting-daemons/
    - https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt
2025-11-12 19:16:51 -06:00
cliffmccarthy
b966c37740 refactor: Add PostfixDeployer
- Removed now-unused 'debug' variable from deploy_chatmail().
2025-11-12 19:16:51 -06:00
cliffmccarthy
1d1522880e refactor: Add DovecotDeployer 2025-11-12 19:16:51 -06:00
cliffmccarthy
2aeea0d95f refactor: Add Deployer base class
- Added a Deployer class that defines the base for objects that will
  handle installation of individual components, with install,
  configure, and activate stages.  Subclasses will override the
  implementation methods of those stages as needed, while the base
  class handles all the logic of deciding which stages to execute.
- The CMDEPLOY_STAGES environment variable is used to determine what
  stages to run.  If this is not defined, all stages run as usual.
- Added import of Deployer to cmdeploy/__init__.py.  This is not yet
  used, but the next series of commits will use it.
- In deploy_chatmail(), define an empty list of deployers, and call
  the create_groups() and create_users() methods for the items in the
  list.  This list will get filled with Deployer objects in the next
  series of commits.
2025-11-12 19:16:51 -06:00
cliffmccarthy
8bb0c20276 refactor: Move addition of 9.9.9.9 resolver earlier
- Moved the "Add 9.9.9.9 to resolv.conf" step earlier, before the
  creation of users or updates to any config files.  This should not
  affect any of those operations.  Moving this step earlier makes it
  easier to accommodate the restructuring of the deployment process
  into separate components with separate stages for install,
  configure, and activate.
2025-11-12 19:16:51 -06:00
cliffmccarthy
e6c97786dc refactor: Move all imports to top of cmdeploy/__init__.py 2025-11-12 19:16:51 -06:00
missytake
5515dc4c4b cmdeploy: fix status cmd after sshexec rework (#723)
* cmdeploy: fix status cmd after sshexec rework

* tests: test cmdeploy status

* tests: move test to online tests

* tests: require chatmail_config for status test
2025-11-12 12:24:31 +01:00
holger krekel
50b986a265 Split README into sphinx doc structured sections (#711)
refactor README.rst and architecture file into sphinx doc project, automatically deploying on main merges and PRs.

* add FAQs from https://chatmail.at/relays landing page

* fix links, and streamline postfix/dovecot mentioning

* add linkcheck to CI, fix several links and streamlihne DKIM section while at it

* some streamlining, rename to "overview"

* ci: upload documentation to chatmail.at/doc/relay

* ci: main should be uploaded when docs.yaml changes

* ci: fix typo

* Update .github/workflows/docs-preview.yaml

Co-authored-by: missytake <missytake@systemli.org>
2025-11-11 14:49:25 +01:00
missytake
f24bc99c6f config: xstore@testrun.org is deprecated (#722) 2025-11-11 11:46:35 +01:00
link2xt
a0ebb2bdbc ci: pin jsok/serialize-workflow-action 2025-11-08 21:03:48 +00:00
link2xt
132bdcb5e5 Update the changelog 2025-11-08 19:20:39 +00:00
link2xt
7d593841bb fix: change hook permissions from 744 to 755
There is no reason for it to be not executable by non-owner.
2025-11-08 19:20:39 +00:00
link2xt
83e7caeaf8 Replace acmetool cronjob with a timer 2025-11-08 19:20:39 +00:00
link2xt
1cff4a94f1 Setup acmetool hook into correct place 2025-11-08 19:20:39 +00:00
missytake
ded9dd470d www: add changelog 2025-11-06 16:19:02 +01:00
Alexander
b94ad729fd Update cmdeploy/src/cmdeploy/__init__.py
Co-authored-by: missytake <missytake@systemli.org>
2025-11-06 16:17:12 +01:00
Alexander Dietrich
b60267f37f Skip www_folder if merge conflict marker found 2025-11-06 16:17:12 +01:00
missytake
a0aa2912dd ci: fix test methods for deltachat 2.23.0 2025-11-06 12:33:59 +01:00
Serge Matveenko
76108c1c03 Test dig output with dns comments 2025-11-06 11:26:02 +01:00
Serge Matveenko
61b8dc4637 Improve dns responses parsing 2025-11-06 11:26:02 +01:00
Lars-Dominik Braun
d42f579291 turnserver: Strip newline from response. 2025-11-03 22:57:43 +00:00
Serge Matveenko
dd3cf4d449 Update dovecot-core deb sha256 sums 2025-10-30 11:23:19 +01:00
holger krekel
7361cc9350 fix changelog references 2025-10-29 13:33:25 +01:00
missytake
00f199816d unpublish mutual help group invite link 2025-10-28 16:12:07 +01:00
link2xt
8d7e1dad0e Require STARTTLS for incoming port 25 connections
We already require that outgoing connections
use STARTTLS so other servers need a valid TLS
certificate to accept messages from us.
It is then very unlikely that they cannot use TLS
to send messages to us.

Conversely, if they only can send messages to use without TLS,
it likely does not have STARTLS on its port 25
and then we don't want to accept messages from them
because we will likely not be able to reply.
2025-10-28 01:44:14 +00:00
link2xt
c0da7bb3bf docs: chatmail-turn listens on 3478 UDP, not TCP port 2025-10-28 01:08:06 +00:00