PXC catalog item (#95)
* PXC Template * fix bind issue * version * missed version * variables * proper icon
This commit is contained in:
parent
dafdfcbd63
commit
9b31003fce
13
templates/pxc/0/README.md
Normal file
13
templates/pxc/0/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Percona XtraDB Cluster
|
||||
|
||||
### Info:
|
||||
|
||||
This template creates a Percona XtraDB Cluster on top of Rancher.
|
||||
|
||||
When deployed from the catalog, a three node cluster is created with a database, root password, database user and password. The cluster is set up for replication between all of the nodes. Health check monitors port 8000 for clustercheck status updates.
|
||||
|
||||
### Usage:
|
||||
|
||||
Once deployed, use a mysql client to connect:
|
||||
|
||||
`mysql -u<db_user> -p -h<pxc>`
|
41
templates/pxc/0/docker-compose.yml
Normal file
41
templates/pxc/0/docker-compose.yml
Normal file
@ -0,0 +1,41 @@
|
||||
pxc-clustercheck:
|
||||
image: flowman/percona-xtradb-cluster-clustercheck:v2.0
|
||||
net: "container:pxc"
|
||||
labels:
|
||||
io.rancher.container.hostname_override: container_name
|
||||
volumes_from:
|
||||
- 'pxc-data'
|
||||
pxc-server:
|
||||
image: flowman/percona-xtradb-cluster:5.6.28-1
|
||||
net: "container:pxc"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "${mysql_root_password}"
|
||||
PXC_SST_PASSWORD: "${pxc_sst_password}"
|
||||
MYSQL_DATABASE: "${mysql_database}"
|
||||
MYSQL_USER: "${mysql_user}"
|
||||
MYSQL_PASSWORD: "${mysql_password}"
|
||||
labels:
|
||||
io.rancher.container.hostname_override: container_name
|
||||
volumes_from:
|
||||
- 'pxc-data'
|
||||
entrypoint: bash -x /opt/rancher/start_pxc
|
||||
pxc-data:
|
||||
image: flowman/percona-xtradb-cluster:5.6.28-1
|
||||
net: none
|
||||
environment:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
||||
volumes:
|
||||
- /var/lib/mysql
|
||||
- /etc/mysql/conf.d
|
||||
- /docker-entrypoint-initdb.d
|
||||
command: /bin/true
|
||||
labels:
|
||||
io.rancher.container.start_once: true
|
||||
pxc:
|
||||
image: flowman/percona-xtradb-cluster-confd:v0.2.0
|
||||
labels:
|
||||
io.rancher.sidekicks: pxc-clustercheck,pxc-server,pxc-data
|
||||
io.rancher.container.hostname_override: container_name
|
||||
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
|
||||
volumes_from:
|
||||
- 'pxc-data'
|
57
templates/pxc/0/rancher-compose.yml
Normal file
57
templates/pxc/0/rancher-compose.yml
Normal file
@ -0,0 +1,57 @@
|
||||
.catalog:
|
||||
name: "Percona XtraDB Cluster"
|
||||
version: 5.6.28-rancher1
|
||||
description: |
|
||||
Percona XtraDB Cluster 5.6.28
|
||||
questions:
|
||||
- variable: "mysql_root_password"
|
||||
type: string
|
||||
required: true
|
||||
label: "MySQL Root Password"
|
||||
description: "Password given to the root mysql user"
|
||||
default: "password"
|
||||
- variable: "pxc_sst_password"
|
||||
type: string
|
||||
required: true
|
||||
label: "PXC SST Password"
|
||||
description: "Password given to the sst mysql user"
|
||||
default: "password"
|
||||
- variable: "mysql_database"
|
||||
type: string
|
||||
required: false
|
||||
label: "MySQL Database Name"
|
||||
description: "MySQL database to create"
|
||||
- variable: "mysql_user"
|
||||
type: string
|
||||
required: false
|
||||
description: "MySQL user for the created database"
|
||||
label: "MySQL DB User"
|
||||
- variable: "mysql_password"
|
||||
type: string
|
||||
required: false
|
||||
label: "MySQL DB Password"
|
||||
description: "Password for the MySQL user of the created database"
|
||||
pxc:
|
||||
scale: 3
|
||||
health_check:
|
||||
port: 8000
|
||||
interval: 2000
|
||||
unhealthy_threshold: 3
|
||||
strategy: none
|
||||
request_line: GET / HTTP/1.1
|
||||
healthy_threshold: 2
|
||||
response_timeout: 2000
|
||||
metadata:
|
||||
mysqld: |
|
||||
innodb_buffer_pool_size=512M
|
||||
innodb_doublewrite=0
|
||||
innodb_flush_log_at_trx_commit=0
|
||||
innodb_file_per_table=1
|
||||
innodb_log_file_size=128M
|
||||
innodb_log_buffer_size=64M
|
||||
innodb_support_xa=0
|
||||
query_cache_size=0
|
||||
query_cache_type=0
|
||||
sync_binlog=0
|
||||
max_connections=1000
|
||||
wsrep_sst_auth=sstuser:${pxc_sst_password}
|
BIN
templates/pxc/catalogIcon-pxc.png
Normal file
BIN
templates/pxc/catalogIcon-pxc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
5
templates/pxc/config.yml
Normal file
5
templates/pxc/config.yml
Normal file
@ -0,0 +1,5 @@
|
||||
name: "Percona XtraDB Cluster"
|
||||
description: |
|
||||
Percona XtraDB Cluster
|
||||
version: 5.6.28-rancher1
|
||||
category: Databases
|
Loading…
x
Reference in New Issue
Block a user