-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use service profiles to specify drunc-lite use case #147
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e5f711e
Use service profiles to specify drunc-lite use case
TinyMarsh 8936955
Recreate requirements.txt and amend paths
TinyMarsh 17edca7
Add line to pre-commit workflow to fix failure.
TinyMarsh d09c189
Merge remote-tracking branch 'origin/full-drunc-image' into drunc-ima…
TinyMarsh f133036
Get profiles working
cc-a a53b48c
Refactor docker images
cc-a 8ecf86a
Add entry point and scripts to make drunc image easier to work with
cc-a 6bfd64f
Update readme with details of docker compose profiles
cc-a File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that
--profile
is now required, or does it somehow default to one or the other?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The former. It's necessary for both
drunc
anddrunc-lite
services. I couldn't find an elegant way to default to one or the other in the absence of--profile
.