Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

まず、環境の説明

説明:1つの、環境内のすべてのは、DBUSのスタンドアロンバージョンで、dbusの経験は、ユーザーが簡単に試用版を高速に機能を与えることである、または環境は以下を含む他の目的に使用することはできません。

1)の基礎を形成します。

  • 飼育係3.4.6
  • カフカ0.10.0.0
  • 嵐1.0.1
  • granfana 4.2.0
  • logstash 5.6.1
  • influxdb(次のステップ3を参照して、個別にインストール)
  • MySQLの(ステップ2を参照して、個別にインストール)

2)DBUS関連のパッケージ:

  • dbusのキーパー0.5.0
  • dbusのストリーム、メイン0.5.0
  • dbusのルータ0.5.0
  • dbusの、ハートビート0.5.0
  • dbusのログプロセッサ0.5.0

3)MySQLデータソースが必要。

  • 運河

1.1依存環境

次のように構成されたDBUS-allinone提案設置環境

  • JDK 1.8.181以上
  • CPU 2以上の核
  • メモリの16ギガバイト以上
  • ディスクの20ギガバイト以上

注:のLinuxのCentOSマシン好ましくは空であるサーバー、DBUSのZKを搭載し、カフカ、嵐などに依存しません。

1.2ドメイン名を変更

注:たとえば、192.168.0.1として、ここで使用され、あなたの特定のIPをIP

以下のように提供されるドメイン情報に対応するサーバ/ etc / hostsファイルを変更します。

192.168.0.1 dbus-n1

次のようにサーバーのhostnameコマンドを変更します。

hostname dbus-n1

設定が完了すると、以下のように、サーバーのIPおよびドメインの情報は次のとおりです。

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

1.3アプリのユーザーは、SSHのない密なログインを作成および構成します

DBUSは、デフォルトの呼び出しのssh利用アプリのユーザーと22ポート、およびアプリのアカウントを作成し、sshのフリー密集ログインフリー密なログイン設定を構成するための1を必要としているすべてのため、通常の経験では、すべて1つのパッケージに、コールの嵐のコマンドを使用してSSHトポロジーを開始しているのでDBUS-N1からのdbus-N1-無料密集ログインへ

設定後、設定が成功したときに表示するには、次のコマンドを実行し

[app@dbus-n1 ~]$ ssh -p 22 app@dbus-n1
Last login: Fri Aug 10 15:54:45 2018 from 10.10.169.53
[app@dbus-n1 ~]$

第二に、準備

2.1インストールのMysql

2.1.1のダウンロード

推奨ダウンロードMySQLバージョン:5.7.19住所:https://dev.mysql.com/downloads/mysql/

2.1.2インストール

mysqlの-5.7.19-1.el6.x86_64.rpm-bundle.tarパッケージを抽出した後、次のコマンドのインストールを実行します。

rpm -ivh mysql-community-server-5.7.19-1.el6.x86_64.rpm --nodeps
rpm -ivh mysql-community-client-5.7.19-1.el6.x86_64.rpm --nodeps
rpm -ivh mysql-community-libs-5.7.19-1.el6.x86_64.rpm --nodeps
rpm -ivh mysql-community-common-5.7.19-1.el6.x86_64.rpm --nodeps
rpm -ivh mysql-community-libs-compat-5.7.19-1.el6.x86_64.rpm --nodeps

2.1.3設定

な/etc/my.cnf設定ファイルでは、単に漢字のコメント欄以下、その他を変更することなく、ビン・ログ設定を追加

[mysqld]
# dbus相关配置开始
log-bin=mysql-bin
binlog-format=ROW
server_id=1
# dbus相关配置结束

2.1.4スタート

mysqlの起動するには、次のコマンドを実行します。

service mysqld start

2.2。インストールInfluxDB

2.2.1のダウンロード

推奨ダウンロードInfluxDBバージョン:influxdb-1.1.0.x86_64住所:https://portal.influxdata.com/downloads

2.2.2インストール

rootユーザーにDBUS-N1に切り替え、ディレクトリinfluxdb-1.1.0.x86_64.rpmに保存されている以下のコマンドを実行します。

