Giter Site home page Giter Site logo

sportsru / ansible-percona-toolkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oefenweb/ansible-percona-toolkit

0.0 4.0 1.0 89 KB

Ansible role to set up percona-toolkit in Debian-like systems

License: MIT License

Shell 85.44% Dockerfile 14.56%

ansible-percona-toolkit's Introduction

percona-toolkit

Build Status Ansible Galaxy

Manage percona-toolkit in Debian-like systems.

Requirements

None

Variables

Percona version
  • percona_toolkit_repo_version: [required, default: 5.6]: Manages the repository depending on the Percona version (5.5, 5.6, 5.7 and 8.0)
General
  • percona_toolkit_cron_jobs: [optional, default: []]: List of job declarations
  • percona_toolkit_cron_jobs.{n}.name: [required]: Description of a crontab entry, should be unique, and changing the value will result in a new cron task being created (e.g. pt-deadlock-logger)
  • percona_toolkit_cron_jobs.{n}.job: [required]: The command to execute (e.g. /usr/bin/flock -n /var/lock/percona-toolkit-heartbeat -c /usr/local/bin/pt-heartbeat-wrapper)
  • percona_toolkit_cron_jobs.{n}.state: [default: present]: Whether to ensure the job is present or absent
  • percona_toolkit_cron_jobs.{n}.day: [default: *]: Day of the month the job should run (1-31, *, */2)
  • percona_toolkit_cron_jobs.{n}.hour: [default: *]: Hour when the job should run (e.g. 0-23, *, */2)
  • percona_toolkit_cron_jobs.{n}.minute: [default: *]: Minute when the job should run (e.g. 0-59, *, */2)
  • percona_toolkit_cron_jobs.{n}.month: [default: *]: Month of the year the job should run (e.g 1-12, *, */2)
  • percona_toolkit_cron_jobs.{n}.weekday: [default: *]: Day of the week that the job should run (e.g. 0-6 for Sunday-Saturday, *)
pt-deadlock-logger
  • percona_toolkit_deadlock_logger: [optional, default: {}]: pt-deadlock-logger configuration declarations
  • percona_toolkit_deadlock_logger.defaults_file: [optional]: Only read mysql options from the given file. You must give an absolute pathname.
  • percona_toolkit_deadlock_logger.host: [optional]: Host to connect to (default localhost)
  • percona_toolkit_deadlock_logger.password: [optional]: Password to use when connecting
  • percona_toolkit_deadlock_logger.port: [optional]: Port number to use for connection
  • percona_toolkit_deadlock_logger.socket: [optional]: Socket file to use for connection
  • percona_toolkit_deadlock_logger.user: [optional]: User for login if not current user
  • percona_toolkit_deadlock_logger.daemonize: [optional, default: false]: Fork to the background and detach from the shell. POSIX operating systems only.
  • percona_toolkit_deadlock_logger.opts: [optional, default: []]: Additional options
  • percona_toolkit_deadlock_logger.dest: [optional]: DSN for where to store deadlocks configuration declarations
  • percona_toolkit_deadlock_logger.dest.host: [optional]: Host of DSN for where to store deadlocks
  • percona_toolkit_deadlock_logger.dest.database: [required]: Database of DSN for where to store deadlocks
  • percona_toolkit_deadlock_logger.dest.table: [required]: Table of DSN for where to store deadlocks
pt-heartbeat
  • percona_toolkit_heartbeat: [optional, default: {}]: pt-heartbeat configuration declarations
  • percona_toolkit_heartbeat.defaults_file: [optional]: Only read mysql options from the given file. You must give an absolute pathname.
  • percona_toolkit_heartbeat.host: [optional]: Host to connect to (default localhost)
  • percona_toolkit_heartbeat.password: [optional]: Password to use when connecting
  • percona_toolkit_heartbeat.port: [optional]: Port number to use for connection
  • percona_toolkit_heartbeat.socket: [optional]: Socket file to use for connection
  • percona_toolkit_heartbeat.user: [optional]: User for login if not current user
  • percona_toolkit_heartbeat.daemonize: [optional, default: false]: Fork to the background and detach from the shell. POSIX operating systems only.
  • percona_toolkit_heartbeat.opts: [optional, default: []]: Additional options
pt-table-checksum
  • percona_toolkit_table_checksum: [optional, default: {}]: pt-table-checksum configuration declarations
  • percona_toolkit_table_checksum.defaults_file: [optional]: Only read mysql options from the given file. You must give an absolute pathname.
  • percona_toolkit_table_checksum.host: [optional]: Host to connect to (default localhost)
  • percona_toolkit_table_checksum.password: [optional]: Password to use when connecting
  • percona_toolkit_table_checksum.port: [optional]: Port number to use for connection
  • percona_toolkit_table_checksum.socket: [optional]: Socket file to use for connection
  • percona_toolkit_table_checksum.user: [optional]: User for login if not current user
  • percona_toolkit_table_checksum.databases: [optional]: Only checksum this list of databases (e.g. ['foo', 'bar'])
  • percona_toolkit_table_checksum.ignore_databases: [optional]: Ignore this list of databases (e.g. ['information_schema', 'common_schema'])
  • percona_toolkit_table_checksum.opts: [optional, default: []]: Additional options
(Custom) scripts
  • percona_toolkit_script_map: [default: []]: Script declarations
  • percona_toolkit_script_map.{n}.src: The local path of the file to copy, can be absolute or relative (e.g. ../../../files/percona-toolkit/usr/local/bin/pt-truncate-database.sh)
  • percona_toolkit_script_map.{n}.dest: The remote path of the file to copy (e.g. /usr/local/bin/pt-truncate-database)
  • percona_toolkit_script_map.{n}.owner: The name of the user that should own the file (optional, default root)
  • percona_toolkit_script_map.{n}.group: The name of the group that should own the file (optional, default root)
  • percona_toolkit_script_map.{n}.mode: The mode of the file, such as 0644 (optional, default 0755)

Dependencies

None

Recommended

  • percona-client (see)
  • percona-server (see)

Example(s)

Simple
---
- hosts: all
  roles:
    - percona-toolkit
Create jobs
---
- hosts: all
  roles:
    - percona-toolkit
  vars:
    percona_toolkit_cron_jobs:
      - name: pt-deadlock-logger
        job: '/usr/bin/flock -n /var/lock/percona-toolkit-deadlock-logger -c /usr/local/bin/pt-deadlock-logger-wrapper'
        minute: 0
        hour: 0
      - name: pt-heartbeat
        job: '/usr/bin/flock -n /var/lock/percona-toolkit-heartbeat -c /usr/local/bin/pt-heartbeat-wrapper'
        minute: 0
        hour: 0
      - name: pt-table-checksum
        job: '/usr/bin/flock -n /var/lock/percona-toolkit-table-checksum -c /usr/local/bin/pt-table-checksum-wrapper'
        minute: 0
        hour: 0

License

MIT

Author Information

  • Mark van Driel
  • Mischa ter Smitten

Feedback, bug-reports, requests, ...

Are welcome!

ansible-percona-toolkit's People

Contributors

tersmitten avatar mvdriel avatar memberit avatar sakojpa avatar

Watchers

James Cloos avatar Anatoly Bezgubov avatar Gleb avatar  avatar

Forkers

tribunadigital

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.