-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
ARG cycle | ||
ARG hub | ||
|
||
FROM ${hub}/deploy-env:${cycle} | ||
|
||
LABEL maintainer Tiago Ribeiro <[email protected]> | ||
|
||
USER root | ||
|
||
RUN dnf install -y dnf-plugins-core epel-release && \ | ||
dnf config-manager --set-enabled powertools && \ | ||
dnf -y --enablerepo=extras install make \ | ||
gcc-toolset-11 \ | ||
git \ | ||
catch-devel \ | ||
boost1.78 \ | ||
boost1.78-devel \ | ||
readline-devel \ | ||
snappy-devel \ | ||
spdlog-devel \ | ||
jansson \ | ||
iproute \ | ||
yaml-cpp-devel && \ | ||
dnf clean all | ||
|
||
RUN ln -s /usr/lib64/libboost_filesystem.so.1.78.0 /usr/lib64/libboost_filesystem.so && \ | ||
ln -s /usr/lib64/libboost_iostreams.so.1.78.0 /usr/lib64/libboost_iostreams.so && \ | ||
ln -s /usr/lib64/libboost_program_options.so.1.78.0 /usr/lib64/libboost_program_options.so && \ | ||
ln -s /usr/lib64/libboost_system.so.1.78.0 /usr/lib64/libboost_system.so && \ | ||
ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl.so && \ | ||
ln -s /usr/lib64/libjansson.so.4 /usr/lib64/libjansson.so | ||
|
||
ARG rpm | ||
|
||
RUN dnf install -y \ | ||
--enablerepo=lsst-ts-test \ | ||
--disablerepo=lsst-ts \ | ||
MTM1M3TS-22.1.1-10.0.0.el8 | ||
|
||
ENV LSST_SDK_INSTALL=/opt/lsst/ts_sal/ | ||
ENV SAL_WORK_DIR=/opt/lsst/ts_sal/ | ||
ENV LSST_SAL_PREFIX=/opt/lsst/ts_sal/ | ||
|
||
USER saluser | ||
WORKDIR /home/saluser/ | ||
|
||
ARG m1m3ts | ||
ARG crio_cpp | ||
ARG config | ||
|
||
RUN git clone https://github.com/lsst-ts/ts_m1m3thermal && \ | ||
git clone https://github.com/lsst-ts/ts_cRIOcpp && \ | ||
git clone https://github.com/lsst-ts/ts_config_mttcs.git | ||
|
||
WORKDIR /home/saluser/ts_config_mttcs | ||
|
||
RUN /home/saluser/.checkout_repo.sh ${config} | ||
|
||
WORKDIR /home/saluser/ts_cRIOcpp/ | ||
|
||
RUN /home/saluser/.checkout_repo.sh ${crio_cpp} && \ | ||
source /home/saluser/.setup_sal_env.sh && \ | ||
source scl_source enable gcc-toolset-11 && \ | ||
sed -i 's/boost169/boost1.78/' Makefile.inc && \ | ||
make | ||
|
||
ENV WITH_SAL_KAFKA=1 | ||
|
||
WORKDIR /home/saluser/ts_m1m3thermal/ | ||
|
||
RUN /home/saluser/.checkout_repo.sh ${m1m3ts} && \ | ||
source /home/saluser/.setup_sal_env.sh && \ | ||
source scl_source enable gcc-toolset-11 && \ | ||
make simulator | ||
|
||
WORKDIR /home/saluser/ | ||
|
||
COPY mtm1m3ts_sim/startup.sh /home/saluser/.startup.sh | ||
COPY mtm1m3ts_sim/sal_setup.sh /home/saluser/.sal_setup.sh | ||
COPY mtm1m3ts_sim/create_topics_mtm1m3ts.py /home/saluser/.create_topics_mtm1m3ts.py | ||
USER root | ||
RUN chown saluser:saluser /home/saluser/.startup.sh && \ | ||
chown saluser:saluser /home/saluser/.create_topics_mtm1m3ts.py && \ | ||
chmod a+x /home/saluser/.create_topics_mtm1m3ts.py && \ | ||
chmod a+x /home/saluser/.startup.sh | ||
USER saluser | ||
|
||
ENV RUN_ARG="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import asyncio | ||
from lsst.ts import salobj | ||
|
||
|
||
async def main(): | ||
async with salobj.Controller("MTM1M3TS"): | ||
await asyncio.sleep(1) | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.run(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Configuration file to setup SAL environment. Default config assumes | ||
# ts_opensplice is available in the same directory as ts_sal. You don't need to | ||
# edit this file for the default config described in README.md. | ||
# | ||
# If needed, please change the LSST_SDK_INSTALL and OSPL_HOME to the actual | ||
# locations before running the script. | ||
|
||
BS_DIRNAME=$(dirname $BASH_SOURCE) | ||
if [ $BS_DIRNAME = "." ]; then | ||
export LSST_SDK_INSTALL=${LSST_SDK_INSTALL:=$(pwd)} | ||
else | ||
export LSST_SDK_INSTALL=${LSST_SDK_INSTALL:=$(pwd)/${BS_DIRNAME}} | ||
fi | ||
|
||
|
||
echo "LSST_SDK_INSTALL $LSST_SDK_INSTALL" | ||
|
||
export SAL_HOME=$LSST_SDK_INSTALL/lsstsal | ||
export SAL_WORK_DIR=$LSST_SDK_INSTALL/test | ||
|
||
export SAL_CPPFLAGS=-m64 | ||
source $SAL_HOME/salenv.sh | ||
|
||
if [ -z "$JAVA_HOME" ]; then | ||
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ | ||
fi | ||
|
||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SAL_HOME}/lib | ||
export PATH=$JAVA_HOME/bin:${LSST_SDK_INSTALL}/bin:${PATH} | ||
|
||
export SAL_IDL_DIR=${SAL_WORK_DIR}/idl-templates/validated/sal | ||
|
||
export LSST_KAFKA_IP=`ip route get 1 | awk '{print $7;exit}'` | ||
export LSST_KAFKA_SCHEMA_REGISTRY=${LSST_SCHEMA_REGISTRY_URL} | ||
export LSST_KAFKA_HOST=${LSST_KAFKA_BROKER_ADDR%:*} | ||
export LSST_KAFKA_BROKER_PORT=${LSST_KAFKA_BROKER_ADDR##*:} | ||
export LSST_KAFKA_LOCAL_SCHEMAS=${LSST_SDK_INSTALL} | ||
export LSST_KAFKA_PREFIX=${LSST_TOPIC_SUBNAME} | ||
export LSST_KAFKA_SECURITY_PROTOCOL=SASL_PLAINTEXT | ||
export LSST_KAFKA_SECURITY_MECHANISM=SCRAM-SHA-512 | ||
export OSPL_RELEASE=0.0.0 | ||
|
||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SAL_WORK_DIR}/lib:${LSST_SDK_INSTALL}/lib:/opt/lsst/ts_sal/lib | ||
export TS_SAL_DIR=$LSST_SDK_INSTALL | ||
export TS_XML_DIR=$LSST_SDK_INSTALL/../ts_xml | ||
export AVRO_RELEASE=`$SAL_DIR/avro_release.tcl` | ||
export AVRO_HOME=$SAL_HOME/lib | ||
export AVRO_INCL=$SAL_HOME/include/avro | ||
export AVRO_PREFIX=lsst.sal | ||
export AVRO_CLASSPATH=lsst/sal | ||
|
||
mkdir -p $LSST_SDK_INSTALL/lsstsal/lib | ||
pushd $LSST_SDK_INSTALL | ||
sal_version=`git describe --tags --dirty` | ||
popd | ||
export SAL_VERSION=$sal_version | ||
echo "LSST middleware toolset environment "$sal_version" (Kafka) is configured." | ||
echo "LSST_SDK_INSTALL=$LSST_SDK_INSTALL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/bash | ||
|
||
source ${HOME}/.setup_sal_env.sh | ||
source ${HOME}/.sal_setup.sh | ||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/lsst/ts_sal/lib/ | ||
|
||
python ${HOME}/.create_topics_mtm1m3ts.py | ||
|
||
/home/saluser/ts_m1m3thermal/ts-M1M3thermald ${RUN_ARG} -c /home/saluser/ts_m1m3thermal/SettingFiles & | ||
|
||
pid="$!" | ||
|
||
wait ${pid} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters