-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
73 switching ion to dtnma tools (#79)
* switching to dtnma-tools * updating .gitmodules * updating to DTNMA-tools * updating Dockerfile * fixes for sql update * latest attempt for Dockerbuild * Fixing ION runtime libdir * updating to latest commit of MATOOLS * added missing packages * getting postgres db working adding missing libs * updated submod for ion * updated to src --------- Co-authored-by: d-linko <[email protected]> Co-authored-by: Brian Sipos <[email protected]>
- Loading branch information
1 parent
b97186b
commit e0d816a
Showing
6 changed files
with
74 additions
and
32 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 |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
## Copyright (c) 2023 The Johns Hopkins University Applied Physics | ||
## Laboratory LLC. | ||
## | ||
## This file is part of the Asynchronous Network Management System (ANMS). | ||
## This file is part of the Delay-Tolerant Networking Management | ||
## Architecture (DTNMA) Tools package. | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); | ||
## you may not use this file except in compliance with the License. | ||
|
@@ -14,36 +15,68 @@ | |
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
## | ||
## This work was performed for the Jet Propulsion Laboratory, California | ||
## Institute of Technology, sponsored by the United States Government under | ||
## the prime contract 80NM0018D0004 between the Caltech and NASA under | ||
## subcontract 1658085. | ||
## | ||
|
||
FROM anms-init AS ion-base | ||
|
||
# Dependencies for NM Mgr tests/dotest | ||
RUN dnf -y install \ | ||
patch autoconf libtool make gcc gcc-c++ libpq-devel \ | ||
perl-CPAN \ | ||
gdb less && \ | ||
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | ||
RUN dnf install -y \ | ||
autoconf libtool \ | ||
cmake ninja-build \ | ||
ruby rsync git \ | ||
systemd systemd-sysv \ | ||
patch autoconf libtool \ | ||
make gcc gcc-c++ libpq-devel \ | ||
civetweb-devel cjson-devel\ | ||
perl-CPAN \ | ||
gdb less && \ | ||
dnf clean all && rm -rf /var/cache/yum && \ | ||
PERL_MM_USE_DEFAULT=1 cpan -T JSON REST::Client Expect File::Slurp | ||
|
||
# Build from added source | ||
COPY src *.patch /usr/src/ion-ios/ | ||
RUN cd /usr/src/ion-ios && \ | ||
patch -p1 <ion-4.1.1-anms-db.patch && \ | ||
patch -p1 <ion-4.1.2-local-deliver.patch && \ | ||
patch -p1 <ion-4.1.1-amp-filestructure.patch && \ | ||
patch -p1 <dtnma-tools-nm_rest.patch && \ | ||
COPY src/deps/ion /usr/src/nm/deps/ion | ||
COPY src/deps/ion*.patch /usr/src/nm/deps/ | ||
RUN cd /usr/src/nm/deps/ion && \ | ||
patch -p1 <../ion-4.1.2-remove-nm.patch && \ | ||
patch -p1 <../ion-4.1.2-local-deliver.patch && \ | ||
patch -p1 <../ion-4.1.2-private-headers.patch && \ | ||
autoreconf -vif && \ | ||
./configure --with-postgresql --enable-nmrest && \ | ||
./configure \ | ||
--prefix=/usr/local --libdir=/usr/local/lib64 && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
echo /usr/local/lib64 > /etc/ld.so.conf.d/local.conf && \ | ||
ldconfig | ||
|
||
COPY src/deps/QCBOR /usr/src/nm/deps/QCBOR | ||
COPY src/deps/qcbor*.patch /usr/src/nm/deps/ | ||
RUN cd /usr/src/nm/deps/QCBOR && \ | ||
patch -p1 <../qcbor-install.patch && \ | ||
patch -p2 <../qcbor-expose-private.patch && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
ldconfig && \ | ||
rm -rf /usr/src/ion-ios | ||
make -j$(nproc) clean | ||
|
||
COPY src/deps/mlib /usr/src/nm/deps/mlib | ||
RUN cd /usr/src/nm/deps/mlib && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
make -j$(nproc) clean | ||
|
||
|
||
|
||
# Agent to test | ||
COPY src/deps /usr/src/nm/deps | ||
COPY src/cmake /usr/src/nm/cmake | ||
COPY src/src /usr/src/nm/src | ||
COPY src/test /usr/src/nm/test | ||
COPY src/CMakeLists.txt /usr/src/nm/ | ||
RUN ls -lt /usr/src/nm/ | ||
RUN cd /usr/src/nm && \ | ||
cmake -S . -B build/default \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-G Ninja && \ | ||
cmake --build build/default && \ | ||
cmake --install build/default | ||
|
||
# Helper utilities | ||
RUN dnf -y install \ | ||
python3 python3-pip \ | ||
gcc python3-devel systemd-devel && \ | ||
|
@@ -54,7 +87,7 @@ COPY --chmod=755 utils/service_is_running.sh /usr/local/bin/service_is_running | |
COPY --chmod=755 utils/ion_restart_ducts.sh /usr/local/bin/ion_restart_ducts | ||
COPY --chmod=755 utils/ion_ping_peers.sh /usr/local/bin/ion_ping_peers | ||
|
||
# Service configuration | ||
# Systemd services | ||
COPY tmpfiles.conf /etc/tmpfiles.d/ion.conf | ||
COPY --chmod=644 systemd/ion.service systemd/ion-stats.service systemd/[email protected] /usr/local/lib/systemd/system/ | ||
COPY --chmod=644 systemd/ion-stats.timer /usr/local/lib/systemd/system/ | ||
|
@@ -64,7 +97,8 @@ FROM ion-base AS ion-manager | |
COPY configs/simple-2-node/mgr.rc /etc/ion.rc | ||
|
||
COPY --chmod=644 systemd/ion-nm-mgr.service systemd/ion-nm-agent.service /usr/local/lib/systemd/system/ | ||
RUN systemctl enable ion-nm-mgr ion-nm-agent | ||
RUN systemctl enable ion-nm-mgr ion-nm-agent && \ | ||
mkdir -p /var/run/ion | ||
|
||
HEALTHCHECK --start-period=10s --interval=30s --timeout=5s --retries=5 \ | ||
CMD ["service_is_running", "ion", "ion-nm-mgr"] | ||
|
@@ -74,7 +108,8 @@ FROM ion-base AS ion-agent | |
COPY configs/simple-2-node/agent.rc.in /etc/ion.rc | ||
|
||
COPY --chmod=644 systemd/ion-nm-agent.service /usr/local/lib/systemd/system/ | ||
RUN systemctl enable ion-nm-agent | ||
RUN systemctl enable ion-nm-agent && \ | ||
mkdir -p /var/run/ion | ||
|
||
HEALTHCHECK --start-period=10s --interval=30s --timeout=5s --retries=5 \ | ||
CMD ["service_is_running", "ion", "ion-nm-agent"] | ||
CMD ["service_is_running", "ion", "ion-nm-agent"] |
Submodule src
updated
from be66a1 to 416130
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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
[Unit] | ||
Description=ION NM Agent | ||
After=network-online.target ion.service ion-nm-mgr.service | ||
Wants=network-online.target | ||
Wants=network-online.target ion-nm-mgr.service | ||
Requires=ion.service | ||
|
||
[Service] | ||
Type=notify | ||
PassEnvironment=ION_NODE_NUM MGR_NODE_NUM | ||
EnvironmentFile=-/etc/ion/environment | ||
ExecStart=ion_nm_wrap --listen /var/run/nm_agent.socket -- \ | ||
nm_agent ipn:${ION_NODE_NUM}.6 ipn:${MGR_NODE_NUM}.7 | ||
ion_nm_agent ipn:${ION_NODE_NUM}.6 ipn:${MGR_NODE_NUM}.7 | ||
# workaround for OSAL blocking SIGTERM | ||
KillSignal=SIGINT | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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