はじめに
2018年12月3日に MariaDB の列指向データベース ColumnStore の新バージョン1.2 がGAとなりました。
MariaDB ColumnStore 1.2.2 GA リリースノート
今回はバージョン1.2の新機能の一つ,1ステップ クイック インストーラについて解説いたします。
ColumnStore 1ステップ クイック インストーラ
MariaDB ColumnStore のインストールを行う際,従来はrpm/debパッケージをOSのパッケージマネージャ(yum/apt等)でインストールした後に postConfigure ツールで対話的に初期設定を行っていましたが,1.1.6以降のバージョンではコマンドひとつでシングルノード/マルチノード構成の初期設定が可能となっております。
MariaDB ColumnStore One Step Quick Installer Script
今回は複数ノード(separated)構成でクイックインストールを行います。
CentOS 7上で 2UM x 2PM構成のクイックインストール
テスト環境として以下のものを用意します。今回はUMとPMが分離した構成とします。
- OS: CentOS 7.6.1810
- MariaDB ColumnStore 1.2.2 GA
- ノード構成:
モジュール | IPアドレス |
---|---|
um1 | 192.168.2.111 |
um2 | 192.168.2.112 |
pm1 | 192.168.2.121 |
pm2 | 192.168.2.122 |
事前準備
以下のページを参考に以下の作業を各ノードで行います。
Preparing for ColumnStore Installation – 1.2.0
- SELinux/firewalldの無効化
- 依存ライブラリのインストール
- 各ノードで相互にパスワードなしログイン可能
作業の詳細はこちらの過去記事に解説されておりますので,今回は割愛させて頂きます。
MariaDB ColumnStore を複数ノードで動かす
pm1 への MariaDB ColumnStore 1.2.2 のインストール
rpmパッケージのインストールは,rpm tarball, mariadb-columnstore-1.2.2-1-centos7.x86_64.rpm.tar.gzをダウンロード,展開し
1 |
yum -y localinstall mariadb-columnstore-*.rpm |
で行う方法と,yumレポジトリを設定し,
Installing MariaDB AX / MariaDB ColumnStore from the Package Repositories – 1.2.X
以下のように yum groupinstall で行う方法があります。
1 2 3 |
sudo yum --enablerepo=mariadb-columnstore clean metadata sudo yum groups mark remove "MariaDB ColumnStore" sudo yum groupinstall "MariaDB ColumnStore" |
クイックインストーラ実行前の事前準備の確認を pm1 へのColumnStore インストール後,以下のスクリプトで行うことができます。
MariaDB ColumnStore Cluster Test Tool
pm1 ノードでの columnstoreClusterTester.sh 実行結果
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
[root@pm1 ~]# /usr/local/mariadb/columnstore/bin/columnstoreClusterTester.sh *** This is the MariaDB Columnstore Cluster System Test Tool *** ** Validate local OS is supported Local Node OS System Name : CentOS Linux 7 (Core) ** Run Local UMASK check UMASK local setting test passed ** Run Local SELINUX check Local Node SELINUX setting is Not Enabled ** Run MariaDB Console Password check Passed, no problems detected with a MariaDB password being set without an associated /root/.my.cnf ** Run MariaDB ColumnStore Dependent Package Check Local Node - Passed, all dependency packages are installed Local Node - Passed, all packages that should not be installed aren't installed *** Finished Validation of the Cluster, all Tests Passed *** |
all Tests Passed となっていますので,pm1の事前準備は完了しています。
pm1 からリモートの pm2 に対するチェックは –ipaddr オプションでIPアドレスを指定します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
[root@pm1 ~]# /usr/local/mariadb/columnstore/bin/columnstoreClusterTester.sh --ipaddr=192.168.2.122 *** This is the MariaDB Columnstore Cluster System Test Tool *** ** Validate local OS is supported Local Node OS System Name : CentOS Linux 7 (Core) ** Run Local UMASK check UMASK local setting test passed ** Run Local SELINUX check Local Node SELINUX setting is Not Enabled ** Run Ping access Test to remote nodes 192.168.2.122 Node Passed ping test ** Run SSH Login access Test to remote nodes 192.168.2.122 Node Passed SSH login test using ssh-keys ** Run OS check - OS version needs to be the same on all nodes Local Node OS Version : CentOS Linux 7 (Core) 192.168.2.122 Node OS Version : CentOS Linux 7 (Core) ** Run Locale check - Locale needs to be the same on all nodes Local Node Locale : LANG=en_US.UTF-8 192.168.2.122 Node Locale : LANG=en_US.UTF-8 ** Run UMASK check 192.168.2.122 Node UMASK setting test passed ** Run SELINUX check 192.168.2.122 Node SELINUX setting is Not Enabled ** Run Firewall Services check Local Node iptables service is Not Active Local Node ufw service is Not Active Local Node firewalld service is Not Active Local Node firewall service is Not Active 192.168.2.122 Node iptables service is Not Enabled 192.168.2.122 Node ufw service is Not Enabled 192.168.2.122 Node firewalld service is Not Enabled 192.168.2.122 Node firewall service is Not Enabled ** Run MariaDB ColumnStore Port (8600-8630,8700,8800,3306) availability test 192.168.2.122 Node Passed port test ** Run Date/Time check - Date/Time should be within 10 seconds on all nodes Passed: 192.168.2.122 Node date/time is within 10 seconds of local node ** Run MariaDB Console Password check Passed, no problems detected with a MariaDB password being set without an associated /root/.my.cnf ** Run MariaDB ColumnStore Dependent Package Check Local Node - Passed, all dependency packages are installed Local Node - Passed, all packages that should not be installed aren't installed 192.168.2.122 Node - Passed, all dependency packages are installed 192.168.2.122 Node - Passed, all packages that should not be installed aren't installed *** Finished Validation of the Cluster, all Tests Passed *** |
pm2 の事前準備は問題ないことが確認できました。um1/um2に対しても同様のチェックを行います。
マルチサーバ クイック インストーラの実行
今回は pm1 にのみ手動で MariaDB ColumnStore の各 RPM のインストールを実施し,以下のように–dist-install オプションを指定,UM/PMの各ノードのIPアドレスを列挙,リモートノードへのRPMコピー,インストールを自動で行います。
1 2 3 4 |
/usr/local/mariadb/columnstore/bin/quick_installer_multi_server.sh \ --dist-install \ --pm-ip-addresses=192.168.2.121,192.168.2.122 \ --um-ip-addresses=192.168.2.111,192.168.2.112 |
なお,クイックインストーラ実行時に,pm1 の /root に mariadb-columnstore-1.2.2-1-centos7.x86_64.rpm.tar.gz を展開した状態になっている必要があります。
RPMが存在しない場合,以下のエラーメッセージが表示され,インストールが異常終了します。
1 2 3 4 5 |
Performing a MariaDB ColumnStore System install using RPM packages located in the /root directory. ls: cannot access /root/mariadb-columnstore-1.2.2-1*.rpm: No such file or directory Error: can't locate /root/mariadb-columnstore-1.2.2-1*.rpm Package in directory /root |
インストールが正常に完了した場合は以下のようなメッセージが表示されます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
[root@pm1 ~]# /usr/local/mariadb/columnstore/bin/quick_installer_multi_server.sh --dist-install --pm-ip-addresses=192.168.2.121,192.168.2.122 --um-ip-addresses=192.168.2.111,192.168.2.112 NOTE: Performing a Multi-Server Seperate install with um and pm running on seperate servers Run post-install script The next step is: If installing on a pm1 node using non-distributed install /usr/local/mariadb/columnstore/bin/postConfigure If installing on a pm1 node using distributed install /usr/local/mariadb/columnstore/bin/postConfigure -d If installing on a non-pm1 using the non-distributed option: /usr/local/mariadb/columnstore/bin/columnstore start Run postConfigure script This is the MariaDB ColumnStore System Configuration and Installation tool. It will Configure the MariaDB ColumnStore System and will perform a Package Installation of all of the Servers within the System that is being configured. IMPORTANT: This tool requires to run on the Performance Module #1 With the no-Prompting Option being specified, you will be required to have the following: 1. Root user ssh keys setup between all nodes in the system or use the password command line option. 2. A Configure File to use to retrieve configure data, default to Columnstore.xml.rpmsave or use the '-c' option to point to a configuration file. ===== Quick Install Multi-Server Configuration ===== Multi-Server install defaulting to using local storage ===== Setup System Module Type Configuration ===== There are 2 options when configuring the System Module Type: separate and combined 'separate' - User and Performance functionality on separate servers. 'combined' - User and Performance functionality on the same server Select the type of System Module Install [1=separate, 2=combined] (1) > Seperate Server Installation will be performed. NOTE: Local Query Feature allows the ability to query data from a single Performance Module. Check MariaDB ColumnStore Admin Guide for additional information. Enable Local Query feature? [y,n] (n) > NOTE: The MariaDB ColumnStore Schema Sync feature will replicate all of the schemas and InnoDB tables across the User Module nodes. This feature can be enabled or disabled, for example, if you wish to configure your own replication post installation. MariaDB ColumnStore Schema Sync feature is Enabled, do you want to leave enabled? [y,n] (y) > NOTE: MariaDB ColumnStore Replication Feature is enabled Enter System Name (columnstore-1) > ===== Setup Storage Configuration ===== ----- Setup Performance Module DBRoot Data Storage Mount Configuration ----- There are 2 options when configuring the storage: internal or external 'internal' - This is specified when a local disk is used for the DBRoot storage. High Availability Server Failover is not Supported in this mode 'external' - This is specified when the DBRoot directories are mounted. High Availability Server Failover is Supported in this mode. Select the type of Data Storage [1=internal, 2=external] (1) > ===== Setup Memory Configuration ===== NOTE: Setting 'NumBlocksPct' to 70% Setting 'TotalUmMemory' to 50% ===== Setup the Module Configuration ===== ----- User Module Configuration ----- Enter number of User Modules [1,1024] (2) > *** User Module #1 Configuration *** Enter Nic Interface #1 Host Name (192.168.2.111) > Enter Nic Interface #1 IP Address of 192.168.2.111 (192.168.2.111) > *** User Module #2 Configuration *** Enter Nic Interface #1 Host Name (192.168.2.112) > Enter Nic Interface #1 IP Address of 192.168.2.112 (192.168.2.112) > ----- Performance Module Configuration ----- Enter number of Performance Modules [1,1024] (2) > *** Parent OAM Module Performance Module #1 Configuration *** Enter Nic Interface #1 Host Name (192.168.2.121) > Enter Nic Interface #1 IP Address of 192.168.2.121 (192.168.2.121) > Enter the list (Nx,Ny,Nz) or range (Nx-Nz) of DBRoot IDs assigned to module 'pm1' (1) > *** Performance Module #2 Configuration *** Enter Nic Interface #1 Host Name (192.168.2.122) > Enter Nic Interface #1 IP Address of 192.168.2.122 (192.168.2.122) > Enter the list (Nx,Ny,Nz) or range (Nx-Nz) of DBRoot IDs assigned to module 'pm2' (2) > Next step is to enter the password to access the other Servers. This is either user password or you can default to using a ssh key If using a user password, the password needs to be the same on all Servers. Enter password, hit 'enter' to default to using a ssh key, or 'exit' > ===== System Installation ===== System Configuration is complete. Performing System Installation. Performing a MariaDB ColumnStore System install using RPM packages located in the /root directory. ----- Performing Install on 'um1 / 192.168.2.111' ----- Install log file is located here: /tmp/columnstore_tmp_files/um1_rpm_install.log ----- Performing Install on 'um2 / 192.168.2.112' ----- Install log file is located here: /tmp/columnstore_tmp_files/um2_rpm_install.log ----- Performing Install on 'pm2 / 192.168.2.122' ----- Install log file is located here: /tmp/columnstore_tmp_files/pm2_rpm_install.log MariaDB ColumnStore Package being installed, please wait ... DONE ===== Checking MariaDB ColumnStore System Logging Functionality ===== The MariaDB ColumnStore system logging is setup and working on local server ===== MariaDB ColumnStore System Startup ===== System Configuration is complete. Performing System Installation. ----- Starting MariaDB ColumnStore on local server ----- MariaDB ColumnStore successfully started MariaDB ColumnStore Database Platform Starting, please wait ........... DONE System Catalog Successfully Created Run MariaDB ColumnStore Replication Setup.. DONE MariaDB ColumnStore Install Successfully Completed, System is Active Enter the following command to define MariaDB ColumnStore Alias Commands . /etc/profile.d/columnstoreAlias.sh Enter 'mcsmysql' to access the MariaDB ColumnStore SQL console Enter 'mcsadmin' to access the MariaDB ColumnStore Admin console NOTE: The MariaDB ColumnStore Alias Commands are in /etc/profile.d/columnstoreAlias.sh |
異常終了した場合は各ノードの以下のログファイルにログが記録されておりますので参照することをおすすめ致します。
1 |
/tmp/columnstore_tmp_files/[u|p]m[1|2]_rpm_install.log |
mcsadmin getSystemStatus によるステータス確認
MariaDB ColumnStore の管理ツール,mcsadmin(ma) のサブコマンド getSystemStatus では各ノードの稼働状態を確認することができます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[root@pm1 ~]# ma getsystems getsystemstatus Thu Dec 6 14:55:37 2018 System columnstore-1 System and Module statuses Component Status Last Status Change ------------ -------------------------- ------------------------ System ACTIVE Thu Dec 6 14:54:11 2018 Module um1 ACTIVE Thu Dec 6 14:54:07 2018 Module um2 ACTIVE Thu Dec 6 14:54:02 2018 Module pm1 ACTIVE Thu Dec 6 14:53:45 2018 Module pm2 ACTIVE Thu Dec 6 14:53:57 2018 Active Parent OAM Performance Module is 'pm1' Primary Front-End MariaDB ColumnStore Module is 'um1' MariaDB ColumnStore Replication Feature is enabled MariaDB ColumnStore set for Distributed Install |
なお,ma は mcsadmin のaliasです。
getSystemInfo では,getSystemStatus の出力に加え,各モジュールの各プロセスの状態を確認することができます。
1 |
[root@pm1 ~]# ma getsystemi |
まとめ
MariaDB ColumnStore 1.2.2 GA の複数ノードへのインストールを1ステップクイックインストーラを用いて行いました。各ノードにおける事前準備が整っていない場合に,従来の postConfigure では何度も対話的に同じ入力を行わざるをえない場合がありましたが,よりインストール作業の省力化が可能となりました。