Skip to content
Snippets Groups Projects
Commit 36dba6c7 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-429: create ConfManager and EvSubscriber with Timescale backend

parent 1f69f951
No related branches found
No related tags found
1 merge request!177Resolve L2SS-429 "Timescaledb container"
......@@ -16,3 +16,44 @@ services:
- POSTGRES_PASSWORD=password
- TANGO_HOST=${TANGO_HOST}
restart: unless-stopped
hdbppts-cm:
image: hdbppts-cm
build:
context: ../docker/tango/tango-archiver-ts
networks:
- control
container_name: hdbppts-cm
depends_on:
- databaseds
- dsconfig
- archiver-timescale
environment:
- TANGO_HOST=${TANGO_HOST}
- HdbManager=archiving/hdbppts/confmanager01
command: >
/bin/bash -c "
wait-for-it.sh archiver-timescale:5432 --timeout=30 --strict --
wait-for-it.sh ${TANGO_HOST} --timeout=30 --strict --
hdbppcm-srv 02"
hdbppts-es:
image: hdbppts-es
build:
context: ../docker/tango/tango-archiver-ts
networks:
- control
container_name: hdbppts-es
depends_on:
- databaseds
- dsconfig
- archiver-timescale
environment:
- TANGO_HOST=${TANGO_HOST}
- HdbManager=archiving/hdbppts/confmanager01
command: >
/bin/bash -c "
wait-for-it.sh archiver-timescale:5432 --timeout=30 --strict --
wait-for-it.sh ${TANGO_HOST} --timeout=30 --strict --
hdbppes-srv 02"
restart: unless-stopped
#ARG DOCKER_REGISTRY_USER
#ARG DOCKER_REGISTRY_HOST
#FROM ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-cpp:latest
FROM artefact.skao.int/ska-tango-images-tango-cpp:9.3.9
USER root
RUN apt-get update && \
apt-get install -y ca-certificates
RUN echo "deb http://deb.debian.org/debian buster-backports main contrib non-free" >> /etc/apt/sources.list && \
more /etc/apt/sources.list && \
apt-get update && \
apt-get install -y \
checkinstall \
git \
cmake \
make \
g++ \
libomniorb4-dev \
libzmq3-dev \
libcos4-dev \
mariadb-server \
libmariadb-dev-compat libmariadb-dev \
libmariadbclient-dev \
postgresql \
postgresql-contrib \
libpq5 \
libpqxx-6.2 \
libpq-dev \
libpqxx-dev
#RUN git clone -b master https://github.com/tango-controls-hdbpp/libhdbpp.git
RUN git clone -b master https://github.com/Diego91RA/libhdbpp.git
RUN cd libhdbpp \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_INCLUDE_PATH=/usr/local/include/tango \
&& make -j4
RUN cd libhdbpp/build \
&& checkinstall \
--install=yes \
--fstrans=no \
--showinstall=no \
--backup=no \
--type=debian \
--pkgsource="https://github.com/tango-controls-hdbpp/libhdbpp" \
--pkglicense="LGPLv3" \
--deldesc=no \
--nodoc \
--strip \
--stripso \
--maintainer="tango" \
--pkgarch=$(dpkg --print-architecture) \
--pkgversion="2.0.0" \
--pkgrelease="SNAPSHOT" \
--pkgname="libhdbpp" \
--requires="libzmq5,libomniorb4-2,libcos4-2,libomnithread4" \
make install
#RUN git clone -b master --recurse-submodules https://github.com/tango-controls-hdbpp/libhdbpp-timescale.git
RUN git clone -b master --recurse-submodules https://github.com/Diego91RA/libhdbpp-timescale.git
RUN cd libhdbpp-timescale \
&& mkdir -p build \
&& cd build \
&& cmake .. -DCMAKE_PREFIX_PATH=/usr/local/include/tango -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/local/include/postgresql \
&& make -j4
RUN cd libhdbpp-timescale/build \
&& checkinstall \
--install=yes \
--fstrans=no \
--showinstall=no \
--backup=no \
--type=debian \
--pkgsource="https://github.com/tango-controls-hdbpp/libhdbpp-timescale" \
--pkglicense="LGPLv3" \
--deldesc=no \
--nodoc \
--strip \
--stripso \
--maintainer="tango" \
--pkgarch=$(dpkg --print-architecture) \
--pkgversion="2.0.0" \
--pkgrelease="SNAPSHOT" \
--pkgname="libhdbpp-timescale" \
--requires="libpq5" \
make install
#RUN git clone -b master https://github.com/tango-controls-hdbpp/hdbpp-cm.git
RUN git clone -b master https://github.com/Diego91RA/hdbpp-cm.git
RUN cd hdbpp-cm \
&& mkdir -p build \
&& cd build \
&& cmake .. -DCMAKE_PREFIX_PATH=/usr/local/include/tango \
&& make -j4
RUN cd hdbpp-cm/build \
&& checkinstall \
--install=yes \
--fstrans=no \
--showinstall=no \
--backup=no \
--type=debian \
--pkgsource="https://github.com/tango-controls-hdbpp/hdbpp-cm" \
--pkglicense="GPLv3" \
--deldesc=no \
--nodoc \
--strip \
--stripso \
--maintainer="tango" \
--pkgarch=$(dpkg --print-architecture) \
--pkgversion="2.0.0" \
--pkgrelease="SNAPSHOT" \
--pkgname="hdbpp-cm" \
--requires="libzmq5,libomniorb4-2,libcos4-2,libomnithread4" \
make install
#RUN git clone -b master https://github.com/tango-controls-hdbpp/hdbpp-es.git
RUN git clone -b master https://github.com/Diego91RA/hdbpp-es.git
RUN cd hdbpp-es \
&& mkdir -p build \
&& cd build \
&& cmake .. -DCMAKE_PREFIX_PATH=/usr/local/include/tango -DFETCH_LIBHDBPP=OFF -DLIBHDBPP_BACKEND=timescale -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/local/include/postgresql \
&& make -j4
RUN cd hdbpp-es/build \
&& checkinstall \
--install=yes \
--fstrans=no \
--showinstall=no \
--backup=no \
--type=debian \
--pkgsource="https://github.com/tango-controls-hdbpp/hdbpp-es" \
--pkglicense="GPLv3" \
--deldesc=no \
--nodoc \
--strip \
--stripso \
--maintainer="tango" \
--pkgarch=$(dpkg --print-architecture) \
--pkgversion="2.0.0" \
--pkgrelease="SNAPSHOT" \
--pkgname="hdbpp-es" \
--requires="libzmq5,libomniorb4-2,libcos4-2,libomnithread4" \
make install
RUN apt-get update && \
apt-get install -y \
build-essential && \
apt-get clean
RUN dpkg -i /libhdbpp/build/libhdbpp_2.0.0-SNAPSHOT_amd64.deb
RUN dpkg -i /libhdbpp-timescale/build/libhdbpp-timescale_2.0.0-SNAPSHOT_amd64.deb
RUN dpkg -i /hdbpp-cm/build/hdbpp-cm_2.0.0-SNAPSHOT_amd64.deb
RUN dpkg -i /hdbpp-es/build/hdbpp-es_2.0.0-SNAPSHOT_amd64.deb
RUN ldconfig
RUN mv /usr/local/bin/hdb++cm-srv /usr/local/bin/hdbppcm-srv
RUN mv /usr/local/bin/hdb++es-srv /usr/local/bin/hdbppes-srv
......@@ -13,6 +13,19 @@
}
}
}
},
"02": {
"HdbEventSubscriber": {
"archiving/hdbppts/eventsubscriber01": {
"attribute_properties": {},
"properties": {
"CheckPeriodicTimeoutDelay": ["5"],
"PollingThreadPeriod": ["3"],
"LibConfiguration": ["connect_string= user=postgres password=password host=archiver-timescale port=5432 dbname=hdb","host=archiver-timescale","libname=libhdb++timescale.so","dbname=hdb","port=5432", "user=postgres", "password=password"],
"polled_attr": []
}
}
}
}
},
"hdbppcm-srv": {
......@@ -28,6 +41,19 @@
}
}
}
},
"02": {
"HdbConfigurationManager": {
"archiving/hdbppts/confmanager01": {
"attribute_properties": {},
"properties": {
"ArchiverList": ["archiving/hdbppts/eventsubscriber01"],
"MaxSearchSize": ["1000"],
"LibConfiguration": ["connect_string= user=postgres password=password host=archiver-timescale port=5432 dbname=hdb","host=archiver-timescale","libname=libhdb++timescale.so","dbname=hdb","port=5432", "user=postgres", "password=password"],
"polled_attr": []
}
}
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment