Skip to content

Commit 0c206cb

Browse files
authored
Podman updates to Product Guide (#13)
* Initial podman notes * Fix small typos
1 parent 6474930 commit 0c206cb

1 file changed

Lines changed: 81 additions & 27 deletions

File tree

product-guide/manual.adoc

Lines changed: 81 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Although some of the subsystems have a preferred start-up order (to ensure initi
155155

156156
=== ANMS Components
157157

158-
The subsystems of the ANMS (all Docker containers) are illustrated as gray blocks within the "ANMS Instance" group in the diagram of <<fig-anms-components-protocol>>.
158+
The subsystems of the ANMS (all containers) are illustrated as gray blocks within the "ANMS Instance" group in the diagram of <<fig-anms-components-protocol>>.
159159
The entire ANMS instance is made to be run on a single host, with future plans to allow installing in a more distributed environment.
160160
Currently the ANMS provides security at the boundary of the instance but not between comtainers (see <<sec-security>> for details), which would be required for a distributed installation.
161161

@@ -188,13 +188,13 @@ graphviz::anms-light-protocol.gv[format=svg]
188188
[#sec-deployment]
189189
=== Deployment
190190

191-
The target host will be running the RedHat Enterprise Linux \(((RHEL))) version 8 (RHEL-8) with network interfaces configured, and IP addressing and DNS configured along with a running local firewall.
191+
The target host will be running the RedHat Enterprise Linux \(((RHEL))) version 9 (RHEL-9) with network interfaces configured, and IP addressing and DNS configured along with a running local firewall.
192192

193193
The ANMS is intended to be deployed using the ((Puppet)) orchestrator, either from a local Puppet apply execution or configured from a central Puppet server.
194194
Part of the ANMS source is a Puppet module "anms" to automate the configuration of an ANMS deployment.
195195
Specific procedures for performing an installation using a local Puppet apply are in <<sec-proc-install>>.
196196

197-
Conditions for installing the ANMS are a host with packages identified in <<target-host-packages>>, at least 7{nbsp}GiB of filesystem space for docker image storage, and additional space for long-term data warehouse storage.
197+
Conditions for installing the ANMS are a host with packages identified in <<target-host-packages>>, at least 7{nbsp}GiB of filesystem space for container image storage, and additional space for long-term data warehouse storage.
198198
The total amount of storage needed depends on the mission use of reports, specifically the average size and rate of reported data.
199199

200200
[#target-host-packages]
@@ -204,14 +204,20 @@ The total amount of storage needed depends on the mission use of reports, specif
204204
|Package Name
205205
|Version Minimum
206206

207-
|docker-ce
208-
|23.0.1
207+
|podman
208+
|5.2
209209

210-
|docker-compose
211-
|1.29.2
210+
|podman-compose
211+
|1.0
212+
213+
|systemd
214+
|252
212215

213216
|Puppet
214217
|7
218+
219+
|Puppet Bolt
220+
|4
215221
|===
216222

217223
The ANMS is designed to operate on a network where the MGSS Common Access Manager (CAM) is used to manage user accounts and a CAM Gateway is used as a reverse proxy within the ANMS installation to enforce user login sessions and access permissions.
@@ -312,12 +318,13 @@ The test environment service configuration.
312318
The project-specific deployment path for compose configurations.
313319
Its contents are:
314320
`.env`:::
315-
The compose-level environment configuration for all of the ANMS and testenv containers.
321+
The compose-level environment configuration for all of the ANMS and testenv containers, including host port mapping options (see <<sec-deploy-containers>>).
316322
`anms-compose.yml`:::
317323
Compose configuration for the ANMS containers, volumes, and networks.
318-
The compose runtime is managed by the `podman-compose@` template service.
324+
The compose runtime is managed by the `podman-compose@anms` template service.
319325
`testenv-compose.yml`:::
320326
Compose configuration for the test environment containers and network.
327+
The compose runtime is managed by the `podman-compose@testenv` template service.
321328

322329
`/run/anms`::
323330
The temporary file directory used at runtime.
@@ -327,6 +334,14 @@ The transport proxy socket needed by the AMP Manager in order to message to and
327334

328335
Secondary files related to the ANMS deployment are:
329336

337+
`/etc/containers/containers.conf`::
338+
Configured to enable compose provider and SELinux for containers.
339+
`/etc/containers/compose/projects/anms.env`::
340+
The systemd environment for the `anms` project, used by the systemd service `podman-compose@anms`.
341+
This points to `/ammos/anms/` for its compose configuration.
342+
`/etc/systemd/system/podman-compose@.service`::
343+
A parameterized service interface which reads compose environment from under `/etc/containers/compose/projects/`
344+
330345
`/ammos/etc/pki/tls`::
331346
Host-level PKI security configuration from which the ANMS user-agent TLS configuration is derived.
332347
Its contents for ANMS are:
@@ -337,18 +352,16 @@ The corresponding public key certificiate for the local TLS endpoint.
337352
`certs/ammos-ca-bundle.crt`:::
338353
The trusted CA bundle for all TLS endpoints (including users).
339354

340-
`/etc/containers/containers.conf`::
341-
Configured to enable SELinux for containers.
342355
`/var/cache/puppet/puppet-selinux/modules`::
343356
The containing directory for SELinux modules for the ANMS containers (see <<sec-security>>).
344357

345358

346359
[#sec-network]
347360
=== Networking
348361

349-
The target host will be running RHEL-8 with network interfaces configured, and IP addressing and DNS configured along with a running local firewall.
362+
The target host will be running RHEL-9 with network interfaces configured, and IP addressing and DNS configured along with a running local firewall.
350363

351-
The Docker network configuration for the ANMS includes host port forwarding for the following services:
364+
The container network configuration (under `/ammos/anms`) for the ANMS includes host port forwarding for the following services:
352365

353366
HTTPS::
354367
Default port 443 forwarded to the `authnz` container for HTTP use.
@@ -388,37 +401,78 @@ Reported ((Data Warehouse))::
388401
When reports arrive from managed agents and are associated with known ADMs they are disassembled and stored as object-values in the historical data warehouse.
389402

390403

391-
[#sec-proc]
392-
== Procedures
404+
[#sec-devel]
405+
== Development Procedures
406+
407+
This chapter includes procedures related to development and pre-production testing of the ANMS.
408+
These procedures assume that the user has a working copy of the ANMS source tree an intends to make some changes to the source or the configuration outside of a normal production deployment procedure (where build happens on a different host from the ultimate installation).
409+
410+
[#sec-devel-deploy]
411+
=== Test Build and Deployment
412+
413+
TBD
414+
415+
[#sec-devel-install]
416+
=== Production-Like Build and Installation
417+
418+
This procedure builds images in the root user's podman context and then uses puppet to install to the local host.
419+
420+
More TBD
421+
422+
. Images for all of the ANMS production and test containers can be built with the following:
423+
```
424+
sudo AUTHNZ_EMU=authnz-emu podman compose -p anms -f docker-compose.yml --podman-build-args='--format docker' build
425+
sudo podman compose -p agents -f agent-compose.yml --podman-build-args='--format docker' build
426+
```
427+
. The deployment configuration is set by editing the file `puppet/data/override.yaml` to contain similar to:
428+
+
429+
----
430+
anms::docker_image_prefix: "" # Left empty to use locally built images
431+
anms::docker_image_tag: "latest"
432+
----
433+
. Pull the necessary upstream Puppet modules with:
434+
+
435+
----
436+
./puppet/prep.sh
437+
----
438+
. Perform a dry-run of the puppet apply with:
439+
+
440+
----
441+
sudo PATH=/opt/puppetlabs/bin:$PATH ./puppet/apply_local.sh --test --noop
442+
----
443+
and verify that there are no unexpected changes.
444+
. Perform the actual puppet apply with:
445+
+
446+
----
447+
sudo PATH=/opt/puppetlabs/bin:$PATH ./puppet/apply_local.sh --test
448+
----
393449

394-
This chapter includes specific procedures related to managing an ANMS instance.
395450

451+
[#sec-proc]
452+
== Production Procedures
453+
454+
This chapter includes specific procedures related to managing an ANMS production instance.
396455

397456
[#sec-proc-build]
398457
=== Building
399458

400-
The ANMS source is composed of a top-level repository `ammos-anms` and a number of submodule repositories; all of them are required for building the ANMS.
459+
The ANMS source is composed of a top-level repository `anms` and a number of submodule repositories; all of them are required for building the ANMS.
401460

402461
. The top-level checkout can be done with:
403462
+
404463
----
405-
git clone --recursive --branch <TAGNAME> <BASEURL>/ammos-anms.git
464+
git clone --recursive --branch <TAGNAME> https://github.com/NASA-AMMOS/anms.git
406465
----
407466
. Optional: switching to a different tag or branch can be done with the sequence:
408467
+
409468
----
410469
git checkout <TAGNAME>
411470
git submodule update --init --recursive
412471
----
413-
. If necessary, add the local user to the `docker` access group with:
414-
+
415-
----
416-
sudo usermod -a -G docker ${USER}
417-
----
418472
. The container image building is then executed with:
419473
+
420474
----
421-
export DOCKER_IMAGE_PREFIX=<DOCKERURL>
475+
export DOCKER_IMAGE_PREFIX=<REPOURL>
422476
export DOCKER_IMAGE_TAG=latest
423477
./build.sh buildonly
424478
----
@@ -585,7 +639,7 @@ In many fault cases, the procedure will work for the first steps and then fail o
585639
This is taken advantage of for the purposes of troubleshooting and failure reporting; the specific procedure(s) run and step(s) that fail are valuable to include in issue reports related to the ANMS.
586640

587641
To make the procedures more readable, the ANMS host is assumed to have the resolveable host name `anms-serv`.
588-
For checkout steps ocurring on a "client host" it is assumed to be running RHEL-8 or equivalent from the perspective of commands available.
642+
For checkout steps ocurring on a "client host" it is assumed to be running RHEL-9 or equivalent from the perspective of commands available.
589643

590644

591645
[#sec-checkout-frontend]
@@ -600,7 +654,7 @@ The checkout procedure is as follows:
600654
----
601655
sudo firewall-cmd --zone public --list-services
602656
----
603-
which should include the servies "https".
657+
which should include the services "https".
604658
. From a client host check the port is open with:
605659
+
606660
----
@@ -673,7 +727,7 @@ The checkout procedure is as follows:
673727
sudo firewall-cmd --zone public --list-services
674728
----
675729
which should include the services "ltp" and "dtn-bundle-udp".
676-
. From any RHEL-8 host on the agent network run the following:
730+
. From any RHEL-9 host on the agent network run the following:
677731
+
678732
----
679733
sudo nmap anms-serv -sU -p4556

0 commit comments

Comments
 (0)