Skip to content

Commit 1f53a0d

Browse files
author
Andre Rodier
committed
documentation update
1 parent 5a5c4ce commit 1f53a0d

File tree

5 files changed

+24
-215
lines changed

5 files changed

+24
-215
lines changed

config/defaults/version-medium.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ roles_list:
1313
- nginx
1414
- mta-sts
1515
- postfix
16-
- rspamd
1716
- opendkim
1817
- opendmarc
1918
- dovecot
19+
- rspamd
2020
- autodiscover
2121
- autoconfig
2222
- prometheus

config/defaults/version-mini.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ prometheus_default:
289289
extra_certs: [ ]
290290

291291
# Ansible lookup to use: passwords
292-
creds:
293-
store: 'ansible.builtin.password'
292+
creds_default:
293+
store: password
294294
prefix: '{{ backup_directory }}/credentials/'
295295
opts:
296296
create: ''

docs/backup-home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Some folders are excluded from the backup, like the email indexes and temporary
213213
!!! Note
214214
If the Transmission bittorrent daemon is installed, the downloaded files are excluded.
215215

216-
# Emails reporting
216+
# Emails reporting=
217217

218218
By default, the backup jobs are run overnight, and an email is sent to the postmaster, with a summary of the backup job:
219219

docs/development.md

