diff --git a/.github/ci-collectors.json b/.github/ci-collectors.json new file mode 100644 index 0000000..3497fc0 --- /dev/null +++ b/.github/ci-collectors.json @@ -0,0 +1,6 @@ +{ + "tempstat": {}, + "diskstat": {}, + "memstat": {}, + "cpustat": {} +} diff --git a/.github/ci-config.json b/.github/ci-config.json index 402388d..15b2e6f 100644 --- a/.github/ci-config.json +++ b/.github/ci-config.json @@ -1,52 +1,8 @@ { - "sink": { - "user": "testuser", - "password": "testpass", - "host": "127.0.0.1", - "port": "9090", - "database": "testdb", - "organization": "testorg", - "type": "stdout" - }, - "interval": 3, - "duration": 1, - "collectors": [ - "tempstat", - "loadavg", - "memstat", - "netstat", - "ibstat", - "lustrestat", - "cpustat", - "topprocs", - "nvidia", - "diskstat", - "ipmistat", - "gpfs", - "cpufreq", - "cpufreq_cpuinfo" - ], - "default_tags": { - "cluster": "testcluster" - }, - "receiver": { - "type": "none" - }, - "collect_config": { - "topprocs": { - "num_procs": 2 - }, - "tempstat": { - "tag_override": { - "hwmon0": { - "type": "socket", - "type-id": "0" - }, - "hwmon1": { - "type": "socket", - "type-id": "1" - } - } - } - } -} \ No newline at end of file + "sinks": ".github/ci-sinks.json", + "collectors" : ".github/ci-collectors.json", + "receivers" : ".github/ci-receivers.json", + "router" : ".github/ci-router.json", + "interval": 5, + "duration": 1 +} diff --git a/.github/ci-receivers.json b/.github/ci-receivers.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.github/ci-receivers.json @@ -0,0 +1 @@ +[] diff --git a/.github/ci-router.json b/.github/ci-router.json new file mode 100644 index 0000000..a9f8714 --- /dev/null +++ b/.github/ci-router.json @@ -0,0 +1,22 @@ +{ + "add_tags" : [ + { + "key" : "cluster", + "value" : "testcluster", + "if" : "*" + }, + { + "key" : "test", + "value" : "testing", + "if" : "name == 'temp_package_id_0'" + } + ], + "delete_tags" : [ + { + "key" : "unit", + "value" : "*", + "if" : "*" + } + ], + "interval_timestamp" : true +} diff --git a/.github/ci-sinks.json b/.github/ci-sinks.json new file mode 100644 index 0000000..d304018 --- /dev/null +++ b/.github/ci-sinks.json @@ -0,0 +1,6 @@ +[ + { + "type" : "stdout", + "meta_as_tags" : true + } +] diff --git a/.github/workflows/rpmbuild.yml b/.github/workflows/rpmbuild.yml index 3e121d0..a7aee22 100644 --- a/.github/workflows/rpmbuild.yml +++ b/.github/workflows/rpmbuild.yml @@ -2,7 +2,7 @@ name: Run RPM Build on: push jobs: - build: + build-centos8: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -21,3 +21,41 @@ jobs: with: name: cc-metric-collector SRPM CentOS8 path: ${{ steps.rpm.outputs.source_rpm_path }} + build-centos-latest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: TomTheBear/rpmbuild@centos_latest + id: rpm + name: Build RPM package on CentOS 'Latest' + with: + spec_file: "./scripts/cc-metric-collector.spec" + - name: Save RPM as artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: cc-metric-collector RPM CentOS 'Latest' + path: ${{ steps.rpm.outputs.rpm_dir_path }} + - name: Save SRPM as artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: cc-metric-collector SRPM CentOS 'Latest' + path: ${{ steps.rpm.outputs.source_rpm_path }} + build-alma-8_5: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: TomTheBear/rpmbuild@alma8.5 + id: rpm + name: Build RPM package on AlmaLinux 8.5 + with: + spec_file: "./scripts/cc-metric-collector.spec" + - name: Save RPM as artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: cc-metric-collector RPM AlmaLinux 8.5 + path: ${{ steps.rpm.outputs.rpm_dir_path }} + - name: Save SRPM as artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: cc-metric-collector SRPM AlmaLinux 8.5 + path: ${{ steps.rpm.outputs.source_rpm_path }}