Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: partial walk #990

Draft
wants to merge 46 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e88717a
chore: remove redundant code (#974)
ajasnosz Mar 8, 2024
461774a
feat: add docker compose deployment configuration (#973)
wojtekzyla Mar 14, 2024
2bcfedd
fix: update .releaserc (#979)
wojtekzyla Mar 14, 2024
682cf21
chore(release): 1.11.0-beta.1
srv-rr-github-token Mar 14, 2024
effa082
chore(deps): update dependency pytest to v8.1.1 (#959)
renovate[bot] Mar 20, 2024
9c10712
chore: update jinja2 and pycryptodomex (#981)
ajasnosz Mar 21, 2024
33cd16b
chore(deps): update oleksiyrudenko/gha-git-credentials action to v2.1…
renovate[bot] Mar 21, 2024
3816095
chore(deps): update splunk/addonfactory-github-workflows action to v1…
renovate[bot] Mar 21, 2024
7955a12
chore(deps): update pre-commit/action action to v3.0.1 (#955)
renovate[bot] Mar 21, 2024
f7ea224
chore(deps): update splunk/semantic-release-action action to v1.3.4 (…
renovate[bot] Mar 21, 2024
bda2bd4
chore(deps): update softprops/action-gh-release action to v2 (#977)
renovate[bot] Mar 21, 2024
a006dd9
chore(deps): update dependency ruamel.yaml to v0.18.6 (#954)
renovate[bot] Mar 21, 2024
86e3ebe
chore(deps): update dependency pymongo to v4.6.2 (#963)
renovate[bot] Mar 21, 2024
4d5f2ba
docs: add restart instruction (#983)
ajasnosz Mar 21, 2024
cd2ddee
chore(deps): update docker/login-action action to v3.1.0 (#984)
renovate[bot] Mar 22, 2024
5a944e4
fix: fix formatting of Debug Splunk Connect for SNMP documentation (#…
wojtekzyla Mar 27, 2024
04dd6fd
chore(release): 1.11.0-beta.2
srv-rr-github-token Mar 27, 2024
86460cc
docs: add template for ui file (#992)
ajasnosz Apr 12, 2024
6e4f634
Fix: improve errors message (#993)
ajasnosz Apr 12, 2024
ead94b3
fix: improve mkdocs.yml file formatting (#994)
wojtekzyla Apr 12, 2024
d76b88f
chore(release): 1.11.0-beta.3
srv-rr-github-token Apr 12, 2024
194290c
chore(deps): update dependency pymongo to v4.6.3 (#989)
renovate[bot] Apr 16, 2024
0f85f17
chore(deps): update peaceiris/actions-gh-pages action to v4 (#991)
renovate[bot] Apr 16, 2024
2d80cba
chore(deps): update dependency pytest-cov to v5 (#987)
renovate[bot] Apr 16, 2024
98e5438
chore: bump dnspython snd idna (#995)
ajasnosz Apr 16, 2024
c238f72
chore(deps): update dependency opentelemetry-api to v1.24.0 (#931)
renovate[bot] Apr 17, 2024
e14bb6f
chore(deps): update dependency mkdocs-material to v9.5.18 (#934)
renovate[bot] Apr 17, 2024
80d72c0
chore(deps): update dependency pydantic to v1.10.15 (#942)
renovate[bot] Apr 17, 2024
0516087
chore(deps): update dependency requests-ratelimiter to ^0.6.0 (#949)
renovate[bot] Apr 17, 2024
0578dd4
chore(deps): update dependency requests-cache to v1.2.0 (#960)
renovate[bot] Apr 17, 2024
f3421f4
chore(deps): update dependency mongoengine to ^0.28.0 (#969)
renovate[bot] Apr 17, 2024
8d3350f
chore(deps): update helm release redis to v19 (#986)
renovate[bot] Apr 17, 2024
dcca9aa
chore: fix operators and imports (#997)
ajasnosz Apr 18, 2024
91b5fbe
chore: fix semantic-release-replace-plugin (#1000)
ajasnosz Apr 19, 2024
3c9273b
fix: fix a bug with values.yaml not being loaded to the UI while migr…
wojtekzyla Apr 19, 2024
2eee8cf
chore: fix semantic plugin (#1002)
ajasnosz Apr 19, 2024
f1bf18a
chore(release): 1.11.0-beta.4
srv-rr-github-token Apr 19, 2024
c415d0e
fix: fix sonarqube issues with f-string and regex (#1001)
wojtekzyla Apr 22, 2024
1bb2b6a
chore(release): 1.11.0-beta.5
srv-rr-github-token Apr 22, 2024
642c539
fix: update microk8s to v1.30 (#1004)
ajasnosz Apr 25, 2024
1ce5abc
chore(release): 1.11.0-beta.6
srv-rr-github-token Apr 25, 2024
34affa8
chore: resolve shell issues (#1008)
ajasnosz Apr 25, 2024
1ffd1ae
chore: remove duplicated functions (#1009)
ajasnosz Apr 26, 2024
94f3a47
feat: partial walk
ajasnosz Apr 5, 2024
c845843
test: test [run-int-tests] [run-ui-tests]
ajasnosz Apr 26, 2024
0b1887e
docs: add documentation about partial walk
ajasnosz May 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Fixes # (issue)

Please delete options that are not relevant.

- [ ] Dependency update
- [ ] Bug fix
- [ ] New feature
- [ ] Refactor/improvement
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/agreements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
call-workflow-agreements:
uses: splunk/addonfactory-github-workflows/.github/workflows/[email protected].1
uses: splunk/addonfactory-github-workflows/.github/workflows/[email protected].2
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-docs-pdf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
sudo apt-get install -y pandoc texlive librsvg2-bin texlive-latex-extra
pandoc -s --pdf-engine=pdflatex -o /tmp/SC4S4SNMP_docs.pdf $(find . -type f -name "*.md") -H deeplists.tex
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: /tmp/SC4SNMP_docs.pdf
6 changes: 3 additions & 3 deletions .github/workflows/cd-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oleksiyrudenko/[email protected].1
- uses: oleksiyrudenko/[email protected].2
with:
token: "${{ secrets.PAT_CLATOOL }}"

Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
helm repo index /tmp/package --url https://github.com/splunk/splunk-connect-for-snmp/releases/download/$VERSION --merge /tmp/origin/index.yaml
cp /tmp/package/index.yaml /tmp/index/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: /tmp/index
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/ci-docker-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: create-compose-files
on:
push:
tags:
- "v*"

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
strategy:
matrix:
python-version:
- 3.9
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Zip docker_compose directory and upload it
run: |
zip -r docker_compose.zip docker_compose
VERSION=$(echo $GITHUB_REF | cut -d / -f 3)
gh release upload $VERSION docker_compose.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: docker_compose.zip
env:
ARTIFACT_NAME: docker_compose
24 changes: 12 additions & 12 deletions .github/workflows/ci-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected].0
- uses: pre-commit/[email protected].1
test-unit:
name: Test Unit Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
Expand All @@ -92,16 +92,16 @@ jobs:
- name: Run Pytest with coverage
run: |
poetry run pytest --cov=./splunk_connect_for_snmp --cov-report=xml --junitxml=test-results/junit.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.txt
verbose: true
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage.xml
# directory: ./coverage/reports/
# env_vars: OS,PYTHON
# fail_ci_if_error: true
# path_to_write_report: ./coverage/codecov_report.txt
# verbose: true
- uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
uses: actions/checkout@v4
- name: run install_microk8s.sh
run: |
sudo snap install microk8s --classic --channel=1.25/stable
sudo snap install microk8s --classic --channel=1.30/stable
sudo apt-get install snmp -y
sudo apt-get install python3-dev -y
- name: run automatic_setup.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -77,14 +77,14 @@ jobs:
node-version: "14"
- name: Semantic Release
id: version
uses: splunk/[email protected].3
uses: splunk/[email protected].4
with:
git_committer_name: ${{ secrets.SA_GH_USER_NAME }}
git_committer_email: ${{ secrets.SA_GH_USER_EMAIL }}
gpg_private_key: ${{ secrets.SA_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.SA_GPG_PASSPHRASE }}
extra_plugins: |
@google/semantic-release-replace-plugin
@google/semantic-release-replace-plugin@1.2.7
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}

2 changes: 1 addition & 1 deletion .github/workflows/ci-ui-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

- name: install microk8s
run: |
sudo snap install microk8s --classic --channel=1.25/stable
sudo snap install microk8s --classic --channel=1.30/stable
sudo apt-get install snmp -y
sudo apt-get install python3-dev -y

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mike.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oleksiyrudenko/[email protected].1
- uses: oleksiyrudenko/[email protected].2
with:
token: "${{ secrets.PAT_CLATOOL }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
permissions:
contents: write
packages: write
uses: splunk/addonfactory-github-workflows/.github/workflows/[email protected].1
uses: splunk/addonfactory-github-workflows/.github/workflows/[email protected].2
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ celerybeat.pid

# Environments
.env
!docker_compose/.env
.venv
env/
venv/
Expand Down
30 changes: 29 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,34 @@
}
],
"countMatches": true
},
{
"files": ["docker_compose/.env"],
"from": "^SC4SNMP_TAG=.*",
"to": "SC4SNMP_TAG=\"${nextRelease.version}\"",
"results": [
{
"file": "docker_compose/.env",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
}
],
"countMatches": true
},
{
"files": ["docker_compose/.env"],
"from": "^SC4SNMP_VERSION=.*",
"to": "SC4SNMP_VERSION=\"${nextRelease.version}\"",
"results": [
{
"file": "docker_compose/.env",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
}
],
"countMatches": true
}
]
}
Expand All @@ -66,7 +94,7 @@
[
"@semantic-release/git",
{
"assets": ["NOTICE", "charts/splunk-connect-for-snmp/Chart.yaml", "pyproject.toml", "splunk_connect_for_snmp/__init__.py"],
"assets": ["NOTICE", "charts/splunk-connect-for-snmp/Chart.yaml", "pyproject.toml", "splunk_connect_for_snmp/__init__.py", "docker_compose/.env"],
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}",
},
],
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

### Changed
- add docker compose deployment
- update default microk8s to 1.30

### Fixed
- fixed a bug with configuration from values.yaml not being transferred to the UI while migrating to SC4SNMP-UI

## [1.10.0]

### Changed
Expand Down
8 changes: 4 additions & 4 deletions charts/splunk-connect-for-snmp/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ dependencies:
version: 13.18.5
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 18.5.0
version: 19.1.0
- name: mibserver
repository: https://pysnmp.github.io/mibs/charts/
version: 1.15.7
digest: sha256:692c53672741f1c2f75c021c3f75ae45290195e5efaeffc9a06b5cb5b0d6ac12
generated: "2023-12-11T13:21:44.273403415Z"
version: 1.15.8
digest: sha256:25bb231b140ccc7aed166d3a142ccfa81e5026560d5009f8b0dedde9ecb0657a
generated: "2024-04-17T09:12:38.843604607Z"
6 changes: 3 additions & 3 deletions charts/splunk-connect-for-snmp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 1.10.0
version: 1.11.0-beta.6
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.10.0"
appVersion: "1.11.0-beta.6"
#
dependencies:
- name: mongodb
version: ~13.18.0
repository: https://charts.bitnami.com/bitnami
- name: redis
version: ~18.5.0
version: ~19.1.0
repository: https://charts.bitnami.com/bitnami
- name: mibserver
version: ~1.15
Expand Down
4 changes: 2 additions & 2 deletions charts/splunk-connect-for-snmp/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Walk profiles no longer include IF-MIB family by default.
If you've used this functionality before, please update the walk profile with ['IF-MIB'] varBind.
Default walk no longer calls full oid tree, instead it is collecting only 'SNMPv2-MIB'.
If you want to call full oid for the devices, you have to set enableFullWalk flag to true.
2 changes: 2 additions & 0 deletions charts/splunk-connect-for-snmp/templates/inventory/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ spec:
value: {{ .Values.scheduler.tasksExpiryTime | quote }}
- name: CONFIG_FROM_MONGO
value: {{ quote .Values.UI.enable | default "false" }}
- name: ENABLE_FULL_WALK
value: {{ .Values.poller.enableFullWalk | default "false" | quote }}
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
2 changes: 2 additions & 0 deletions charts/splunk-connect-for-snmp/templates/ui/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ spec:
value: {{ .Values.scheduler.logLevel | default "INFO" }}
- name: CONFIG_FROM_MONGO
value: {{ quote .Values.UI.enable | default "false" }}
- name: ENABLE_FULL_WALK
value: {{ .Values.poller.enableFullWalk | default "false" | quote }}
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
3 changes: 3 additions & 0 deletions charts/splunk-connect-for-snmp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ poller:
# https://splunk.github.io/splunk-connect-for-snmp/main/configuration/poller-configuration/#define-usernamesecrets
usernameSecrets: []

# flag to enable polling full walk tree for devices
enableFullWalk: false

# Here is where polling happens. Learn more on how to configure it here:
# https://splunk.github.io/splunk-connect-for-snmp/main/configuration/poller-configuration/

Expand Down
8 changes: 4 additions & 4 deletions create_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ do
done

pull_ui_images "/tmp/package/$SPLUNK_DIR"
docker save $images_to_pack > /tmp/package/packages/dependencies-images.tar
docker save "$images_to_pack" > /tmp/package/packages/dependencies-images.tar
cd ../..
tar -czvf packages/splunk-connect-for-snmp-chart.tar splunk-connect-for-snmp

Expand Down Expand Up @@ -258,15 +258,15 @@ else
fi

docker pull "$docker_image_pull"
docker save $docker_image_pull > /tmp/package/packages/sim_image.tar
docker save "$docker_image_pull" > /tmp/package/packages/sim_image.tar

# Download and package otel charts
cd /tmp/package/packages/ || exit
LOCATION=$(curl -s https://api.github.com/repos/signalfx/splunk-otel-collector-chart/releases/latest | grep "zipball_url" | awk '{ print $2 }' | sed 's/,$//' | sed 's/"//g' )
curl -L -o otel-repo.zip $LOCATION
curl -L -o otel-repo.zip "$LOCATION"
unzip otel-repo.zip
rm otel-repo.zip
OTEL_DIR=$(pwd)"/"$(ls | grep -E "signalfx-splunk.+")
OTEL_DIR=$(find "$(pwd)" -type d -name "signalfx-splunk*")
CHART_DIR="$OTEL_DIR/helm-charts/splunk-otel-collector"
OTEL_IMAGE_TAG=$(python3 "$python_script" "$CHART_DIR/Chart.yaml" "appVersion")
otel_image=quay.io/signalfx/splunk-otel-collector:"$OTEL_IMAGE_TAG"
Expand Down
Loading
Loading