Lines changed: 19 additions & 211 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,33 @@ If something goes wrong, here are a few resources:
55
- The [Postfix mailing lists](http://www.postfix.org/lists.html).
66
- The [Dovecot mailing lists](https://www.dovecot.org/mailinglists.html).
77
- The [Debian mailing lists](https://lists.debian.org/).
8-
- Our [github page](https://github.com/progmaticltd/homebox)
8+
- Our [github page](https://github.com/progmaticltd/homebox).
9+
- The [Ansible quick start](https://docs.ansible.com/ansible/latest/getting_started/index.html).
910
- Finally, [Duckduckgo](https://duckduckgo.com/) or [Google](https://google.com/).
1011

12+
1113
## Folders content
1214

1315
The repository contains a few folders you should be familiar with:
1416

15-
- config: The main Yaml configuration files for your homebox device.
16-
- preseed: Environment to create an automatic ISO image installer for Debian.
17-
- install: Ansible scripts to install or test the whole server environment.
18-
- backup: A very useful folder that contains some important files like the passwords and certificates generated when
17+
- backup: The folder that contains some important files like the passwords and certificates generated when
1918
deploying the system. This allows you to "replay" the deployment on a new server after a disaster, without losing any
2019
information. This folder is generated automatically on the first deployment, and ignored by git.
21-
- tests: Ansible playbooks to test the platform.
22-
- sandbox: Put here anything you don't want to commit.
20+
- config: Your configuration files, specific to your platform and domain.
21+
- config/defaults: The default pre-configured values and settings.
22+
- devel: Role template and development specific files
2323
- docs: This project documentation.
24-
- uninstall: Ansible scripts to uninstall some of the components. This allows you to test them.
25-
- devel: A set of containers to help setup a local development environment.
24+
- playbooks: Ansible playbooks to install, uninstall or check the whole server environment.
25+
- roles: The roles list. Each role has tasks to install, uninstall and check the system.
26+
- sandbox: Put here anything you don't want to commit.
27+
- scripts: utility scripts, for instance the domain selection script.
28+
2629

2730
## Branches
2831

2932
- The current developments are done in the [dev](https://github.com/progmaticltd/homebox/tree/dev) branch.
30-
- The master branch is kept for releases.
33+
- The main branch is kept for releases.
3134

32-
Starting in May 2019, the approach will be to use gitflow, from the dev branch.
3335

3436
## Test machine
3537

@@ -45,14 +47,6 @@ For instance:
4547

4648
`apt-get install libvirt virt-manager`
4749

48-
## Preseed
49-
50-
There is a preseed folder that creates an an ISO image for automatic installation. It is using Docker, and builds an
51-
automatic installer from a YAML configuration file. The [preseed page](preseed.md) give more details about this
52-
feature.
53-
54-
!!! Note
55-
This installer installs Debian only, it does not deploy the platform.
5650

5751
## Router configuration
5852

@@ -71,14 +65,14 @@ your router during the development time:
7165
- TCP/143 and TCP/993: IMAP and IMAPS
7266
- TCP/110 and TCP/995: POP3 and POP3S
7367
- TCP/587: [Submission](https://en.wikipedia.org/wiki/Opportunistic_TLS).
74-
- TCP/465: [SMTPS](https://en.wikipedia.org/wiki/SMTPS) (this one is kept for compatibility with some old devices, but
75-
perhaps will be removed soon)
68+
- TCP/465: [SMTPS](https://en.wikipedia.org/wiki/SMTPS) (this one is kept for compatibility with some old devices)
7669
- TCP/4190: ManageSieve. Used to remotely access your mail filters, for instance with
7770
[thunderbird sieve plugin](https://addons.mozilla.org/en-US/thunderbird/addon/sieve/).
7871
- TCP/443: HTTPS access for the webmail and also Outlook autodiscover feature.
7972
- TCP/5222 and TCP/5269: Jabber, clients to server and server to server implementation.
8073
- UDP/53 and TCP/53: DNS Server.
8174

75+
8276
### Bridging your workstation
8377

8478
If you are using a virtual machine, it is better to use a bridge on your workstation, to
@@ -89,6 +83,7 @@ transparently forward the traffic from the internet.
8983
- A fancy guide on Ubuntu:
9084
[Linux bridge with Network Manager](http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html)
9185

86+
9287
### Create your hosts file
9388

9489
```sh
@@ -112,6 +107,7 @@ all:
112107
I have actually tested with the Ansible remote user as root. However, it should be possible to run as an admin user and
113108
use sudo with little modifications.
114109
110+
115111
## System configuration
116112
117113
First, as you would do for a live environment, copy the sample configuration to create your own:
@@ -125,11 +121,12 @@ The file is self explanatory, and inside, you will find the following block:
125121

126122
```yaml
127123
system:
128-
release: bullseye
124+
release: bookworm
129125
devel: true
130126
debug: true
131127
```
132128
129+
133130
### The "debug" flag
134131
135132
Setting the debug flag to true will activate a lot of debug options in Dovecot, OpenLDAP, Postfix, etc... You can then
@@ -163,35 +160,6 @@ git config --local core.hooksPath git-hooks
163160
```
164161

165162

166-
## Development playbook
167-
168-
The first playbook to run is probably "dev-support.yml". It installs some diagnostic and convenience packages on the
169-
server, to make your life easier during the development phase.
170-
171-
For instance, these packages are installed:
172-
173-
- mc
174-
- telnet
175-
- dnsutils
176-
- whois
177-
- tmux
178-
- pfqueue
179-
- aptitude
180-
- man
181-
- less
182-
- vim
183-
- net-tools
184-
- file
185-
- swaks
186-
- curl
187-
- locate
188-
- colorized-logs
189-
- bash-completion
190-
191-
- The script also configures a basic bashrc / zshrc.
192-
- It is also adding the LetsEncrypt staging root certificate authority to the system.
193-
194-
195163
## Installation playbooks
196164

197165
The main playbook 'main.yml' and includes all other playbooks, with some of them conditional, as some components are
@@ -212,166 +180,6 @@ bashrc to its default state. You probably want to run this script before putting
212180
It is also removing the LetsEncrypt staging root certificate authority from the system.
213181

214182

215-
## Tests / Diagnostic playbooks.
216-
217-
There is also a tests folder that contains test playbooks. These playbooks are running a list of system and integration
218-
tests on your development server. This is useful for diagnostic purposes and also during the development phase, to be
219-
sure nothing is broken before committing anything.
220-
221-
It does not replace a full test suite in a pre-production environment, but has been enough so far to catch common
222-
mistakes made in the scripts.
223-
224-
The following roles are run:
225-
226-
- Install the development packages above,
227-
- Basic system tests
228-
- LDAP server: Binding, users list, SSL certificate, etc.
229-
- Home folders: Presence and permissions
230-
- Antivirus rspamd: Current state
231-
- Service opendmarc: Current state
232-
- SMTP certificate: presence and validity
233-
- Service opendkim: Current state, key validdity
234-
- Service postfix: Current state, certificate, emails sending and receiving
235-
- POP3 certificate: presence and validity
236-
- IMAP certificate: presence and validity
237-
- Service dovecot: current state, user authentication, email resolution
238-
- Web site for roundcube: basic access, SSL certificate test
239-
- Web site "autoconfig" for Thunderbird: Check the validity of the XML generated
240-
- Web Site "autodiscover" for Outlook: HTTPS certificate, check the validity of the XML
241-
generated
242-
- Antivirus tests, for instance check that an email with a virus is bounced.
243-
- Full text search inside attachments
244-
- DNS records when the DNS server is installed.
245-
246-
247-
## Profiling the playbook
248-
249-
You can profile the time taken by the whole playbook, using the Ansible profile_roles plugin:
250-
251-
```ini hl_lines="5"
252-
[defaults]
253-
retry_files_enabled = False
254-
display_skipped_hosts = False
255-
stdout_callback = yaml
256-
callback_whitelist = profile_roles
257-
roles_path = .:{{ playbook_dir }}/../../common/roles/
258-
connection_plugins = {{ playbook_dir }}/../../common/connection-plugins/
259-
remote_tmp = /tmp/
260-
```
261-
262-
Then, once you have finished to run the playbook, you will see the total time. For instance:
263-
264-
For a full deployment:
265-
266-
```
267-
PLAY RECAP *********************************************************************
268-
homebox : ok=644 changed=394 unreachable=0 failed=0
269-
localhost : ok=0 changed=0 unreachable=0 failed=0
270-
271-
Saturday 22 June 2019 15:18:09 +0100 (0:00:00.424) 0:18:59.596 *********
272-
===============================================================================
273-
dovecot --------------------------------------------------------------- 176.27s
274-
system-prepare -------------------------------------------------------- 118.33s
275-
postfix --------------------------------------------------------------- 112.06s
276-
certificates ---------------------------------------------------------- 100.98s
277-
load-defaults ---------------------------------------------------------- 81.55s
278-
roundcube -------------------------------------------------------------- 67.77s
279-
ldap ------------------------------------------------------------------- 66.80s
280-
clamav ----------------------------------------------------------------- 59.39s
281-
external-ip ------------------------------------------------------------ 39.54s
282-
sogo ------------------------------------------------------------------- 38.57s
283-
opendkim --------------------------------------------------------------- 27.84s
284-
dns-server-bind -------------------------------------------------------- 27.40s
285-
setup ------------------------------------------------------------------ 25.43s
286-
rspamd ----------------------------------------------------------------- 24.34s
287-
opendmarc -------------------------------------------------------------- 23.52s
288-
packages --------------------------------------------------------------- 21.38s
289-
website-simple --------------------------------------------------------- 17.81s
290-
system-cleanup --------------------------------------------------------- 16.34s
291-
user-setup ------------------------------------------------------------- 15.64s
292-
autoconfig ------------------------------------------------------------- 14.98s
293-
autodiscover ----------------------------------------------------------- 14.98s
294-
remote-access ---------------------------------------------------------- 14.89s
295-
nginx ------------------------------------------------------------------ 13.14s
296-
imapproxy --------------------------------------------------------------- 8.58s
297-
dns-server-bind-refresh ------------------------------------------------- 2.69s
298-
well-known-services ----------------------------------------------------- 2.10s
299-
dns-server-check-propagation -------------------------------------------- 1.22s
300-
ejabberd ---------------------------------------------------------------- 0.75s
301-
transmission ------------------------------------------------------------ 0.63s
302-
borg-backup ------------------------------------------------------------- 0.58s
303-
zabbix-server ----------------------------------------------------------- 0.54s
304-
luks-remote ------------------------------------------------------------- 0.50s
305-
fwknop-server ----------------------------------------------------------- 0.40s
306-
privoxy ----------------------------------------------------------------- 0.31s
307-
backup-server ----------------------------------------------------------- 0.19s
308-
tor --------------------------------------------------------------------- 0.18s
309-
import-accounts --------------------------------------------------------- 0.18s
310-
rspamd-web -------------------------------------------------------------- 0.18s
311-
fwknop-client ----------------------------------------------------------- 0.17s
312-
ssh-keygen -------------------------------------------------------------- 0.13s
313-
extra-certs ------------------------------------------------------------- 0.06s
314-
sendxmpp ---------------------------------------------------------------- 0.05s
315-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
316-
total ---------------------------------------------------------------- 1139.50s
317-
```
318-
319-
And for an update:
320-
321-
```text
322-
PLAY RECAP *********************************************************************
323-
homebox : ok=557 changed=66 unreachable=0 failed=0
324-
localhost : ok=0 changed=0 unreachable=0 failed=0
325-
326-
Saturday 22 June 2019 14:50:39 +0100 (0:00:00.442) 0:09:57.571 *********
327-
===============================================================================
328-
load-defaults ---------------------------------------------------------- 85.87s
329-
certificates ----------------------------------------------------------- 78.07s
330-
dovecot ---------------------------------------------------------------- 54.67s
331-
postfix ---------------------------------------------------------------- 42.22s
332-
external-ip ------------------------------------------------------------ 36.11s
333-
ldap ------------------------------------------------------------------- 34.02s
334-
system-prepare --------------------------------------------------------- 27.48s
335-
setup ------------------------------------------------------------------ 23.86s
336-
dns-server-bind -------------------------------------------------------- 22.62s
337-
opendkim --------------------------------------------------------------- 22.37s
338-
rspamd ----------------------------------------------------------------- 22.30s
339-
opendmarc -------------------------------------------------------------- 18.06s
340-
roundcube -------------------------------------------------------------- 17.91s
341-
user-setup ------------------------------------------------------------- 15.80s
342-
nginx ------------------------------------------------------------------ 15.27s
343-
sogo ------------------------------------------------------------------- 14.75s
344-
remote-access ---------------------------------------------------------- 13.83s
345-
website-simple ---------------------------------------------------------- 8.27s
346-
system-cleanup ---------------------------------------------------------- 7.65s
347-
clamav ------------------------------------------------------------------ 6.65s
348-
autoconfig -------------------------------------------------------------- 5.68s
349-
autodiscover ------------------------------------------------------------ 5.37s
350-
imapproxy --------------------------------------------------------------- 4.82s
351-
packages ---------------------------------------------------------------- 3.09s
352-
dns-server-bind-refresh ------------------------------------------------- 1.93s
353-
well-known-services ----------------------------------------------------- 1.35s
354-
dns-server-check-propagation -------------------------------------------- 0.98s
355-
ejabberd ---------------------------------------------------------------- 0.77s
356-
transmission ------------------------------------------------------------ 0.75s
357-
borg-backup ------------------------------------------------------------- 0.62s
358-
zabbix-server ----------------------------------------------------------- 0.58s
359-
luks-remote ------------------------------------------------------------- 0.53s
360-
fwknop-server ----------------------------------------------------------- 0.43s
361-
privoxy ----------------------------------------------------------------- 0.32s
362-
access-check ------------------------------------------------------------ 0.28s
363-
rspamd-web -------------------------------------------------------------- 0.24s
364-
backup-server ----------------------------------------------------------- 0.21s
365-
tor --------------------------------------------------------------------- 0.20s
366-
fwknop-client ----------------------------------------------------------- 0.18s
367-
access-report ----------------------------------------------------------- 0.16s
368-
ssh-keygen -------------------------------------------------------------- 0.14s
369-
extra-certs ------------------------------------------------------------- 0.06s
370-
sendxmpp ---------------------------------------------------------------- 0.06s
371-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
372-
total ----------------------------------------------------------------- 597.48s
373-
```
374-
375183
## Some development tools to consider
376184

377185
- The fantastic tmux, mandatory IMHO: [tmux github page](https://github.com/tmux).

roles/grafana/tasks/install/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
- name: Restart Grafana now if needed
4949
ansible.builtin.meta: flush_handlers
50+
tags: config
5051

5152
# See https://github.com/grafana/grafana/issues/12638
5253
- name: Set the admin password using the API

0 commit comments

Comments
 (0)