nokia / OSSMediator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support running in Docker

33Fraise33 opened this issue · comments

Hello,

Please allow the mediator, opennmsplugin and elasticsearchplugin to be run in a docker container. The current dockerfiles only support running the build an tests but not running the binary.

It is easier to deploy a new version as you can replace the container and keep the mounted volume at /OSSMediatorCollector/resources/.

If possible make the image run on alpine so the image size stays small.

An example use is the following ansible snippet ( I started working on this as I realized the image is not for running the binary)

- name: Get Nokia git repo
  git:
    repo: 'https://github.com/nokia/OSSMediator'
    dest: "{{ oss_tools_location }}/git"
    version: "{{ oss_mediator_version }}"

- name: build ossmediator image
  docker_image:
    name: ossmediator
    tag: "{{ oss_mediator_version }}"
    build:
      path: "{{ oss_tools_location }}/git/OSSMediatorCollector"
    source: build

- name: tag image as latest
  docker_image:
    name: ossmediator:{{ oss_mediator_version }}
    repository: ossmediator:latest
    force_tag: yes
    source: local

- name: setup ossmediator docker container
  docker_container:
    name: ossmediator
    image: ossmediator:latest
    volumes:
      - "{{ oss_mediator_location }}/resources:/OSSMediatorCollector/resources"
    restart: yes
    restart_policy: always
    state: started
    pull: true

We'll take this as enhancement request and push with our next release.

Hello @soursing any update to this ticket?

Hello,

Any update to this?

Hi @33Fraise33,
We are working on it, we'll release it with 3.7 version.
You can track #31 for the updates.

OSSMediator now supports running in docker from 3.7 version.
Please follow https://github.com/nokia/OSSMediator/blob/master/MediatorSetup/README.md#docker_install instructions.