Skip to content

Commit

Permalink
updated ace and adm with new bp-agent (#165)
Browse files Browse the repository at this point in the history
* updated ace and adm with new bp-agent

* updated to use dtnma-ace

* reverted dependcies name change

---------

Co-authored-by: David Linko <[email protected]>
  • Loading branch information
d-linko and David Linko authored Dec 23, 2024
1 parent a097b87 commit bc0e19d
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/anms-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aricodec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]'
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[submodule "deps/anms-ace"]
path = deps/anms-ace
url = ../anms-ace.git
[submodule "deps/anms-camp"]
path = deps/anms-camp
url = ../anms-camp.git
[submodule "ion/src"]
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions anms-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion aricodec/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]=""
Expand Down
1 change: 0 additions & 1 deletion deps/anms-ace
Submodule anms-ace deleted from ecf173
1 change: 1 addition & 0 deletions deps/dtnma-ace
Submodule dtnma-ace added at f0047d
2 changes: 1 addition & 1 deletion transcoder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit bc0e19d

Please sign in to comment.