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

20210809 MariaDB + Nextcloud - experimental branch - PR 3 of 3 #389

Conversation

Paraphraser
Copy link

  1. Adds Dockerfile to MariaDB template to add stability patches recommended in:

    Note:

    • I have been running these patches for three months and they definitely improve stability (zero crashes in nextcloud_db). The Discord link above contains a similar stability report for MariaDB.
  2. Alters service definitions for both MariaDB and Nextcloud to:

    • build using the Dockerfile

    • add a volume mapping to support backup/restore of MariaDB database.

      Note:

      • it was a conscious decision to place the db_backup folder in ./volumes/CONTAINER rather than mimic the arrangement for influxdb. It simplifies the backup/restore design.
  3. Adds port mapping 9322:3306 to nextcloud_db service definition. This is needed so "restore" routines can tell when the MariaDB service is open for business.

    Note:

    • MariaDB already exposes 3306:3306.

1. Adds Dockerfile to MariaDB template to add stability patches recommended in:

	* [StackOverflow](https://stackoverflow.com/questions/61809270/how-to-discover-why-mariadb-crashes)
	* [Discord](https://discord.com/channels/638610460567928832/638610461109256194/825049573520965703)

	Note:

	* I have been running these patches for three months and they definitely improve stability (zero crashes in nextcloud_db). The Discord link above contains a similar stability report for MariaDB.

2. Alters service definitions for both MariaDB and Nextcloud to:

	* build using the Dockerfile
	* add a volume mapping to support backup/restore of MariaDB database.

		Note:

		* it was a conscious decision to place the db_backup folder in `./volumes/CONTAINER` rather than mimic the arrangement for influxdb. It simplifies the backup/restore design.

3. Adds port mapping 9322:3306 to nextcloud_db service definition. This is needed so "restore" routines can tell when the MariaDB service is open for business.

	Note:

	* MariaDB already exposes 3306:3306.
@Slyke Slyke merged commit 1deb39b into SensorsIot:experimental Sep 4, 2021
@Paraphraser Paraphraser deleted the 20210809-nextcloud-mariadb-experimental branch September 5, 2021 04:49
Paraphraser added a commit to Paraphraser/IOTstackBackup that referenced this pull request Sep 6, 2021
nextcloud backup/restore had dependencies on:

* [SensorsIot/IOTstack PR387](SensorsIot/IOTstack#387)
* [SensorsIot/IOTstack PR387](SensorsIot/IOTstack#388)
* [SensorsIot/IOTstack PR387](SensorsIot/IOTstack#389)

Those PRs have now been applied so IOTstackBackup can assume the
dependencies are satisfied.

At this stage, `iotstack_backup_nextcloud` and `iotstack_restore_nextcloud`
should be considered "test scripts" and "best efforts". Neither script
should be relied upon for production work or where any data loss or
corruption across a backup/restore would be irretrievable.
Paraphraser added a commit to Paraphraser/IOTstack that referenced this pull request Dec 14, 2021
Pull Requests [PR387](SensorsIot#387), [PR388](SensorsIot#388), [PR389](SensorsIot#389) added a port mapping of `9322:3306` to facilitate backup and restores - so the routines could determine when the MariaDB service was ready for business.

The need for this was superseded by PRs [416](SensorsIot#416), [417](SensorsIot#417) and [418](SensorsIot#418). It is sufficient for backup and restore routines to run the health check and rely on the return status.

This PR removes the `9322:3306` as no longer needed. It will also avoid the need to protect the port with an iptables rule in situations where the host is exposed to the network.

Documentation also updated.

Signed-off-by: Phill Kelley <pmk.57t49@lgosys.com>
Paraphraser added a commit to Paraphraser/IOTstack that referenced this pull request Dec 14, 2021
Pull Requests [PR387](SensorsIot#387), [PR388](SensorsIot#388), [PR389](SensorsIot#389) added a port mapping of `9322:3306` to facilitate backup and restores - so the routines could determine when the MariaDB service was ready for business.

The need for this was superseded by PRs [416](SensorsIot#416), [417](SensorsIot#417) and [418](SensorsIot#418). It is sufficient for backup and restore routines to run the health check and rely on the return status.

This PR removes the `9322:3306` as no longer needed. It will also avoid the need to protect the port with an iptables rule in situations where the host is exposed to the network.

Signed-off-by: Phill Kelley <pmk.57t49@lgosys.com>
Paraphraser added a commit to Paraphraser/IOTstack that referenced this pull request Dec 14, 2021
Pull Requests [PR387](SensorsIot#387), [PR388](SensorsIot#388), [PR389](SensorsIot#389) added a port mapping of `9322:3306` to facilitate backup and restores - so the routines could determine when the MariaDB service was ready for business.

The need for this was superseded by PRs [416](SensorsIot#416), [417](SensorsIot#417) and [418](SensorsIot#418). It is sufficient for backup and restore routines to run the health check and rely on the return status.

This PR removes the `9322:3306` as no longer needed. It will also avoid the need to protect the port with an iptables rule in situations where the host is exposed to the network.

Signed-off-by: Phill Kelley <pmk.57t49@lgosys.com>
ukkopahis pushed a commit to ukkopahis/IOTstack that referenced this pull request Dec 18, 2021
Pull Requests [PR387](SensorsIot#387), [PR388](SensorsIot#388), [PR389](SensorsIot#389) added a port mapping of `9322:3306` to facilitate backup and restores - so the routines could determine when the MariaDB service was ready for business.

The need for this was superseded by PRs [416](SensorsIot#416), [417](SensorsIot#417) and [418](SensorsIot#418). It is sufficient for backup and restore routines to run the health check and rely on the return status.

This PR removes the `9322:3306` as no longer needed. It will also avoid the need to protect the port with an iptables rule in situations where the host is exposed to the network.

Documentation also updated.

Signed-off-by: Phill Kelley <pmk.57t49@lgosys.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants