Analytics Nodeの設定
Contrailで使用するAnalytics Nodeを設定します。Analytics Nodeはcontrail-alarm-gen,contrail-analytics-api,contrail-collector,contrail-query-engine,contrail-snmp-collector,contrail-topologyで構成されます。
**対象サーバ Contrail1-3
1. 変数の設定
HOST=10.84.50.131 ## インストール対象サーバのIPアドレスを指定
OPENSTACK=10.84.50.134 ## Openstack ServerのIPアドレスを指定
IVIP=10.84.50.139 ## Control/Dataの仮想IPアドレスを指定
host1=10.84.50.131 ## Contrail1のControl/Data用物理IPアドレス
host2=10.84.50.132 ## Contrail2のControl/Data用物理IPアドレス
host3=10.84.50.133 ## Contrail3のControl/Data用物理IPアドレス
2.パッケージのインストール
apt-get -y install contrail-openstack-analytics
3.
/etc/redis/redis.confの修正
sed -i "s/^bind/#bind/g" /etc/redis/redis.conf
sed -i "s/^save/#save/g" /etc/redis/redis.conf
sed -i "s/^dbfilename/#dbfilename/g" /etc/redis/redis.conf
sed -i "s/^lua-time-limit 5000/lua-time-limit 15000/g" /etc/redis/redis.conf
4.
/etc/contrail/contrail-collector.confの修正
sed -i "s/^# cassandra_server_list=.*/cassandra_server_list=$host1:9160 $host2:9160 $host3:9160/g" /etc/contrail/contrail-collector.conf
sed -i "s/^# kafka_broker_list=.*/kafka_broker_list=$host1:9092 $host2:9092 $host3:9092/g" /etc/contrail/contrail-collector.conf
sed -i "s/^# hostip=/hostip=$HOST/g" /etc/contrail/contrail-collector.conf
sed -i "s/^# http_server_port=8089/http_server_port=8089/g" /etc/contrail/contrail-collector.conf
sed -i "s/^# syslog_port=514/syslog_port=-1/g" /etc/contrail/contrail-collector.conf
sed -i "s/^# port=8086/port=8086/g" /etc/contrail/contrail-collector.conf
sed -i -e "/^# IP address of discovery server/a server=$IVIP" /etc/contrail/contrail-collector.conf
sed -i -e "/^# IP address of redis-server/a server=127.0.0.1" /etc/contrail/contrail-collector.conf
sed -i -e "/^cassandra_server_list/a zookeeper_server_list=$host1:2181,$host2:2181,$host3:2181" /etc/contrail/contrail-collector.conf
5.
/etc/contrail/contrail-query-engine.confの修正
sed -i "s/^# Collector configuration options/# Query-Engine configuration options/g" /etc/contrail/contrail-query-engine.conf
sed -i "s/^# cassandra_server_list=127.0.0.1:9160/cassandra_server_list=$host1:9160 $host2:9160 $host3:9160/g" /etc/contrail/contrail-query-engine.conf
sed -i "s/^# hostip=.*/hostip=$HOST/g" /etc/contrail/contrail-query-engine.conf
sed -i "s/^# http_server_port=8089/http_server_port=8091/g" /etc/contrail/contrail-query-engine.conf
sed -i "s/^# server=127.0.0.1 # discovery_server IP address/server=$IVIP/g" /etc/contrail/contrail-query-engine.conf
sed -i "s/^# port=6379/port=6379/g" /etc/contrail/contrail-query-engine.conf
sed -i "s/^# server=127.0.0.1/server=127.0.0.1/g" /etc/contrail/contrail-query-engine.conf
6.
/etc/contrail/contrail-analytics-api.confの修正
sed -i "s/^#host_ip = 127.0.0.1/host_ip = $HOST/g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#cassandra_server_list=127.0.0.1:9160/cassandra_server_list=$host1:9160 $host2:9160 $host3:9160/g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#http_server_port = 8090/http_server_port = 8090/g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#rest_api_port = 8081/rest_api_port = 9081/g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#rest_api_ip = 0.0.0.0/rest_api_ip = 0.0.0.0/g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#log_category = /log_category = /g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#disc_server_ip = 127.0.0.1/disc_server_ip = $IVIP/g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#disc_server_port = 5998/disc_server_port = 5998/g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#redis_server_port=6379/redis_server_port=6379/g" /etc/contrail/contrail-analytics-api.conf
sed -i "s/^#redis_query_port=6379/redis_query_port=6379/g" /etc/contrail/contrail-analytics-api.conf
7.
/etc/contrail/contrail-analytics-nodemgr.confの修正
sed -i "s/server=.*/server=$IVIP/g" /etc/contrail/contrail-analytics-nodemgr.conf
8.
/etc/contrail/contrail-snmp-collector.confの修正
sed -i "s/^#zookeeper=.*/zookeeper=$host1:2181,$host2:2181,$host3:2181/g" /etc/contrail/contrail-snmp-collector.conf
sed -i "s/^#disc_server_ip=.*/disc_server_ip=$IVIP/g" /etc/contrail/contrail-snmp-collector.conf
sed -i "s/^#disc_server_port=5998/disc_server_port=5998/g" /etc/contrail/contrail-snmp-collector.conf
9.
/etc/contrail/supervisord_analytics_files/contrail-snmp-collector.iniの修正
sed -i "s/command=.*/command=\/usr\/bin\/contrail-snmp-collector --conf_file \/etc\/contrail\/contrail-snmp-collector.conf --conf_file \/etc\/contrail\/contrail-keystone-auth.conf/g" /etc/contrail/supervisord_analytics_files/contrail-snmp-collector.ini
10.
/etc/contrail/contrail-topology.confの修正
sed -i "s/^#zookeeper=.*/zookeeper=$host1:2181,$host2:2181,$host3:2181/g" /etc/contrail/contrail-topology.conf
echo "[DISCOVERY]
disc_server_ip = $IVIP
disc_server_port = 5998" >> /etc/contrail/contrail-topology.conf
11.
/etc/contrail/supervisord_analytics_files/contrail-topology.iniの修正
sed -i "s/command=.*/command=\/usr\/bin\/contrail-topology --conf_file \/etc\/contrail\/contrail-topology.conf --conf_file \/etc\/contrail\/contrail-keystone-auth.conf/g" /etc/contrail/supervisord_analytics_files/contrail-topology.ini
12.
/etc/contrail/contrail-alarm-gen.confの修正
sed -i "s/^#host_ip =.*/host_ip = $HOST/g" /etc/contrail/contrail-alarm-gen.conf
sed -i "s/^#kafka_broker_list =.*/kafka_broker_list=$host1:9092 $host2:9092 $host3:9092/g" /etc/contrail/contrail-alarm-gen.conf
sed -i "s/^#zk_list =.*/zk_list = $host1:2181,$host2:2181,$host3:2181/g" /etc/contrail/contrail-alarm-gen.conf
sed -i "s/^#disc_server_ip =.*/disc_server_ip=$IVIP/g" /etc/contrail/contrail-alarm-gen.conf
sed -i "s/^#disc_server_port =.*/disc_server_port=5998/g" /etc/contrail/contrail-alarm-gen.conf
13.
Analytics Nodeの起動
service supervisor-analytics restart
次はWebUIの設定です。
0 件のコメント:
コメントを投稿