From bc0e19d51e46dd6402fb870f6c29bed6fdd60843 Mon Sep 17 00:00:00 2001 From: David Linko Date: Mon, 23 Dec 2024 08:53:40 -0500 Subject: [PATCH] updated ace and adm with new bp-agent (#165) * updated ace and adm with new bp-agent * updated to use dtnma-ace * reverted dependcies name change --------- Co-authored-by: David Linko --- .github/workflows/anms-core.yaml | 4 ++-- .github/workflows/aricodec.yaml | 2 +- .gitlab-ci.yml | 2 +- .gitmodules | 8 ++++---- README.md | 4 ++-- anms-core/Dockerfile | 4 ++-- aricodec/Dockerfile | 2 +- base.Dockerfile | 6 +++--- build.sh | 2 +- deps/anms-ace | 1 - deps/dtnma-ace | 1 + transcoder/Dockerfile | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) delete mode 160000 deps/anms-ace create mode 160000 deps/dtnma-ace diff --git a/.github/workflows/anms-core.yaml b/.github/workflows/anms-core.yaml index 834d504..885f831 100644 --- a/.github/workflows/anms-core.yaml +++ b/.github/workflows/anms-core.yaml @@ -20,7 +20,7 @@ jobs: python-version: "3.10" - name: Install dependencies run: | - pip3 install deps/anms-ace + pip3 install deps/dtnma-ace pip3 install deps/anms-camp - name: Install working-directory: anms-core @@ -42,7 +42,7 @@ jobs: python-version: "3.10" - name: Install dependencies run: | - pip3 install deps/anms-ace + pip3 install deps/dtnma-ace pip3 install deps/anms-camp - name: Install flake8 working-directory: anms-core diff --git a/.github/workflows/aricodec.yaml b/.github/workflows/aricodec.yaml index 64498c5..b916f84 100644 --- a/.github/workflows/aricodec.yaml +++ b/.github/workflows/aricodec.yaml @@ -20,7 +20,7 @@ jobs: python-version: "3.10" - name: Install dependencies run: | - pip3 install deps/anms-ace + pip3 install deps/dtnma-ace - name: Install flake8 working-directory: aricodec run: pip3 install -e '.[flake8]' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7369412..16814d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -172,7 +172,7 @@ anms-core_unit-test: before_script: - *prep-install-ca - *prep-install-python - - pip3 wheel deps/anms-ace -w ${PY_WHEEL_DIR} --no-deps + - pip3 wheel deps/dtnma-ace -w ${PY_WHEEL_DIR} --no-deps - pip3 wheel deps/anms-camp -w ${PY_WHEEL_DIR} --no-deps - (cd anms-core && pip-compile --find-links ${PY_WHEEL_DIR} --extra test pyproject.toml && diff --git a/.gitmodules b/.gitmodules index 59199d9..b0c642e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "deps/anms-ace"] - path = deps/anms-ace - url = ../anms-ace.git [submodule "deps/anms-camp"] path = deps/anms-camp url = ../anms-camp.git @@ -8,4 +5,7 @@ path = ion/src url = https://github.com/JHUAPL/dtnma-tools.git - +[submodule "deps/dtnma-ace"] + path = deps/dtnma-ace + url = https://github.com/JHUAPL-DTNMA/dtnma-ace + branch = main diff --git a/README.md b/README.md index 654d197..9ca2a1d 100644 --- a/README.md +++ b/README.md @@ -210,14 +210,14 @@ The two output paths for ADM C files are: To regenerate agent source, scraping the pre-existing source to avoid clearing out agent implementations, run: ```sh -PYTHONPATH=deps/anms-ace/src/:deps/anms-camp/src/ python3 -m camp.tools.camp ion/src/nm/doc/adms/ion_bp_admin.json -o ion/src/bpv7/nm/ --only-ch --scrape +PYTHONPATH=deps/dtnma-ace/src/:deps/anms-camp/src/ python3 -m camp.tools.camp ion/src/nm/doc/adms/ion_bp_admin.json -o ion/src/bpv7/nm/ --only-ch --scrape ``` ## Manual Agent exercising To use the local AMP Manager directly via its REST API on the local host run similar to: ``` -echo 'ari:/IANA:ltp_agent/CTRL.reset(UINT.3)' | PYTHONPATH=deps/anms-ace/src/ ADM_PATH=deps/anms-ace/tests/adms/ python3 -m ace.tools.ace_ari --log-level=warning --outform=cborhex --must-nickname | tr -d '[[:space:]]' | curl -v -XPUT -H 'Content-Type: text/plain' --data-binary @- http://localhost:8089/nm/api/agents/eid/ipn:2.6/hex; echo +echo 'ari:/IANA:ltp_agent/CTRL.reset(UINT.3)' | PYTHONPATH=deps/dtnma-ace/src/ ADM_PATH=deps/dtnma-ace/tests/adms/ python3 -m ace.tools.ace_ari --log-level=warning --outform=cborhex --must-nickname | tr -d '[[:space:]]' | curl -v -XPUT -H 'Content-Type: text/plain' --data-binary @- http://localhost:8089/nm/api/agents/eid/ipn:2.6/hex; echo ``` A limitation in the current NM REST API disallows multiple controls in a single message, so each ARI must be iterated over for this method. diff --git a/anms-core/Dockerfile b/anms-core/Dockerfile index 0f1198a..dc6baec 100644 --- a/anms-core/Dockerfile +++ b/anms-core/Dockerfile @@ -25,7 +25,7 @@ # DB_USERNAME and DB_PASSWORD for optional authentication # DB_NAME for the database schema to use # -FROM anms-acelib +FROM dtnma-acelib ENV APP_WORK_DIR=/usr/src/anms-core # Requirement of main module @@ -40,7 +40,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ pip3 install ${APP_WORK_DIR} RUN mkdir -p /usr/local/share/ace && \ - cp -R /usr/src/anms-ace/tests/adms /usr/local/share/ace/adms + cp -R /usr/src/dtnma-ace/tests/adms /usr/local/share/ace/adms COPY anms/agent_parameter.json /usr/local/share/anms/agent_parameter.json # Remaining commands as the local user diff --git a/aricodec/Dockerfile b/aricodec/Dockerfile index 917e508..bab0422 100644 --- a/aricodec/Dockerfile +++ b/aricodec/Dockerfile @@ -24,7 +24,7 @@ # MQTT_HOST referencing the DNS name of the MQTT broker # DB_URI referencing the sqlalchemy URI for the DNS name of a PostgreSQL server # -FROM anms-acelib +FROM dtnma-acelib ENV APP_WORK_DIR=/usr/src/aricodec # Requirement of main package diff --git a/base.Dockerfile b/base.Dockerfile index 73c4eb0..4df0bb8 100644 --- a/base.Dockerfile +++ b/base.Dockerfile @@ -64,7 +64,7 @@ RUN systemctl disable dnf-makecache.timer # Sets environment: # PY_WHEEL_DIR to local PIP wheel search path # -FROM anms-base AS anms-acelib +FROM anms-base AS dtnma-acelib # Install System Level Dependencies RUN --mount=type=cache,target=/root/.cache/pip \ @@ -75,9 +75,9 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # Submodules with dependencies env PY_WHEEL_DIR=/usr/local/lib/wheels -COPY deps/anms-ace /usr/src/anms-ace +COPY deps/dtnma-ace /usr/src/dtnma-ace RUN --mount=type=cache,target=/root/.cache/pip \ - pip3 wheel /usr/src/anms-ace -w ${PY_WHEEL_DIR} --no-deps + pip3 wheel /usr/src/dtnma-ace -w ${PY_WHEEL_DIR} --no-deps COPY deps/anms-camp /usr/src/anms-camp RUN --mount=type=cache,target=/root/.cache/pip \ diff --git a/build.sh b/build.sh index 21ea0f3..d73a76d 100755 --- a/build.sh +++ b/build.sh @@ -42,7 +42,7 @@ echo "Running image build" declare -A BASEIMGS=( [anms-base]=". -f base.Dockerfile --target anms-base" [anms-init]=". -f base.Dockerfile --target anms-init" - [anms-acelib]=". -f base.Dockerfile --target anms-acelib" + [dtnma-acelib]=". -f base.Dockerfile --target dtnma-acelib" ) declare -A IMAGES=( [authnz]="" diff --git a/deps/anms-ace b/deps/anms-ace deleted file mode 160000 index ecf173c..0000000 --- a/deps/anms-ace +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ecf173caa449cfa977b66c6886998e3e0cbe208a diff --git a/deps/dtnma-ace b/deps/dtnma-ace new file mode 160000 index 0000000..f0047da --- /dev/null +++ b/deps/dtnma-ace @@ -0,0 +1 @@ +Subproject commit f0047da2c87c7a559ed5846decafb6ae2ea29a44 diff --git a/transcoder/Dockerfile b/transcoder/Dockerfile index ff74781..7993acc 100644 --- a/transcoder/Dockerfile +++ b/transcoder/Dockerfile @@ -19,7 +19,7 @@ ## the prime contract 80NM0018D0004 between the Caltech and NASA under ## subcontract 1658085. ## -FROM anms-acelib +FROM dtnma-acelib ENV APP_WORK_DIR /opt/app