Skip to content

Commit

Permalink
feat: performance enhancement (#527)
Browse files Browse the repository at this point in the history
* fix: performance enhancement (#483)

* fix: change the default udpConnectionTimeout to 3 (#441)

* chore(release): 1.6.1-beta.1

## [1.6.1-beta.1](v1.6.0...v1.6.1-beta.1) (2022-03-21)

### Bug Fixes

* change the default udpConnectionTimeout to 3 ([#441](#441)) ([e1004ca](e1004ca))

* build(pip): (deps): bump mongoengine from 0.23.1 to 0.24.1 (#444)

Bumps [mongoengine](https://github.com/MongoEngine/mongoengine) from 0.23.1 to 0.24.1.
- [Release notes](https://github.com/MongoEngine/mongoengine/releases)
- [Changelog](https://github.com/MongoEngine/mongoengine/blob/master/docs/changelog.rst)
- [Commits](MongoEngine/mongoengine@v0.23.1...v0.24.1)

---
updated-dependencies:
- dependency-name: mongoengine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add retry mechanism to splunk queries of integration tests (#445)

* test: add retry mechanism to splunk queries of integration tests [run-int-tests]

* fix: apply pre-commit

* fix: enhancing SC4SNMP Telemetry (#443)

* fix: add headers for enhancing Telemetry

* test: increase static profiles time delay after the upgrade to 30 seconds [run-int-tests]

* chore(release): 1.6.1-beta.2

## [1.6.1-beta.2](v1.6.1-beta.1...v1.6.1-beta.2) (2022-03-23)

### Bug Fixes

* enhancing SC4SNMP Telemetry ([#443](#443)) ([43785fb](43785fb))

* build(pip): (deps-dev): bump mkdocs-material from 8.2.5 to 8.2.6 (#446)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.2.5 to 8.2.6.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](squidfunk/mkdocs-material@8.2.5...8.2.6)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: replace celerybeatmongo repo  (#448)

* fix: replace celerybeatmongo repo

* fix: modify poetry.lock

* chore(release): 1.6.1-beta.3

## [1.6.1-beta.3](v1.6.1-beta.2...v1.6.1-beta.3) (2022-03-25)

### Bug Fixes

* replace celerybeatmongo repo  ([#448](#448)) ([ddd25aa](ddd25aa))

* chore(release): 1.6.1-beta.1

## [1.6.1-beta.1](v1.6.0...v1.6.1-beta.1) (2022-04-07)

### Bug Fixes

* enhance SC4SNMP telemetry, improve integration tests ([#457](#457)) ([6dd7c1e](6dd7c1e)), closes [#441](#441) [#441](#441) [#444](#444)

* feat: experimental change to divide tasks on 2 queues (poller and trap) and workers that consumes from them

* feat: experimental change to divide tasks on 2 queues (poller and trap) and workers that consumes from them

* feat: change the way worker are initialized

* feat: change dpeloyment name

* feat: change deployment name

* feat: use different replicaCount and concurrency for trap and poller workers

* build(pip): (deps): bump pyrate-limiter from 2.6.0 to 2.8.1 (#463)

Bumps [pyrate-limiter](https://github.com/vutran1710/PyrateLimiter) from 2.6.0 to 2.8.1.
- [Release notes](https://github.com/vutran1710/PyrateLimiter/releases)
- [Changelog](https://github.com/vutran1710/PyrateLimiter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vutran1710/PyrateLimiter/commits)

---
updated-dependencies:
- dependency-name: pyrate-limiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add another queue only for prepare and send

* feat: test redis as a celerybeat tool

* fix: redis port

* fix: redis url in inventory pod

* feat: add autoscaling for poller pods

* feat: change RabbitMQ to Redis

* feat: add autoscaling

* fix: workers cleanup

* fix: default values file

* fix: delete RabbitMQ

* fix: enable autoscaling for traps

* fix: move tolerations and podAffinity up

* fix: worker annotation typo

* fix: change directory name

* fix: add _helper for worker

* fix: ident of labels in poller

* fix: update hpa version

* fix: delete memory check in horizontal autoscaling

* fix: set default resources for pods

* fix: fix typo

* fix: define resources for workers

* fix: refactor traps to trap

* fix: adjust poetry packages and wait-for-dep

* fix: local installation for integration tests script

* fix: microk8s documentation and integration tests (#466)

* fix: change the default udpConnectionTimeout to 3 (#441)

* chore(release): 1.6.1-beta.1

## [1.6.1-beta.1](v1.6.0...v1.6.1-beta.1) (2022-03-21)

### Bug Fixes

* change the default udpConnectionTimeout to 3 ([#441](#441)) ([e1004ca](e1004ca))

* build(pip): (deps): bump mongoengine from 0.23.1 to 0.24.1 (#444)

Bumps [mongoengine](https://github.com/MongoEngine/mongoengine) from 0.23.1 to 0.24.1.
- [Release notes](https://github.com/MongoEngine/mongoengine/releases)
- [Changelog](https://github.com/MongoEngine/mongoengine/blob/master/docs/changelog.rst)
- [Commits](MongoEngine/mongoengine@v0.23.1...v0.24.1)

---
updated-dependencies:
- dependency-name: mongoengine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add retry mechanism to splunk queries of integration tests (#445)

* test: add retry mechanism to splunk queries of integration tests [run-int-tests]

* fix: apply pre-commit

* fix: enhancing SC4SNMP Telemetry (#443)

* fix: add headers for enhancing Telemetry

* test: increase static profiles time delay after the upgrade to 30 seconds [run-int-tests]

* chore(release): 1.6.1-beta.2

## [1.6.1-beta.2](v1.6.1-beta.1...v1.6.1-beta.2) (2022-03-23)

### Bug Fixes

* enhancing SC4SNMP Telemetry ([#443](#443)) ([43785fb](43785fb))

* build(pip): (deps-dev): bump mkdocs-material from 8.2.5 to 8.2.6 (#446)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.2.5 to 8.2.6.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](squidfunk/mkdocs-material@8.2.5...8.2.6)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: replace celerybeatmongo repo  (#448)

* fix: replace celerybeatmongo repo

* fix: modify poetry.lock

* chore(release): 1.6.1-beta.3

## [1.6.1-beta.3](v1.6.1-beta.2...v1.6.1-beta.3) (2022-03-25)

### Bug Fixes

* replace celerybeatmongo repo  ([#448](#448)) ([ddd25aa](ddd25aa))

* fix: microk8s installation enabling addons

* [run-int-tests]

* fix: change test to 2/3 retries, as one retry to splunk takes about 1 minute

* [run-int-tests]

* fix: delete unnecessary part from the documentation

* fix: clarify index requirements

* fix: typo

Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: make task timeout configurable (#476)

* fix: make task timeout configurable

* fix: add debug for monitoring the state of walk

* chore(release): 1.6.2-beta.1

## [1.6.2-beta.1](v1.6.1...v1.6.2-beta.1) (2022-05-25)

### Bug Fixes

* make task timeout configurable ([#476](#476)) ([79e05d2](79e05d2))

* fix: disable first full walk when small walk is enabled (#477)

* fix: disable first full walk when small walk is enabled

* fix: apply pre-commit and rename tests

* fix: unit tests

* chore(release): 1.6.2-beta.2

## [1.6.2-beta.2](v1.6.2-beta.1...v1.6.2-beta.2) (2022-05-26)

### Bug Fixes

* disable first full walk when small walk is enabled ([#477](#477)) ([d8570cb](d8570cb))

* doc: clarification and adjust integration tests (#478)

* doc: add information about small walk, fix broken link

* fix: delete stale integration tests for small walk 

* fix: apply pre-commit

* fix: metadata flags for workers

* fix: metadata flags for workers selectorLabels

* fix: default selectorLabel

* fix: unit tests

* fix: comment out v3 test that doesn't work

* fix: profiles schedules calculating starting from every walk operation

* fix: waiting for trap pod initialization in integration tests

* fix: add redis default config to base values.yaml

* fix: migration to the new version, refactor of tasks generator

* fix: set of profiles to list

* fix: add unit tests to task_generator.py

* doc: autoscaling doc update

* refactor: Helm files

* fix: wrong env variables for traps

* fix: increase resources for traps

* test: add unit tests for schema migration

* test: fix unit tests for schema migration

* test: apply pre-commit

* doc: update documentation

* doc: update performance specs

* fix: increase resources for poller pod

* fix: update poetry dependencies

* doc: bring back previous performance specs for GETs

Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(release): 1.6.3-beta.1

## [1.6.3-beta.1](v1.6.2...v1.6.3-beta.1) (2022-06-23)

### Bug Fixes

* performance enhancement ([#483](#483)) ([8965301](8965301)), closes [#441](#441) [#441](#441) [#444](#444)

* fix: cleanup after performance enhancement (#485)

* fix: deployment replicaCount value and enhance documentation with visualisation of application working

* doc: trap example

* fix: crop images, expand images after click

* chore(release): 1.6.3-beta.2

## [1.6.3-beta.2](v1.6.3-beta.1...v1.6.3-beta.2) (2022-06-24)

### Bug Fixes

* cleanup after performance enhancement ([#485](#485)) ([1d4fde6](1d4fde6))

* doc: simplify hard to understand parts of the docs and update perf specs for GETs (#486)

* chore: fossa integration (#488)

* chore: fossa integration

* fix: delete flower unused dependency

Co-authored-by: omrozowicz-splunk <[email protected]>

* chore: piepline documentation publishing fix (#493)

* chore: piepline documentation publishing fix

* chore: documentation versioning cleanup

* chore: run list of versions to delete

* chore: change grep

* chore: version cleanup

* chore: delete one version

* chore: build documentation for tag versions

* chore: delete -next branches

* chore: hardcode next latest version

* chore: delete mike cleanup (#498)

* fix: refactor of inventory fields (#494)

* fix: refactor of inventory fields

* fix: deleted unnecessary line in tasks.py and .gitignore after pull request review

* fix: changes after pre-commit

* fix: added preprocessing of old inventory fields names to from_dict method in InventoryRecord class. Updated reference to class attributes in test_utils.py

* fix: removed from_dict() method from InventoryRecord class and changed InventoryRecord creation in test_auth.py so that it doesn't use from_dict() method

* fix: changed InventoryRecord creation in unit tests so that it doesn't use from_dict() method

* fix: increased test coverage of inventory_record.py

* fix: run pre-commit on all files

* chore(release): 1.6.3-beta.3

## [1.6.3-beta.3](v1.6.3-beta.2...v1.6.3-beta.3) (2022-07-13)

### Bug Fixes

* refactor of inventory fields ([#494](#494)) ([148280f](148280f))

* fix: worker pods recreation (#499)

* fix: worker environmental variables, add configurable walk retry max interval

* chore(release): 1.6.3-beta.4

## [1.6.3-beta.4](v1.6.3-beta.3...v1.6.3-beta.4) (2022-07-19)

### Bug Fixes

* worker pods recreation ([#499](#499)) ([6ac95a5](6ac95a5))

* fix: bump version of redbeat (#501)

* chore(release): 1.6.3-beta.5

## [1.6.3-beta.5](v1.6.3-beta.4...v1.6.3-beta.5) (2022-07-22)

### Bug Fixes

* bump version of redbeat ([#501](#501)) ([93c2132](93c2132))

* doc: typos fixes, reorganisation of profiles configuration instructions (#500)

* doc: typos fixes, reorganisation of profiles configuration instructions

* doc: delete walk type form smart profiles

* doc: apply PR review suggestions

* test: I added test of snmpv3 walk (#502)

* test: add test of snmpv3 walk

* test: decrease wait time for v3 polling case

* refactor: apply pre-commit

Co-authored-by: omrozowicz-splunk <[email protected]>

* fix: add logging for profiles assigned, update monit for SC4SNMP upgrade (#505)

* fix: add logging for profiles assigned, update monit for SC4SNMP upgrade

* chore: apply pre-commit

* chore: update Contact information in Readme

* fix: monit content

* chore(release): 1.6.3-beta.6

## [1.6.3-beta.6](v1.6.3-beta.5...v1.6.3-beta.6) (2022-07-27)

### Bug Fixes

* add logging for profiles assigned, update monit for SC4SNMP upgrade ([#505](#505)) ([adf87ae](adf87ae))

* fix: creating packages for offline installation in the pipeline (#507)

* fix: Creating packages for offline installation in the pipeline

* fix: changed create_packages.sh script so that version of splunk-connect-for-snmp package downloaded from helm isn't hardcoded

* fix: changed action trigger to push and added release

* chore(release): 1.6.3-beta.7

## [1.6.3-beta.7](v1.6.3-beta.6...v1.6.3-beta.7) (2022-07-28)

### Bug Fixes

* creating packages for offline installation in the pipeline ([#507](#507)) ([5aa51f3](5aa51f3))

* fix: offline installation workflow, small walk frequency not updating… (#508)

* fix: offline installation workflow, small walk frequency not updating, add logging for using smart profile as a static one

* fix: bring back gh release upload

* chore(release): 1.6.3-beta.8

## [1.6.3-beta.8](v1.6.3-beta.7...v1.6.3-beta.8) (2022-07-28)

### Bug Fixes

* offline installation workflow, small walk frequency not updating… ([#508](#508)) ([ace577f](ace577f))

* fix: small walk issue (#511)

* fix: walk profile as a static profile + unit tests

* fix: updating profiles to mongo instead of a mount file

* fix: apply pre-commit and [run-int-tests]

* fix: PROFILES_RELOAD_DELAY back to env variable

* chore(release): 1.6.3-beta.9

## [1.6.3-beta.9](v1.6.3-beta.8...v1.6.3-beta.9) (2022-07-30)

### Bug Fixes

* small walk issue ([#511](#511)) ([7c5834b](7c5834b))

* fix: added automatic sim_image and otel helm chart packages creation … (#512)

* fix: Added automatic sim_image and otel helm chart packages creation for offline installation

* fix: downloading of one more image for mongodb

* chore(release): 1.6.3-beta.10

## [1.6.3-beta.10](v1.6.3-beta.9...v1.6.3-beta.10) (2022-08-03)

### Bug Fixes

* added automatic sim_image and otel helm chart packages creation … ([#512](#512)) ([aebee37](aebee37))

* fix: otel package upload for offline installation (#513)

* fix: otel package upload so that it works in the workflow

* fix: check if fossa passes

* chore(release): 1.6.3-beta.11

## [1.6.3-beta.11](v1.6.3-beta.10...v1.6.3-beta.11) (2022-08-03)

### Bug Fixes

* otel package upload for offline installation ([#513](#513)) ([b6eb532](b6eb532))

* doc:  documentation of SC4SNMP offline installation (#510)

* doc:  documentation of SC4SNMP offline installation

* doc: instead of 'lab' use 'sc4snmp installation server', added pullPolicy: Never to sim and redis, corrected other suggestions from review

* doc: added documentation of the OpenTelemetry offline installation

* doc: removed explicit <tag> specification in splunk image in sc4snmp offlinie installation doc

* fix: add handling exceptions for loading mibs, fix sender priority, change autoscaling parametrs from entrypoint (#514)

* chore(release): 1.6.3-beta.12

## [1.6.3-beta.12](v1.6.3-beta.11...v1.6.3-beta.12) (2022-08-05)

### Bug Fixes

* add handling exceptions for loading mibs, fix sender priority, change autoscaling parametrs from entrypoint ([#514](#514)) ([7ac35e7](7ac35e7))

* doc: snmpv3 (#518)

* doc: update trap v3 configuration

* fix: security engines in traps (#519)

* fix: define list of security engines

* fix: default value of security engine

* fix: join security engines

* fix: subpaths of secrets

* fix: write *** instead of passwords in debug logs

* fix: upgrade default replicaCounts for workers

* fix: setup default securityEngineId

* doc: update snmptrap v3 documentation

* chore(release): 1.6.3-beta.13

## [1.6.3-beta.13](v1.6.3-beta.12...v1.6.3-beta.13) (2022-08-11)

### Bug Fixes

* security engines in traps ([#519](#519)) ([de16713](de16713))

* fix: performance adjustment (#515)

* fix: add handling exceptions for loading mibs, fix sender priority, change autoscaling parameters from an entrypoint

* fix: update default resources of pods

* fix: remove hpa for ram and resources for ram

* fix: decrease requests and limits for traps

* fix: change the way trap's loading mibs

* fix: refactor oid_values variable

* fix: increase cpu limits

* doc: add upgrading section ot the documentation

* doc: fix documentation

* test: fix unit tests

* doc: describe autoscaling more and update planning section

* chore(release): 1.6.3-beta.14

## [1.6.3-beta.14](v1.6.3-beta.13...v1.6.3-beta.14) (2022-08-11)

### Bug Fixes

* performance adjustment ([#515](#515)) ([34db1d2](34db1d2))

* fix: update develop versioning (#525)

* doc: snmpv3 traps issues (#516)

* doc: traps v3

* doc: update creation os snmpv3 secrets

* fix: trap secrets mount and security engine defining (#521)

* fix: trap secrets mount and security engine defining

* doc: add documentation about upgrading SC4SNMP

* chore(release): 1.6.3

## [1.6.3](v1.6.2...v1.6.3) (2022-08-12)

### Bug Fixes

* trap secrets mount and security engine defining ([#521](#521)) ([bbe4bce](bbe4bce))

Co-authored-by: semantic-release-bot <[email protected]>

* chore(release): 1.6.3-beta.15

## [1.6.3-beta.15](v1.6.3-beta.14...v1.6.3-beta.15) (2022-08-23)

### Bug Fixes

* update develop versioning ([#525](#525)) ([7520ed4](7520ed4)), closes [#516](#516) [#521](#521) [#521](#521)

* doc: documentation for installation on small environments (#520)

* doc: documentation for installation on small environments

* doc: applied changes from the review

* doc: update helm NOTES

* chore: set semantic release dry run mode to true

* chore: delete dry run from semantic release

* feat: update version in chart notes to 1.7

Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam Ryznar <[email protected]>
Co-authored-by: wojtekzyla <[email protected]>
  • Loading branch information
5 people authored Aug 23, 2022
1 parent 8cacf83 commit 6cdeec2
Show file tree
Hide file tree
Showing 86 changed files with 3,990 additions and 1,894 deletions.
5 changes: 5 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 3
server: https://app.fossa.com
project:
id: "splunk-connect-for-snmp"
team: "TA-Automation"
4 changes: 2 additions & 2 deletions .github/workflows/cd-docs-pdf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
name: Produce PDF from docs
run: |
sudo apt-get install -y pandoc texlive librsvg2-bin texlive-latex-extra
pandoc -s --pdf-engine=pdflatex -o /tmp/SC4S_docs.pdf $(find . -type f -name "*.md") -H deeplists.tex
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
with:
files: /tmp/SC4S_docs.pdf
files: /tmp/SC4SNMP_docs.pdf
49 changes: 30 additions & 19 deletions .github/workflows/ci-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,37 @@ on:
- "main"
- "develop"
- "next"
workflow_call:
secrets:
FOSSA_API_KEY:
description: API token for FOSSA app
required: true
jobs:
semgrep:
name: Scan
fossa-scan:
name: fossa
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: run fossa anlyze and create report
run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
fossa analyze --debug
fossa report attribution --format text > /tmp/THIRDPARTY
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
- name: upload THIRDPARTY file
uses: actions/upload-artifact@v2
with:
name: THIRDPARTY
path: /tmp/THIRDPARTY
- name: run fossa test
run: |
fossa test --debug
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
semgrep-scan:
name: semgrep
runs-on: ubuntu-latest
if: (github.actor != 'dependabot[bot]')
steps:
Expand Down Expand Up @@ -210,21 +238,4 @@ jobs:
@google/semantic-release-replace-plugin
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}
mike:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
token: "${{ secrets.PAT_CLATOOL }}"

- name: Upload Docs
run: |
BRANCH=$(echo $GITHUB_REF | cut -d / -f 3)
echo $BRANCH
pip3 install poetry
poetry install
poetry run mike deploy -p $BRANCH
44 changes: 44 additions & 0 deletions .github/workflows/mike.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ########################################################################
# Copyright 2021 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ########################################################################
name: mike
on:
push:
branches:
- "main"
- "develop"
- "next"
tags-ignore:
- "*beta*"
- "*next*"
jobs:
mike:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
token: "${{ secrets.PAT_CLATOOL }}"

- name: Upload Docs
run: |
BRANCH=$(echo $GITHUB_REF | cut -d / -f 3)
echo $BRANCH
pip3 install poetry
poetry install
poetry run mike deploy -p $BRANCH
29 changes: 29 additions & 0 deletions .github/workflows/offline-installation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: offline-installation
on:
push:
tags:
- "v*"

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1

- name: Download images and upload them
run: |
./${{ env.SCRIPT_NAME }}
VERSION=$(echo $GITHUB_REF | cut -d / -f 3)
gh release upload $VERSION /tmp/package/packages/*
env:
SCRIPT_NAME: create_packages.sh
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}
path: /tmp/package/packages
env:
ARTIFACT_NAME: offline-installation-packages
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,15 @@ secrets

integration_tests/scripts/set_env.sh


# Edited by wzya
integration_tests/scripts/.terraform/providers/registry.terraform.io/hashicorp/aws/4.22.0/darwin_arm64/terraform-provider-aws_v4.22.0_x5
integration_tests/scripts/splunk-connect-for-snmp.tgz
integration_tests/scripts/terraform.tfstate
integration_tests/scripts/terraform.tfstate.backup
integration_tests/scripts/.terraform.lock.hcl
integration_tests/scripts/inventory.yaml
integration_tests/scripts/main.tf
integration_tests/scripts/.terraform
.DS_Store
snmp-ssh-key.pem
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# splunk-connect-for-snmp
Splunk Connect for SNMP Gets SNMP data in to Splunk Enterprise and Splunk Cloud Platform.
This project repo is primarily the documentation and publishing repo for the integrated set
of components.

# Badges

Expand All @@ -11,5 +9,7 @@ of components.

For deployment and user documentation [see](https://splunk.github.io/splunk-connect-for-snmp/)

#
# Contact
Feel free to contact us via [#splunk-connect-for-snmp](https://splunk-usergroups.slack.com/archives/C01K4V86WV7) slack channel.

#
10 changes: 5 additions & 5 deletions charts/splunk-connect-for-snmp/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ dependencies:
- name: mongodb
repository: https://charts.bitnami.com/bitnami
version: 10.30.12
- name: rabbitmq
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 8.24.13
version: 16.8.10
- name: mibserver
repository: https://pysnmp.github.io/mibs/charts/
version: 1.14.0
digest: sha256:545a9f4d0a644b6d8dd920bf64833959cd75dd956805de6c7a42d47484ee52de
generated: "2022-02-03T15:52:47.974625+01:00"
version: 1.14.2
digest: sha256:882ca6e0cd371b94f1f1f06861f593b515b908e7504d40d187595ecdb863c4c6
generated: "2022-06-15T16:29:53.985105+02:00"
4 changes: 2 additions & 2 deletions charts/splunk-connect-for-snmp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ dependencies:
- name: mongodb
version: ~10.30
repository: https://charts.bitnami.com/bitnami
- name: rabbitmq
version: ~8.24
- name: redis
version: ~16.8
repository: https://charts.bitnami.com/bitnami
- name: mibserver
version: ~1.14.0
Expand Down
31 changes: 9 additions & 22 deletions charts/splunk-connect-for-snmp/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
1. Get the application URL by running these commands:
{{- if .Values.traps.ingress.enabled }}
{{- range $host := .Values.traps.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.traps.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.traps.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "splunk-connect-for-snmp.traps.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.traps.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "splunk-connect-for-snmp.traps.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "splunk-connect-for-snmp.traps.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.traps.service.port }}
{{- else if contains "ClusterIP" .Values.traps.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "splunk-connect-for-snmp.traps.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
Version 1.7 of SC4SNMP add new feature which enables horizontal worker pods autoscaling, in order to use it you will need to turn on microk8s metrics-server addon:

microk8s enable metrics-server

and you should also update worker configuration in values.yaml file according to the documentation:
https://splunk.github.io/splunk-connect-for-snmp/main/configuration/worker-configuration

values.yaml template is available here:
https://splunk.github.io/splunk-connect-for-snmp/main/gettingstarted/sc4snmp-installation
9 changes: 6 additions & 3 deletions charts/splunk-connect-for-snmp/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
{{- end }}

{{- define "splunk-connect-for-snmp.celery_url" -}}
{{- printf "amqp://%s:%s@%s-rabbitmq:5672/" .Values.rabbitmq.auth.username .Values.rabbitmq.auth.password .Release.Name }}
{{- end }}
{{- printf "redis://%s-redis-headless:6379/0" .Release.Name }}
{{- end }}

{{- define "splunk-connect-for-snmp.redis_url" -}}
{{- printf "redis://%s-redis-headless:6379/1" .Release.Name }}
{{- end }}

{{- define "splunk-connect-for-snmp.name" -}}
{{- default (printf "%s" .Chart.Name ) .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
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 @@ -29,6 +29,8 @@ spec:
env:
- name: CONFIG_PATH
value: /app/config/config.yaml
- name: REDIS_URL
value: {{ include "splunk-connect-for-snmp.redis_url" . }}
- name: INVENTORY_PATH
value: /app/inventory/inventory.csv
- name: CELERY_BROKER_URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ spec:
env:
- name: CONFIG_PATH
value: /app/config/config.yaml
- name: REDIS_URL
value: {{ include "splunk-connect-for-snmp.redis_url" . }}
- name: CELERY_BROKER_URL
value: {{ include "splunk-connect-for-snmp.celery_url" . }}
- name: MONGO_URI
Expand Down
4 changes: 2 additions & 2 deletions charts/splunk-connect-for-snmp/templates/traps/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "splunk-connect-for-snmp.traps.name" -}}
{{- default (printf "%s-%s" .Chart.Name "traps") .Values.traps.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default (printf "%s-%s" .Chart.Name "trap") .Values.traps.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -14,7 +14,7 @@ If release name contains chart name it will be used as a full name.
{{- if .Values.traps.fullnameOverride }}
{{- .Values.traps.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default (printf "%s-%s" .Chart.Name "traps") .Values.traps.nameOverride }}
{{- $name := default (printf "%s-%s" .Chart.Name "trap") .Values.traps.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
{{- if .Values.splunk.protocol }}
- name: SPLUNK_HEC_SCHEME
value: {{ .Values.splunk.protocol | default "https" | quote }}
{{- end}}
{{- end}}
- name: SPLUNK_HEC_HOST
value: {{ .Values.splunk.host | quote }}
{{- if .Values.splunk.port }}
Expand Down
Loading

0 comments on commit 6cdeec2

Please sign in to comment.