Skip to content

Commit 1d5a58e

Browse files
committed
Merge branch 'main' into 167-ion-split-proxy
2 parents d428212 + aa480e9 commit 1d5a58e

38 files changed

+698
-252
lines changed

.env

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1+
# Port Services; Uncomment below lines to override default mappings
2+
#AUTHNZ_PORT=8084
3+
#AUTHNZ_HTTPS_PORT=8443
4+
#OPENSEARCH_PORT1=
5+
#OPENSEARCH_PORT2=
6+
#OPENSEARCH_DASH_PORT=
7+
#MQTT_PORT=11883
8+
9+
10+
111
DOCKER_CTR_PREFIX=
2-
DOCKER_IMAGE_PREFIX=
12+
DOCKER_IMAGE_PREFIX=localhost/
313
DOCKER_IMAGE_TAG=latest
414

515
ANMS_VERSION=0
616
ANMS_GW_FQDN=localhost
717

18+
# Selects authnz emulation mode, valid options are authnz-emu or cam-gateway
19+
AUTHNZ_EMU=authnz-emu
20+
821
CAM_SERVER_URL=
922
CAM_ADMIN_USER=amAdmin
1023
CAM_ADMIN_PASSWORD=
@@ -36,3 +49,4 @@ RENDERER_PORT=8081
3649
RENDERER_HOST_PORT=${DOCKER_CTR_PREFIX}grafana-image-renderer:${RENDERER_PORT}
3750
ION_MGR_PORT=8089
3851
HTTP_PORT:80
52+

.github/workflows/build-test.yaml

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,81 @@ on:
88
- cron: '0 0 * * 0' # weekly
99

1010
jobs:
11-
checkout-test:
11+
podman-checkout-test:
1212
runs-on: ubuntu-latest
1313
env:
1414
DOCKER_BUILDKIT: "1"
15-
AUTHNZ_EMU: "1"
15+
AUTHNZ_EMU: "authnz-emu"
1616
ANMS_COMPOSE_OPTS: "-f docker-compose.yml -p anms"
1717
AGENT_COMPOSE_OPTS: "-f agent-compose.yml -p agents"
18+
DOCKER_CMD: "podman"
19+
AUTHNZ_PORT: 8084
20+
AUTHNZ_HTTPS_PORT: 8443
21+
steps:
22+
- name: Start Podman API Service
23+
run: |
24+
systemctl --user start podman.socket
25+
systemctl --user enable podman.socket
26+
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
27+
- name: Versions
28+
run: |
29+
podman -v
30+
podman ps
31+
podman compose ls
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
with:
35+
submodules: recursive
36+
- name: Tag name env
37+
run: |
38+
DOCKER_IMAGE_TAG=$(echo ${{ github.head_ref || github.ref_name }} | sed 's/[^a-zA-Z0-9\-\._]/-/g')
39+
echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV
40+
- name: Debug GitHub workspace
41+
run: |
42+
echo "GITHUB_WORKSPACE=${{ github.workspace }}"
43+
ls -al ${{ github.workspace }}
44+
- name: Build Main
45+
run: podman compose build
46+
- name: Build Agents
47+
run: podman compose -f agent-compose.yml build
48+
- name: Build Volume
49+
run: |
50+
./create_volume.sh ./puppet/modules/apl_test/files/anms/tls
51+
- name: Start
52+
run: |
53+
podman compose up -d --force-recreate
54+
podman compose -f agent-compose.yml up -d --force-recreate
55+
sleep 5
56+
- name: Status
57+
run: |
58+
for BADSTATUS in stopped restarting; do
59+
podman compose ${ANMS_COMPOSE_OPTS} ps --services --filter status=${BADSTATUS} | tee -a /tmp/notgood
60+
done
61+
# Show hints at what may be wrong
62+
for SERVNAME in $(cat /tmp/notgood); do
63+
podman compose ${ANMS_COMPOSE_OPTS} logs --tail 50 ${SERVNAME}
64+
done
65+
# Fail if any names are in the file
66+
! grep '[^[:space:]]' /tmp/notgood
67+
- name: Test
68+
run: |
69+
# Checkout the running gateway+backend
70+
podman build -t checkout-test checkout-test
71+
podman run --network anms -v $PWD:/mnt -e XUNIT_OUTFILE=/mnt/testresults.xml -e CHECKOUT_BASE_URL=http://authnz/ -e SSL_CERT_FILE=/mnt/puppet/modules/apl_test/files/anms/tls/certs/ammos-ca-bundle.crt checkout-test
72+
- name: Stop
73+
if: always()
74+
run: |
75+
for OPTS_NAME in ANMS_COMPOSE_OPTS AGENT_COMPOSE_OPTS; do
76+
podman compose ${!OPTS_NAME} rm --stop --force
77+
done
78+
docker-checkout-test:
79+
runs-on: ubuntu-latest
80+
env:
81+
DOCKER_BUILDKIT: "1"
82+
AUTHNZ_EMU: "authnz-emu"
83+
ANMS_COMPOSE_OPTS: "-f docker-compose.yml -p anms"
84+
AGENT_COMPOSE_OPTS: "-f agent-compose.yml -p agents"
85+
DOCKER_CMD: "docker"
1886
steps:
1987
- name: Versions
2088
run: |
@@ -29,15 +97,21 @@ jobs:
2997
run: |
3098
DOCKER_IMAGE_TAG=$(echo ${{ github.head_ref || github.ref_name }} | sed 's/[^a-zA-Z0-9\-\._]/-/g')
3199
echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV
32-
- name: Build
100+
- name: Debug GitHub workspace
101+
run: |
102+
echo "GITHUB_WORKSPACE=${{ github.workspace }}"
103+
ls -al ${{ github.workspace }}
104+
- name: Build Main
105+
run: docker compose build
106+
- name: Build Agents
107+
run: docker compose -f agent-compose.yml build
108+
- name: Build Volume
33109
run: |
34-
./build.sh buildonly
35110
./create_volume.sh ./puppet/modules/apl_test/files/anms/tls
36111
- name: Start
37112
run: |
38-
for OPTS_NAME in ANMS_COMPOSE_OPTS AGENT_COMPOSE_OPTS; do
39-
docker compose ${!OPTS_NAME} up --detach --force-recreate
40-
done
113+
docker compose up -d --force-recreate
114+
docker compose -f agent-compose.yml up -d --force-recreate
41115
sleep 5
42116
- name: Status
43117
run: |

