Public Repository

Last pushed: a year ago
Short Description
SolarWinds Web Help Desk
Full Description

This is a Dockerized version of WebHelpDesk. This is based on the RHEL rpm installed on a CentOS Latest base and a seperate container for PostGreSQL that runs on alpine.

The primary purpose of the document is to explain the steps involved in deploying WHD Docker image on to Docker store/hub. This could be first step in exploring the feasibility of moving other products (related and non-related) to Containers to cut down the build and deploy time for products that are under maintenance. Please refer Docker Best Practices for creating Docker file.

Pull the docker-compose yaml file from https://github.com/solarwinds/containers/blob/master/whd/docker-compose.yaml
or create a yaml file using the following contents

#YAML file to be run on the Customer Docker instance

version: "2.0"
services:
   db:
     container_name: postgres-whd
     image: postgres:alpine
   whd:
      container_name: whdinstance
      environment:
         EMBEDDED: 'false'
      image: solarwinds/whd
      ports:
      - "8081:8081"
      depends_on:
      - db

Copy the above lines and create an YAML file on the linux server containing docker instance and use the docker-compose up command.

Ideally you would want the Data to be stored outside the Application or postgreSQL container. So that when the container is upgraded or removed, the data still exists on the host. In order to create a seperate mount point for the Data directory, create a Volume to store data on the host

docker volume create --name whd-data-volume

Use the following Docker run command to mount volume when launching the container instance

#YAML file to be run on the Customer Docker instance using external mount

docker-compose.yaml to be run on the Customer Docker Instance using the mount point that stores Data on the host

version: "2.0"

services:
  db:
    container_name: postgres-whd
    image: postgres:alpine
    volumes:
      - whd-data-volume:/var/lib/postgresql/data
  whd:
    container_name: whdinstance
    image: solarwinds/whd
    ports:
      - "8081:8081"
    depends_on:
      - db

volumes:
  whd-data-volume:
    driver: local

volumes:

  • whd-data-volume:/var/lib/postgresql/data

    means we mount /var/lib/postgresql/data on the docker volume named whd-data-volume. This is very important. It's safe to keep database files seperate from postgres Container.

The other option is to create volume outside of docker-compose using docker volume create option and then use the volumes: by adding a external keyword on the docker-compose YAML file

volumes:
  whd-data-volume:
    external: true

Note

However there is one caveat with mounted data volumes. Especially when you upgrade or remove and create Web Help Desk Application Container.
The Web Console prompts you to select "Custom Database". This will be worked out in the future releases though. But you need to configure the Database Connection one more time. Please enter the container instance name "postgres-whd" for Host Name and Leave the port number as 5432. This is just one time configuration setup to connect back to the same Container Volume.

Configure WHD Through Browser:

Web Help Desk is automatically configured to run Embedded PostgreSQL Database that comes with the WebHelpDesk RPM.
PostgreSQL is configured to run on the port 5432 and runs on the seperate container named "postgres-whd".
The port 5423 is exposed internally for the application to talk to the database.

Steps that happens when the container is launched

PostGreSQL gets installed on a seperate container with image named "postgres-whd" and uses port 5432.
WebhelpDesk gets installed on a container with image named solarwinds/whd and exposes port 8081 for external use.
The Database name whd and DB Admin and Users are created automatically from solarwinds/whd container using Container Links(ports).
The WebhelpDesk application is started on the port 8081 and a API call is made to configure WHD Application to use external postgresql DB.

Important

Please allow couple of minutes after you launch the container to Start PostgreSQL and WHD Instance and create System Catalogs to keep the Database ready.

Docker Pull Command
Owner
solarwinds

Comments (0)