-
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.
Merge pull request #147 from ImperialCollegeLondon/drunc-image-profiles
Use service profiles to specify drunc-lite use case
- Loading branch information
Showing
9 changed files
with
132 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
!drunc_ui | ||
!db | ||
db/* | ||
!drunc_docker_service_lite/requirements.txt | ||
!drunc_docker_service/process-manager-kafka.json |
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
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 |
---|---|---|
|
@@ -7,7 +7,9 @@ SHELL ["/bin/bash", "-c"] | |
|
||
WORKDIR /basedir | ||
|
||
# for frozen release | ||
# setup for the the dune development environment that provides the full set of | ||
# dependencies required for booting of the controller test session | ||
# See https://github.com/DUNE-DAQ/drunc/wiki/Setup-drunc-with-DUNE-DAQ for explanation | ||
RUN source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh && \ | ||
setup_dbt latest_v5 && \ | ||
dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9 && \ | ||
|
@@ -18,18 +20,18 @@ RUN source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh && \ | |
pip install git+https://github.com/DUNE-DAQ/[email protected] | ||
WORKDIR /basedir/fddaq-v5.1.0-a9/ | ||
|
||
COPY process-manager-no-kafka.json process-manager-kafka.json data/ | ||
COPY process-manager-kafka.json / | ||
|
||
RUN mkdir -p /root/.ssh && \ | ||
ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N "" && \ | ||
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys | ||
|
||
RUN echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config && \ | ||
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \ | ||
echo "UserKnownHostsFile /dev/null" >> /etc/ssh/ssh_config && \ | ||
ssh-keygen -A | ||
# setup ssh server config and keys | ||
ADD ssh-setup.sh / | ||
RUN bash /ssh-setup.sh | ||
|
||
RUN mkdir -p /usr/src/app | ||
ENTRYPOINT [] | ||
ADD entrypoint.sh / | ||
RUN chmod a+x /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
ADD wibeth_output_all_zeros.bin /cvmfs/dunedaq.opensciencegrid.org/assets/files/d/d/1/wibeth_output_all_zeros.bin | ||
|
||
ADD boot_test_session.sh / | ||
RUN chmod a+x /boot_test_session.sh |
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,16 @@ | ||
FROM python:3.11-slim-bookworm | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends git ssh openssh-server \ | ||
&& rm -fr /var/lib/apt/lists/* | ||
|
||
COPY lite_requirements.txt /requirements.txt | ||
RUN pip install --no-cache-dir -r /requirements.txt | ||
|
||
COPY process-manager-kafka.json / | ||
|
||
# setup ssh server config and keys | ||
ADD ssh-setup.sh / | ||
RUN bash /ssh-setup.sh | ||
|
||
RUN mkdir -p /usr/src/app |
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,7 @@ | ||
#!/bin/bash | ||
|
||
# setup dunedaq environment | ||
. /basedir/fddaq-v5.1.0-a9/env.sh | ||
|
||
# boot full test session | ||
drunc-process-manager-shell grpc://localhost:10054 boot test/config/test-session.data.xml test-session |
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,6 @@ | ||
#!/bin/bash | ||
|
||
# setup dunedaq environment | ||
. /basedir/fddaq-v5.1.0-a9/env.sh | ||
|
||
exec "$@" |
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,2 @@ | ||
git+https://github.com/DUNE-DAQ/[email protected] | ||
git+https://github.com/DUNE-DAQ/[email protected] |
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,16 @@ | ||
# Setup the ssh server configuration and keys | ||
|
||
set -e | ||
|
||
# create an ssh key for the root user | ||
mkdir -p /root/.ssh | ||
ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N "" | ||
|
||
# allow the key to be used to authenticate ssh connections | ||
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys | ||
|
||
# configure the ssh server to allow the root user to login only with an ssh key | ||
echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config | ||
|
||
# generate a unique host key | ||
ssh-keygen -A |