Skip to content

Commit 5fcfb19

Browse files
author
David Linko
committed
Merge branch 'main' into 235-uploading-new-yang-file-is-broken
2 parents bafe282 + 5ede6cb commit 5fcfb19

32 files changed

+1005
-1081
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# SCM files
2-
.git
2+
.git/
33
.gitignore
44

55
# Ignore IDE/IntelliJ Files
66
.idea
77
*.iml
88

9-
# Ignore Node Modules used locally
10-
public/node_modules
11-
server/node_modules
12-
9+
# Ignore build files
10+
node_modules
11+
/puppet/.modules/
1312
# Ignore Compiled Vue App
14-
release
15-
13+
/anms-ui/release
1614
# Ignore Data Directory
17-
logs
18-
15+
/anms-ui/logs
1916

2017
# Ignore Other Specific Stuff
21-
docker-compose.yaml
18+
*-compose.yaml
19+
Containerfile
2220
Dockerfile
2321
Makefile
2422
.dockerignore
2523
gl-sast-report.json
2624
.metrics-dashboard.yml
27-
CONTRIBUTING.md
25+
*.md
26+
*.pdf
27+
*.docx

.env

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# This .env file is used by all compose commands for test and development usage.
2+
# NOTE: Production deployments via Puppet use an alternative version of this file generated by the tools.
3+
4+
# Choose which profile(s) to run.
5+
# If no profiles are set, a 'light' configuration will be started without the UI components
6+
# Available profiles include 'full' (UI) and 'dev' (aeveloper tools such as adminer)
7+
COMPOSE_PROFILES=full,dev
8+
19
# Port Services; Uncomment below lines to override default mappings
210
#AUTHNZ_PORT=8084
311
#AUTHNZ_HTTPS_PORT=8443
@@ -7,8 +15,6 @@
715
#MQTT_PORT=11883
816

917

10-
11-
DOCKER_CTR_PREFIX=
1218
DOCKER_IMAGE_PREFIX=localhost/
1319
DOCKER_IMAGE_TAG=latest
1420

@@ -34,8 +40,8 @@ DB_HEALTHCHECK_USER=healthcheck
3440
DB_HEALTHCHECK_PASSWORD=healthcheck
3541

3642
GRAFANA_CONTAINER_PORT=3000
37-
GRAFANA_HOST_PORT=${DOCKER_CTR_PREFIX}grafana:${GRAFANA_CONTAINER_PORT}
38-
GRAFANA_PROXIES_PATH=localhost/${DOCKER_CTR_PREFIX}grafana
43+
GRAFANA_HOST_PORT=grafana:${GRAFANA_CONTAINER_PORT}
44+
GRAFANA_PROXIES_PATH=localhost/grafana
3945
REDIS_PORT=6379
4046
JS_AMP_PORT=3001
4147
ANMS_UI_HTTP_PORT=9030
@@ -48,7 +54,7 @@ LOGSTASH_MONITORING_PORT=9600
4854
KIBANA_PORT=5601
4955
ADMINER_PORT=8080
5056
RENDERER_PORT=8081
51-
RENDERER_HOST_PORT=${DOCKER_CTR_PREFIX}grafana-image-renderer:${RENDERER_PORT}
57+
RENDERER_HOST_PORT=grafana-image-renderer:${RENDERER_PORT}
5258
ION_MGR_PORT=8089
5359
HTTP_PORT=80
5460

