Plugin installation in docker container

I’m running opensearch 2.9.0 in a docker swarm environment, running a 3 node cluster.

The cluster itself is running fine and behaving as it should, however i’m wanting to add some visualizations to the list. More in specific : Releases · lguillaud/osd_transform_vis · GitHub and GitHub - fbaligand/kibana-enhanced-table: Kibana visualization like a Data Table, but with enhanced features like computed columns, filter bar, and “Split Cols” bucket

I succeed in installing both the plugins from file (verified with ./bin/opensearch-dashboards-plugin list)

however afterwards the documentation specifies: restart opensearch…

Which is where i run into problems:

  • restarting the entire stack in portainer => no more plugins installed
  • on the host where the dashboard is running restart the docker container => no more plugins installed.

So i’m not sure how to continue, it’s probably something stupid, but still no clue.

Thanks in advance!

Build a customer docker container based on the main opensearch image as such:

ARG osversion
FROM opensearchproject/opensearch:${osversion}

RUN /usr/share/opensearch/bin/opensearch-plugin install --batch repository-s3

Or if you’re on Kubernetes you could do it using init containers, but if the repo is down cluster won’t boot: not the ideal solution.

Not really at home in the entire dockerbuild world :slight_smile:

Using portainer to create the following new image:

FROM opensearchproject/opensearch-dashboards:2.9.0
ENV http_proxy=proxy_url
ENV https_proxy=proxy_url

RUN ./bin/opensearch-dashboards-plugin install
RUN ./bin/opensearch-dashboards-plugin install

That gives me an error code 70 (non-zero code). Plugin installation was unsuccessfull due to error (no valid url specified).:

Attempting to transfer from
Picked up proxy proxy_url from environment variable.
Attempting to transfer from
Plugin installation was unsuccessful due to error "No valid url specified."

something seems wrong with the url, not sure how to resolve that?

Hm, you need the --batch at least and you’re installing a plugin for 1.13 as well.

I’m installing version 1.13 of the enhanced plugin for OSD 2.9.0

When i’m using the --batch command portainer complains about “unknown option --batch”

FROM opensearchproject/opensearch-dashboards:2.9.0
ENV http_proxy=proxy_url
ENV https_proxy=proxy_url

RUN ./bin/opensearch-dashboards-plugin install --batch
RUN ./bin/opensearch-dashboards-plugin install --batch

Ah this is for dashboards, never did install plugins for that sorry :slight_smile:

Please find below an extract of the dockerfile I am using for the plugins you mention:

# Transform viz settings
RUN echo "csp.strict: false" >> /usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
RUN echo "csp.warnLegacyBrowsers: false" >> /usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
RUN echo "csp.rules:" >> /usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
RUN echo "  - \"script-src 'unsafe-eval' 'unsafe-inline' 'self'  http://localhost/ 'self'\"" >> /usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
RUN echo "  - \"worker-src blob: *\"" >> /usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
RUN echo "  - \"child-src data: * blob: *\"" >> /usr/share/opensearch-dashboards/config/opensearch_dashboards.yml

# transform_viz
RUN /usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install$VERSION/transformVis-$

# Enhanced table plugin
RUN cd /tmp && wget$
RUN /usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install file:///tmp/enhanced-table-1.13.3_osd-$

This might require wget, zip and unzip packages in your container.
in that case:

# install required packages to install Kibana & custom plugins
USER root
RUN yum -y update 
RUN yum -y install wget
RUN yum -y install zip
RUN yum -y install unzip
USER opensearch-dashboards

Hope it helps.