Support Ubuntu 16.04 for devstack plugin
Update OS version name in the README. Update the openjdk/kafka version. Control the kafka/zookeeper service by systemd. Change-Id: If0866b4d816689ee54166a5061a4792fa205ae17
This commit is contained in:
parent
5809e66874
commit
ecf75f1919
|
@ -1,6 +1,6 @@
|
|||
# Monasca Analytics DevStack Plugin
|
||||
|
||||
The Monasca Analytics DevStack plugin currently only works on Ubuntu 14.04 (Trusty).
|
||||
The Monasca Analytics DevStack plugin currently only works on Ubuntu 16.04 (Xenial).
|
||||
More Linux Distributions will be supported in the future.
|
||||
|
||||
Running the Monasca Analytics DevStack plugin requires a machine with 8GB of RAM.
|
||||
|
@ -52,7 +52,7 @@ you can add the following two lines to the local.conf file.
|
|||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Apache Kafka
|
||||
Requires=network.target
|
||||
After=zookeepepr.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/kafka/bin/kafka-server-start.sh /etc/kafka/server.properties
|
||||
ExecStop=/opt/kafka/bin/kafka-server-stop.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -69,8 +69,6 @@ function pre_install_monasca_analytics {
|
|||
function unstack_monasca_analytics {
|
||||
echo_summary "Unstack Monasca-analytics"
|
||||
|
||||
sudo service monasca-analytics stop || true
|
||||
|
||||
delete_monasca_analytics_files
|
||||
|
||||
sudo userdel monasca-analytics || true
|
||||
|
@ -129,8 +127,7 @@ function unistall_pkgs {
|
|||
sudo sed -i -e '/deb https\:\/\/dl.bintray.com\/sbt\/debian \//d' /etc/apt/sources.list.d/sbt.list
|
||||
sudo dpkg -r scala
|
||||
|
||||
sudo apt-get -y purge openjdk-7-jdk
|
||||
sudo apt-get -y purge openjdk-7-jre-headless
|
||||
sudo apt-get -y purge $JDK_PKG
|
||||
|
||||
sudo rm -rf ~/.m2
|
||||
|
||||
|
@ -243,7 +240,7 @@ function install_zookeeper {
|
|||
sudo mkdir -p /var/log/zookeeper || true
|
||||
sudo chmod 755 /var/log/zookeeper
|
||||
|
||||
sudo start zookeeper || sudo restart zookeeper
|
||||
sudo systemctl start zookeeper || sudo systemctl restart zookeeper
|
||||
else
|
||||
echo_summary "SKIP:Install Monasca Zookeeper"
|
||||
fi
|
||||
|
@ -290,7 +287,11 @@ function install_kafka {
|
|||
sudo sed -i "s/zookeeper\.connect=127\.0\.0\.1:2181/zookeeper.connect=${SERVICE_HOST}:2181/g" /etc/kafka/server.properties
|
||||
fi
|
||||
|
||||
sudo start kafka || sudo restart kafka
|
||||
sudo cp -f "${MONASCA_ANALYTICS_BASE}"/devstack/files/kafka/kafka.service /etc/systemd/system/kafka.service
|
||||
sudo chmod 644 /etc/systemd/system/kafka.service
|
||||
|
||||
sudo systemctl enable kafka
|
||||
sudo systemctl start kafka || sudo systemctl restart kafka
|
||||
else
|
||||
echo_summary "SKIP:Install Monasca Kafka"
|
||||
fi
|
||||
|
@ -328,7 +329,7 @@ function post_config_monasca_analytics {
|
|||
|
||||
###
|
||||
function extra_monasca_analytics {
|
||||
sudo service monasca-analytics start
|
||||
:
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
@ -31,7 +31,7 @@ enable_service monasca-analytics
|
|||
# spark vars
|
||||
SPARK_DIRECTORIES=("/var/spark" "/var/log/spark" "/var/run/spark/work" "/etc/spark/conf" "/etc/spark/init" )
|
||||
|
||||
JDK_PKG="openjdk-7-jre-headless openjdk-7-jdk"
|
||||
JDK_PKG="openjdk-8-jre-headless openjdk-8-jdk"
|
||||
|
||||
MAVEN="apache-maven-3.3.9"
|
||||
MAVEN_TARBAL="$MAVEN-bin.tar.gz"
|
||||
|
@ -49,11 +49,9 @@ SPARK_VERSION=${SPARK_VERSION:-1.6.1}
|
|||
SPARK_TARBALL_NAME="spark-${SPARK_VERSION}.tgz"
|
||||
SPARK_URL="http://archive.apache.org/dist/spark/spark-$SPARK_VERSION/$SPARK_TARBALL_NAME"
|
||||
|
||||
BASE_KAFKA_VERSION=${BASE_KAFKA_VERSION:-0.9.0.0}
|
||||
BASE_KAFKA_VERSION=${BASE_KAFKA_VERSION:-1.0.1}
|
||||
KAFKA_DIR="/opt/kafka"
|
||||
KAFKA_DOWNLOAD="$KAFKA_DIR/download"
|
||||
KAFKA_VERSION=${KAFKA_VERSION:-${SCALA_VERSION}-${BASE_KAFKA_VERSION}}
|
||||
KAFKA_TARBALL="kafka_$KAFKA_VERSION.tgz"
|
||||
KAFKA_URL="http://ftp.riken.jp/net/apache/kafka/$BASE_KAFKA_VERSION/$KAFKA_TARBALL"
|
||||
#KAFKA_URL="http://apache.arvixe.com/kafka/$BASE_KAFKA_VERSION/$KAFKA_TARBALL"
|
||||
KAFKA_URL="http://ftp.riken.jp/net/apache/kafka/$BASE_KAFKA_VERSION/$KAFKA_TARBALL"
|
||||
|
|
Loading…
Reference in New Issue