Hirlam / obsmon

Tool for observation monitoring in the Harmonie-Arome NWP system
https://hirlam.github.io/obsmon/
MIT License
3 stars 8 forks source link

channel selection missing #30

Closed khintz closed 1 year ago

khintz commented 1 year ago

We have been dealing figuring out why we cant select channels when using observation type satem. To test I built a container.

To make the installation succeed I had to update the class package from 7.3-20 to 7.3-22. See diff here @ewhelan found the following info:

The install.packages() function will ignore your version argument, so you'll get the latest version, 7.3-22. 
Version 7.3-20 is not compatible with R 4.3.x, because the Sint and related definitions have been dropped.
So if you want to install 7.3-20, you'll need to use an older version of R.

I made a containerfile to make an image to use with podman (attached at the end of this issue). Be aware that I tried two different ways to run obsmon:

  1. As standalone running the obsmon script: CMD ["obsmon/obsmon"]
  2. Through a shiny-server: CMD ["/usr/bin/shiny-server"]

With option 1, we are able to select channels. With option 2 we are not (no channels show up). Our temporary solution, however not ideal, will be to run without the shiny server and force the container to restart if it fails.

Any good guess why this happens?

Recipe for creating and running the image:

podman build -t obsmon -f rocky_obsmon.Containerfile
podman run -d  -v /obsmondata/:/obsmondata/ --net=host --name obsmon localhost/obsmon:latest
FROM rockylinux:8.8

RUN dnf -y install epel-release
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
RUN yum -y config-manager --set-enabled powertools
RUN yum -y install R
RUN yum -y install \
    gcc \
    make \
    cmake \
    gcc-c++ \
    wget \
    cairo-devel \
    libXt-devel \
    libcurl-devel \
    openssl-devel \
    libxml2-devel \
    mariadb-devel \
    postgresql-devel \
    libkml \
    libkml-devel \
    proj \
    proj-devel \
    libgeotiff \
    ogdi \
    udunits2 \
    udunits2-devel \
    gdal \
    gdal-devel \
    git \
    diffutils \
    sqlite-devel \
    libcurl-minimal \
    geos \
    geos-devel \
    bison \
    flex \
    binutils \
    autoconf \
    automake \
    zlib \
    zlib-devel \
    bzip2 \
    bzip2-devel \
    xz \
    xz-devel \
    pcre \
    pcre-devel \
    libcurl-minimal \
    harfbuzz-devel \
    fribidi-devel \
    freetype-devel \
    libpng-devel \
    libtiff-devel \
    libjpeg-turbo-devel \
    gcc-gfortran \
    nodejs

RUN git clone -b feature/rocky8 https://github.com/khintz/obsmon.git

RUN cd obsmon && ./install --live-view-install-log

COPY config.toml obsmon/config.toml

RUN wget https://download3.rstudio.org/centos7/x86_64/shiny-server-1.5.20.1002-x86_64.rpm
RUN yum -y install --nogpgcheck shiny-server-1.5.20.1002-x86_64.rpm

COPY shiny-server.conf /etc/shiny-server/shiny-server.conf

#EXPOSE 5391
EXPOSE 3838

RUN groupadd svc_obsmon
RUN useradd -ms /bin/bash svc_obsmon -g svc_obsmon

RUN chown svc_obsmon:svc_obsmon /var/lib/shiny-server

USER svc_obsmon

#CMD ["obsmon/obsmon"]
CMD ["/usr/bin/shiny-server"]
khintz commented 1 year ago

Channels are there apparently. Just not possible to select them when running through a shiny-server.

Screenshot 2023-06-30 at 11 57 54

khintz commented 1 year ago

It seems one of the missing pieces was the package pmisc. Installing that made both channel selection work and made the app more stable. The image we ended up using was the following (still updating the class package from 7.3-20 to 7.3-22):

FROM rockylinux:8.8

RUN dnf -y install epel-release

RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

RUN yum -y config-manager --set-enabled powertools

RUN yum -y install R

RUN yum -y install \
    gcc \
    make \
    cmake \
    gcc-c++ \
    wget \
    cairo-devel \
    libXt-devel \
    libcurl-devel \
    openssl-devel \
    libxml2-devel \
    mariadb-devel \
    postgresql-devel \
    libkml \
    libkml-devel \
    proj \
    proj-devel \
    libgeotiff \
    ogdi \
    udunits2 \
    udunits2-devel \
    gdal \
    gdal-devel \
    git \
    diffutils \
    sqlite-devel \
    libcurl-minimal \
    geos \
    geos-devel \
    bison \
    flex \
    binutils \
    autoconf \
    automake \
    zlib \
    zlib-devel \
    bzip2 \
    bzip2-devel \
    xz \
    xz-devel \
    pcre \
    pcre-devel \
    libcurl-minimal \
    harfbuzz-devel \
    fribidi-devel \
    freetype-devel \
    libpng-devel \
    libtiff-devel \
    libjpeg-turbo-devel \
    gcc-gfortran \
    nodejs \
    libgit2 \
    libgit2-devel \
    psmisc

RUN git clone -b feature/rocky8 https://github.com/khintz/obsmon.git

RUN cd obsmon && ./install --live-view-install-log

RUN wget https://download3.rstudio.org/centos7/x86_64/shiny-server-1.5.20.1002-x86_64.rpm
RUN yum -y install --nogpgcheck shiny-server-1.5.20.1002-x86_64.rpm

COPY config.toml obsmon/config.toml
COPY shiny-server.conf /etc/shiny-server/shiny-server.conf

RUN chown shiny:shiny /var/lib/shiny-server
RUN chown shiny:shiny /obsmon/

USER shiny

RUN mkdir -p /home/shiny/rcache/

EXPOSE 3838

CMD ["/usr/bin/shiny-server"]