Skip to content

Commit

Permalink
Merge pull request #141 from infrawatch/release-prep-1.5.5
Browse files Browse the repository at this point in the history
STF 1.5.5 release ops
  • Loading branch information
vkmc committed Aug 29, 2024
2 parents 02aeeb6 + ddc5418 commit 375d0f8
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 27 deletions.
24 changes: 16 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
OPSTOOLS_REPO: https://git.centos.org/rpms/centos-release-opstools/raw/c8s-sig-opstools/f/SOURCES/CentOS-OpsTools.repo
OPSTOOLS_REPO: https://raw.githubusercontent.com/infrawatch/sg-core/04dcb34edd2c234b378222d2f9a17e15c0dad936/build/repos/opstools.repo

QDR_IMAGE: quay.io/interconnectedcloud/qdrouterd:1.17.0
QDR_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/qdr:/etc/qpid-dispatch:ro"
Expand All @@ -25,7 +25,7 @@ jobs:
PROMETHEUS_IMAGE: prom/prometheus:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.3
- name: Prepare environment
run: |
mkdir -p /opt/stack/
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \
-e GITHUB_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \
--workdir=$(dirname $BRIDGE_SOCKET) \
--workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_bridge.sh
- name: Install collectd
run: |
Expand All @@ -102,6 +102,8 @@ jobs:
docker logs qdr
echo "========================= sg-core =======================" && \
docker logs sgcore
echo "========================= sg-bridge =======================" && \
docker logs sgbridge
echo "======================== prometheus =====================" && \
docker logs prometheus
- name: Validate metrics processing
Expand All @@ -119,7 +121,7 @@ jobs:
PROMETHEUS_IMAGE: prom/prometheus:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.3
- name: Prepare environment
run: |
mkdir -p /opt/stack/
Expand Down Expand Up @@ -169,7 +171,7 @@ jobs:
run: |
docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \
-e GITHUB_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \
--workdir=$(dirname $BRIDGE_SOCKET) \
--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
run: |
Expand Down Expand Up @@ -200,6 +202,8 @@ jobs:
docker logs qdr
echo "========================= sg-core =======================" && \
docker logs sgcore
echo "========================= sg-bridge =======================" && \
docker logs sgbridge
echo "========================= ceilometer ====================" && \
sudo journalctl -xu [email protected]
echo "======================== prometheus =====================" && \
Expand All @@ -217,7 +221,7 @@ jobs:
PROMETHEUS_IMAGE: prom/prometheus:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.3
- name: Prepare environment
run: |
mkdir -p /opt/stack/
Expand Down Expand Up @@ -283,6 +287,10 @@ jobs:
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/run_validation.sh
#-------------------------------------------------------------------------------
logging:
# Disable Logging CI job, because it's failing. This functionality was never
# used in the downstream product. We can re-enable and fix the job if we
# determine the functionality is useful.
if: false
name: "[logging] handler: logs; application: elasticsearch, loki"
runs-on: ubuntu-22.04
env:
Expand All @@ -299,7 +307,7 @@ jobs:
RSYSLOG_VOLUME: "--volume ${{ github.workspace }}/ci/service_configs/rsyslog/rsyslog_config.conf:/etc/rsyslog.d/integration.conf:z"
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.3
# start data store services
- name: Start Elasticsearch service
run: |
Expand All @@ -326,7 +334,7 @@ jobs:
if: steps.bridge_branch.outcome == 'success'
run: |
docker run --name=sgbridge $BRIDGE_VOLUME -d -uroot --network host -e OPSTOOLS_REPO \
-e GITHUB_REF -e BRIDGE_SOCKET --workdir=$(dirname $BRIDGE_SOCKET) \
-e GITHUB_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
run: |
Expand Down
15 changes: 7 additions & 8 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
OPSTOOLS_REPO: https://git.centos.org/rpms/centos-release-opstools/raw/c8s-sig-opstools/f/SOURCES/CentOS-OpsTools.repo
OPSTOOLS_REPO: https://raw.githubusercontent.com/infrawatch/sg-core/04dcb34edd2c234b378222d2f9a17e15c0dad936/build/repos/opstools.repo