rpm -ivh influxdb-1.1.0.x86_64.rpm

2.2.3スタート

DBUS-N1で次のコマンドを実行します。

service influxdb start

2.2.4初期設定

DBUS-N1で次のコマンドを実行します。

#登录influx
influx

#执行初始化脚本
create database dbus_stat_db
use dbus_stat_db
CREATE USER "dbus" WITH PASSWORD 'dbus!@#123'
ALTER RETENTION POLICY autogen ON dbus_stat_db DURATION 15d

第三に、インストールパッケージDBUS-allinone

3.1をダウンロード

:Baiduのネットワークディスクにdbusの-allinone.tar.gzパッケージを提供することで、最新のリリースパッケージダウンロードするページにアクセスhttps://github.com/BriData/DBus/releasesを

3.2インストール

サーバー/ appディレクトリにアップロードのdbus-allinoneパッケージをダウンロードし、このディレクトリに存在する必要があります

# 如果没有app目录,要先创建app目录
mkdir /app
cd /app
tar -zxvf dbus-allinone.tar.gz

3.3データベースを初期化します

ルートmysqlクライアントとしてログインし、データベースを初期化するには、次のコマンドを実行して、ユーザーが作成したdbmgrライブラリ、運河のユーザー、dbusのライブラリ、およびユーザー、testschemaライブラリ、およびユーザー:

source /app/dbus-allinone/sql/init.sql

3.4開始

Start.shはDBUSすべてのサービス、スタートアップ項目の詳細を開始するためのキーを行います。

cd /app/dbus-allinone
./start.sh

以下のように(おそらく、約5分かかります)待ってください、正しいブートログは次のとおりです。

Start grafana...
Grafana started. pid: 23760
=============================================================================================
Start zookeeper...
zookeeper pid 23818
Zookeeper started.
=============================================================================================
Start kafka...
No kafka server to stop
kafka pid 24055
kafka started.
=============================================================================================
Start Canal ... 
canal started.
=============================================================================================
Start logstash...
No logstash to stop
nohup: appending output to `nohup.out'
logstash pid 24151
logstash started.
=============================================================================================
Start storm nimbus...
No storm nimbus to stop
Storm nimbus pid 24215
Storm nimbus started.
=============================================================================================
Start storm supervisor...
No storm supervisor to stop
Storm supervisor pid 24674
Storm supervisor started.
=============================================================================================
Start storm ui...
No storm ui to stop
Storm ui pid 24939
Storm ui started. ui port: 6672
=============================================================================================
Stop storm topology.
Storm topology stoped.
=============================================================================================
Start storm topology...
Storm topology started.
=============================================================================================
Start Dbus Heartbeat...
No Dbus Heartbeat to stop
Dbus Heartbeat pid 26854
Dbus Heartbeat started.
=============================================================================================
Start Dbus keeper...
=========================stop===========================
keeper-proxy process not exist
gateway process not exist
keeper-mgr process not exist
keeper-service process not exist
register-server process not exist

=========================start===========================
register-server started. pid: 27077
keeper-proxy  started. pid: 27172
gateway started. pid: 27267
keeper-mgr started. pid: 27504
keeper-service started. pid: 27645
Dbus keeper prot: 6090
Dbus keeper started.
=============================================================================================

3.5通常のスタートかどうかを確認するために検査レポートを生成

ディレクトリ/app/dbus-allinone/allinone-auto-check-0.5.0、自動検出スクリプトauto-check.shを入力し、しばらく待っ

cd /app/dbus-allinone/allinone-auto-check-0.5.0
./auto-check.sh

示すように、それは、時間/app/dbus-allinone/allinone-auto-check-0.5.0/reportsディレクトリに対応した検査報告書を生成します

[app@dbus-n1 reports]$ tree
.
└── 20180824111905
    └── check_report.txt

ファイルを開くには、次のように検査報告書を閲覧check_report.txt

(#で始まることは解釈情報で、レポートが生成されていないことに注意してください)

# 出现以下信息说明dbusmgr库正常
check db&user dbusmgr start:
============================================
table t_avro_schema data count: 0
table t_data_schema data count: 4
table t_data_tables data count: 4
table t_dbus_datasource data count: 2
table t_ddl_event data count: 0
table t_encode_columns data count: 0
table t_encode_plugins data count: 1
table t_fullpull_history data count: 0
table t_meta_version data count: 5
table t_plain_log_rule_group data count: 1
table t_plain_log_rule_group_version data count: 1
table t_plain_log_rule_type data count: 0
table t_plain_log_rules data count: 5
table t_plain_log_rules_version data count: 5
table t_project data count: 1
table t_project_encode_hint data count: 1
table t_project_resource data count: 1
table t_project_sink data count: 1
table t_project_topo data count: 1
table t_project_topo_table data count: 1
table t_project_topo_table_encode_output_columns data count: 1
table t_project_topo_table_meta_version data count: 0
table t_project_user data count: 1
table t_query_rule_group data count: 0
table t_sink data count: 1
table t_storm_topology data count: 0
table t_table_action data count: 0
table t_table_meta data count: 7
table t_user data count: 2

# 出现以下信息说明dbus库正常
check db&user dbus start:
============================================
table db_heartbeat_monitor data count: 15
table test_table data count: 0
table db_full_pull_requests data count: 0

# 出现以下信息说明canal用户正常
check db&user canal start: 
============================================
master status File:mysql-bin.000002, Position:12047338
table db_heartbeat_monitor data count: 15
table test_table data count: 0
table db_full_pull_requests data count: 0

# 出现以下信息说明testschema库正常
check db&user testschema start: 
============================================
table test_table data count: 0

# 出现以下信息说明zk启动正常
check base component zookeeper start: 
============================================
23818 org.apache.zookeeper.server.quorum.QuorumPeerMain

# 出现以下信息说明kafka启动正常
check base component kafka start: 
============================================
24055 kafka.Kafka

# 出现以下信息说明storm nimbus、supervisor、ui 启动正常
check base component storm start: 
============================================
26500 org.apache.storm.daemon.worker
25929 org.apache.storm.daemon.worker
27596 org.apache.storm.LogWriter
26258 org.apache.storm.LogWriter
24215 org.apache.storm.daemon.nimbus
27035 org.apache.storm.LogWriter
27611 org.apache.storm.daemon.worker
26272 org.apache.storm.daemon.worker
24674 org.apache.storm.daemon.supervisor
24939 org.apache.storm.ui.core
26486 org.apache.storm.LogWriter
27064 org.apache.storm.daemon.worker
25915 org.apache.storm.LogWriter

# 出现以下信息说明influxdb 启动正常
check base component influxdb start: 
============================================
influxdb 10265     1  0 Aug08 ?        02:28:06 /usr/bin/influxd -pidfile /var/run/influxdb/influxd.pid -config /etc/influxdb/influxdb.conf
app      28823 28746  0 11:19 pts/3    00:00:00 /bin/sh -c ps -ef | grep influxdb
app      28827 28823  0 11:19 pts/3    00:00:00 grep influxdb

# 出现以下信息说明grafana 启动正常
check base component grafana start: 
============================================
app      23760     1  0 11:09 pts/3    00:00:00 ./grafana-server
app      28828 28746  0 11:19 pts/3    00:00:00 /bin/sh -c ps -ef | grep grafana
app      28832 28828  0 11:19 pts/3    00:00:00 grep grafana

# 出现以下信息说明心跳heartbeat 启动正常
check base component heartbeat start: 
============================================
26854 com.creditease.dbus.heartbeat.start.Start

# 出现以下信息说明logstash 启动正常
check base component logstash start: 
============================================
24151 org.jruby.Main

# 出现以下信息说明canal 启动正常
check canal start: 
============================================
zk path [/DBus/Canal/otter-testdb] exists.
24105 com.alibaba.otter.canal.deployer.CanalLauncher

# 出现以下信息说明dispatcher-appender、mysql-extractor、splitter-puller、router 启动正常
check topology start: 
============================================
api: http://dbus-n1:6672/api/v1/topology/summary
topology testlog-log-processor status is ACTIVE
topology testdb-mysql-extractor status is ACTIVE
topology testdb-splitter-puller status is ACTIVE
topology testdb-dispatcher-appender status is ACTIVE
topology tr-router status is ACTIVE

# 出现以下信息说明从数据库->extractor-dispatcher->appender线路正常
check flow line start: 
============================================
first step insert heart beat success.
data arrive at topic: testdb
data arrive at topic: testdb.testschema
data arrive at topic: testdb.testschema.result

第四に、一つのパッケージ内のすべてのインストールが成功したかどうかを検証します

4.1ログインgrafanaの前提

grafanaマシンをログに記録するブラウザでホストファイルを設定する必要があり、すでに設定されている場合は、この前提をスキップ

検証システムは、Windowsマシンである場合は、Cを変更:\ WINDOWS \ System32に\ドライバを\ ETC \ hostsには、適切なドメイン情報を設定するファイルは次のとおりです。

# 192.168.0.1 替换成部署allinone包的服务器ip地址
192.168.0.1 dbus-n1

マシンは、Linux検証システムであれば、以下のように、ドメイン情報に対応する修正/ etc / hostsファイルが提供されます。

# 192.168.0.1 替换成部署allinone包的服务器ip地址
192.168.0.1 dbus-n1

4.2ログインgrafana

ログインgrafana URLアドレス:HTTP:// dbusの-N1:3000 /ログイン

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

4.3 mysqlの挿入データの検証

#登录测试用户
mysql -utestschema -p     #testschema账户密码:j0<C6cqcqr:TestSchema
#执行测试脚本
use testschema;
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');
INSERT INTO test_table (NAME, BIRTHDAY) VALUES ('testdataname', '2018-08-10 18:00:00');

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

Dバス4.4のデータにリアルタイムでアクセスするかどうかを確認してください

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

V.は、インストールが成功した抽出ハートビートログであったかどうかを確認しますlogstash

/app/dbus-allinone/dbus-heartbeat-0.5.0/logs/heartbeat/heartbeat.log、ログファイル、非構造化データ、抽出にを使用して抽出logstash:dbusのハートビートハートビートの子供たちは、位置のログモジュールを持っています構造化データ

5.1次のように生の非構造化データを記録します:

コマンドによって3、以下に示すように、非構造化データは、抽出されるかを確認し、ログに「成功を挿入ハートビートパケット」で毎分を持っています

cd /app/dbus-allinone/dbus-heartbeat-0.5.0/logs/heartbeat/
tail -f heartbeat.log | grep "插入心跳包成功"

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

5.2結果は、ビューのルールとルールの実行DBUSキーパーに構造を設定します

次のように図の抽出規則は、次のとおり

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

ルール実行の結果

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

5.3 grafanaビューでリアルタイムのトラフィックの監視を抽出

ボードd​​eatilログテーブルを選択します

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

テーブルを選択します。testlog.testlog_schema.t_heartbeat_data

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

シックス・ログインDバスキーパー検査のUI操作

6.1ログインDBUSキーパーの前提

すでに設定されている場合は、ブラウザのマシンを介してホストファイルdbusのキーパーログインを設定する必要があり、この前提をスキップ

検証システムは、Windowsマシンである場合は、Cを変更:\ WINDOWS \ System32に\ドライバを\ ETC \ hostsには、適切なドメイン情報を設定するファイルは次のとおりです。

# 192.168.0.1 替换成部署allinone包的服务器ip地址
192.168.0.1 dbus-n1

マシンは、Linux検証システムであれば、以下のように、ドメイン情報に対応する修正/ etc / hostsファイルが提供されます。

# 192.168.0.1 替换成部署allinone包的服务器ip地址
192.168.0.1 dbus-n1

6.2ログインdbusのキーパー

ログインDBUSキーパーのURLアドレス:HTTP:// dbusの-N1:6090 /ログイン

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

エクスペリエンス管理者機能、利用ユーザー:adminパスワード:12345678

次のように管理者インターフェイスは、次のとおりです。

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

[email protected]パスワード:12345678体験テナント機能は、ユーザーを使用します

次のようにテナントインタフェースは次のとおりです。

Dバスは、リアルタイムデータフロー計算の迅速な展開を体験します

Gitの住所:https://github.com/BriData

おすすめ

転載: blog.51cto.com/14159827/2421024