Skip to content

pxc-mysql job from pxc/1.0.3

Github source: d18ddfd2 or master branch

Properties

admin_password

Required. Password for the MySQL server admin user

admin_username

Username for the MySQL server admin user

Default
root

cli_history

When set to false, disables cli history on the mysql vms.

Default
true

cluster_probe_timeout

The maximum time, in seconds, that a new node will search for an existing cluster.

Default
10

engine_config

audit_logs

audit_log_exclude_accounts

Database users to exclude from audit logging

Default
[]
Example
|+
  - monitoring_user
  - other_excluded_user
  - bot_user
audit_log_exclude_accounts_csv

Optional. Additional database users to exclude from audit logging, will be combined with uses specified in engine_config.audit_logs.audit_log_exclude_accounts

audit_log_policy

Audit events to log. Valid values are: ALL, LOGINS, QUERIES, NONE

Default
ALL
enabled

Enable audit logging

Default
false
file_rotations

Number of audit file rotations to keep

Default
30
rotate_size_in_mb

Size in MB of each audit log file

Default
100

binlog

enabled

Enable binlogs across all nodes

Default
true
expire_logs_days

Time in days to store binlogs before purging

Default
7
space_limit_percent

Set this to an integer which represents the percentage of disk space to reserve for binary logs. 0 indicates no limit on binary log space.

Default
0

character_set_server

Default character set. Note that while the MySQL default is latin1, we default to utf8.

Default
utf8mb4

collation_server

Default collation. Use SHOW COLLATION to view the valid collations for your character set.

Default
use_default

enable_lower_case_table_names

Enable or disable the “lower_case_table_names” MySQL server variable via a boolean of true/false.

Default
false

event_scheduler

Events are named database objects containing SQL statements that are to be executed at a later stage, either once off, or at regular intervals.

Default
false

galera

cluster_name

A unique name for this cluster. ONLY set before first deployment. DO NOT attempt to change an existing multi-node cluster.

Default
galera-cluster
enabled

Enable this when deploying a galera cluster

Default
false
gcache_size

Cache size used by galera (maximum amount of data possible in an IST), in MB

Default
512
port

Port which Galera Cluster uses for communication across nodes

Default
4567
wsrep_applier_threads

Defines the number of threads to use when applying replicated write-sets.

Default
1
wsrep_log_conflicts

Defines whether the node logs additional information about conflicts. The values that were in conflict are logged, so it is possible for user data to end up in the logs.

Default
true
wsrep_max_ws_rows

Maximum permitted number of rows per writeset.

Default
0
wsrep_max_ws_size

Maximum permitted size in bytes per writeset.

Default
1.073741824e+09

innodb_buffer_pool_instances

Optional. Number of buffer pool instances for InnoDB

innodb_buffer_pool_size

Optional. The size in bytes of the memory buffer InnoDB uses to cache data and indexes of its tables

innodb_buffer_pool_size_percent

Set this to an integer which represents the percentage of system RAM to reserve for the InnoDB buffer pool

Default
50

innodb_flush_log_at_trx_commit

Control balance between performance and full ACID compliance. Valid values are: 0, 1, 2

Default
1

innodb_flush_method

Advanced configuration variable, consult the documentation before changing. Controls how MySQL opens data files; by default uses fsync(). Set to O_DIRECT if innodb_buffer_pool is sufficiently large that you can use O_DIRECT thus avoiding double-buffering.

Default
fsync

innodb_ft_min_token_size

Minimum length of words that are stored in an InnoDB FULLTEXT index.

innodb_large_prefix

Whether innodb_large_prefix is enabled

Default
true

innodb_lock_wait_timeout

Time in seconds that an InnoDB transaction waits for an InnoDB row lock

Default
50

innodb_log_buffer_size

Size in bytes of the buffer for writing log files to disk. Increasing this means larger transactions can run without needing to perform disk I/O before committing.

Default
32M

innodb_log_file_size

Size of the ib_log_file used by innodb, in MB

Default
1024

innodb_strict_mode

Whether innodb_strict_mode is enabled

Default
false

local_infile

Allow or disallow clients to access local files

Default
true

log_queries_not_using_indexes

Queries that do not use an index, or that perform a full index scan where the index does not limit the number of rows, will be logged to the slow query log.

Default
false

long_query_time

Threshold in seconds above which SQL queries get logged in the slow query log file

Default
10

max_allowed_packet

The maximum size in bytes of a packet or a generated/intermediate string

Default
256M

max_connections

Maximum total number of database connections for the node

Default
1500

max_heap_table_size

The maximum size (in rows) to which user-created MEMORY tables are permitted to grow

Default
1.6777216e+07

read_write_permissions

Specify the database server’s read/write setting. For single-node deployments, valid options are read_write, read_only, or super_read_only. The setting must be read_write for Galera clusters.

Default
read_write

server_id

In leader-follower topology, this value must be unique. In other words, the leader must have a different value than the follower and vice versa. If this is set to 0, then the server refuses any replication connections.

Default
0

table_definition_cache

Set this to a number relative to the number of tables the server will manage.

Default
8192

table_open_cache

Configure the number of table handles to keep open

Default
2000

tmp_table_size

The maximum size (in bytes) of internal in-memory temporary tables

Default
3.3554432e+07

userstat

Enables user statistics, adding several new information schema tables and new FLUSH and SHOW commands.

Default
false

wait_timeout

The time in seconds that the MySQL server waits for inactive connections before closing them.

logging

format

timestamp

Format for timestamp in component logs. Valid values are ‘rfc3339’, ‘unix-epoch’. ‘rfc3339’ is the recommended format. It will result in all timestamps controlled by this job to be in RFC3339 format, which is human readable. This includes stdout, pre-start, and post-start logs. This does not include stderr logs from golang libraries. ‘unix-epoch’ will result in all timestamps being in the format they were before the rfc3339 flag was introduced. This format is different for different logs. We do not recommend using this flag unless you have scripts that expect a particular timestamp format.

Default
rfc3339

monit_startup_timeout

Number of seconds that monit should wait for mysql to start before giving up

Default
60

mysql_backup_password

Optional. Password for mysql-backup user

mysql_backup_username

Optional. Username for mysql-backup user

Default
mysql-backup

mysql_socket

Location of the mysql socket for connecting locally

Default
/var/vcap/sys/run/pxc-mysql/mysqld.sock

port

Port the mysql server should bind to

Default
3306

previous_admin_username

Optional. Previous username of the MySQL server admin user to be removed. Use this when changing the admin_username to avoid leaving around an unused user with root access.

pxc_enabled

Used for disabling the job. Useful if co-locating the cf-mysql release mysql job and migrating

Default
true

remote_admin_access

When set to true, admin and roadmin will be able to connect from any remote host.

Default
false

roadmin_enabled

When set to true, a read-only admin user called roadmin is added

Default
false

roadmin_password

Required when roadmin_enabled is true. Password for the MySQL server read-only admin user.

seeded_databases

Set of databases to seed. DEPRECATED: Use the seeded_users property with the “schema-admin” role.

Default
{}
Example
|+
  - name: db1
    username: user1
    password: pw1
  - name: db2
    username: user2
    password: pw2

seeded_users

Set of database users to create

Default
{}
Example
|+
  seeded_users:
    admin:
      password: "((mysql_root_password))"
      host: loopback
      role: admin
    monitoring:
      password: "((mysql_monitoring_password))"
      host: any
      role: minimal
    app-user:
      password: "((app_user_password))"
      host: any
      role: schema-admin
      schema: "app-db"

tls

client

ca

Optional. Certificate bundle that defines the set of root certificate authorities that MySQL instances in this deployment will use to verify client certificates

certificate

Optional. Client certificate used when this MySQL instance establishes a connection to another remote MySQL instance.

private_key

Optional. Client private key used when this MySQL instance establishes a connection to another remote MySQL instance.

enforce_tls_v1_2

DEPRECATED (TLSv1 and TLSV1.1 connections deprecated): If enabled, will enforce client connections to use TLSv1.2

Default
false

galera

Required if engine_config.galera.enabled is true. TLS certificate for galera cluster encryption

required

Require TLS for all client connections. This enables the MySQL require_secure_transport option.

Default
false

server

Required. TLS certificate for client-server encryption

Templates

Templates are rendered and placed onto corresponding instances during the deployment process. This job's templates will be placed into /var/vcap/jobs/pxc-mysql/ directory (learn more).

  • bin/cleanup-socket (from cleanup-socket.sh.erb)
  • bin/drain (from drain.sh.erb)
  • bin/get-sequence-number (from get-sequence-number.sh.erb)
  • bin/pre-start (from pre-start.sh.erb)
  • config/bpm.yml (from bpm.yml.erb)
  • config/db_init (from db_init.erb)
  • config/disable_mysql_cli_history.sh (from disable_mysql_cli_history.sh.erb)
  • config/galera-init-config.yml (from galera-init-config.yml.erb)
  • config/my.cnf (from my.cnf.erb)
  • config/mylogin.cnf (from mylogin.cnf.erb)
  • config/mysql_clustered_audit_logs.logrotate (from audit_logs.logrotate.erb)
  • config/pxc-sudoers (from pxc-sudoers)
  • certificates/client-ca.pem (from client-ca.pem.erb)
  • certificates/client-cert.pem (from client-cert.pem.erb)
  • certificates/client-key.pem (from client-key.pem.erb)
  • certificates/galera-ca.pem (from galera-ca.pem.erb)
  • certificates/galera-cert.pem (from galera-cert.pem.erb)
  • certificates/galera-key.pem (from galera-key.pem.erb)
  • certificates/server-ca.pem (from server-ca.pem.erb)
  • certificates/server-cert.pem (from server-cert.pem.erb)
  • certificates/server-key.pem (from server-key.pem.erb)

Packages

Packages are compiled and placed onto corresponding instances during the deployment process. Packages will be placed into /var/vcap/packages/ directory.