{"id":15227840,"url":"https://github.com/hfm/puppet-proxysql","last_synced_at":"2025-05-15T08:32:12.066Z","repository":{"id":57664491,"uuid":"134838711","full_name":"hfm/puppet-proxysql","owner":"hfm","description":"Puppet module for ProxySQL","archived":false,"fork":false,"pushed_at":"2018-11-12T07:20:43.000Z","size":190,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T06:15:02.714Z","etag":null,"topics":["database","mysql","proxysql","puppet","puppet-proxysql"],"latest_commit_sha":null,"homepage":"https://hfm.github.io/puppet-proxysql/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hfm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-25T10:00:44.000Z","updated_at":"2019-04-22T08:47:21.000Z","dependencies_parsed_at":"2022-09-10T14:11:46.539Z","dependency_job_id":null,"html_url":"https://github.com/hfm/puppet-proxysql","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfm%2Fpuppet-proxysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfm%2Fpuppet-proxysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfm%2Fpuppet-proxysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfm%2Fpuppet-proxysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hfm","download_url":"https://codeload.github.com/hfm/puppet-proxysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254304641,"owners_count":22048446,"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","mysql","proxysql","puppet","puppet-proxysql"],"created_at":"2024-09-28T23:06:23.222Z","updated_at":"2025-05-15T08:32:07.316Z","avatar_url":"https://github.com/hfm.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppet-proxysql [![Build Status](https://travis-ci.org/hfm/puppet-proxysql.svg?branch=master)](https://travis-ci.org/hfm/puppet-proxysql) [![Puppet Forge](https://img.shields.io/puppetforge/v/hfm/proxysql.svg?style=flat-square)](https://forge.puppetlabs.com/hfm/proxysql)\n\n#### Table of Contents\n\n1. [Description](#description)\n2. [Setup - The basics of getting started with proxysql](#setup)\n    * [Setup requirements](#setup-requirements)\n    * [Beginning with proxysql](#beginning-with-proxysql)\n3. [Usage - Configuration options and additional functionality](#usage)\n4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n    * [Public Class: proxysql](#public-class-proxysql)\n5. [Limitations - OS compatibility, etc.](#limitations)\n6. [Development - Guide for contributing to the module](#development)\n\n## Description\n\nThe proxysql module handles installing, configuring, and running [ProxySQL](http://www.proxysql.com).\n\n## Setup\n\n### Setup Requirements\n\nThe proxysql module requires the following puppet module:\n\n- [puppetlabs-stdlib](https://forge.puppet.com/puppetlabs/stdlib): version 4.6.x or newer\n- [camptocamp-systemd](https://forge.puppet.com/camptocamp/systemd): version 1.x\n- [puppetlabs-apt](https://forge.puppet.com/puppetlabs/apt): version 4.x (only Debian-based distributions).\n\nnote: puppetlabs-apt is soft dependencies. If you are installing on Debian systems, you will need to configure appropriate versions of this module.\n\n### Beginning with proxysql\n\nTo set up the proxysql with default parameters, declare the `proxysql` class like the following:\n\n```puppet\ninclude ::proxysql\n```\n\n## Usage\n\n### Configuring modules in Puppet\n\nTo set up the proxysql in Puppet codes, you can configure like the following:\n\n```puppet\nclass { '::proxysql':\n  datadir      =\u003e '/var/lib/proxysql',\n  datadir_mode =\u003e '0750',\n  logdir       =\u003e '/var/log/proxysql',\n  logdir_mode  =\u003e '0750'.\n}\n```\n\n### Configuring modules from Hiera\n\nTo set up ProxySQL using Hiera, you declare `include ::proxysql` in puppet manifests and configure in Hiera like the following:\n\n```yaml\n---\nproxysql::datadir: '/var/lib/proxysql'\nproxysql::datadir_mode: '0750'\nproxysql::logdir: '/var/log/proxysql'\nproxysql::logdir_mode: '0750'\nproxysql::configs:\n  admin_variables:\n    admin_credentials: 'admin:admin;remoteadmin:remateadminpass'\n    mysql_ifaces: '0.0.0.0:6032'\n  mysql_variables:\n    threads: 8\n    max_connections: 4096\n    interfaces: '0.0.0.0:3306'\n    stacksize: 1048576\n    ping_interval_server_msec: 10000\n  mysql_servers:\n    - address: mysql\n      port: 3306\n      hostgroup: 0\n  mysql_users:\n    - username: root\n  mysql_query_rules:\n    - rule_id: 1\n      active: 1\n      match_pattern: '.'\n      log: 1\n      apply: 0\n```\n\n## Reference\n\n### Public Class: `proxysql`\n\n#### parameters\n\nParameter | Data type | Description | Default\n---|---|---|---\n`owner`            | String                  | The user to run proxysql.                            | 'proxysql'\n`group`            | String                  | Which group should belong to proyxsql.               | 'proxysql'\n`package_ensure`   | String                  | What state the package should be in.                 | 'installed'\n`datadir`          | Stdlib::Absolutepath    | Path to data directory.                              | '/var/lib/proxysql'\n`datadir_mode`     | Stdlib::Filemode        | The permissions for the data directory.              | '0700'\n`logdir`           | Stdlib::Absolutepath    | Path to log directory.                               | '/var/log/proxysql'\n`logdir_mode`      | Stdlib::Filemode        | The permissions for the log directory.               | '0700'\n`configfile`       | Stdlib::Absolutepath    | Path to configuration file.                          | '/etc/proxysql.cnf'\n`configfile_mode`  | Stdlib::Filemode        | The permissions for the config file.                 | '0600'\n`configfile_show_diff` | Boolean             | Whether to display differences when the file changes | false\n`service_ensure`   | Stdlib::Ensure::Service | Whether proxysql should be running.                  | 'running'\n`service_enable`   | Boolean                 | Whether proxysql should be enabled to start at boot. | true\n`configs`          | Hash                    | The Configuration hashes for proxysql.cnf            | See [data/common.yaml](./data/common.yaml)\n`refresh_from_config` | Boolean              | Whether proxysql should be restarted after updating configuration. | false\n\n#### Private Classes\n\n- `proxysql::repo`\n- `proxysql::install`\n- `proxysql::config`\n- `proxysql::service`\n\n## Limitations\n\nSee `operatingsystem_support` in [metadata.json](./metadata.json)\n\n## Development\n\n### Running tests\n\nThe proxysql puppet module contains tests for both [rspec-puppet](http://rspec-puppet.com) (unit tests) and [beaker-rspec](https://github.com/puppetlabs/beaker-rspec) (acceptance tests) to verify functionality. For detailed information on using these tools, please see their respective documentation.\n\n#### Testing quickstart\n\n- Unit tests:\n\n```console\n$ bundle install\n$ bundle exec rake\n```\n\n- Acceptance tests:\n\n```console\n# Set your DOCKER_HOST variable\n$ eval \"$(docker-machine env default)\"\n\n# List available beaker nodesets\n$ bundle exec rake beaker_nodes\ncentos7\ndebian9\n\n# Run beaker acceptance tests\n$ BEAKER_set=debian9 bundle exec rake beaker\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfm%2Fpuppet-proxysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhfm%2Fpuppet-proxysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfm%2Fpuppet-proxysql/lists"}