{"id":14981103,"url":"https://github.com/lkubb/salt-mariadb-formula","last_synced_at":"2026-04-02T01:49:51.487Z","repository":{"id":134852505,"uuid":"508001022","full_name":"lkubb/salt-mariadb-formula","owner":"lkubb","description":"Manage a MariaDB server or Galera cluster of MariaDB nodes with Salt.","archived":false,"fork":false,"pushed_at":"2024-11-13T23:19:21.000Z","size":233,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T01:12:25.383Z","etag":null,"topics":["database","devops","mariadb","mysql","salt-formula","saltstack","saltstack-formula"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lkubb.png","metadata":{"files":{"readme":"docs/README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-27T17:24:56.000Z","updated_at":"2024-11-13T23:19:25.000Z","dependencies_parsed_at":"2025-01-01T21:28:05.197Z","dependency_job_id":"ef0acd82-362d-4754-9008-82e59506d538","html_url":"https://github.com/lkubb/salt-mariadb-formula","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"5ba274b52903736faf2c21afa8142f50848aee30"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-mariadb-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-mariadb-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-mariadb-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-mariadb-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkubb","download_url":"https://codeload.github.com/lkubb/salt-mariadb-formula/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243021782,"owners_count":20223068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","devops","mariadb","mysql","salt-formula","saltstack","saltstack-formula"],"created_at":"2024-09-24T14:02:55.290Z","updated_at":"2025-12-26T03:29:14.036Z","avatar_url":"https://github.com/lkubb.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":".. _readme:\n\nMariaDB Formula\n===============\n\n|img_sr| |img_pc|\n\n.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n   :alt: Semantic Release\n   :scale: 100%\n   :target: https://github.com/semantic-release/semantic-release\n.. |img_pc| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white\n   :alt: pre-commit\n   :scale: 100%\n   :target: https://github.com/pre-commit/pre-commit\n\nManage MariaDB or a Galera cluster of MariaDB nodes with Salt.\n\n.. contents:: **Table of Contents**\n   :depth: 1\n\nGeneral notes\n-------------\n\nSee the full `SaltStack Formulas installation and usage instructions\n\u003chttps://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html\u003e`_.\n\nIf you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section\n\u003chttps://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html#writing-formulas\u003e`_.\n\nIf you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,\nwhich contains the currently released version. This formula is versioned according to `Semantic Versioning \u003chttp://semver.org/\u003e`_.\n\nSee `Formula Versioning Section \u003chttps://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html#versioning\u003e`_ for more details.\n\nIf you need (non-default) configuration, please refer to:\n\n- `how to configure the formula with map.jinja \u003cmap.jinja.rst\u003e`_\n- the ``pillar.example`` file\n- the `Special notes`_ section\n\nSpecial notes\n-------------\n- Certificates are automatically generated if configured.\n- Optionally, there is also support for initializing a connection to HashiCorp Vault.\n- The MariaDB root user has no password by default and running ``mysql_secure_installation`` `is discouraged \u003chttps://salsa.debian.org/mariadb-team/mariadb-10.5/-/blob/52ed70783405f51c2633be9749ec7ec8ea8fd01f/debian/mariadb-server-10.5.README.Debian#L76-95\u003e`_. There is no option to set the root password.\n\nConfiguration\n-------------\nAn example pillar is provided, please see `pillar.example`. Note that you do not need to specify everything by pillar. Often, it's much easier and less resource-heavy to use the ``parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml`` files for non-sensitive settings. The underlying logic is explained in `map.jinja`.\n\n\nAvailable states\n----------------\n\nThe following states are found in this formula:\n\n.. contents::\n   :local:\n\n\n``mariadb``\n^^^^^^^^^^^\n*Meta-state*.\n\nThis installs the mariadb package,\nmanages the mariadb configuration,\ncreates TLS certificates if they have been configured,\nstarts the MariaDB service,\ninitializes a Vault connection if configured\nand then manages configured databases and user accounts.\n\n\n``mariadb.package``\n^^^^^^^^^^^^^^^^^^^\nInstalls the mariadb package only.\n\n\n``mariadb.package.repo``\n^^^^^^^^^^^^^^^^^^^^^^^^\nThis state will install the configured mariadb repository.\nThis works for apt/dnf/yum/zypper-based distributions only by default.\n\n\n``mariadb.config``\n^^^^^^^^^^^^^^^^^^\nManages the mariadb service configuration.\nHas a dependency on `mariadb.package`_.\n\n\n``mariadb.cert``\n^^^^^^^^^^^^^^^^\nManages MariaDB server/client certificates as well as the trusted\nroot CA certificate.\n\nPulls the certificate paths directly from the configuration.\nAll three values ``ssl_key``, ``ssl_cert`` and ``ssl_ca`` must be specified\nin ``mysqld``/``mariadb`` (server) or ``mysql`` (client) for this\nstate to apply.\n\n\n``mariadb.service``\n^^^^^^^^^^^^^^^^^^^\nStarts the mariadb service and enables it at boot time.\nIf ``manage_firewall`` is true, will also ensure the service\nports are exposed.\nHas a dependency on `mariadb.config`_.\n\nNotes for Galera (``install:galera`` is true):\n\n* If ``config:mariadb:wsrep_cluster_address`` is unspecified, will initialize a new cluster.\n* If you need to bootstrap a cluster after shutting down all nodes,\n  you will need to pass ``pillar='{\"galera_bootstrap\": false}'`` to ``state.apply``.\n* Ensure that all service ports are exposed to other nodes in the cluster, otherwise\n  starting the service will fail.\n\n\n``mariadb.vault``\n^^^^^^^^^^^^^^^^^\nConnects the local database to a Vault database secret plugin\nand manages associated roles.\n\nRequires ``vault:init`` set to true to be included in the\nmeta state by default.\n\n\n``mariadb.databases``\n^^^^^^^^^^^^^^^^^^^^^\nManages databases.\nHas a dependency on `mariadb.service`_.\n\n\n``mariadb.users``\n^^^^^^^^^^^^^^^^^\nManages user accounts and their database grants.\nHas a dependency on `mariadb.databases`_.\n\n\n``mariadb.clean``\n^^^^^^^^^^^^^^^^^\n*Meta-state*.\n\nUndoes everything performed in the ``mariadb`` meta-state\nin reverse order, i.e.\nremoves managed databases if ``clean_databases`` is true,\nremoves managed user accounts,\nremoves the Vault connection if configured,\nstops the service,\nremoves the configuration file and then\nuninstalls the package.\n\n\n``mariadb.package.clean``\n^^^^^^^^^^^^^^^^^^^^^^^^^\nRemoves the mariadb package.\nHas a dependency on `mariadb.config.clean`_.\n\n\n``mariadb.package.repo.clean``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nThis state will remove the configured mariadb repository.\nThis works for apt/dnf/yum/zypper-based distributions only by default.\n\n\n``mariadb.config.clean``\n^^^^^^^^^^^^^^^^^^^^^^^^\nRemoves the configuration of the mariadb service and has a\ndependency on `mariadb.service.clean`_.\n\n\n``mariadb.cert.clean``\n^^^^^^^^^^^^^^^^^^^^^^\nRemoves the managed MariaDB server/client certificates as well as the trusted\nroot CA certificate.\n\n\n``mariadb.service.clean``\n^^^^^^^^^^^^^^^^^^^^^^^^^\nStops the mariadb service and disables it at boot time.\n\n\n``mariadb.vault.clean``\n^^^^^^^^^^^^^^^^^^^^^^^\nRemoves the Vault connection, associated roles and the ``vault`` user account.\n\n\n``mariadb.databases.clean``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\nRemoves all managed databases if ``mariadb:clean_databases`` is True.\n\n\n``mariadb.users.clean``\n^^^^^^^^^^^^^^^^^^^^^^^\nRemoves all managed user accounts and grants.\n\n\n\nContributing to this repo\n-------------------------\n\nCommit messages\n^^^^^^^^^^^^^^^\n\n**Commit message formatting is significant!**\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\npre-commit\n^^^^^^^^^^\n\n`pre-commit \u003chttps://pre-commit.com/\u003e`_ is configured for this formula, which you may optionally use to ease the steps involved in submitting your changes.\nFirst install  the ``pre-commit`` package manager using the appropriate `method \u003chttps://pre-commit.com/#installation\u003e`_, then run ``bin/install-hooks`` and\nnow ``pre-commit`` will run automatically on each ``git commit``. ::\n\n  $ bin/install-hooks\n  pre-commit installed at .git/hooks/pre-commit\n  pre-commit installed at .git/hooks/commit-msg\n\nState documentation\n~~~~~~~~~~~~~~~~~~~\nThere is a script that semi-autodocuments available states: ``bin/slsdoc``.\n\nIf a ``.sls`` file begins with a Jinja comment, it will dump that into the docs. It can be configured differently depending on the formula. See the script source code for details currently.\n\nThis means if you feel a state should be documented, make sure to write a comment explaining it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-mariadb-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkubb%2Fsalt-mariadb-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-mariadb-formula/lists"}