Browse Source

Drop monasca-grafana image.

After months of using deprecated components image finally stopped
building.

Change-Id: I8f5a9b220fc8afd6ef07cb5f2142df8c6ead9bc0
(cherry picked from commit 2c49046ae2)
changes/93/792293/1
Marcin Juszkiewicz 6 months ago
committed by Radosław Piliszek
parent
commit
66b5abf672
  1. 104
      docker/monasca/monasca-grafana/Dockerfile.j2
  2. 8
      docker/monasca/monasca-grafana/extend_start.sh
  3. 1
      docker/monasca/monasca-grafana/grafana_sudoers
  4. 2
      kolla/image/build.py
  5. 5
      releasenotes/notes/deprecate-monasca-grafana-d05af2e96cffd82c.yaml
  6. 7
      releasenotes/notes/drop-monasca-grafana-df2c45d6826752f6.yaml

104
docker/monasca/monasca-grafana/Dockerfile.j2

@ -1,104 +0,0 @@
FROM {{ namespace }}/{{ infra_image_prefix }}base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block monasca_grafana_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='monasca', homedir='/usr/share/grafana') }}
{% if base_package_type == 'rpm' %}
{% set monasca_grafana_build_packages = [
'bzip2',
'fontconfig',
'gcc-c++',
'git',
'golang',
'make',
'npm',
'rpm-build',
'ruby',
'ruby-devel'
] %}
{% elif base_package_type == 'deb' %}
{% set monasca_grafana_build_packages = [
'bzip2',
'fontconfig',
'g++',
'git',
'golang',
'libffi-dev',
'make',
'npm',
'rpm',
'ruby',
'ruby-dev'
] %}
{% endif %}
{{ macros.install_packages(monasca_grafana_build_packages | customizable("packages")) }}
WORKDIR /usr/share/grafana
COPY grafana_sudoers /etc/sudoers.d/kolla_grafana_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
ENV GO_PATH=/grafana
ENV monasca_grafana_build_path=${GO_PATH}/src/github.com/grafana/grafana
ARG monasca_grafana_version=grafana4_2
ARG monasca_grafana_url=https://github.com/monasca/grafana/archive/$monasca_grafana_version.tar.gz
ARG monasca_grafana_app_version=1.0.0
ARG monasca_grafana_app_url=https://github.com/monasca/monasca-grafana/archive/$monasca_grafana_app_version.tar.gz
{% block monasca_grafana_install %}
# NOTE(yoctozepto): Update npm to 6.x version to avoid issues with metadata parsing.
# NPM installs itself in /usr/local/bin (the default in Ubuntu) which is not in the PATH.
# This is forced for all distros to avoid conflicts with native packages.
RUN gem install fpm \
&& curl -o /tmp/monasca-grafana.tgz ${monasca_grafana_url} \
&& mkdir -p ${monasca_grafana_build_path} \
&& tar --strip 1 -xvf /tmp/monasca-grafana.tgz -C ${monasca_grafana_build_path} \
&& rm -f /tmp/monasca-grafana.tgz \
&& cd ${monasca_grafana_build_path} \
&& go run build.go setup \
&& npm config set prefix /usr/local -g \
&& npm install npm@6.x -g \
&& /usr/local/bin/npm install \
&& go run build.go build package \
&& mv ${monasca_grafana_build_path}/dist /grafana_pkgs \
&& rm -rf /grafana
{% if base_package_type == 'rpm' %}
{% set monasca_grafana_packages = ['/grafana_pkgs/grafana*.rpm'] %}
{% elif base_package_type == 'deb' %}
{% set monasca_grafana_packages = ['/grafana_pkgs/grafana*.deb'] %}
{% endif %}
{{ macros.install_packages(monasca_grafana_packages | customizable("packages")) }}
{% endblock %}
{% block monasca_plugins_install %}
RUN grafana-cli plugins install monasca-datasource \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_grafana_sudoers \
&& chmod 755 /usr/local/bin/kolla_extend_start
RUN mkdir -p /var/lib/grafana/plugins/monasca-grafana \
&& curl -o tmp.tgz ${monasca_grafana_app_url} \
&& tar zxvf tmp.tgz -C /var/lib/grafana/plugins/monasca-grafana --strip-components=1 \
&& rm tmp.tgz \
&& npm install -g grunt \
&& cd /var/lib/grafana/plugins/monasca-grafana \
&& npm install \
&& grunt
{% endblock %}
{% block monasca_grafana_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER monasca

8
docker/monasca/monasca-grafana/extend_start.sh

@ -1,8 +0,0 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/monasca" ]]; then
mkdir -p /var/log/kolla/monasca
fi
if [[ $(stat -c %a /var/log/kolla/monasca) != "755" ]]; then
chmod 755 /var/log/kolla/monasca
fi

1
docker/monasca/monasca-grafana/grafana_sudoers

@ -1 +0,0 @@
%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R monasca\: /var/lib/grafana/, /bin/chown -R monasca\: /var/lib/grafana/

2
kolla/image/build.py

@ -81,7 +81,6 @@ LOG = utils.make_a_logger()
UNBUILDABLE_IMAGES = {
'aarch64': {
"bifrost-base", # someone need to get upstream working first
"monasca-grafana", # no phantomJS on aarch64
"prometheus-mtail", # no aarch64 binary
"skydive-base", # no aarch64 binary
},
@ -131,7 +130,6 @@ UNBUILDABLE_IMAGES = {
'debian': {
"bifrost-base", # tries to install 'mysql-server' which is not in
# Debian 'buster'
"monasca-grafana", # FIXME(hrw): some ssl issues to fix
"ovn-base", # needs more checking
"qdrouterd",
},

5
releasenotes/notes/deprecate-monasca-grafana-d05af2e96cffd82c.yaml

@ -1,5 +0,0 @@
---
deprecations:
- |
The ``monasca-grafana`` image is deprecated and will be removed in the Xena cycle.
Image was using several deprecated components and does not build anymore.

7
releasenotes/notes/drop-monasca-grafana-df2c45d6826752f6.yaml

@ -0,0 +1,7 @@
---
upgrade:
- |
The ``monasca-grafana`` image has been dropped because it was using several
deprecated components and was not buildable.
Support for ``Monasca`` datasource was added into standard ``grafana``
instead.
Loading…
Cancel
Save