Chapter 2.2: Install the contrail from the packages
Setup Details
My Setup diagram is below
My Installation Machine configurations
- Ubuntu 14.04.05
- 8GB RAM, 2 Core Processor
- Virtual Machine (VM)
- Internet connectivity
opencontrail VM :
All Contrail Services (config-node, control-node, analytics-node,cassandra, rabbitmq, zookeeper etc) will be installed in this VM
VM IP - 10.0.1.4
Hostname: opencontrail
devstack1 VM:
Devstack will be installed
Contrail vrouter, vrouter-agent will be installed
VM IP - 10.0.1.7
Hostname - devstack1
OpenContrail Installation :
Install the services one by one.
contrail-config contrail-control, contrail-analytics, contrail-ui, db
Note: If you want run the services on separate VMs, you can use the same installation methods
Installing the prerequisties:
opencontrail ppa maintains some dependent packages. Add and update it
sudo add-apt-repository ppa:opencontrail/ppa
sudo apt-get update
Create a /etc/contrail folder
sudo mkdir /etc/contrail
Install the required packages
sudo apt-get install python-geventhttpclient python-bitarray python-bottle python-kazoo python-kombu python-pycassa python-consistent-hash python-netaddr python-psutilsudo apt-get install python-lxml python-ncclient python-netifaces python-stevedore python-xmltodict supervisor ifmap-server python-jsonpickle
sudo apt-get install python-keystoneclient python-neutron python-novaclient
sudo apt-get install authbind supervisor libboost-chrono1.54.0 libboost-program-options1.54.0 libboost-regex1.54.0 libboost-system1.54.0 liblog4cplus-1.0-4 libtbb2 dpkg-dev
sudo apt-get install python-geventhttpclient python-bitarray python-bottle python-kazoo python-kombu python-pycassa python-consistent-hash python-netaddr python-psutil nodejs zookeeperd
Note : zookeeper, ifmap-server ,redis-server is installed as part of above.
Installing contrail-config service:
Install and setup the RabbitMQ
sudo apt-get install rabbitmq-server
sudo rabbitmqctl add_user stackrabbit stackqueue
sudo rabbitmqctl set_permissions -p / stackrabbit ".*" ".*" ".*"
Note : we have added the user "stackrabbit" and set password as "stackrabbit". This will be used in all the contrail configuration files.
Common Contrail packages required for all contrail nodes(config,control,analytics)
sudo dpkg -i python-contrail_1.1master~96e7f26_amd64.deb
sudo dpkg -i contrail-lib_1.1master~96e7f26_amd64.deb
sudo dpkg -i contrail-utils_1.1master~96e7f26_amd64.deb
Contrail-config installation
sudo dpkg -i contrail-config_1.1master~96e7f26_amd64.deb
sudo dpkg -i contrail-config-openstack_1.1master~96e7f26_amd64.deb
Verify the status of contrail config process
sudo service contrail-discovery status
sudo service contrail-api status
sudo service contrail-schema status
sudo service contrail-device-manager status
sudo service contrail-svc-monitor status
We will configure and restart it later.
Install the Contrail-Control service:
sudo dpkg -i contrail-dns_1.1master~96e7f26_amd64.deb
sudo dpkg -i contrail-control_1.1master~96e7f26_amd64.deb
Verify the status of contrail control process
sudo service contrail-control status
sudo service contrail-dns status
sudo service contrail-named status
Install the Contrail-Analytics service
Install the cassadra cpp driver
wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/cassandra/v2.2.0/cassandra-cpp-driver_2.2.0-1_amd64.deb
wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/cassandra/v2.2.0/cassandra-cpp-driver-dev_2.2.0-1_amd64.deb
wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/dependencies/libuv/v1.7.5/libuv_1.7.5-1_amd64.deb
sudo dpkg -i libuv_1.7.5-1_amd64.deb cassandra-cpp-driver_2.2.0-1_amd64.deb cassandra-cpp-driver-dev_2.2.0-1_amd64.deb
Install the contrail-analytics
sudo dpkg -i contrail-analytics_1.1master~96e7f26_amd64.deb
Verify the status of contrail analytics processes
sudo service contrail-topology status
sudo service contrail-collector status
sudo service contrail-query-engine
sudo service contrail-analytics-api
sudo service contrail-alarm-gen
sudo service contrail-snmp-collector status
Install the Contrail-Web-UI service
Install the contrail web
sudo dpkg -i contrail-web-core_1.1master~96e7f26_amd64.deb
sudo dpkg -i contrail-web-controller_1.1master~96e7f26_all.deb
Verify the status of contrail web ui status
sudo service contrail-webui-webserver status
sudo service contrail-webui-jobserver status
Install the DB
Install cassandra as per this link
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
java -version
curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -
echo "deb http://debian.datastax.com/community stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
sudo apt-get update
sudo apt-get install dsc22=2.2.3-1 cassandra=2.2.3
sudo apt-get install cassandra-tools=2.2.3
Ref : https://hostpresto.com/community/tutorials/how-to-install-apache-cassandra-on-ubuntu-14-04/
Thats all.
To verify cassandra, use the below commands
nodetool status
cqlsh
Install Kafka (optional)
Kafka is required for Contrail analytics. Kafka package is available in opencontrail ppa. The following procedure shows how to install and run.
sudo apt-get install kafka
cloud@opencontrail:~$ dpkg -l | grep kafka
ii kafka 2.11-0.9.0.1-0contrail0 amd64 <insert up to 60 chars description>
ii python-kafka 1.0.1-0contrail1 amd64 Python client for the Apache Kafka distributed stream processing system
cloud@opencontrail:~$
sudo touch /var/log/kafka.log
sudo /usr/share/kafka/bin/kafka-server-start.sh /usr/share/kafka/config/server.properties > /var/log/kafka.log 2>&1 &
cloud@opencontrail:~$ ps -ef | grep kafka
root 16797 16474 0 07:24 pts/0 00:00:00 sudo /usr/share/kafka/bin/kafka-server-start.sh /usr/share/kafka/config/server.properties
root 16798 16797 7 07:24 pts/0 00:00:04 java -Xmx1G -Xms1G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+DisableExplicitGC -Djava.awt.headless=true -Xloggc:/usr/share/kafka/bin/../logs/kafkaServer-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dkafka.logs.dir=/usr/share/kafka/bin/../logs -Dlog4j.configuration=file:/usr/share/kafka/bin/../config/log4j.properties -cp :/usr/share/kafka/bin/../libs/* kafka.Kafka /usr/share/kafka/config/server.properties
cloud 16899 16474 0 07:25 pts/0 00:00:00 grep --color=auto kafka
cloud@opencontrail:~$
cloud@opencontrail:~$ tailf /var/log/kafka.log
[2017-05-16 07:24:29,517] INFO Completed load of log -uve-0-0 with log end offset 0 (kafka.log.Log)
[2017-05-16 07:24:29,518] INFO Created log for partition [-uve-0,0] in /tmp/kafka-logs with properties {compression.type -> producer, file.delete.delay.ms -> 60000, max.message.bytes -> 1000012, min.insync.replicas -> 1, segment.jitter.ms -> 0, preallocate -> false, min.cleanable.dirty.ratio -> 0.5, index.interval.bytes -> 4096, unclean.leader.election.enable -> true, retention.bytes -> -1, delete.retention.ms -> 86400000, cleanup.policy -> delete, flush.ms -> 9223372036854775807, segment.ms -> 604800000, segment.bytes -> 1073741824, retention.ms -> 604800000, segment.index.bytes -> 10485760, flush.messages -> 9223372036854775807}. (kafka.log.LogManager)
[2017-05-16 07:24:29,518] INFO Partition [-uve-0,0] on broker 0: No checkpointed highwatermark is found for partition [-uve-0,0] (kafka.cluster.Partition)