Lance Edgar
8c556e6176
Fix logic to bind postgres to all network interfaces
...
ugh, finally solved this
2023-01-07 17:22:21 -06:00
Lance Edgar
5fcfc91d83
Inject default mail sender/recips for machine-wide rattail.conf
...
also tweak timezone handling
2023-01-07 17:21:34 -06:00
Lance Edgar
375cd1a36f
Add docker
module for installing that
2023-01-05 11:41:39 -06:00
Lance Edgar
dc5556651f
Update clone URL for byjove
2023-01-05 08:41:54 -06:00
Lance Edgar
cfba5425a1
Slight tweaks when making backup venv
2023-01-02 15:01:39 -06:00
Lance Edgar
a3339ac062
Avoid workon
command when deploying backup app
2022-11-28 16:49:56 -06:00
Lance Edgar
1fedc314b3
Add pyfuse3 support for backup (borg) app
2022-11-27 18:47:43 -06:00
Lance Edgar
a9bbee572a
Let caller override config paths for luigi overnight scripts
2022-11-27 12:47:39 -06:00
Lance Edgar
ebf94fb7dc
Specify logging, retcode config for luigi
2022-11-23 14:47:09 -06:00
Lance Edgar
5acf8d5304
Use workaround for shlex.join()
on older python
2022-11-21 20:09:51 -06:00
Lance Edgar
f1ecf9a1e4
Don't write overnight scripts to invoke luigi directly, by default
...
`rattail overnight` command can handle that natively now
2022-11-21 20:09:16 -06:00
Lance Edgar
4c8e956fec
Must pass -k
flag to rattail overnight
command
2022-11-21 15:39:49 -06:00
Lance Edgar
25891902b8
Make each overnight script optional
...
trying to phase out at least 1, maybe 2 of them...
this also cleans up the 'restart' script to use 'rattail overnight'
per recent changes. this seems the most useful to have around, in
case of web app failure
2022-11-20 20:03:28 -06:00
Lance Edgar
a36ecdb2ad
Use new rattail overnight
command in cron-overnight.sh
script
...
this is all a bit of WIP at the moment, perhaps..
2022-11-20 15:54:58 -06:00
Lance Edgar
7ce3aae20c
Be more explicit about virtualenvwrapper script
2022-11-20 15:31:50 -06:00
Lance Edgar
46440b6a95
Add basic composer.install()
function
2022-11-01 18:42:11 -05:00
Lance Edgar
614fd92a20
Use shlex.join()
when adding postfix alias
...
a bit convoluted perhaps, but still better...
2022-11-01 18:41:27 -05:00
Lance Edgar
a2dca4ea65
Add generic script to check mountpoints, for collectd
2022-08-21 22:57:30 -05:00
Lance Edgar
987731885b
Allow for deploying v02 certbot account
2022-08-14 13:57:10 -05:00
Lance Edgar
ba05d616d8
Always make soffice daemon init scripts executable
2022-07-25 21:32:28 -05:00
Lance Edgar
303f650a0b
Tweak logic for setting PostgreSQL listen_addresses
...
this still isn't right, but i'm calling this a savepoint at least
2022-07-25 19:53:12 -05:00
Lance Edgar
f97401009e
Allow custom email key for overnight scripts
2022-03-21 17:54:23 -05:00
Lance Edgar
5a4e2701df
Tweak default luigi config; allow specifying version
...
to accommodate one particular install, but is generally okay i think..
2022-03-18 21:46:41 -05:00
Lance Edgar
5df704679f
Improve error message when deploying backup w/ no config
2022-02-16 15:26:46 -06:00
Lance Edgar
a1b580e51a
Add function to get MariaDB version string
2022-02-10 23:25:24 -06:00
Lance Edgar
097a96fc07
Add --progress-bar
arg for pip in backup app's upgrade script
...
for some reason latest pip has progress bar showing up in cron output
and causing unwanted email
2022-02-07 10:47:43 -06:00
Lance Edgar
fd0e55ab60
Add logic to install with get-pip.py
on python2
2022-01-30 10:45:53 -06:00
Lance Edgar
a2f5542ed8
Fix typo in overnight luigi cron script
2022-01-29 17:28:46 -06:00
Lance Edgar
6bf697da1d
Add generic Luigi install logic
...
at least try to do what we can to reduce boilerplate
2022-01-28 15:29:32 -06:00
Lance Edgar
ca59000287
Allow specifying alternate config file for datasync checks
2021-11-30 13:38:05 -06:00
Lance Edgar
b58c0da7a4
Use python instead of shell script, for datasync checks
...
seems to give more clarity, and we'll have more options this way
2021-11-11 11:58:09 -06:00
Lance Edgar
5b985fb803
Fix syntax error, clone URL for deploy.backup_app()
2021-11-10 20:56:55 -06:00
Lance Edgar
cbf93624e0
Update README link for FreeTDS
2021-10-05 10:11:42 -04:00
Lance Edgar
955ceea801
Add function for installing byjove from source
2021-09-03 19:24:48 -05:00
Lance Edgar
c413c2a1f2
Add postgres functions, set_listen_addresses
and add_hba_entry
2021-06-15 14:16:46 -05:00
Lance Edgar
3287505f88
Bring in the uncomment
function to root namespace
2021-06-15 14:16:29 -05:00
Lance Edgar
1fd9ad48d6
Add bootstrap_rattail_base()
and related tweaks
...
the idea here is to have a "one stop shop" for base requirements,
we'll see how useful it is in practice i guess
2021-06-11 18:38:16 -05:00
Lance Edgar
506b88d3e2
Avoid use of workon
when deploying backup app
...
should not assume presence of virtualenvwrapper for this
2021-05-04 15:49:46 -05:00
Lance Edgar
9ae0015aba
Allow skipping of triggers when dumping MySQL DB
...
specifically this is b/c of a production demo which makes use of multiple
triggers of the same "type" but my dev maching has older MariaDB which doesn't
allow such multiple triggers
2021-02-02 11:31:27 -06:00
Lance Edgar
9048403130
Tweak how python packages are installed for backup app
...
per some issues i encountered with pip 20.3.3 and its "new resolver" although
not totally clear what fixed it... :/
2021-01-13 13:13:35 -06:00
Lance Edgar
f87f1e875c
Add python.configure_pythonz()
convenience function
...
not sure how i managed to get by without this until now..?
2021-01-13 13:12:35 -06:00
Lance Edgar
70c5d661a3
Add basic standard datasync check scripts
2021-01-02 20:04:36 -06:00
Lance Edgar
7500202af0
Add basic ejabberd
module
...
doesn't do much really, but still worth sharing i suppose
2020-12-14 11:09:46 -06:00
Lance Edgar
8b8df95633
Add postgresql.script()
for running arbitrary SQL script
2020-12-13 15:54:03 -06:00
Lance Edgar
ab822411be
Tweak regex used to determine PHP version
2020-10-17 10:21:20 -05:00
Lance Edgar
a77b1ec100
Fix typo for installing POD images
2020-10-14 09:21:44 -05:00
Lance Edgar
7963380715
Remove some deprecated init scripts for rattail
2020-10-09 16:39:17 -05:00
Lance Edgar
f5a7f80fd4
More tweaks to logic for caching ssh host key
2020-10-09 16:38:19 -05:00
Lance Edgar
8c08412d7b
Be more discerning about how/when we cache ssh host key
2020-10-09 16:09:34 -05:00
Lance Edgar
47c27eaba5
Don't use sudo for parts of postgresql.restore_db()
...
since apparently that is a problem
2020-10-08 13:58:55 -05:00
Lance Edgar
caf94ac65a
Add port
and user
kwargs for ssh.cache_host_key()
...
deprecate the `for_user` kwarg. this also will now try a basic command over
ssh before bothering with an update/cache for the host key
2020-10-08 13:15:06 -05:00
Lance Edgar
97ed8eeff0
Split up the dump/restore DB logic for postgresql
...
so that i can swap out portions of that in order to use rsync for big DBs
2020-10-07 17:54:45 -05:00
Lance Edgar
96f950d958
Try to set mysql user password in 2 different ways
...
so some versions of MySQL and/or MariaDB do not agree as to how the password
should be set? weird, but oh well, hopefully this works everywhere...
2020-09-30 18:19:36 -05:00
Lance Edgar
d744257af6
Allow specifying python binary for common backup app environment
...
also be sure to upgrade setuptools, wheel for it. this is needed esp. when
deploying to older machines e.g. debian 8
2020-09-29 17:59:31 -05:00
Lance Edgar
c67cc74d3d
Add apt.upgrade()
convenience function
2020-09-29 17:59:21 -05:00
Lance Edgar
c9aebd84e9
Change how we set password when creating a MySQL user
...
the way we were doing it just failed on MySQL (proper, not MariaDB) 8.0
2020-09-26 14:35:52 -05:00
Lance Edgar
c2cca7aa76
Update changelog
2020-09-25 18:05:38 -05:00
Lance Edgar
7471dd1bf5
Add is_debian()
convenience function
2020-09-23 22:40:59 -05:00
Lance Edgar
e8821b3395
Add mssql
module for installing MS SQL Server ODBC driver
2020-09-23 22:40:27 -05:00
Lance Edgar
19fcc94dc7
Add method
kwarg for python.install_pip()
...
ugh, this still needs to be better probably
2020-09-20 17:43:50 -05:00
Lance Edgar
6d8cf3adb6
Add "auto" method of installing pip
2020-09-18 15:38:56 -05:00
Lance Edgar
6cf17a054b
Pass arbitrary kwargs along, for apt.install()
...
also return the result
2020-09-18 15:38:20 -05:00
Lance Edgar
6cb6ddaba7
Allow kwargs for template context when deploying sudoers file
2020-09-16 15:48:34 -05:00
Lance Edgar
d6a11908ce
Update changelog
2020-09-08 18:03:07 -05:00
Lance Edgar
3d5b7c1d6e
Improve support for installing pip etc. on python3
...
namely this is for the sake of newer Ubuntu which doesn't include python2 by
default, and this affects some other package names
2020-09-08 18:01:53 -05:00
Lance Edgar
84c345ce39
Update changelog
2020-09-08 16:15:44 -05:00
Lance Edgar
659f43d5ee
Update changelog
2020-09-08 15:21:14 -05:00
Lance Edgar
8f541c30b3
Allow specifying which version of nodejs to install
2020-09-08 15:19:08 -05:00
Lance Edgar
08e030c8c7
Allow specifying git branch, when installing FreeTDS from source
2020-09-08 15:18:51 -05:00
Lance Edgar
a293ed4012
Make 'gperf' a pre-requisite for FreeTDS source install
2020-08-21 13:47:02 -05:00
Lance Edgar
f6bc14f94c
Add more options when installing pip, virtualenvwrapper
...
some of these were needed to support an older Ubuntu 14.04 machine
2020-03-31 21:31:54 -05:00
Lance Edgar
218d9e5476
Install libsqlite3-dev when installing pythonz
...
since it's needed to build python w/ sqlite3 support
2020-03-22 17:28:00 -05:00
Lance Edgar
720010d889
Allow global registration of custom versions of python
2020-03-22 17:19:10 -05:00
Lance Edgar
3b3cb8ab82
Add 'pythonz' logic, for installing arbitrary versions of python
2020-03-22 17:07:52 -05:00
Lance Edgar
32dda9742e
Add more flexible retry config for Luigi, for overnight backups
2020-03-22 15:40:51 -05:00
Lance Edgar
679ffe817c
Add the apache.stop()
convenience function
2020-03-22 15:04:12 -05:00
Lance Edgar
7590760569
Add some more mysql functions, copied from rattail-fabric
2020-03-21 16:42:19 -05:00
Lance Edgar
9ad1716bad
Add logic to install POD images
2020-03-21 16:42:06 -05:00
Lance Edgar
e290be05c6
Fix command invocation for agent_sudo()
...
at least, this worked for a recent test...where previous code didn't
2020-02-20 17:44:54 -06:00
Lance Edgar
98a64c5024
Add apache.get_php_version()
convenience function
2020-02-08 14:38:08 -06:00
Lance Edgar
4315799e1d
Fix permission bug when configuring virtualenvwrapper
2020-02-08 14:37:57 -06:00
Lance Edgar
f584cf7e16
Add util.uncomment()
function
...
copied from fabric v1
2020-02-07 11:29:53 -06:00
Lance Edgar
88a08fcf8f
Try to suppress output when setting password for postgresql
2020-02-06 23:23:08 -06:00
Lance Edgar
56acb30008
Add postgresql.reload()
function
2019-10-29 20:55:24 -05:00
Lance Edgar
5eea62688e
Fix some permission errors
2019-10-16 19:32:22 -05:00
Lance Edgar
9f066ca859
Add scripts for checking supervisor process, systemd service
2019-10-14 20:32:35 -05:00
Lance Edgar
f441ac7b25
Change how we install JDK for headless libreoffice server
2019-10-07 22:20:30 -05:00
Lance Edgar
c45e1a9187
Expose the Deployer
class in root package namespace
2019-10-07 22:20:08 -05:00
Lance Edgar
325f85a4b3
Add postgresql.create_schema()
2019-10-04 23:08:39 -05:00
Lance Edgar
0b5f6234ad
Add upgrade, restart-overnight-backups scripts for generic backup app
2019-09-30 15:37:21 -05:00
Lance Edgar
067c02e965
Add logic for installing luigi service as part of backup app
2019-09-27 15:51:10 -05:00
Lance Edgar
477af6c6a0
Add TODO comment
2019-09-26 22:02:02 -05:00
Lance Edgar
8e34ee2f17
Add apache.stop()
function
2019-09-26 22:01:45 -05:00
Lance Edgar
baea97957c
Add sed()
convenience function
...
copied from fabric1 src
2019-09-26 22:01:23 -05:00
Lance Edgar
85baacecc1
Add apache.install_wsgi()
convenience function
...
although you really shouldn't use it
2019-09-25 14:17:44 -05:00
Lance Edgar
e81f4afa8f
Add nodejs.install()
for "typical" nvm / node.js install
...
also some related tweaks, necessary for that
2019-09-23 15:26:28 -05:00
Lance Edgar
21bdc2b391
Add postgresql.get_version()
function
2019-09-23 15:25:39 -05:00
Lance Edgar
fef0ccbac5
Always make backup config owned by 'root' user
...
instead of the `user` specified by caller, since we'll always expect to run the
actual backup commands as root
2019-09-22 20:15:15 -05:00
Lance Edgar
c933f36ed6
Install symlink for /usr/local/bin/borg
-> /srv/envs/backup/bin/borg
...
by default, but can skip if so invoked. makes for nicer usage though, for sure
2019-09-16 14:52:36 -05:00
Lance Edgar
6d9006db9d
Pass along user when making virtualenv for backup app
...
i.e. stop assuming 'root' user for that
2019-09-13 19:56:30 -05:00