.github/workflows/build-test.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
name: Checkout Test (${{matrix.ctrmgr}})
1818
env:
1919
AUTHNZ_EMU: "demo"
20-
ANMS_COMPOSE_OPTS: "-f docker-compose.yml --profile=full"
20+
COMPOSE_PROFILES: "full"
21+
ANMS_COMPOSE_OPTS: "-f docker-compose.yml"
2122
TESTENV_COMPOSE_OPTS: "-f testenv-compose.yml"
2223
DOCKER_CMD: ${{matrix.ctrmgr}}
2324
AUTHNZ_PORT: 8084
@@ -42,9 +43,7 @@ jobs:
4243
DOCKER_IMAGE_TAG=$(echo ${{ github.head_ref || github.ref_name }} | sed 's/[^a-zA-Z0-9\-\._]/-/g')
4344
echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV
4445
- name: Build ANMS
45-
run: |
46-
${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} build builder-base builder-init builder-acelib
47-
${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} build
46+
run: ${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} build
4847
- name: Build Agents
4948
run: ${DOCKER_CMD} compose ${TESTENV_COMPOSE_OPTS} build
5049
- name: Build Volume
@@ -59,6 +58,7 @@ jobs:
5958
${DOCKER_CMD} compose ${TESTENV_COMPOSE_OPTS} up -d --force-recreate
6059
${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} up -d --force-recreate --wait --wait-timeout 600
6160
- name: Status
61+
if: always()
6262
run: |
6363
for BADSTATUS in stopped restarting; do
6464
${DOCKER_CMD} compose ${ANMS_COMPOSE_OPTS} ps --services --filter status=${BADSTATUS} | tee -a /tmp/notgood
@@ -70,14 +70,7 @@ jobs:
7070
# Fail if any names are in the file
7171
! grep '[^[:space:]]' /tmp/notgood
7272
- name: Test
73-
run: |
74-
# Checkout the running gateway+backend
75-
${DOCKER_CMD} build -t checkout-test checkout-test
76-
${DOCKER_CMD} run --network anms -v $PWD:/mnt \
77-
-e XUNIT_OUTFILE=/mnt/testresults.xml \
78-
-e CHECKOUT_BASE_URL=http://authnz/ \
79-
-e SSL_CERT_FILE=/mnt/puppet/modules/apl_test/files/anms/tls/certs/ammos-ca-bundle.crt \
80-
checkout-test
73+
run: ./checkout-test/run.sh
8174
- name: Stop
8275
if: always()
8376
run: |

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
.DS_Store
88
.project
99
.cproject
10+
.pydevproject
11+
.settings/
1012

1113
# Python intermediates
1214
__pycache__
@@ -16,11 +18,9 @@ coverage.xml
1618
testresults.xml
1719

1820
# local build files
19-
anms-core/build/
20-
anms-ui/release/
21+
/anms-core/build/
22+
/anms-ui/release/
2123

2224
# Javascript and ESLint related content to be ignored
2325
node_modules
2426
package-lock.json
25-
26-
ion/configs/**/logs

README.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,16 @@ If your computer is behind a network proxy, this may cause issues related to usi
4949
Though ANMS can be run behind a proxy; building the ANMS Docker images from behind a network proxy may result in errors.
5050

5151
The first steps in each of the container image `Dockerfile` is to attempt to download an APLNIS root CA to validate the APLNIS HTTPS proxy.
52-
When building images outside of the APLNIS, this download will gracefully fail and the image will not be able to run within the APLNIS.
52+
When building images outside of the APLNIS, this download will gracefully fail and the image will not be able to run within the APLNIS. The URL for this certificate can be changed for users requiring equivalent functionality on their own networks.
53+
54+
### Special Notes on Podman
55+
56+
If not otherwise specified, most commands in this document allow podman and docker to be used interchangeably. It is also possible to install an alias (provided in most package managers) to map `docker` to `podman` if desired.
57+
58+
Podman, running as a standard user, is typically unable to bind to **low-numbered ports**. It is recommended to edit the `.env` file and uncomment the lines at top for AUTHNZ_PORT and AUTHNZ_HTTPS_PORT to remap those services to a higher port number. In the directions below, you would then use for example http://localhost:8084 and https://localhost:8443 instead of the default.
59+
60+
Note: If running on a system where **SELinux** is enabled, the system will not start if the appropriate security groups have not been defined. As an alternative, the `security_opt` sections can be commented out in the *-compose.yml files if required.
61+
5362

5463
### Upgrading ANMS
5564