.github/workflows/puppet.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,19 @@ jobs:
1111
prep:
1212
name: Download modules
1313
runs-on: ubuntu-24.04
14+
container: quay.io/centos/centos:stream9
1415
steps:
1516
- name: Checkout repository
1617
uses: actions/checkout@v4
1718
with:
1819
submodules: false
1920
- name: Install dependencies
2021
run: |
21-
wget https://apt.puppet.com/puppet-release-focal.deb
22-
sudo dpkg -i puppet-release-focal.deb
23-
wget https://apt.puppet.com/puppet-tools-release-focal.deb
24-
sudo dpkg -i puppet-tools-release-focal.deb
25-
sudo apt-get update
26-
sudo apt-get install -y puppet-agent puppet-bolt
27-
sudo update-alternatives --install /usr/bin/puppet puppet-agent /opt/puppetlabs/bin/puppet 10
28-
sudo chmod +t /tmp # workaround ruby need within prep.sh
22+
dnf install -y https://yum.puppet.com/puppet7-release-el-9.noarch.rpm
23+
dnf install -y https://yum.puppet.com/puppet-tools-release-el-9.noarch.rpm
24+
dnf install -y puppet-agent-7.28.0-1.el9 puppet-bolt-3.30.0-1.el9
25+
update-alternatives --install /usr/bin/puppet puppet-agent /opt/puppetlabs/bin/puppet 10
26+
chmod +t /tmp # workaround ruby need within prep.sh
2927
- name: Prep project
3028
run: |
3129
./puppet/prep.sh

.gitlab-ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ deploy:
331331
- dnf install -y hostname
332332
- ./build.sh push
333333
- |
334-
dnf install -y https://yum.puppet.com/puppet-release-el-9.noarch.rpm
334+
dnf install -y https://yum.puppet.com/puppet7-release-el-9.noarch.rpm
335335
dnf install -y https://yum.puppet.com/puppet-tools-release-el-9.noarch.rpm
336336
dnf install -y puppet-agent-7.28.0-1.el9 puppet-bolt-3.30.0-1.el9
337337
update-alternatives --install /usr/bin/puppet puppet-agent /opt/puppetlabs/bin/puppet 10
@@ -343,10 +343,10 @@ deploy:
343343
mkdir -p puppet/data/fqdn/
344344
cat <<EOF >puppet/data/override.yaml
345345
anms::version: "${ANMS_VERSION}"
346-
anms::docker_image_prefix: "${DOCKER_IMAGE_PREFIX}"
347-
anms::docker_image_tag: "${DOCKER_IMAGE_TAG}"
348-
anms::docker_registry_user: "${DOCKER_REGISTRY_USERNAME}"
349-
anms::docker_registry_pass: "${DOCKER_REGISTRY_PASSWORD}"
346+
anms::ctr_image_prefix: "${DOCKER_IMAGE_PREFIX}"
347+
anms::ctr_image_tag: "${DOCKER_IMAGE_TAG}"
348+
anms::ctr_registry_user: "${DOCKER_REGISTRY_USERNAME}"
349+
anms::ctr_registry_pass: "${DOCKER_REGISTRY_PASSWORD}"
350350
anms::tls_server_key: 'puppet:///modules/apl_test/anms/tls/private/ammos-server-key.pem'
351351
anms::tls_server_cert: 'puppet:///modules/apl_test/anms/tls/certs/ammos-server-cert.pem'
352352
anms::tls_server_ca: 'puppet:///modules/apl_test/anms/tls/certs/ammos-ca-bundle.crt'

0 commit comments

Comments
 (0)