Commit graph

21 commits

Author SHA1 Message Date
Aine
ee07534c1e
add a note about just update 2024-08-12 13:51:17 +03:00
Aine
adca05a2a2
adjust 'just update' and 'just roles' commands similar to mdad. 2024-08-12 13:45:28 +03:00
Aine
2fbdfe4367
add versions generator 2024-04-12 21:19:28 +03:00
Slavi Pantaleev
7bf6173efa Only optimize based on vars.yml, not on all .yml files (vault.yml, etc.) 2023-11-22 15:03:27 +02:00
Slavi Pantaleev
cbdf15440a Fix auto-restore from stored optimization state file 2023-11-20 16:41:42 +02:00
Slavi Pantaleev
d2c9ed3e45 Initial work on optimization commands
The playbook can now optimize itself based on the enabled components in
for all hosts in the inventory (`just optimize`) or for a specific host
(`just optimize-for-host HOSTNAME`).

The optimized playbook will have:

- fewer requirements (fewer roles need to be installed by `just roles`)
- a shorter and quicker to evaluate `group_vars/mash_servers` file
- a `setup.yml` file which includes less roles

Running the playbook optimized is still work in progress.
There still probably exist various role dependencies in the group-vars file, etc.

The `optimize-reset` command aims to restore your playbook to a
non-optimized state, which should work as before (and not experience bugs).

The playbook takes care to notice of changes to the various files in
`templates/` (`setup.yml`, `requirements.yml`, `group_vars_mash_servers`)
and update your optimized or non-optimized copies that are derived from
these templates. To do this, it keeps `.srchash` files in the `run/` directory.
When it notices a change in the source file's hash (by comparing to the `.srchash` file),
it will update you to the new template.

Optimization state is stored in a file in `run/` as well (`optimization-vars-files.state`).
Should the playbook notice changes in the source `template/` files, it
should update you and re-optimize using the same parameters as before (read from the state file).
2023-11-20 16:29:06 +02:00
Slavi Pantaleev
490f01bba2 Remove debug lines 2023-11-20 11:21:28 +02:00
Slavi Pantaleev
e71a879748 Create group_vars/mash_servers based on a template (group_vars/mash_servers_all)
In the future, we'll also have optional optimization steps, which could
trim down `group_vars/mash_servers` based on the components being used.
2023-11-20 11:07:31 +02:00
Slavi Pantaleev
3273f475bb Ensure setup.yml and requirements.yml are updated when .all.yml files change 2023-11-20 11:05:18 +02:00
Slavi Pantaleev
7a06bd9588 Create setup.yml based on a template (setup.all.yml)
In the future, we'll also have optional optimization steps, which could
trim down `setup.yml` based on the components being used.

Related to e2132a3c51 which did the same
for the `requirements.yml` file.
2023-11-19 15:25:28 +02:00
Slavi Pantaleev
e2132a3c51 Create requirements.yml based on a template (requirements.all.yml)
In the future, we'll also have optional optimization steps, which could
trim down `requirements.yml` based on the components being used.
2023-11-19 14:26:32 +02:00
Aine
50a844bb8a
add OPML generator script 2023-07-22 11:27:49 +03:00
Slavi Pantaleev
27892369e1 Remove time from "just run" command
People who need to time things should do it themselves, explicitly.
Forcing `time` on people is a little rude.
2023-04-01 06:33:54 +03:00
Slavi Pantaleev
dbf84d1249 Always restart services one by one when doing install-service
This way, something like `just install-service postgres` will
definitely do a `restart` and not a `stop` + `start` (which may leave
dependant services stopped).

This has potentially been addressed by
7acb5f4b85
as well.
2023-03-28 10:52:48 +03:00
Slavi Pantaleev
798b37d2fe Remove shell configuration for better compatibility 2023-03-26 14:13:14 +03:00
Aine
0a27d99b1a
justfile - fix formatting 2023-03-25 16:50:46 +02:00
Aine
b7d2bebd13
just roles - replace bash with sh 2023-03-25 16:15:08 +02:00
Aine
f8202aeb05
add just update 2023-03-25 15:41:54 +02:00
Aine
9e3069277d
format justfile, safely integrate agru 2023-03-25 15:40:07 +02:00
Slavi Pantaleev
11cafe8f26 Add extra_args support to install-service justfile command
It's now possible to do: `just install-service gitea -l host.example.com`
2023-03-20 14:46:35 +02:00
Slavi Pantaleev
488864d29e Initial commit 2023-03-15 10:58:12 +02:00