@@ -63,29 +72,35 @@ The following command sequence uses standard Docker commands to stop all contain
6372
docker stop $(docker ps -q); docker rm $(docker ps --all -q); docker system prune -f; docker volume prune -f
6473
```
6574

66-
### Deployment Scenario
6775

68-
The current ANMS capability is designed to run on `localhost` and on a development virtual machine.
69-
This guide presumes that you can either connect via a VMRC remote console or with ssh tunnelling to the machine, hence the use of `localhost` in db connection information and in URLs.
70-
If you deploy this to a VM, you will need to replace `localhost` with the hostname of the machine where it is deployed.
71-
72-
### Special Notes on Podman
76+
## ANMS build and deploy
7377

74-
If not otherwise specified, most commands in this document allow podman and docker to be used interchangeably. It is also possible to install an alias (provided in most package managers) to map `docker` to `podman` if desired.
78+
## Quickstart
7579

76-
Podman, running as a standard user, is typically unable to bind to **low-numbered ports**. It is recommended to edit the `.env` file and uncomment the lines at top for AUTHNZ_PORT and AUTHNZ_HTTPS_PORT to remap those services to a higher port number. In the directions below, you would then use for example http://localhost:8084 and https://localhost:8443 instead of the default.
80+
`./quickstart.sh`
7781

78-
Note: If running on a system where **SELinux** is enabled, the system will not start if the appropriate security groups have not been defined. As an alternative, the `security_opt` sections can be commented out in the *-compose.yml files if required.
82+
The quickstart script will configure, build, and start the ANMS system for the first time. See comments in the script for additional details, including optional ENV variables to override default behavior.
7983

84+
To stop the system use `podman compose -f testenv-compose.yml -f docker-compose.yml down`.
8085

81-
## ANMS build and deploy
86+
To start the system in the future use `podman compose -f testenv-compose.yml up` and `podman compose up`.
8287

88+
## Manual Startup
8389
Choose the appropriate docker, podman or podman-compose commands in the directions below as appropriate for your system.
8490

85-
- Select appropriate profile(s) as desired.
86-
- If no profiles are set, a "light" deployment of the ANMS focused on browser-less API-only ANMS users.
87-
- For a full deployment: `export COMPOSE_PROFILES=full`
88-
- For a full deployment with additional developer tools: `export COMPOSE_PROFILES=full,dev`
91+
- Edit `.env` file as appropriately
92+
- Select appropriate profile(s) as desired.
93+
- Core ANMS services are always started.
94+
- The 'full' profile starts up all UI and related services.
95+
- The 'dev' profile adds development tools, such as adminer
96+
- Profiles can be set with COMPOSE_PROFILES in the .env file. The default includes full and dev profiles.
97+
- Adjust network ports as necessary to avoid any conflicts or permissions issues.
98+
- For rootless podman, the AUTHNZ_* ports must be changed to higher number ports to avoid permissions issues.
99+
- The corresponding lines can be uncommented in .env.
100+
- SELinux Security Labels Setup
101+
- If your system does not support security labels, no additional steps are needed.
102+
- If security labels are supported and you are unable to define them, they can be disabled for development purposes:
103+
- `cp docker-compose.no-security-override.yml docker-compose.override.yml`
89104
- Clone this repository recursively (`git clone --recursive https://github.com/NASA-AMMOS/anms.git`)
90105
- Setup Volume containing PKI configuration (certificate chains and private keys):
91106
- `./create_volume.sh ./puppet/modules/apl_test/files/anms/tls`
@@ -98,7 +113,6 @@ Choose the appropriate docker, podman or podman-compose commands in the directio
98113
- `docker compose -f testenv-compose.yml build`
99114
- `podman compose -f testenv-compose.yml build`
100115
- `podman-compose --podman-build-args='--format docker' -f testenv-compose.yml build`
101-
102116
- Start System using one of the following:
103117
- `docker compose -f docker-compose.yml up -d`
104118
- `podman compose -f docker-compose.yml up -d`
@@ -126,11 +140,11 @@ To restart the system, use the 'up' and 'down' commands as described in the prev
126140

127141
The top-level `docker-compose.yml` uses the environment defined by the sibling file `.env`. Note: If using the legacy/deprecated build.sh script, that script may additionally override some environment variables.
128142

129-
Two principal options of the compose configuration, which are both defaulted to empty text, are:
143+
The principal options of the compose configuration are:
130144

131145
* `DOCKER_IMAGE_PREFIX` which controls any image name prefix added to all ANMS images.
132146
For a local build, this can be left empty, but for builds intended to be pushed to a Docker image registry this can be set to the full path on the registry before the image names (e.g. `DOCKER_IMAGE_PREFIX=some.host.example.com:5000/path/to/images`).
133-
147+
* `HOST_SOCKDIR` which controls the source of the bind mount on `amp-manager` container for its transport socket. This can either be a volume name, for inter-container or non-root user use, or an absolute path on the host filesystem, used in the production deployment.
134148

135149

136150
### AMP Database Querying

anms-core/.dockerignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

anms-core/Dockerfile

Lines changed: 0 additions & 52 deletions
This file was deleted.

anms-ui/Dockerfile

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)