devops days belgium ghent 2016
TRANSCRIPT
Safe Harbor StatementThe following is intended to outline our general product direction. It is intended forinformation purpose only, and may not be incorporated into any contract. It is not acommitment to deliver any material, code, or functionality, and should not be relied up inmaking purchasing decisions. The development, release and timing of any features orfunctionality described for Oracle's product remains at the sole discretion of Oracle.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
1 / 20
Yes in MySQL we care about devops !
MySQLnnoDB Cluster: easy HA and easy Deployment
Frédéric Descamps - MySQL Community Manager - Oracle
devops Days Ghent 2016
2 / 20
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
3 / 20
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
4 / 20
Tell me what you use...
... I will tell you who you are !
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
5 / 20
Tell me what you use... ;-)
... I will tell you who you are !
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
6 / 20
Can be setup in 4 minutes !
(you may have seen THE video) ;-)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
7 / 20
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
8 / 20
MySQL Group ReplicationGR is a plugin for MySQL, made by MySQL and packaged with MySQLGR is an implementation of Replicated Database State Machine theory
MySQL Group Communication System (GCS) is based on Paxos Mencius
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
9 / 20
MySQL Group Replication (2)Provides virtually synchronous replication for MySQL 5.7+Supported on all MySQL platforms !!
Linux, Windows, Solaris, OSX, FreeBSD
“Multi-master update anywhere replication plugin for MySQL with built-in conflictdetection and resolution, automatic distributed recovery, and group membership.”
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
10 / 20
MySQL RouterMySQL Router is lightweight middleware that provides transparent routing between yourapplication and any backend MySQLMySQL Servers. It can be used for a wide variety of usecases, such as providing high availability and scalability by effectively routing databasetraffic to appropriate backend MySQL Servers.
MySQL Router doesn't need to be configured it gets its configuration from the cluster'smetadata.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
11 / 20
MySQL ShellThe MySQL Shell is an interactive Javascript, Python, or SQL interface supportingdevelopment and administration for the MySQL Server. You can use the MySQL Shell toperform data queries and updates as well as various administration operations.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
12 / 20
MySQL Shell (2)The MySQL Shell provides:
Both Interactive and Batch operationsCRUD Document and Relational APIs via scriptingTraditional Table, JSON, Tab Separated output results formatsMySQL Standard and X Protocolsand more...
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
13 / 20
Commands to deploy a cluster using MySQLShell's adminAPI:mysql-js> var i1 = 'root@dim0:3306';mysql-js> var i2 = 'root@inuits:3306';mysql-js> var i3 = 'root@punch:3306';
mysql-js> dba.checkInstanceCon�g(i1);mysql-js> dba.checkInstanceCon�g(i2);mysql-js> dba.checkInstanceCon�g(i3);
mysql-js> shell.connect(i1);mysql-js> var cluster = dba.createCluster('devopsdaysGhentCluster');
mysql-js> cluster.checkInstanceState(i2); mysql-js> cluster.addInstance(i2);
mysql-js> cluster.checkInstanceState(i3);mysql-js> cluster.addInstance(i3);
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
14 / 20
MySQL Shell's adminAPInew since last labs release:
dba.checkInstanceCongif(): verifies if all configuration variables arecorrect
cluster.checkInstanceState(): verifies the state of the dataset
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
15 / 20
dim0.yaml :
classes: - innodbcluster
innodbcluster::mysql_serverid: 1
in Puppet now ;-)https://github.com/lefred/puppet-lefred-innodbcluster
Very easy to configure with hiera:
common.yaml:
innodbcluster::mysql_root_password: fredinnodbcluster::mysql_bind_interface: eth1innodbcluster::cluster_name: devopsdaysGhentClusterinnodbcluster::grant::user: rootinnodbcluster::grant::password: fredinnodbcluster::seed: mysql1
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
16 / 20
With HA Proxy
http://lefred.be/content/mysql-group-replication-as-ha-solution/
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
17 / 20
With ProxySQL
http://lefred.be/content/ha-with-mysql-group-replication-and-proxysql/
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
18 / 20
Persisting Configuration VariablesIn the next major release of MySQL (8.0) we also introduce a new feature which allowconfiguration variables to be persisted.
This means that for a number of configuration settings, you will no longer need tomanually edit a configuration file and can instead make modifications directly via an SQLconnection.
mysql> SET PERSIST innodb_buffer_pool_size = 512 * 1024 * 1024;Query OK, 0 rows affected (0.01 sec)
mysql> SET PERSIST max_connections=500;Query OK, 0 rows affected (0.00 sec)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
19 / 20
Frédéric Descamps@lefredMySQL EvangelistManaging MySQL since 3.23devops believer
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
20 / 20