Initial version of mysql catalog entry.

This commit is contained in:
Chris Fordham
2017-07-21 11:56:12 +10:00
parent 407ff595e6
commit de128b8054
6 changed files with 219 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# MySQL
## What is MySQL?
MySQL is the world's most popular open source database. With its proven performance, reliability and ease-of-use, MySQL has become the leading database choice for web-based applications, covering the entire range from personal projects and websites, via e-commerce and information services, all the way to high profile web properties including Facebook, Twitter, YouTube, Yahoo! and many more.
For more information and related downloads for MySQL Server and other MySQL products, please visit [www.mysql.com](http://www.mysql.com).
## Services
Includes the following services:
- Load Balancer
- MySQL Server
- MySQL Data (sidekick to the server)
## Usage
The minimum configuration option(s) required to launch the stack is the MySQL Public LB Port and MySQL Root Password. See the description of each option for more information.
+42
View File
@@ -0,0 +1,42 @@
version: '2'
services:
mysql-lb:
image: rancher/lb-service-haproxy
links:
- mysql
ports:
- ${mysql_lb_port}:3306
mysql-data:
image: busybox
labels:
io.rancher.container.start_once: true
volumes:
- /var/lib/mysql
mysql:
image: ${mysql_image}
environment:
{{- if eq .Values.mysql_allow_empty_password "yes"}}
MYSQL_ALLOW_EMPTY_PASSWORD: ${mysql_allow_empty_password}
{{- end}}
{{- if (.Values.mysql_database)}}
MYSQL_DATABASE: ${mysql_database}
{{- end}}
{{- if eq .Values.mysql_onetime_password "yes"}}
MYSQL_ONETIME_PASSWORD: ${mysql_onetime_password}
{{- end}}
{{- if (.Values.mysql_password)}}
MYSQL_PASSWORD: ${mysql_password}
{{- end}}
{{- if eq .Values.mysql_random_root_password "yes"}}
MYSQL_RANDOM_ROOT_PASSWORD: ${mysql_random_root_password}
{{- end}}
MYSQL_ROOT_PASSWORD: ${mysql_root_password}
{{- if (.Values.mysql_user)}}
MYSQL_USER: ${mysql_user}
{{- end}}
tty: true
stdin_open: true
labels:
io.rancher.sidekicks: mysql-data
volumes_from:
- mysql-data
+124
View File
@@ -0,0 +1,124 @@
.catalog:
name: "mysql"
version: "v0.0.1"
description: "A recommended stack for the MySQL RDBMS."
uuid: mysql-0
minimum_rancher_version: v1.0.0
questions:
- variable: mysql_lb_port
description: "Public port for access to MySQL through the load balancer"
label: "MySQL Public LB Port"
required: true
default: 3306
type: "int"
- variable: mysql_root_password
description: "The password that will be set for the MySQL root superuser account."
label: "MySQL Root Password"
required: true
type: password
- variable: mysql_image
description: "The docker image to use for the MySQL server."
label: "MySQL Docker Image"
type: "enum"
options:
- "mysql:latest"
- "mysql:8.0.1"
- "mysql:8.0"
- "mysql:8"
- "mysql:5.7.18"
- "mysql:5.7"
- "mysql:5"
- "mysql:5.6.36"
- "mysql:5.6"
- "mysql:5.5.56"
- "mysql:5.5"
- "mariadb:latest"
- "mariadb:10.3.0"
- "mariadb:10.3"
- "mariadb:10.2.6"
- "mariadb:10.2"
- "mariadb:10.1.24"
- "mariadb:10.1"
- "mariadb:10"
- "mariadb:10.0.31"
- "mariadb:10.0"
- "mariadb:5.5.56"
- "mariadb:5.5"
- "mariadb:5"
default: "mysql:latest"
required: true
- variable: mysql_database
description: "Optional, allows you to specify the name of a database to be created on image startup."
label: "MySQL Database"
required: false
type: "string"
- variable: mysql_user
description: "Creates an additional MySQL (super)user. MySQL Password must also be set."
label: "MySQL User"
required: false
type: "string"
- variable: mysql_password
description: "A password for the additional MySQL (super)user. MySQL User must also be set."
label: "MySQL Password"
required: false
type: password
- variable: mysql_allow_empty_password
description: "Set to 'yes' to allow the container to be started with a blank password for the root user."
label: MySQL Allow Empty Password
type: "enum"
options:
- "yes"
- "no"
default: "no"
required: false
- variable: mysql_random_root_password
description: "Set to 'yes' to generate a random initial password for the root user (using pwgen)."
label: MySQL Random Root Password
type: "enum"
options:
- "yes"
- "no"
default: "no"
required: false
- variable: mysql_onetime_password
description: "Set to 'yes' and the root user's password will be set as expired once init is complete."
label: MySQL One-time Password
type: "enum"
options:
- "yes"
- "no"
default: "no"
required: false
version: '2'
services:
mysql-lb:
scale: 1
start_on_create: true
lb_config:
certs: []
port_rules:
- protocol: tcp
service: mysql
source_port: ${mysql_lb_port}
target_port: 3306
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 42
unhealthy_threshold: 3
interval: 2000
strategy: recreate
mysql:
scale: 1
start_on_create: true
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 3306
unhealthy_threshold: 3
interval: 2000
strategy: recreate
mysql-data:
scale: 1
start_on_create: true