Install Elasticsearch and Kibana packages using yum/apt-get

Test results of this patch set are at
http://paste.openstack.org/show/490450/.

Change-Id: I2957cc70fcca34706ec50a630d785f0630c3f5c0
Closes-Bug: #1553203
This commit is contained in:
Vikram Hosakote 2016-03-12 05:11:00 +00:00
parent f5bdcfbb60
commit ec3baf0428
6 changed files with 28 additions and 11 deletions

View File

@ -21,6 +21,9 @@ ENV KOLLA_INSTALL_METATYPE {{ install_metatype }}
# Turns on Elasticsearch repos
COPY elasticsearch.yum.repo /etc/yum.repos.d/elasticsearch.repo
# Turns on Kibana repo
COPY kibana.yum.repo /etc/yum.repos.d/kibana.yum.repo
# Turns on MariaDB repos throughout the RPM build
COPY mariadb.yum.repo /etc/yum.repos.d/MariaDB.repo

View File

@ -0,0 +1,6 @@
[kibana-4.4]
name=Kibana repository for 4.4.x packages
baseurl=http://packages.elastic.co/kibana/4.4/centos
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

View File

@ -21,3 +21,6 @@ deb http://download.ceph.com/debian-hammer/ trusty main
# Elastic repo
deb http://packages.elastic.co/elasticsearch/2.x/debian stable main
# Kibana repo
deb http://packages.elastic.co/kibana/4.4/debian stable main

View File

@ -8,7 +8,7 @@ ENV JAVA_HOME /usr/lib/jvm/jre-1.7.0-openjdk/
RUN yum -y install \
java-1.7.0-openjdk \
elasticsearch-2.1.1 \
elasticsearch \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
@ -17,7 +17,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.7.0-openjdk-amd64/
RUN apt-get install -y --no-install-recommends \
openjdk-7-jre \
elasticsearch=2.1.1 \
elasticsearch \
&& apt-get clean
{% endif %}

View File

@ -1,18 +1,22 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
ENV KIBANA_VERSION 4.3.1
ENV KIBANA_DIR /opt/kibana/
ENV KIBANA_ARCHIVE kibana-${KIBANA_VERSION}-linux-x64.tar.gz
RUN useradd -r -m --user-group kibana \
&& usermod -a -G kolla kibana
RUN curl "https://download.elastic.co/kibana/kibana/$KIBANA_ARCHIVE" -o $KIBANA_ARCHIVE \
&& mkdir -p $KIBANA_DIR \
&& tar -xz --strip-components=1 -f $KIBANA_ARCHIVE -C $KIBANA_DIR \
&& chown -R kibana:kibana $KIBANA_DIR \
&& rm -f $KIBANA_ARCHIVE
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
kibana \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
kibana \
&& apt-get clean
{% endif %}
{{ include_footer }}

View File

@ -32,6 +32,7 @@ deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main
deb http://repo.percona.com/apt trusty main
deb http://download.ceph.com/debian-hammer/ trusty main
deb http://packages.elastic.co/elasticsearch/2.x/debian stable main
deb http://packages.elastic.co/kibana/4.4/debian stable main
EOF
fi
}