Apr 19, 2016

Contrail R3.0 Manual installation on ubuntu(8)

Analytics Nodeの設定


Analytics Node consists of contrail-alarm-gen,contrail-analytics-api,contrail-collector,contrail-query-engine,contrail-snmp-collector,contrail-topology.
**Target Server: Contrail1-3

1.Set variables
HOST=10.84.50.131  ## Set IP address of an Installation server
OPENSTACK=10.84.50.134  ## Set IP address of Openstack server
IVIP=10.84.50.139  ## Set Virtual IP address of Control/Data
host1=10.84.50.131  ## Physical IP address for Control/Data of Contrail1
host2=10.84.50.132  ## Physical IP address for Control/Data of Contrail2
host3=10.84.50.133  ## Physical IP address for Control/Data of Contrail3

2.Install package
apt-get -y install contrail-openstack-analytics

3.Modify /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.Modify /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.Modify /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.Modify /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.Modify /etc/contrail/contrail-analytics-nodemgr.conf
sed -i "s/server=.*/server=$IVIP/g" /etc/contrail/contrail-analytics-nodemgr.conf

8.Modify /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.Modify /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.Modify /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.Modify /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.Modify /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.Restart process
service supervisor-analytics restart

Next topic is "Install Contrail WebUI".

No comments:

Post a Comment