Skip to content

Commit

Permalink
Only enable the CentOS 9 opstools repo
Browse files Browse the repository at this point in the history
  • Loading branch information
vkmc committed Feb 5, 2025
1 parent b3fe99d commit 196cb4a
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 37 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Integration testing
env:
PROJECT_ROOT: /root/go/src/github.com/infrawatch/sg-core
OPENSTACK_REPO: https://trunk.rdoproject.org/centos9-caracal/delorean-deps.repo
OPSTOOLS_REPO: https://trunk.rdoproject.org/centos9-caracal/delorean-deps.repo

QDR_IMAGE: quay.io/interconnectedcloud/qdrouterd:1.17.0
QDR_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/qdr:/etc/qpid-dispatch:ro"
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
if: steps.bridge_branch.outcome == 'success'
run: |
docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \
-e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPENSTACK_REPO \
-e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \
--workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_bridge.sh
- name: Install collectd
Expand All @@ -86,7 +86,7 @@ jobs:
sudo collectd -C ci/integration/metrics/collectd/collectd.conf
- name: Run sg-core to process metrics
run: |
docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \
docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/collectd/run_sg.sh
- name: Run Prometheus to store metrics
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
if: steps.bridge_branch.outcome == 'success'
run: |
docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \
-e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPENSTACK_REPO \
-e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \
--workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_bridge.sh
- name: Set Ceilometer pipelines to QDR output and restart notification agent
Expand All @@ -186,7 +186,7 @@ jobs:
sudo systemctl restart [email protected]
- name: Run sg-core to process metrics
run: |
docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \
docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/bridge/run_sg.sh
- name: Run Prometheus to store metrics
Expand Down Expand Up @@ -263,7 +263,7 @@ jobs:
sudo systemctl restart [email protected]
- name: Run sg-core to process metrics
run: |
docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \
docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/tcp/run_sg.sh
- name: Run Prometheus to store metrics
Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
- name: Start sg-bridge with same branch
if: steps.bridge_branch.outcome == 'success'
run: |
docker run --name=sgbridge $BRIDGE_VOLUME -d -uroot --network host -e OPENSTACK_REPO \
docker run --name=sgbridge $BRIDGE_VOLUME -d -uroot --network host -e OPSTOOLS_REPO \
-e GITHUB_HEAD_REF -e BRIDGE_SOCKET --workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/logging/run_bridge.sh
- name: Run rsyslog to produce log messages
Expand Down Expand Up @@ -395,7 +395,7 @@ jobs:
# run integration tests
- name: Run sg-core to process log messages
run: |
docker run --name=sgcore -d -uroot --network host $TEST_PORT $BRIDGE_VOLUME -e OPENSTACK_REPO \
docker run --name=sgcore -d -uroot --network host $TEST_PORT $BRIDGE_VOLUME -e OPSTOOLS_REPO \
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/logging/run_sg.sh
- name: sg-core debug output
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
env:
PROJECT_ROOT: /root/go/src/github.com/infrawatch/sg-core
OPENSTACK_REPO: https://trunk.rdoproject.org/centos9-caracal/delorean-deps.repo
OPSTOOLS_REPO: https://trunk.rdoproject.org/centos9-caracal/delorean-deps.repo

LOKI_IMAGE: quay.io/infrawatch/loki:2.4.2
LOKI_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/loki:/etc/loki:ro"
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
docker logs loki
- name: Run sg-core unit test suite
run: |
docker run --name=testsuite -uroot --network host -e COVERALLS_REPO_TOKEN -e OPENSTACK_REPO \
docker run --name=testsuite -uroot --network host -e COVERALLS_REPO_TOKEN -e OPSTOOLS_REPO \
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \
$TEST_IMAGE bash $PROJECT_ROOT/ci/unit/run_tests.sh
- name: Send coverage
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR $D
COPY . $D/

# dependencies for qpid-proton-c
COPY build/repos/centos9-caracal.repo /etc/yum.repos.d/centos9-caracal.repo
COPY build/repos/opstools.repo /etc/yum.repos.d/CentOS-OpsTools.repo

RUN dnf install golang git qpid-proton-c-devel -y --setopt=tsflags=nodocs
RUN go install golang.org/dl/go1.21.13@latest && /go/bin/go1.21.13 download && PRODUCTION_BUILD=false CONTAINER_BUILD=true GOCMD=/go/bin/go1.21.13 ./build.sh
Expand Down
18 changes: 0 additions & 18 deletions build/repos/centos9-caracal.repo

This file was deleted.

8 changes: 8 additions & 0 deletions build/repos/opstools.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CentOS 9 Opstools repos

[centos9-opstools]
name=centos9-opstools
baseurl=http://mirror.stream.centos.org/SIGs/9-stream/opstools/$basearch/collectd-5/
enabled=1
gpgcheck=0
module_hotfixes=1
2 changes: 1 addition & 1 deletion ci/integration/logging/run_bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -ex

# enable required repo(s)
curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO
curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO

dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config

Expand Down
2 changes: 1 addition & 1 deletion ci/integration/logging/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -ex

# enable required repo(s)
curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO
curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO

dnf install -y git golang gcc make qpid-proton-c-devel

Expand Down
2 changes: 1 addition & 1 deletion ci/integration/metrics/ceilometer/bridge/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -ex

# enable required repo(s)
curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO
curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO

dnf install -y git golang gcc make qpid-proton-c-devel

Expand Down
4 changes: 2 additions & 2 deletions ci/integration/metrics/ceilometer/tcp/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
set -ex

# enable required repo(s)
curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO
sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/centos9-caracal.repo
curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO
sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo

dnf install -y git golang gcc make qpid-proton-c-devel

Expand Down
2 changes: 1 addition & 1 deletion ci/integration/metrics/collectd/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -ex

# enable required repo(s)
curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO
curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO

dnf install -y git golang gcc make qpid-proton-c-devel

Expand Down
2 changes: 1 addition & 1 deletion ci/integration/metrics/run_bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -ex
CHANNEL=$QDR_CHANNEL

# enable required repo(s)
curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO
curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO

dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config

Expand Down
2 changes: 1 addition & 1 deletion ci/unit/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -ex

# enable required repo(s)
curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO
curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO

# without glibc-langpack-en locale setting in CentOS8 is broken without this package
yum install -y git golang gcc make glibc-langpack-en qpid-proton-c-devel
Expand Down

0 comments on commit 196cb4a

Please sign in to comment.