LOKI_IMAGE: quay.io/infrawatch/loki:2.4.2
LOKI_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/loki:/etc/loki:ro"
Expand All @@ -19,12 +19,11 @@ jobs:
golangci:
name: Linting
runs-on: ubuntu-20.04
container: 'quay.io/plmr/sg-core-ci'
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.3
#- name: download libraries
# run: go mod download
- name: golangci-lint
Expand All @@ -39,7 +38,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4.1.3
# start services
- name: Start Elasticsearch service
run: |
Expand Down Expand Up @@ -68,15 +67,15 @@ jobs:
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \
$TEST_IMAGE bash $PROJECT_ROOT/ci/unit/run_tests.sh
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
uses: shogo82148/actions-goveralls@v1.8.0
with:
path-to-profile: ${{ github.workspace }}/profile.cov
image-build:
name: Image build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v4.1.3
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Verify image builds
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: update PR with coveralls badge
uses: actions/github-script@v3
uses: actions/github-script@v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var BRANCH_NAME = process.env.BRANCH_NAME;
github.issues.createComment({
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
4 changes: 2 additions & 2 deletions build/repos/opstools.repo
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ enabled=0

[centos-opstools]
name=CentOS-OpsTools - collectd
mirrorlist=http://mirrorlist.centos.org/?arch=$basearch&release=$releasever-stream&repo=opstools-collectd-5
#baseurl=http://mirror.centos.org/$contentdir/$releasever-stream/opstools/$basearch/collectd-5/
#mirrorlist=http://mirrorlist.centos.org/?arch=$basearch&release=$releasever-stream&repo=opstools-collectd-5
baseurl=http://vault.centos.org/$releasever-stream/opstools/$basearch/collectd-5/
gpgcheck=0
enabled=1
skip_if_unavailable=1
Expand Down
4 changes: 2 additions & 2 deletions ci/integration/logging/run_bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -ex
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 gcc make qpid-proton-c-devel
dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config

# install and start sg-bridge
BRANCH="$(echo ${GITHUB_REF#refs/heads/})"
Expand All @@ -18,4 +18,4 @@ git checkout $BRANCH || true
make

touch $BRIDGE_SOCKET
./bridge --amqp_url amqp://localhost:5666/rsyslog/logs --gw_unix=$BRIDGE_SOCKET
./bridge --amqp_url amqp://localhost:5666/rsyslog/logs --gw_unix=$BRIDGE_SOCKET --stat_period 1
3 changes: 3 additions & 0 deletions ci/integration/logging/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ set -ex
# enable required repo(s)
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
# Update to use the vault mirror since Centos 8s is EOL
sed -i 's/^#baseurl.*$/baseurl=http:\/\/vault.centos.org\/$releasever-stream\/opstools\/$basearch\/collectd-5/g' /etc/yum.repos.d/CentOS-OpsTools.repo
sed -i 's/^mirror/#mirror/g' /etc/yum.repos.d/CentOS-OpsTools.repo

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

Expand Down
4 changes: 2 additions & 2 deletions ci/integration/metrics/run_bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CHANNEL=$QDR_CHANNEL
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 gcc make qpid-proton-c-devel
dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config

# install and start sg-bridge
BRANCH="$(echo ${GITHUB_REF#refs/heads/})"
Expand All @@ -20,4 +20,4 @@ git checkout $BRANCH || true
make

touch $BRIDGE_SOCKET
./bridge --amqp_url amqp://localhost:5666/$CHANNEL --gw_unix=$BRIDGE_SOCKET
./bridge --amqp_url amqp://localhost:5666/$CHANNEL --gw_unix=$BRIDGE_SOCKET --stat_period 1
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/smartystreets/goconvey v1.7.2 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
golang.org/x/sys v0.1.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down

0 comments on commit 375d0f8

Please sign in to comment.