Mais conteúdo relacionado
Semelhante a Oracle Cloud MySQL Service (20)
Mais de Shinya Sugiyama (20)
Oracle Cloud MySQL Service
- 1. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle MySQL Cloud Service概要
Updated: 2017-08-24
MySQL Global Business Unit
Master Principal Sales Consultant / Shinya Sugiyama
- 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
Safe Harbor Statement
以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するものです。
また、情報提供を唯一の目的とするものであり、いかなる契約にも組み込むことはでき
ません。以下の事項は、マテリアルやコード、機能を提供することをコミットメントするも
のではない為、購買決定を行う際の判断材料になさらないで下さい。
オラクル製品に関して記載されている機能の開発、リリースおよび時期については、
弊社の裁量により決定されます。
2
- 3. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 3
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 4. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 4
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 5. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 5
https://www.mysql.com/jp/cloud/
セキュリティ・
コンプライアンス
TCO最適化
高可用性品質維持
機会損失対策
Oracle Public Cloud + MySQL Enterprise Edition
- 6. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 6
Tool and Modules Enterprise Edition _
MySQL Database ✔
MySQL Connectors ✔
MySQL Replication ✔
MySQL Fabric, MySQL Utilities, MySQL Router ✔
MySQL Partitioning ✔
Storage Engine: MyISAM, InnoDB (MyISAM is disabled) ✔
MySQL Workbench SE/EE* ✔
MySQL Enterprise Monitor* ✔
MySQL Enterprise Backup* ✔
MySQL Enterprise Authentication* ✔
MySQL Enterprise TDE (Transparent Data Encryption)* ✔
MySQL Enterprise Encryption * ✔
MySQL Enterprise Firewall * ✔
MySQL Enterprise Audit * ✔
MySQL Enterprise Scalability* ✔
MySQL Enterprise High Availability* ✔
Oracle Enterprise Manager for MySQL * ✔
OPC MySQL
✔
✔
✔
✔
✔
✔
✔
✔
✔
Auth Will be ready
KV Will be ready
✔
✔
✔
✔
✔
✔
24 x 365 Support ✔
Bug Fix and Patch ✔
Consulting Support ✔
✔
✔
✔
- 7. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 7
□ MySQL Cloud Serviceサブスクリプションを調達する必要があります。
アクティブなサブスクリプションがなければ、インスタンスを作成することが出来ません。
□セキュアシェル(SSH)公開鍵/秘密鍵のペアを作成します。
SSHキーは、データベースの展開をサポートするCOMPUTEノードへの安全なアクセスを可能にします。
プロビジョニングタスク中にキーペアを作成することも出来ます。
【オプション】
□Oracle Storage Cloud Serviceにコンテナを作成し、
クラウドストレージにデータベースのバックアップを格納する事が可能。
「Oracle Storage Cloud Serviceを使用したコンテナの作成」を参照してください。
プロビジョニング中にストレージコンテナを作成することもできます。
※このオプションを使用すると、ダッシュボードからスケジュールバックアップジョブを作成出来ます。
MySQLCSインスタンスを作成する前に:
- 8. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
MySQLCSへのログイン
URL: https://cloud.oracle.com/ja_JP/sign-in
アカウントタイプと地域を選択して、各地域のログイン画面に遷移して下さい。
電子メールまたはオラクルの営業担当から、IDCSを使用したクラウド・アカウントを利用するよう
伝えられている場合を除き、「従来のクラウド・アカウント」を選択します。
https://docs.oracle.com/cd/E83857_01/get-started/subscriptions-cloud/index.html
- 9. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 9
MySQLCSへのログイン
1 2
- 10. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 10
Oracle Cloud IaaS, PaaS等のサービスがリストアップされています
プリファレンスで言語の選択が可能です
ダッシュボード
3
- 11. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 11
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 12. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 12
MySQL Instanceの作成
1
- 13. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 13
MySQL Instanceの作成
2
- 14. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 14
【Instance Type】
General Purpose:
OC3 - 1 OCPU, 7.5 GB RAM
OC4 - 2 OCPU, 15 GB RAM
OC5 - 4 OCPU, 30 GB RAM
OC6 - 8 OCPU, 60 GB RAM
OC7 - 16 OCPU, 120 GB RAM
High Memory:
OC1M - 1 OCPU, 15 GB RAM
OC2M - 2 OCPU, 30 GB RAM
OC3M - 4 OCPU, 60 GB RAM
OC4M - 8 OCPU, 120 GB RAM
OC5M - 16 OCPU, 240 GB RAM
~ 1TB
3
<選択> Enterprise Monitor
- 15. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 15
作成時間:約 10分
再起動時間:約 5分
プロビジョニングに時間がかかることがあります。
共有リソースの利用状況に依存する事があります。
4
- 16. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 16
インスタンスの作成が終わると、Notification Emailに
設定したアドレスに完了メールが送信されます。
5
- 17. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 17
補足: MySQL Instanceの作成
既にMEBで取得したバックアップが
ある場合は、バックアップを利用して
データをリストアする事が可能です。
- 18. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 18
補足: MySQL Instanceの作成 構築したインスタンスは、
Computeのダッシュボードで構成を
可視化する事が可能です。
- 19. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 19
MySQL Instanceの再起動と削除
削除
開始(起動)
中止(停止)
再開(再起動)
※プライベートIPは、
変更する事があります。
Rebooting a compute node is different from restarting a compute node. Restarting a compute node, as described in Restarting a Database Deployment,
stops and removes the Compute Cloud Service instance on which the compute node is running and then creates and starts a new Compute Cloud Service
instance for the compute node. Rebooting a compute node uses a Linux command to restart the Compute Cloud Service instance on which the compute
node is running. (Do not use the halt, shutdown or shutdown —h commands to shut down the compute node.)
- 20. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 20
[oracle@psm01-mysql-1 bin]$ pwd
/u01/bin
[oracle@psm01-mysql-1 bin]$ ls -l
total 28
drwxr-xr-x 3 oracle oracle 4096 Mar 29 08:56 enterprise
drwx------ 2 oracle oracle 16384 Mar 29 08:51 lost+found
lrwxrwxrwx 1 oracle oracle 44 Mar 29 08:55 meb -> /u01/bin/meb-4.0.3-bug24611026-el6-x86-64bit
drwxr-xr-x 3 oracle oracle 4096 Mar 29 08:55 meb-4.0.3-bug24611026-el6-x86-64bit
lrwxrwxrwx 1 oracle oracle 21 Mar 29 08:54 mysql -> /u01/bin/mysql-5.7.17
drwxr-xr-x 9 oracle oracle 4096 Mar 29 08:59 mysql-5.7.17
[oracle@psm01-mysql-1 bin]$
NOTE: BINARY
ホームディレクトリー: /u01/app/oracle/tools/home/oracle
MySQLオプションファイル: /u01/bin/mysql/my.cnf
Installation path and Symbolic Link
- 21. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 21
[opc@psm01-mysql-1 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_main-lv_root 21G 3.0G 17G 16% /
tmpfs 15G 0 15G 0% /dev/shm
/dev/xvdb1 477M 61M 388M 14% /boot
/dev/xvdf 4.8G 94M 4.5G 3% /u01/app/oracle/tools
/dev/mapper/vg_bin-lv_bin 9.8G 2.9G 6.4G 32% /u01/bin
/dev/mapper/vg_data-lv_data 25G 428M 23G 2% /u01/data
/dev/mapper/vg_log-lv_log 59G 7.8G 49G 14% /u01/translog
/dev/mapper/vg_backup-lv_backup 50G 324M 47G 1% /u01/backup
[opc@psm01-mysql-1 ~]$
Cloud Storage Container (オブジェクトストレージ):
既存のStorage Cloud Serviceコンテナの名前をStorage-instance_id_domain / containerの形式で入力します。
Create Cloud Storage Container - 選択したパラメータを使用してコンテナを作成する場合に選択します。
NOTE: Storage Container
Block Storage (ブロックストレージ) :
MySQLデータ、バイナリログ、およびREDOログファイルに必要なストレージ容量。
オペレーティングシステム、アプリケーションバイナリ、バックアップストレージは含まれません。 (25GB~1024GB)
Bin directory
Data + UNDO
Binary + REDO Log
Default: expire_logs_days=7
- 22. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 22
+------------------------------------------+--------------------+
| key_buffer_size | 32.000 MB |
| query_cache_size | 1.000 MB |
| innodb_buffer_pool_size | 5120.000 MB |
| innodb_additional_mem_pool_size | 0.000 MB |
| innodb_log_buffer_size | 64.000 MB |
+------------------------------------------+--------------------+
| BASE MEMORY | 5217.000 MB |
+------------------------------------------+--------------------+
| sort_buffer_size | 0.031 MB |
| read_buffer_size | 0.125 MB |
| read_rnd_buffer_size | 0.250 MB |
| join_buffer_size | 0.031 MB |
| thread_stack | 0.250 MB |
| binlog_cache_size | 0.031 MB |
| tmp_table_size | 16.000 MB |
+------------------------------------------+--------------------+
| MEMORY PER CONNECTION | 16.719 MB |
+------------------------------------------+--------------------+
| Max_used_connections | 44 |
| max_connections | 2000 |
+------------------------------------------+--------------------+
| TOTAL (MIN) | 5952.625 MB |
| TOTAL (MAX) | 38654.500 MB |
+------------------------------------------+--------------------+
MySQL Memory for OC3
※ Default Configuration
※ innodb_buffer_pool_size is depend
on instance type.
- 23. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 23
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 24. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 24
スケールアップ 1: スケールアップ及び、Add Storageはオンライン処理ではありません。
(サービス停止時間が必要:目安10分未満)
2: スケールダウンする場合も”スケール・アップします”を選択します。
1
2
3
ストレージは拡張可能ですが、縮小出来ません。
- 25. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 25
[root@study01-mysql-1 opc]# hostname
study01-mysql-1
[root@study01-mysql-1 opc]# date
Thu Aug 17 08:07:41 UTC 2017
[root@study01-mysql-1 opc]# cat /proc/cpuinfo | grep
processor
processor : 0
processor : 1
[root@study01-mysql-1 opc]# cat /proc/meminfo | grep
MemTotal
MemTotal: 7659300 kB
[root@study01-mysql-1 opc]# hostname
study01-mysql-1
[root@study01-mysql-1 opc]# date
Thu Aug 17 08:25:00 UTC 2017
[root@study01-mysql-1 opc]# cat /proc/cpuinfo | grep
processor
processor : 0
processor : 1
processor : 2
processor : 3
[root@study01-mysql-1 opc]# cat /proc/meminfo | grep
MemTotal
MemTotal: 15398660 kB
スケールアウト: 約7分
ストレージ追加: 約11分
※ /data, /translog, /backupを同時拡張した場合
- 26. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 26
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 27. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 27
SSHによる接続 (Default Open Port:22)
サーバーの準備ができたら、割り当てられたIPアドレスを確認出来ます。
その後、次のコマンドを使用してVMにログインできます。
rsa秘密鍵。 デフォルトユーザ:opc (鍵認証 ・ パスワード無し)
参考: Oracle Cloud Servicesでの使用のためのSSHキーの作成
http://docs.oracle.com/cd/E83857_01/paas/database-dbaas-cloud/JCS_SSH/create_sshkey.html
鍵のフォーマットを必要に応じて変換して下さい。
Public IP
- 28. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 28
基本的なアカウント情報
Linux User Accounts
https://docs.oracle.com/cloud/latest/mysql-cloud/UOMCS/GUID-5D3A2177-9947-4B5A-A84C-D74ED096919D.htm#UOMCS-GUID-5D3A2177-9947-4B5A-A84C-D74ED096919D
- 29. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 29
[opc@japac-presales-mysql-1 ~]$ uname -a
Linux japac-presales-mysql-1 3.8.13-68.2.2.2.el6uek.x86_64 #2 SMP Fri Jun 19 16:29:40 PDT 2015 x86_64
x86_64 x86_64 GNU/Linux
[opc@japac-presales-mysql-1 ~]$ ps -ef | grep mysql
oracle 2845 1 0 05:15 ? 00:00:00 /bin/sh ./bin/mysqld_safe
oracle 3922 2845 0 05:15 ? 00:00:08 /u01/bin/mysql/bin/mysqld --basedir=/u01/bin/mysql --
datadir=/u01/data/mysql --plugin-dir=/u01/bin/mysql/lib/plugin --log-error=/u01/data/mysql/japac-presales-
mysql-1.err --open-files-limit=20000 --pid-file=/u01/data/mysql/japac-presales-mysql-1.pid
opc 4464 4314 0 05:42 pts/1 00:00:00 grep mysql
[opc@japac-presales-mysql-1 ~]$ mysql -u root -p
Please switch to "oracle" user to use mysql client
[opc@japac-presales-mysql-1 ~]$ sudo -s
[root@japac-presales-mysql-1 opc]# su - oracle
[oracle@japac-presales-mysql-1 mysql]$ mysql -u oracle
Enter password:
Welcome to the MySQL monitor. Commands end with ; or ¥g.
Your MySQL connection id is 18
Server version: 5.7.13-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition
(Commercial)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
<SNIP>
Type 'help;' or '¥h' for help. Type '¥c' to clear the current input statement.
mysql>
MySQLインスタンスへの接続
MySQLインスタンスにアクセスするには、oracleユーザーを使用する必要があります。
oracleユーザーのパスワードはブランクです。
[opc @ psm01-mysql-1〜] $ sudo su oracle
- 30. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 30
NOTE: MySQL Workbench can connect over SSH (as it is for some connectors).
MySQLにSSH接続を利用して鍵認証でアクセスする事が可能な為、セキュリティ上も望ましいアクセス方法です。
mysql> show processlist;
+----+-----------------+----------------------------------------------+---------+-------+------------------------+------------------+
| Id | User | Host | Command | Time | State | Info |
+----+-----------------+----------------------------------------------+---------+-------+------------------------+------------------+
| 1 | event_scheduler | localhost | Daemon | 10569 | Waiting on empty queue | NULL |
| 9 | opc_japac | oc-120-86-1-79.compute.oraclecloud.com:48172 | Sleep | 142 | | NULL |
| 10 | opc_japac | oc-120-86-1-79.compute.oraclecloud.com:48173 | Sleep | 147 | | NULL |
| 13 | oracle | localhost | Query | 0 | starting | show processlist |
+----+-----------------+----------------------------------------------+---------+-------+------------------------+------------------+
クライアントPCからWorkbenchを利用してOPCにアクセスできます。
SSH(ポート22) - >ポート3306を使用する (Port Forwarding)
※秘密鍵はOpenSSHフォーマットの形式である必要があります。
TCP/IP over SSH Test Connection
- 31. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 31
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 32. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 32
パブリックネットワークからMySQLへの接続
2
3
1
デフォルトでは、MySQLポート3306はファイアウォール
設定が有効になっていません。したがって、「Actions」列
から該当ルールをクリックしポート3306を「有効」にする
必要があります。
注意: MySQLユーザーアカウンのホスト識別子に「%」
を使用しないなど、MySQLアカウントのセキュリティ
ルールを検討する必要があります。
- 33. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 33
mysql> show processlist;
+----+-----------------+---------------------------------------+------+---------+--------+------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-----------------+---------------------------------------+------+---------+--------+------------------------+------------------+
| 1 | event_scheduler | localhost | NULL | Daemon | 103123 | Waiting on empty queue | NULL |
| 19 | oracle | localhost | sys | Query | 0 | starting | show processlist |
| 22 | opc_japac | g141.105-25-11.ppp.oracle.ne.jp:57243 | SLAP | Sleep | 0 | | NULL |
+----+-----------------+---------------------------------------+------+---------+--------+------------------------+------------------+
Workbench等でOPC MySQLサービスにPort3306経由でアクセス出来ます。
※オープンポート3306はセキュリティ上の理由で推奨されません。
※アカウントの管理若しくは、Firewall等でSource IPを制限して下さい。
- 34. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 34
mysql> show processlist;
+----+-----------------+---------------------------------------+-------+---------+--------+------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-----------------+---------------------------------------+-------+---------+--------+------------------------+------------------+
| 1 | event_scheduler | localhost | NULL | Daemon | 139105 | Waiting on empty queue | NULL |
| 41 | oracle | localhost | NEW57 | Query | 0 | starting | show processlist |
| 43 | opc_japac | g141.105-25-11.ppp.oracle.ne.jp:59290 | NULL | Sleep | 0 | cleaning up | PLUGIN |
+----+-----------------+---------------------------------------+-------+---------+--------+------------------------+------------------+
例:パブリックネットワークからPort33060を使いたい場合は、このようにルールを追加するのみです。
パブリックネットワークから特定Port接続
- 35. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 35
内部ネットワークを利用したレプリケーション
Access Rule: 100.65.8.78:3306 <--->100.65.7.26:3306 mysql> show slave status¥G
**************** 1. row ****************
Slave_IO_State: Waiting for master to send event
Master_Host: 100.65.8.78
Master_User: repl_opc
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: demo01-mysql-1.000002
Read_Master_Log_Pos: 4555
Relay_Log_File: demo02-mysql-1-relay-bin.000003
Relay_Log_Pos: 787
Relay_Master_Log_File: demo01-mysql-1.000002
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
<SNIP>
Local Address
ネットワークが異なっていても、Access Ruleを作成する事でアクセス
を許可可能です。相互接続にはサブネット「/ 16」を使用できます。
[IPリスト]フィールドに、セキュリティIPリストを作成するサブネット
(CIDR形式)またはIPv4アドレスのカンマ区切りリストを入力します。
例)レプリケーション、SSH、モニタリングなど。
※「IPネットワーク」をご利用の場合は静的IPアドレスを利用可能
※ Public IPを利用したレプリケーションも設定可能です。
※接続には内部DNS名を使用することができます。
(例) demo01-mysql-1.compute-gse00002890.oraclecloud.internal
- 36. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 36
M S
mysql> show slave status¥G
****************** 1. row ****************
Slave_IO_State: Waiting for master to send event
Master_Host: 142.24.51.69
Master_User: repl_opc
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: japac01-mysql-1.000011
Read_Master_Log_Pos: 190
Relay_Log_File: mysqld-relay-bin.000002
<SNIP>
change master to master_host = '142.24.51.69',
master_port=3306, master_user='repl_opc',
master_password='Wel12-2016',
master_auto_position=1;
Need to open
port 3306 for
source IP
If you are using
private address,
You need to
configure NAT or
port forwarding.
http://dev.mysql.com/doc/refman/5.7/en/replication-problems.html
mysql> show variables like 'slave_comp%';
+---------------------------+-------+
| Variable_name | Value |
+---------------------------+-------+
| slave_compressed_protocol | ON |
+---------------------------+-------+
SSL might
be better
パブリックネット経由のレプリケーション
- 37. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 37
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 38. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 38
mysql> select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE,LOAD_OPTION from PLUGINS
-> where PLUGIN_TYPE <> 'INFORMATION SCHEMA';
+-----------------------+---------------+-------------------+----------------------+
| PLUGIN_NAME | PLUGIN_STATUS | PLUGIN_TYPE | LOAD_OPTION |
+-----------------------+---------------+-------------------+----------------------+
| binlog | ACTIVE | STORAGE ENGINE | FORCE |
| mysql_native_password | ACTIVE | AUTHENTICATION | FORCE |
| sha256_password | ACTIVE | AUTHENTICATION | FORCE |
| InnoDB | ACTIVE | STORAGE ENGINE | FORCE |
| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | FORCE |
<SNIP>
| audit_log | ACTIVE | AUDIT | FORCE_PLUS_PERMANENT |
| thread_pool | ACTIVE | DAEMON | ON |
| authentication_pam | ACTIVE | AUTHENTICATION | ON |
| auth_socket | ACTIVE | AUTHENTICATION | ON |
| validate_password | ACTIVE | VALIDATE PASSWORD | ON |
+-----------------------+---------------+-------------------+----------------------+
全てのEnterprise Pluginが利用可能
- 39. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 39
mysql> select * from processlist where conn_id = 22¥G
*************************** 1. row ***************************
thd_id: 123
conn_id: 22
user: thread_pool/tp_one_connection
db: SLAP
command: Sleep
<SNIP>
progress: NULL
lock_latency: 126.00 us
rows_examined: 0
<SNIP>
last_statement: INSERT INTO t1 VALUES (NULL,16 ... WyXy5kfK0ijcfTXH2gfXFoxtlyL')
last_statement_latency: 4.38 ms
current_memory: 0 bytes
last_wait: NULL
last_wait_latency: NULL
source: NULL
trx_latency: NULL
trx_state: NULL
trx_autocommit: NULL
pid: 1997
program_name: mysqlslap
例) スレッドプールはデフォルトで有効になっています。
- 40. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 40
[oracle@japac-presales02-mysql-1 ~]$ /u01/bin/meb/bin/mysqlbackup --user=opc_japac -p --backup-
dir=/u01/backup/FULL backup-and-apply-log
MySQL Enterprise Backup version 4.0.1 Linux-2.6.39-400.17.1.el6uek.x86_64-x86_64 [2016/05/13]
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All Rights Reserved.
mysqlbackup: INFO: Starting with following command line ...
/u01/bin/meb/bin/mysqlbackup --user=opc_japac -p
--backup-dir=/u01/backup/FULL backup-and-apply-log
<SNIP>
160813 02:35:12 mysqlbackup: INFO: MEB logfile created at /u01/backup/FULL/meta/MEB_2016-08-13.02-35-
12_backup_apply_log.log
--------------------------------------------------------------------
Server Repository Options:
--------------------------------------------------------------------
datadir = /u01/data/mysql/
innodb_data_home_dir =
innodb_data_file_path = ibdata1:12M:autoextend
innodb_log_group_home_dir = /u01/translog/inno-bin-logs
innodb_log_files_in_group = 6
innodb_log_file_size = 1073741824
innodb_page_size = 16384
innodb_checksum_algorithm = crc32
innodb_buffer_pool_filename = ib_buffer_pool
innodb_undo_directory = /u01/data/mysql/
innodb_undo_tablespaces = 4
innodb_undo_logs = 64
--------------------------------------------------------------------
MEBが一般的なバックアップ作業に利用可能です
マニュアルバックアップの実施例
- 41. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 41
Note: You can use PSM command to backup/restore database.
http://docs.oracle.com/cloud/latest/mysql-cloud/UOMCS/GUID-23702231-DB98-420C-AF92-5A7F3F13BBCB.htm#UOMCS-GUID-23702231-DB98-420C-AF92-5A7F3F13BBCB
MEB
ダッシュボードからスケジュールされたバックアップジョブの管理
を行う事が可能です。
ー 完全バックアップ、増分バックアップ、保持期間設定
ー BACKUP NOWでその時点でのバックアップを取得可能です
ー リストア含めて全てGUIで処理可能な為、容易に運用可能
- 42. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 42
[oracle@opc]$ ls -l /u01/backup/MySQLCS/JAPACSC01/onDemandFull/
total 12
drwxr-x--- 4 oracle oracle 4096 Aug 30 17:13 03966377-cace-4813-adce-4007d68c8069
drwxr-x--- 4 oracle oracle 4096 Aug 30 16:01 ebb70593-5d3a-45a5-9651-06da54b4623f
drwxr-x--- 4 oracle oracle 4096 Aug 31 13:52 ed125a38-b1ed-42ef-8f8f-6013ed49f9fc
[oracle@japacsc01-mysql-1 ~]$ ls -l /u01/backup/MySQLCS/JAPACSC01/scheduledFull/
total 8
drwxr-x--- 4 oracle oracle 4096 Aug 31 09:30 3a350d68-6c79-4f3f-b873-95dec56d739e
drwxr-x--- 4 oracle oracle 4096 Aug 30 21:00 fc8f4eb7-e624-41b9-bc3d-368ba02e6b20
[oracle@opc]$ ls -l /u01/backup/MySQLCS/JAPACSC01/scheduledFull/3a350d68-6c79-4f3f-b873-95dec56d739e/
total 2900
-rw-r----- 1 oracle oracle 2932006 Aug 31 09:30 backup_full.mbi
-rw-r----- 1 oracle oracle 335 Aug 31 09:30 backup-my.cnf
drwxr-x--- 2 oracle oracle 4096 Aug 31 09:30 datadir
drwxr-x--- 2 oracle oracle 4096 Aug 31 09:30 meta
-rw-r----- 1 oracle oracle 16138 Aug 31 09:30 server-all.cnf
-rw-r----- 1 oracle oracle 5331 Aug 31 09:30 server-my.cnf
[oracle@opc]$
MEB
scheduled job create backup folders under
/u01/backup/domain name/Instance name/onDemandFull/*
/u01/backup/domain name/Instance name/scheduledFull/*
/u01/backup/domain name/Instance name/scheduledIncremental/*
- 43. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 43
MEB
ユーザーは、ダッシュボードからPoint in Time Restoreを選択出来ます。
ユーザーはバックアップ履歴を選択して復元を実行出来ます。
- 44. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 44
ex) Point-In-Time Recovery at 2016-10-25 04:03:00 UTC.
例)id 5は不要なので、
04:03:00までのデータを復元
https://dev.mysql.com/doc/mysql-enterprise-backup/4.0/en/advanced.point.html
- 45. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Point In Time Recovery with MEB
45
MySQL Enterprise Backupとそれが作成する増分バックアップにデフォルトで含まれているバイナリログ
ファイルを使用すると、フルバックアップと増分バックアップの間の任意の時間tR、または2つの増分
バックアップの間の状態にデータベースを復元できます。
フルバックアップ
増分バックアップ
フルバックアップ
増分バックアップ
増分バックアップ
フルバックアップ
フルバックアップ
PITR Works!! PITR Works!!
PITR Works!!
PITR not Support
必要に応じて、mysqlbinlogコマンドで
差分をマニュアルリストア可能。
- 46. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 46
Note: You can use psm command to apply patch to the instance.
http://docs.oracle.com/cloud/latest/mysql-cloud/UOMCS/GUID-F7A6B431-51A3-432A-A5CA-9C13005F4108.htm#UOMCS-GUID-F7A6B431-51A3-432A-A5CA-9C13005F4108
パッチを適用する前にMEBによる
バックアップが自動実行されます。
STEP1: パッチ適用前チェック
STEP2: MEBフルバックアップ実行
STEP3: 新しいバイナリの適用
STEP4: パッチの適用完了
最新パッチが利用可能な場合は、
パッチが配布され、ダッシュボードに
リストアップされます。
※ロールバックが必要な場合は、
「ロールバック」をクリックしてください。
MEBによるデータ復元が実施されます。
- 47. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 47
OSイメージのSNAPSHOT
- 48. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 48
OSイメージのSNAPSHOT
Snapshotを利用しクローンを作成した為、
MySQLを含む設定がそのまま引き継がれ、
新規サーバーが作成される。
[root@study02-mysql-1 log]# hostname
study02-mysql-1
[root@study02-mysql-1 log]# cat messages | awk '{print $4}' | sort | uniq -c | sort -nr
1235 study01-mysql-1
403 study02-mysql-1
- 49. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 49
MySQL Enterprise Monitor インスタンス作成時に
“MySQL Enterprise Monitorの構成”で”はい”
を選択するとインスタンスにMEMがインストールされます。
インスタンスが正常に作成されるとMEMを使用できます。
1) MEMへアクセスする為の、アクセスルールを有効にする必要があります。
2) https://xxx.xxx.xxx.xxx:18443/でMEMへアクセスするか、ダッシュボード上のリンクをクリック
※MEMデータベースは同じインスタンス上に作成されます。
※MEMは専用インスタンスにインストールする事を推奨しています。
※Public Internetの接続元はセキュリティを考慮して、特定アクセス元のIPを指定して下さい。
- 51. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 51
Note: MEM Monitoring by Using Local Address
DEMO01
10.196.194.234
MEM
10.196.194.238
DEMO02
10.196.194.242
Port:3306
Port:3306
(例)エージェントレス構成の場合
1: 監視のためのアカウントを作成します。
2: 各ターゲットサーバーでポートを開きます。 (ソース:MEMサーバー)
3: ターゲットインスタンスを登録します。
4: 監視を開始します。
- 52. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 52
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 53. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 53
IaaSの基本的なパフォーマンス確認
※ COMPUTEのモニタリングでもサーバーのリソース利用状況を確認可能。
- 54. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
しきい値/アラートの表示 → アラート・ルール
- 55. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 55
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: IaaSとMySQLCSの連携
10: その他
Agenda
- 56. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 56
REST API
REST Endpoint
サイトをクリック
REST API詳細: http://docs.oracle.com/cloud/latest/mysql-cloud/CSMCS/rest-endpoints.html
認証:http://docs.oracle.com/en/cloud/iaas/compute-iaas-cloud/stcsa/Authentication.html
REST Endpoint
•Access Rules
•Backups
•Health Monitoring
•Patches
•Service Instances
•Snapshots
•SSH Access
- 57. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 57
#!/bin/sh
curl -X GET -u “<account>:<password>" ¥
-H "X-ID-TENANT-NAME:<Identity Domain>" -H "Accept: application/json" ¥
https://psm.europe.oraclecloud.com/paas/api/v1.1/instancemgmt/<Identity Domain>/services/MySQLCS/instances/STUDY01
Method: get
Path: /paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/instances/{serviceId}
[root@misc01 opc_training]# ./opc_get_workshop.sh
{“serviceId”:205582,“serviceName”:“STUDY01”,“serviceType”:“MySQLCS”,
“domainName”:“gse00000610”,“serviceVersion”:“5.7”,“releaseVersion”:“5.7.18”,
“baseReleaseVersion”:“5.7.18”,“metaVersion”:“17.3.3-170709”,“serviceDescription”:“デモ専用”,
<SNIP>
For","assocTypeDescription":"Service B¥/Resource B required for Service A"}]},"computeSiteName":"EM002_Z12",
"patching":{"currentOperation":{"operation":"NONE"},"totalAvailablePatches":0},"backup":{"operationInProgress":{},
"lastBackupDate":"2017-08-18T00:30:30.881+0000"}}
例) 特定のサービスインスタンスの詳細を確認
- 58. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 58
user=“<account>"
pass=“<password>"
XAuth=`curl -is -X GET -H "X-Storage-User:Storage-<Identity Domain>:$user" -H "X-Storage-Pass:$pass"
https://<Identity Domain>.storage.oraclecloud.com/auth/v1.0 | egrep 'X-Auth-Token' | awk '{print $2}'`
curl -X GET -H "X-Auth-Token: $XAuth" https://<Identity Domain>.storage.oraclecloud.com/v1/Storage-<Identity Domain>/STUDY01/
[root@misc01 opc_training]# ./opc_storage_get_workshop.sh
This Shell Will Delete Oracle Object Storage Service
Press [Enter] key to resume.
MySQLCS/STUDY01/onDemandFull/e1154bee-9ff4-4e03-9a5f-2966a585bfe6/backup_full.mbi
MySQLCS/STUDY01/onDemandFull/e1154bee-9ff4-4e03-9a5f-2966a585bfe6/backup_full.mbi_part_1
MySQLCS/STUDY01/scheduledFull/2a8ad520-f25d-432e-827a-3f47b733b953/backup_full.mbi
MySQLCS/STUDY01/scheduledFull/2a8ad520-f25d-432e-827a-3f47b733b953/backup_full.mbi_part_1
MySQLCS/STUDY01/scheduledFull/d633939e-dff9-4506-8499-7d51ad7ca354/backup_full.mbi
MySQLCS/STUDY01/scheduledFull/d633939e-dff9-4506-8499-7d51ad7ca354/backup_full.mbi_part_1
MySQLCS/STUDY01/scheduledIncremental/833014fc-6203-45e8-97e1-1a6c096afdb6/backup_incremental.mbi
MySQLCS/STUDY01/scheduledIncremental/833014fc-6203-45e8-97e1-1a6c096afdb6/backup_incremental.mbi_part_1
[root@misc01 opc_training]#
例) オブジェクトストレージ上のファイルを確認
- 59. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 59
[root@misc01 opc_training]# ./opc_mysqlcs_get_access_rule_workshop.sh
{"accessRules":[{"ruleName":"ora_p2admin_ssh","description":"Permit public access to SSH
port","status":"enabled","source":"PUBLIC-INTERNET","destination":"mysql_MASTER","ports":"22","protocol":"tcp",
"ruleType":"DEFAULT"},{"ruleName":"ora_p2admin_mysql","description":"Permit public access to MySQL port",
<SNIP>
{"ruleName":"sys_infra2mys_admin_ssh","description":"DO NOT MODIFY: Permit PSM to ssh to admin host",
"status":"enabled","source":"PAAS-INFRA","destination":"mysql_ADMIN_HOST","ports":"22","protocol":"tcp","ruleType":"SYSTEM"},
{"ruleName":"specific_host_for_replication","description":"MySQL - Public Net - MySQL","status":"enabled",
"source":"61.125.59.0¥/24","destination":"mysql_MASTER","ports":"3306","protocol":"tcp","ruleType":"USER"}],"activities":[]}
curl -X GET -u “<account>:<password>" ¥
-H "X-ID-TENANT-NAME:<Identity Domain>" -H "Accept: application/json" ¥
https://psm.europe.oraclecloud.com/paas/api/v1.1/instancemgmt/<Identity Domain>
/services/MySQLCS/instances/<serviceName>/accessrules
http://docs.oracle.com/cloud/latest/mysql-cloud/CSMCS/index.html
例) アクセスルールの確認
- 60. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 60
curl -X GET -u “<account>:<password>" ¥
-H "X-ID-TENANT-NAME:<Identity Domain>" -H "Accept: application/json" ¥
https://psm.europe.oraclecloud.com/paas/api/v1.1/instancemgmt/<IdentityDomain>/services/MySQLCS/instances/
{serviceName}/backups/{backupId}
[admin@misc01 opc]$ ./opc_mysqlscs_get_backup.sh
{"backupId":"0d9f5357-3115-4cd6-afd1-f683153f3370","jobId":"3116288","backupStartDate":"2016-12-
08T00:25:08.440+0000","backupCompleteDate":"2016-12-08T00:25:18.396+0000","expirationDate":"2017-01-
07T00:25:08.440+0000","initiatedBy":"scheduled","full":true,"local":false,"localCopy":false,"databaseIncluded":false,“
<SNIP>
backup","tag":"{¥"startTime¥":1481156710,¥"endTime¥":1481156710,¥"startLSN¥":1728000,¥"endLSN¥":1728260,¥"l
astBinLog¥":¥"study03-mysql-1.000002¥",¥"lastBinLogPos¥":3631,¥"triggeredBy¥":¥"scheduled¥"}"}
[admin@misc01 opc]$
例) バックアップジョブの確認
- 61. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 61
[root@misc01 opc]# psm MySQLCS help
DESCRIPTION Oracle Oracle MySQL Cloud Service
SYNOPSIS psm MySQLCS <command> [parameters]
AVAILABLE COMMANDS
o services List all Oracle MySQL Cloud Service instances
o service List Oracle MySQL Cloud Service instance
o create-service Create Oracle MySQL Cloud Service
o delete-service Delete an existing service
o stop Stop one or more VMs that are running Oracle MySQL Cloud Service instance
o start Start one or more VMs that are running Oracle MySQL Cloud Service instance
o restart Restart one or more VMs that are running Oracle MySQL Cloud Service instance
o scale Scale-Up or scale-Down the Compute Shape used by service hosts
o view-backups List all backups of Oracle MySQL Cloud Service instance
o view-backup List a backup of Oracle MySQL Cloud Service instance
o backup Backup Service
o delete-backup Delete an existing backup.
o view-restores List all restore operations for Oracle MySQL Cloud Service instance
o view-restore List a specified restore operation for Oracle MySQL Cloud Service instance
o restore Restore the service from a backup
o view-backup-config List backup configuration of Oracle MySQL Cloud Service instance
o update-backup-config Update the backup configuration for the service
o available-patches List all available patches for Oracle MySQL Cloud Service instance
o applied-patches List all applied patches for Oracle MySQL Cloud Service instance
o patch This operation will apply a patch to the service
o precheck-patch This operation will run a precheck for a patch on the given service
o rollback This operation will rollback a previously applied patch
o operation-status View status of Oracle MySQL Cloud Service instance operation
o access-rules List access rules for Oracle Oracle MySQL Cloud Service instance
o create-access-rule Create an access rule for Oracle Oracle MySQL Cloud Service instance
o delete-access-rule Delete an access rule for Oracle Oracle MySQL Cloud Service instance
o enable-access-rule Enable an access rule for Oracle Oracle MySQL Cloud Service instance
o disable-access-rule Disable an access rule for Oracle Oracle MySQL Cloud Service instance
o help Show help
https://docs.oracle.com/cloud/latest/jcs_gs/PSCLI/GUID-E0FB0756-5A83-4B84-9611-159D9D437339.htm#PSCLI-GUID-E0FB0756-5A83-4B84-9611-159D9D437339
PSM Command
Require Python 3.3~
- 62. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 62
$ export USER=<account>
$ export PASSWD=<password>
$ export IDENTITYDOMAIN=<Identity Domain>
curl -v -X GET -u ${USER}:${PASSWD} -H X-ID-TENANT-
NAME:${IDENTITYDOMAIN}
https://psm.europe.oraclecloud.com/paas/core/api/v1.1/cli/${IDEN
TITYDOMAIN}/client -o psmcli.zip
[root@misc01 opc]# pip install --upgrade pip
Collecting pip
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 862kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Successfully installed pip-8.1.2
[root@misc01 opc]#
[root@misc01 opc]# pip install -U psmcli.zip
Processing ./psmcli.zip
Requirement already up-to-date: requests<=2.8.1,>=2.7.0 in
/usr/lib/python2.7/site-packages (from psmcli==1.1.8)
Requirement already up-to-date: keyring<=5.6,>=5.4 in
/usr/lib/python2.7/site-packages (from psmcli==1.1.8)
Requirement already up-to-date: colorama==0.3.3 in
/usr/lib/python2.7/site-packages (from psmcli==1.1.8)
Requirement already up-to-date: PyYAML==3.11 in
/usr/lib64/python2.7/site-packages (from psmcli==1.1.8)
Installing collected packages: psmcli
Found existing installation: psmcli 1.1.8
Uninstalling psmcli-1.1.8:
Successfully uninstalled psmcli-1.1.8
Running setup.py install for psmcli ... done
Successfully installed psmcli-1.1.8
[root@misc01 opc]#
参照: https://docs.oracle.com/en/cloud/paas/java-cloud/pscli/downloading-cli-using-rest-api.html
https://docs.oracle.com/cd/E60665_01/jcs_gs/PSCLI/GUID-A63D73BD-4F22-472D-9E04-D998CEE68A00.htm
PSMコマンドの設定 (インストール)
- 63. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 63
PSMコマンドの設定(初期設定)
[root@misc01 opc_training]# psm setup
Username: <account>
Password: <password>
Retype Password:
Identity domain: <Identity Domain>
Region [us]: emea
Output format [json]:
Please enter password for encrypted keyring:
----------------------------------------------------
'psm setup' was successful. Available services are:
o ANALYTICS : Oracle Analytics Cloud
o APICS : Oracle API Platform Cloud Service
o BDCSCE : Oracle Big Data Cloud Service - Compute Edition
o BigDataAppliance : Oracle Big Data Cloud Service
o MySQLCS : Oracle MySQL Cloud Service
<SNIP>
OPCのアカウント
パスワード
ドメイン等を入力
- 64. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 64
[root@misc01 bin]# psm MySQLCS view-backups -s opc-demo01
Please enter password for encrypted keyring:
{
"backups":[
{
"backupId":"5a05d9f2-2e2b-4669-9197-bafdf303c026",
"jobId":"2410606",
"backupStartDate":"2016-10-10T03:15:10.127+0000",
"backupCompleteDate":"2016-10-10T03:15:43.835+0000",
<SNIP>
"storageContainer":"Storage-scmsyqlteam/object-storage01",
"href":"https://psm.europe.oraclecloud.com:443/.... <SNIP>
[root@misc01 bin]# psm MySQLCS services | egrep -i
"serviceName|ENTERPRISE_MONITOR"
Please enter password for encrypted keyring:
<SNIP>
"serviceName":"opc-demo01",
"ENTERPRISE_MONITOR":{
"ENTERPRISE_MONITOR":"https://121.134.124.230:18443",
Get Service Information
Get Backup Information
- 65. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 65
[root@misc01 opc_training]# psm MySQLCS create-service -c create-service-workshop.json
Please enter password for encrypted keyring:
{
"details":{
"message":"Submitted job to create service [STUDY02] in domain [gse00000610].",
"jobId":"7088606"
}
}
Job ID : 7088606
[root@misc01 opc_training]#
サーバー構成を定義した,
JSONファイルを指定
PSMとダッシュボードにて
プロビジョニング状況を確認可能
- 66. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 66
[root@misc01 opc]# cat create-service-workshop.json
{
"serviceName":“STUDY02",
"serviceDescription":"Create Instance from PSM",
"backupDestination":"BOTH",
"cloudStorageContainer":"Storage-<identitydomain>/PSM01",
"cloudStorageUser":“<username>",
"cloudStoragePassword":“<password>",
"cloudStorageContainerAutoGenerate":"true",
"vmPublicKeyText":"ssh-rsa
AAAAB3NzaC1yc2EAACCBJQAZZZEAlL6Ud4xUYxHcKUUisXmanbhSSSSSBzrnC42foWJ
umJ/bHztUV/EuPV33ZkKKKAZA1qCPYTiPJB3JN3geHTZ== rsa-key-21170329",
"serviceLevel":"PAAS",
"serviceVersion":"5.7",
"vmUser":"opc",
"components":{
"mysql":{
"shape":"oc3",
"mysqlUserName":“<username>",
"mysqlUserPassword":“<password>",
"mysqlPort":"3306",
"mysqlEMPort":"18443",
"dbStorage":"25",
"dbName":"PSM",
"mysqlCharset":"utf8mb4",
"enterpriseMonitor":"Yes",
"enterpriseMonitorManagerUser":“<username>",
"enterpriseMonitorManagerPassword":“<password>",
"enterpriseMonitorAgentUser":“<username>",
"enterpriseMonitorAgentPassword":“<password>"
}
}
}
PSMを使用して容易にインスタンスを作成する事が可能。
JSONでサーバーの定義ファイルを作成しておきます。
参照: https://docs.oracle.com/en/cloud/paas/java-cloud/pscli/mysqlcs-create-service.html
- 67. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 67
[root@misc01 opc_training]# psm MySQLCS delete-service -s study02
Please enter password for encrypted keyring:
{
"details":{
"message":"Submitted job to delete service [study02] in domain [gse00000610].",
"jobId":"7093517"
}
}
Job ID : 7093517
[root@misc01 opc_training]#
インスタンス削除開始
- 68. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 68
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: COMPUTE(IaaS)とMySQLCSの連携
10: その他
Agenda
- 69. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 69
COMPUTEとMySQLCSを活用した基本構成例
Load Balancer (HAProxy)
Firewall, DNS, CDN
IaaS Layer Database Layer
IaaS (Apache + WordPress)Load Balancer as a service
* Restriction about cross site connections
http://docs.oracle.com/cloud/latest/computecs_common/OCSUG/GUID-D9FC8048-7AC5-4EF8-BA4C-E4CE048E56EF.htm#OCSUG-
GUID-D9FC8048-7AC5-4EF8-BA4C-E4CE048E56EF
- 70. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 70
COMPUTEのプロビジョニング
1) OSイメージを選択してください
2) COMPUTEのスペックを選択
- 71. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 71
3)ホスト名等の必要な情報を入力する
4)Public , Privateネットワークの設定
COMPUTEのプロビジョニング
参照: http://docs.oracle.com/cloud/latest/stcomputecs/STCSG/GUID-10F880AD-5D84-48A6-99EF-9A47FF573883.htm#STCSG-GUID-9A826000-2728-4837-905A-7835FA775F9B
固定サブネット若しくは、
固定IPを設定する事が可能です。
事前に設計し作成しておく事も可能です
- 72. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 72
5)STORAGEの設定を行います。
6) COMPUTEの設定を確認します。
6)OKの場合は、「作成」をクリックしてください。
COMPUTEのプロビジョニング
ストレージを複数追加する事が可能で
す。1Tを超える大規模なデータベース
の場合、2017年8月 現状では、
COMPUTEを利用下さい。
- 73. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 73
アクセスリストの設定
詳細: Permitting Public TCP Traffic to Oracle Compute Cloud Service Instances
http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/compute-
iaas/permitting_public_tcp_traffic_to_compute_instances/permitting_public_tcp_traffic_to_compute_instances.html
COMPUTE(Apache)とMySQLCSの間にアクセスリスト設定の必要があります。
また、パブリックアクセス(80)のアクセスリストを設定する必要があります。
詳細は以下のURLを確認してください。
SSHの設定が必要な場合も、合わせて設定する必要があります。
※ IP Exchangesを利用する事で, 異なるIP Network間で接続する事が可能です。
- 74. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 74
アプリケーション構成が完了したら、
サービスにアクセスすることが出来ます。
mysql> show tables;
+-----------------------+
| Tables_in_wordpress |
+-----------------------+
| wp_commentmeta |
| wp_comments |
| wp_links |
| wp_options |
| wp_postmeta |
| wp_posts |
| wp_term_relationships |
| wp_term_taxonomy |
| wp_termmeta |
| wp_terms |
| wp_usermeta |
| wp_users |
+-----------------------+
12 rows in set (0.01 sec)
- 75. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 75
1: Oracle MySQL Cloud Service概要
2: MySQL Instanceの作成、削除、再起動
3: スケールアップ/ダウンインスタンス
4: インスタンスへの接続 (SSH, Workbench)
5: アクセスルールのコントロール (Internal and External network)
6: MySQLプラグインとツール群 (Plugins, MEB, MEM)
7: 基本的なIaaSのパフォーマンスモニタリング (CPU,MEMORY, I/O)
8: CLIによるインスタンス管理 (API,PSM)
9: COMPUTE(IaaS)とMySQLCSの連携
10: その他
Agenda
- 76. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
オブジェクトストレージの可用性設定
Oracle Storage Cloud Serviceにはデータ保護の為に、レプリケーション・オプションがあります。
オブジェクトストレージを使用する前に、複製ポリシーを選択する必要があります。
- 77. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 77
Filling out necessary information
Choose Service
Choose User Role
----
※ You can batch import user from the file.
※ You can export users to the file.
ユーザーアカウント管理ダッシュボード
- 78. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 78
リソース割当量を超えた場合
- 電子メールによる通知
- ダッシュボード確認可能
新しいインスタンスを作成することはできず、既存のインスタンスは
クォータを超えたリソースをさらに消費することはできません。
- 79. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 79
コスト
1 OCPU = 2 vCPU
[root@japacsc01-mysql-1 opc]# cat /proc/cpuinfo | grep processor
processor : 0
processor : 1
[root@japacsc01-mysql-1 opc]#
詳細: https://cloud.oracle.com/ja_JP/mysql/pricing