Commit Graph

39 Commits

Author SHA1 Message Date
Joshua Boniface fc1556c16c Fix incorrect flag 2023-12-14 14:05:45 -05:00
Joshua Boniface fdf856c53d Add creation of PVC directory 2023-12-14 12:53:11 -05:00
Joshua Boniface 9e21aecf97 Ignore errors then check for PVC package
This helps work around apt issues when running from the oneshot
update-pvc-daemons playbook. On a new install, this will be OK. On an
upgrade, the apt tasks will fail OK but then the verification that
pvc-client-cli will ensure that things are actually sane before
proceeding.
2023-12-09 23:56:34 -05:00
Joshua Boniface 73ad2a7751 Avoid removal of old versions at all
We simply shouldn't do this here. Let's leave them hanging around unless
removed in another way (e.g. in update-pvc-daemons)
2023-12-01 02:08:22 -05:00
Joshua Boniface 97b1469a70 Set ownership of pvc.conf 2023-12-01 01:57:56 -05:00
Joshua Boniface d59c9ce1ea Add safety to removal of legacy configs
This conditional will ensure that, the first time pvc.conf is installed
(or, subsequent times, until it stabilizes), the legacy configs will not
be removed. Then, on the next run in which pvc.conf does not change,
they will be removed.

This should provide a safety valve during a 0.9.83 update with the
update-pvc-daemons playbook: if the update succeeds, on the next run,
the legacy configs will be purged; otherwise, they will still be present
and can be used for fallback just in case.

This probably isn't needed, but just in case I'd rather be safe.
2023-12-01 01:45:48 -05:00
Joshua Boniface 1cfda69e5e Remove autobackup.yaml and fix quoting 2023-12-01 01:43:14 -05:00
Joshua Boniface 9408bf709c Only install pvcapid on coordinators
There should be no reason for the API to be installed on non-coordinator
hosts, so separate it out.
2023-12-01 01:40:56 -05:00
Joshua Boniface 9d2af41d3f Install new packages and remove old confs 2023-11-30 03:29:24 -05:00
Joshua Boniface b1d6915cf4 Write new pvc.conf style configuration (0.9.82+) 2023-11-28 16:10:23 -05:00
Joshua Boniface 2ba8f1cfc3 Add retries to all apt commands 2023-09-01 15:42:30 -04:00
Joshua Boniface f79d1da5be Update other commands to use new CLI format 2023-09-01 15:42:30 -04:00
Joshua Boniface 561ecb5c61 Adjust name of bootstrap trigger variable
The PVC bootstrap framework overrides this variable and wreaks havoc on
it. Instead adjust our side so that it looks for do_bootstrap instead.
2023-09-01 15:42:29 -04:00
Joshua Boniface 144f519e76 Add rinse dependency for provisioner 2023-09-01 15:42:29 -04:00
Joshua Boniface be091f66d4 Remove pvc-flush references
This service causes more problems than it solves usually, so it is being
removed in the next PVC version.
2023-09-01 15:42:28 -04:00
Joshua Boniface 25dde4709b Ensure packages are installed as newhost 2023-09-01 15:42:28 -04:00
Joshua Boniface d6cb28b639 Add immutability to PVC subrole
1. Remove the obsolete pvc-vacuum script install.

2. Remove notifies when modifying configs; we do not want to restart the
daemons uncontrolled.

3. Add bootstrap check to package installs so they only happen on
bootstrap.

This ensures this part of the role, on re-runs, will *only* update
configs and not actually touch the running daemon. This makes it safe to
run before a oneshot/update-pvc-daemons.yml playbook run.
2023-09-01 15:42:28 -04:00
Joshua Boniface f25a80ff53 Add additional CMK checks 2023-09-01 15:42:26 -04:00
Joshua Boniface 027a819a83 Move some other tasks to bootstrap role
Avoids an issue where the pvcnoded service is stopped on non-bootstrap
runs.
2023-09-01 15:42:25 -04:00
Joshua Boniface 4f5dbee8ee Correct bugs during bootstrap
1. Ensure Zookeeper restarts and checks out successfully before
proceeding with other steps.
2. Make sure PVC itself doesn't start prematurely.
2023-09-01 15:42:25 -04:00
Joshua Boniface 458e7b4872 Use new init command location
Command was renamed in the PVC CLI to facilitate other "task" actions
like backup/restore.
2023-09-01 15:42:24 -04:00
Joshua Boniface f79fb605de Support using existing SSL certs on system
Add the additional pvc_api_ssl_cert_path and pvc_api_ssl_key_path
group_vars options, which can be used to set the SSL details to existing
files on the filesystem if desired. If these are empty (or nonexistent),
the original pvc_api_ssl_cert and pvc_api_ssl_key raw format options
will be used as they were.

Allows the administrator to use outside methods (such as Let's Encrypt)
to obtain the certs locally on the system, avoiding changes to the
group_vars and redeployment to manage SSL keys.
2023-09-01 15:42:24 -04:00
Joshua Boniface 12d50cfca6 Use correct syntax for init command 2023-09-01 15:42:23 -04:00
Joshua Boniface 6a3c32f306 Use local CLI command instead of API to init 2023-09-01 15:42:23 -04:00
Joshua Boniface 0d9e209b45 Allow deb migrations to be installed 2023-09-01 15:42:23 -04:00
Joshua Boniface 8c15edd75c Handle creation and collection on bootstrap better 2023-09-01 15:42:23 -04:00
Joshua Boniface b4079cae88 Use new in-built database migrations in API 2023-09-01 15:42:23 -04:00
Joshua Boniface 0e5cb688dc Use new package and file names
References parallelvirtualclient/pvc#79
2023-09-01 15:42:23 -04:00
Joshua Boniface ba7270ab23 Add and remove floating IP during cluster bootstrap 2023-09-01 15:42:22 -04:00
Joshua Boniface e76dc2b796 Use API endpoint to bootstrap PVC cluster 2023-09-01 15:42:22 -04:00
Joshua Boniface 9448cf3d90 Add jq dependency 2023-09-01 15:42:21 -04:00
Joshua Boniface 7689e659fe Make vacuum script more comprehensive 2023-09-01 15:42:21 -04:00
Joshua Boniface 5d3de3ece2 Complete configuration of API via Ansible 2023-09-01 15:42:21 -04:00
Joshua Boniface d5516d891c Add client API to configuration 2023-09-01 15:42:21 -04:00
Joshua Boniface cfbe724458 Install ethtool 2023-09-01 15:42:21 -04:00
Joshua Boniface f82bb6a414 Add debootstrap to package list 2023-09-01 15:42:20 -04:00
Joshua Boniface dbf6e52f3c Split PVC bootstrap into separate task 2023-09-01 15:42:20 -04:00
Joshua Boniface e9fc24a8a8 Don't start pvc services on install 2023-09-01 15:42:20 -04:00
Joshua Boniface a922fe4df7 Reorganize and rejigger 2023-09-01 15:42:19 -04:00