Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install MySQL/MariaDB on-demand--for MediaWiki, [Nextcloud,] WordPress, Matomo &/or Admin Console #3665

Merged
merged 4 commits into from Nov 5, 2023

Conversation

holta
Copy link
Member

@holta holta commented Nov 5, 2023

Goal is being able to offer Lightweight IIAB installs, in situations where MySQL (MariaDB) is not wanted:

Examples include more rapid unit-testing of diverse aspects of IIAB, as well as other dev and field scenarios where {MediaWiki, WordPress, Matomo, Admin Console} are not desired.

An interim stub is included in roles/9-local-addons/tasks/main.yml to install MySQL (MariaDB) when admin_console_install: True — however it's possible that Admin Console doesn't much use setup-feedback and record_feedback.php (invoked by Line 970 of js-menu.js) anymore so this can be further refined in whatever direction is appropriate. Hopefully @tim-moody can offer suggestions, if this PR's stub in 9-local-addons needs further improvement.

This PR is functionality-tested in a few different ways on Ubuntu Server 24.04's latest pre-release daily build. (Further testing on different OS's and in more novel scenarios definitely can't hurt, before and after merging, to uncover important/overlooked corner cases!) If changes are required, please LMK! 🎯

@holta holta added this to the 8.1 milestone Nov 5, 2023
@jvonau
Copy link
Contributor

jvonau commented Nov 5, 2023

Personally I would like to see admin_console_install employ it's own role rather than cluttering up the meta tasks 9-add-ons where only other roles are called. On a side note the munin role would need to come after admin_console to pickup the current state of mysql's state of install.

@holta
Copy link
Member Author

holta commented Nov 5, 2023

munin role would need to come after admin_console to [pick up] the current state of mysql's state of install.

Good idea, thanks.

Munin might be going away, given its installation is not reliable and it's rarely used, but still it's worth getting the details right until that happens.

@jvonau
Copy link
Contributor

jvonau commented Nov 5, 2023

Another source of bloated installs related to general dependencies are hidden within nginx's role

@holta
Copy link
Member Author

holta commented Nov 5, 2023

Another source of bloated installs related to general dependencies are hidden within nginx's role

Indeed 👍

We can tackle that later, if a cleaner haircut makes sense e.g. for dependencies like uwsgi and uwsgi-plugin-python3 ...

- name: 'Install 5 packages for NGINX: libnginx-mod-http-subs-filter, nginx-extras, php{{ php_version }}-fpm, uwsgi, uwsgi-plugin-python3'
package:
name:
- libnginx-mod-http-subs-filter
- nginx-extras
- php{{ php_version }}-fpm # INSTALLS [0] /etc/apache2/conf-available/php{{ php_version }}-fpm.conf AND DRAGS IN [1] php{{ php_version }}-cli (superset of php{{ php_version }}-common) [2] libsodium23 (likewise installed in moodle/tasks/install.yml AND wordpress/tasks/install.yml) [3] php{{ php_version }}-json if PHP < 8.0 (NEEDED FOR nextcloud/tasks/install.yml AND pbx/tasks/freepbx_dependencies.yml AND wordpress/tasks/install.yml)
- uwsgi # Admin Console & roles/captiveportal should really install
- uwsgi-plugin-python3 # these 2 packages on demand (not every IIAB needs these).
state: present

@holta
Copy link
Member Author

holta commented Nov 5, 2023

All tests look good so far:

  • Ubuntu 24.04 (diverse functional tests, to hit different code paths)
  • Ubuntu 22.04 (LARGE-sized IIAB install smoke-test)
  • Debian 12.2 (LARGE-sized IIAB install smoke-test, ongoing but all looks good as MediaWiki just successfully forced the install of MariaDB and the install's proceeding from there...)

multipass launch https://cloud.debian.org/images/cloud/bookworm/daily/latest/debian-12-generic-amd64-daily.qcow2 -n deb12 -c 2 -m 2G -d 25G --cloud-init pr3665-large.yml [--bridged]

Using Multipass VMs e.g. with pr3665-large.yml as follows...

runcmd:
  - mkdir /etc/iiab
  - curl https://raw.githubusercontent.com/iiab/iiab/master/vars/local_vars_large.yml > /etc/iiab/local_vars.yml
  - curl iiab.io/risky.txt | bash -s 3665 &

@holta
Copy link
Member Author

holta commented Nov 5, 2023

All tests look good so far:

All tests appear solid on Debian 12, as with Ubuntu 22.04 / 24.04:

I'd like to merge this PR today, if no serious problems arise 🏹

@holta holta merged commit 6edd2f4 into iiab:master Nov 5, 2023
3 checks passed
@holta
Copy link
Member Author

holta commented Nov 5, 2023

Good enough. Thanks @jvonau for helping to guide this.

iiab-diagnostics for LARGE-sized install on Debian 12.2: http://sprunge.us/DeayoO?en

@tim-moody @deldesir please LMK if any further refinements are needed — now that this is merged for wider community testing! 💯

@tim-moody
Copy link
Contributor

doesn't nextcloud require mysql? calibre-web? minetest (maybe sqlite)?

could take iiab-admin_install as a proxy for adm cons

@holta
Copy link
Member Author

holta commented Nov 6, 2023

doesn't nextcloud require mysql?

I missed that one, Thanks!

calibre-web? minetest (maybe sqlite)?

Both above default to SQLite:

@holta holta changed the title Install MySQL/MariaDB on-demand--for MediaWiki, WordPress, Matomo &/or Admin Console Install MySQL/MariaDB on-demand--for MediaWiki, [Nextcloud,] WordPress, Matomo &/or Admin Console Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants