@@ -43,9 +43,15 @@ SKYDIVE_AGENT_PROBES=${SKYDIVE_AGENT_PROBES:-"netlink netns ovsdb neutron"}
4343# Remote port for ovsdb server.
4444SKYDIVE_OVSDB_REMOTE_PORT=6640
4545
46+ # Default log level
47+ SKYDIVE_LOGLEVEL=${SKYDIVE_LOGLEVEL:- INFO}
48+
4649# Storage used by the analyzer to store flows
4750SKYDIVE_STORAGE=${SKYDIVE_STORAGE:- " elasticsearch" }
4851
52+ ELASTICSEARCH_BASE_URL=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution
53+ ELASTICSEARCH_VERSION=2.3.1
54+
4955function install_go {
5056 if [[ ` uname -m` == * " 64" ]]; then
5157 arch=amd64
@@ -64,11 +70,21 @@ function install_go {
6470 export GOPATH=$GOPATH
6571}
6672
73+ function download_elasticsearch {
74+ if is_ubuntu; then
75+ wget ${ELASTICSEARCH_BASE_URL} /deb/elasticsearch/${ELASTICSEARCH_VERSION} /elasticsearch-${ELASTICSEARCH_VERSION} .deb \
76+ -O ${TOP_DIR} /files/elasticsearch-${ELASTICSEARCH_VERSION} .deb
77+ elif is_fedora; then
78+ wget ${ELASTICSEARCH_BASE_URL} /rpm/elasticsearch/${ELASTICSEARCH_VERSION} /elasticsearch-${ELASTICSEARCH_VERSION} .rpm \
79+ -O ${TOP_DIR} /files/elasticsearch-${ELASTICSEARCH_VERSION} .noarch.rpm
80+ fi
81+ }
82+
6783function pre_install_skydive {
6884 install_go
69- if is_service_enabled skydive-analyzer ; then
70- ELASTICSEARCH_VERSION=2.3.1
71- $TOP_DIR /pkg/elasticsearch.sh download
85+ if is_service_enabled skydive-analyzer; then
86+ download_elasticsearch
87+ export ELASTICSEARCH_VERSION
7288 $TOP_DIR /pkg/elasticsearch.sh install
7389 fi
7490}
136152analyzer:
137153 listen: $SKYDIVE_ANALYZER_LISTEN
138154 storage: $SKYDIVE_STORAGE
155+
156+ logging:
157+ default: $SKYDIVE_LOGLEVEL
139158EOF
140159 fi
141160
0 commit comments