Skip to content

Commit

Permalink
Merge branch 'develop' into re-2319/expire-crib
Browse files Browse the repository at this point in the history
  • Loading branch information
chainchad authored Feb 28, 2024
2 parents 572b50a + f9795b3 commit 8a73ca2
Show file tree
Hide file tree
Showing 189 changed files with 6,605 additions and 5,014 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/nightlyfuzz.yml

This file was deleted.

2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ config-docs: ## Generate core node configuration documentation
.PHONY: golangci-lint
golangci-lint: ## Run golangci-lint for all issues.
[ -d "./golangci-lint" ] || mkdir ./golangci-lint && \
docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:v1.55.2 golangci-lint run --max-issues-per-linter 0 --max-same-issues 0 > ./golangci-lint/$(shell date +%Y-%m-%d_%H:%M:%S).txt
docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:v1.56.2 golangci-lint run --max-issues-per-linter 0 --max-same-issues 0 > ./golangci-lint/$(shell date +%Y-%m-%d_%H:%M:%S).txt


GORELEASER_CONFIG ?= .goreleaser.yaml
Expand Down
6 changes: 3 additions & 3 deletions charts/chainlink-cluster/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ dependencies:
version: 5.14.0
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.81.2
version: 0.82.0
- name: tempo
repository: https://grafana.github.io/helm-charts
version: 1.7.2
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 7.3.2
digest: sha256:fb13a8a7b490fd1e388a6b082e50d65a39f44a28030d66559d4640c687a70e20
generated: "2024-02-23T15:22:09.284013-06:00"
digest: sha256:37722063f68689c42ac1d6549ddfae4756370c1659b8ac1c0d7da8916c6fad3d
generated: "2024-02-27T11:04:29.920915-06:00"
4 changes: 2 additions & 2 deletions charts/chainlink-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v2
name: chainlink-cluster
description: Chainlink nodes cluster
version: 0.3.0
version: 0.4.0
appVersion: "2.6.0"
dependencies:
- name: mockserver
version: "5.14.0"
repository: "https://www.mock-server.com"
condition: mockserver.enabled
- name: opentelemetry-collector
version: "0.81.2"
version: "0.82.0"
repository: "https://open-telemetry.github.io/opentelemetry-helm-charts"
condition: opentelemetry-collector.enabled
- name: tempo
Expand Down
74 changes: 50 additions & 24 deletions charts/chainlink-cluster/dashboard/cmd/dashboard_deploy.go
Original file line number Diff line number Diff line change
@@ -1,49 +1,75 @@
package main

import (
"os"

"fmt"
"github.com/smartcontractkit/chainlink/charts/chainlink-cluster/dashboard/dashboard"
"github.com/smartcontractkit/wasp"
"os"
"strings"
)

func main() {
name := os.Getenv("DASHBOARD_NAME")
if name == "" {
panic("DASHBOARD_NAME must be provided")
}
ldsn := os.Getenv("LOKI_DATA_SOURCE_NAME")
if ldsn == "" {
panic("DATA_SOURCE_NAME must be provided")
}
os.Setenv("DATA_SOURCE_NAME", ldsn)
pdsn := os.Getenv("PROMETHEUS_DATA_SOURCE_NAME")
if ldsn == "" {
panic("DATA_SOURCE_NAME must be provided")

lokiDataSourceName := os.Getenv("LOKI_DATA_SOURCE_NAME")
if lokiDataSourceName == "" {
fmt.Println("LOKI_DATA_SOURCE_NAME is empty, panels with logs will be disabled")
}
dbf := os.Getenv("DASHBOARD_FOLDER")
if dbf == "" {
panic("DASHBOARD_FOLDER must be provided")

prometheusDataSourceName := os.Getenv("PROMETHEUS_DATA_SOURCE_NAME")
if prometheusDataSourceName == "" {
panic("PROMETHEUS_DATA_SOURCE_NAME must be provided")
}

grafanaURL := os.Getenv("GRAFANA_URL")
if grafanaURL == "" {
panic("GRAFANA_URL must be provided")
}

grafanaToken := os.Getenv("GRAFANA_TOKEN")
if grafanaToken == "" {
panic("GRAFANA_TOKEN must be provided")
}
// if you'll use this dashboard base in other projects, you can add your own opts here to extend it
db, err := dashboard.NewCLClusterDashboard(6, name, ldsn, pdsn, dbf, grafanaURL, grafanaToken, nil)
if err != nil {
panic(err)

grafanaFolder := os.Getenv("GRAFANA_FOLDER")
if grafanaFolder == "" {
panic("GRAFANA_FOLDER must be provided")
}
// here we are extending load testing dashboard with core metrics, for example
wdb, err := wasp.NewDashboard(nil, db.Opts())
if err != nil {
panic(err)

infraPlatform := os.Getenv("INFRA_PLATFORM")
if infraPlatform == "" {
panic("INFRA_PLATFORM must be provided, can be either docker|kubernetes")
}
if _, err := wdb.Deploy(); err != nil {
panic(err)

panelsIncluded := os.Getenv("PANELS_INCLUDED")
// can be empty
if panelsIncluded == "" {
fmt.Println("PANELS_INCLUDED can be provided to specify panels groups, value must be separated by comma. Possible values are: core, wasp")
}
panelsIncludedArray := strings.Split(panelsIncluded, ",")

err := dashboard.NewDashboard(
name,
grafanaURL,
grafanaToken,
grafanaFolder,
[]string{"generated"},
lokiDataSourceName,
prometheusDataSourceName,
infraPlatform,
panelsIncludedArray,
nil,
)
if err != nil {
fmt.Printf("Could not create dashbard: %s\n", name)
fmt.Printf("Error: %s\n", err)
os.Exit(1)
}
fmt.Printf("Successfully deployed %s dashboard on grafana instance %s in folder %s\n",
name,
grafanaURL,
grafanaFolder,
)
}
Loading

0 comments on commit 8a73ca2

Please sign in to comment.