From 20262752b05fcb91c185f86ac2d2196eca5201b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Gryglicki?= Date: Fri, 24 May 2024 08:09:37 +0000 Subject: [PATCH] Removed support for elastic search 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ɓukasz Gryglicki --- .travis.yml | 1 - INSTALL_AUTO_DEPLOY.md | 1 - INSTALL_FREEBSD.md | 1 - INSTALL_MAC.md | 1 - INSTALL_UBUNTU16.md | 1 - INSTALL_UBUNTU17.md | 1 - INSTALL_UBUNTU18.md | 1 - README.md | 2 +- go.mod | 1 - metrics/all/tags.yaml | 6 ------ metrics/fluentd/tags.yaml | 6 ------ metrics/jenkins/tags.yaml | 6 ------ metrics/kubernetes/tags.yaml | 6 ------ metrics/shared/tags.yaml | 6 ------ metrics/tinkerbell/tags.yaml | 6 ------ util_sh/gha2es.sh | 19 ------------------- util_sh/gha2es_inside_container.sh | 3 --- 17 files changed, 1 insertion(+), 67 deletions(-) delete mode 100755 util_sh/gha2es.sh delete mode 100755 util_sh/gha2es_inside_container.sh diff --git a/.travis.yml b/.travis.yml index f3b7e13f6..86423d05e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ before_install: - go get -u golang.org/x/tools/cmd/goimports - go get -u github.com/jgautheron/usedexports - go get -u github.com/kisielk/errcheck - - go get -u github.com/olivere/elastic - go get -u github.com/cncf/devstatscode - go get -u gopkg.in/yaml.v2 - go get -u github.com/google/go-github/github diff --git a/INSTALL_AUTO_DEPLOY.md b/INSTALL_AUTO_DEPLOY.md index 4936c333f..692370965 100644 --- a/INSTALL_AUTO_DEPLOY.md +++ b/INSTALL_AUTO_DEPLOY.md @@ -21,7 +21,6 @@ Prerequisites: - [errcheck](https://github.com/kisielk/errcheck): `go get github.com/kisielk/errcheck` - [cors](https://github.com/rs/cors): `go get -u github.com/rs/cors` - [jsoniter](https://github.com/json-iterator/go): `go get -u github.com/json-iterator/go` - - If you want to use ElasticSearch output: [elastic](https://github.com/olivere/elastic): `go get -u github.com/olivere/elastic`. 2. Go to `$GOPATH/src/github.com/cncf` and clone devstats and devstatscode there: - `git clone https://github.com/cncf/devstats.git`. - `git clone https://github.com/cncf/devstatscode.git`. diff --git a/INSTALL_FREEBSD.md b/INSTALL_FREEBSD.md index c85251aa3..4d473d7e9 100644 --- a/INSTALL_FREEBSD.md +++ b/INSTALL_FREEBSD.md @@ -26,7 +26,6 @@ Prerequisites: - [errcheck](https://github.com/kisielk/errcheck): `go get github.com/kisielk/errcheck` - [cors](https://github.com/rs/cors): `go get -u github.com/rs/cors` - [jsoniter](https://github.com/json-iterator/go): `go get -u github.com/json-iterator/go` - - If you want to use ElasticSearch output: [elastic](https://github.com/olivere/elastic): `go get -u github.com/olivere/elastic`. - Go Postgres client: install with: `go get github.com/lib/pq` - Go unicode text transform tools: install with: `go get golang.org/x/text/transform` and `go get golang.org/x/text/unicode/norm` - Go YAML parser library: install with: `go get gopkg.in/yaml.v2` diff --git a/INSTALL_MAC.md b/INSTALL_MAC.md index 583714949..c378b9946 100644 --- a/INSTALL_MAC.md +++ b/INSTALL_MAC.md @@ -19,7 +19,6 @@ Prerequisites: - [errcheck](https://github.com/kisielk/errcheck): `go get github.com/kisielk/errcheck` - [cors](https://github.com/rs/cors): `go get -u github.com/rs/cors` - [jsoniter](https://github.com/json-iterator/go): `go get -u github.com/json-iterator/go` - - If you want to use ElasticSearch output: [elastic](https://github.com/olivere/elastic): `go get -u github.com/olivere/elastic`. - Go Postgres client: install with: `go get github.com/lib/pq` - Go unicode text transform tools: install with: `go get golang.org/x/text/transform` and `go get golang.org/x/text/unicode/norm` - Go YAML parser library: install with: `go get gopkg.in/yaml.v2` diff --git a/INSTALL_UBUNTU16.md b/INSTALL_UBUNTU16.md index 40b717ad0..6cc7b58bb 100644 --- a/INSTALL_UBUNTU16.md +++ b/INSTALL_UBUNTU16.md @@ -29,7 +29,6 @@ Prerequisites: - [errcheck](https://github.com/kisielk/errcheck): `go get github.com/kisielk/errcheck` - [cors](https://github.com/rs/cors): `go get -u github.com/rs/cors` - [jsoniter](https://github.com/json-iterator/go): `go get -u github.com/json-iterator/go` - - If you want to use ElasticSearch output: [elastic](https://github.com/olivere/elastic): `go get -u github.com/olivere/elastic`. - Go Postgres client: install with: `go get github.com/lib/pq` - Go unicode text transform tools: install with: `go get golang.org/x/text/transform` and `go get golang.org/x/text/unicode/norm` - Go YAML parser library: install with: `go get gopkg.in/yaml.v2` diff --git a/INSTALL_UBUNTU17.md b/INSTALL_UBUNTU17.md index 1170a5a82..e4c3b4de5 100644 --- a/INSTALL_UBUNTU17.md +++ b/INSTALL_UBUNTU17.md @@ -20,7 +20,6 @@ Prerequisites: - [errcheck](https://github.com/kisielk/errcheck): `go get github.com/kisielk/errcheck` - [cors](https://github.com/rs/cors): `go get -u github.com/rs/cors` - [jsoniter](https://github.com/json-iterator/go): `go get -u github.com/json-iterator/go` - - If you want to use ElasticSearch output: [elastic](https://github.com/olivere/elastic): `go get -u github.com/olivere/elastic`. - Go Postgres client: install with: `go get github.com/lib/pq` - Go unicode text transform tools: install with: `go get golang.org/x/text/transform` and `go get golang.org/x/text/unicode/norm` - Go YAML parser library: install with: `go get gopkg.in/yaml.v2` diff --git a/INSTALL_UBUNTU18.md b/INSTALL_UBUNTU18.md index 17409d03e..24c48f761 100644 --- a/INSTALL_UBUNTU18.md +++ b/INSTALL_UBUNTU18.md @@ -28,7 +28,6 @@ Prerequisites: - [errcheck](https://github.com/kisielk/errcheck): `go get -u github.com/kisielk/errcheck` - [cors](https://github.com/rs/cors): `go get -u github.com/rs/cors` - [jsoniter](https://github.com/json-iterator/go): `go get -u github.com/json-iterator/go` - - If you want to use ElasticSearch output: [elastic](https://github.com/olivere/elastic): `go get -u github.com/olivere/elastic`. 2. Go to `$GOPATH/src/github.com/cncf` and clone devstats and devstatscode there: - `git clone https://github.com/cncf/devstats.git`. - `git clone https://github.com/cncf/devstatscode.git`. diff --git a/README.md b/README.md index c0a63f452..92ba7c4c7 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Please see [example Helm chart](https://github.com/cncf/devstats-helm-example) f Please see [Helm chart](https://github.com/cncf/devstats-helm) for a full Helm deployment. -Please see [LF Helm chart](https://github.com/cncf/devstats-helm-lf) for the LF Helm deployment (it is a data deployment, has no Grafana, and uses ElasticSearch in addition to Postgres to store data). +Please see [LF Helm chart](https://github.com/cncf/devstats-helm-lf) for the LF Helm deployment (it is a data deployment, has no Grafana). Please see [GraphQL Helm chart](https://github.com/cncf/devstats-helm-graphql) for GraphQL foundation DevStats deployment. diff --git a/go.mod b/go.mod index 3e38bb808..2df6f81ee 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/olivere/elastic v6.2.37+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect golang.org/x/crypto v0.10.0 // indirect golang.org/x/net v0.11.0 // indirect diff --git a/metrics/all/tags.yaml b/metrics/all/tags.yaml index 787d37cc9..854228cc3 100644 --- a/metrics/all/tags.yaml +++ b/metrics/all/tags.yaml @@ -57,12 +57,6 @@ tags: sql: cumulative_periods series_name: cumperiods name_tag: cumperiod_name - - name: Elasticsearch periods - sql: es_periods_tags - series_name: es_periods - name_tag: devstats_period - other_tags: - es_period: [es_period_name, f] - name: Licenses sql: licenses_tags series_name: licenses diff --git a/metrics/fluentd/tags.yaml b/metrics/fluentd/tags.yaml index 627e8674a..92613123b 100644 --- a/metrics/fluentd/tags.yaml +++ b/metrics/fluentd/tags.yaml @@ -58,12 +58,6 @@ tags: sql: cumulative_periods series_name: cumperiods name_tag: cumperiod_name - - name: Elasticsearch periods - sql: es_periods_tags - series_name: es_periods - name_tag: devstats_period - other_tags: - es_period: [es_period_name, f] - name: Licenses sql: licenses_tags series_name: licenses diff --git a/metrics/jenkins/tags.yaml b/metrics/jenkins/tags.yaml index 31817570f..b6927fcf7 100644 --- a/metrics/jenkins/tags.yaml +++ b/metrics/jenkins/tags.yaml @@ -59,12 +59,6 @@ tags: sql: cumulative_periods series_name: cumperiods name_tag: cumperiod_name - - name: Elasticsearch periods - sql: es_periods_tags - series_name: es_periods - name_tag: devstats_period - other_tags: - es_period: [es_period_name, f] - name: Licenses sql: licenses_tags series_name: licenses diff --git a/metrics/kubernetes/tags.yaml b/metrics/kubernetes/tags.yaml index 32786719b..7f44abe01 100644 --- a/metrics/kubernetes/tags.yaml +++ b/metrics/kubernetes/tags.yaml @@ -116,12 +116,6 @@ tags: sql: cumulative_periods series_name: cumperiods name_tag: cumperiod_name - - name: Elasticsearch periods - sql: es_periods_tags - series_name: es_periods - name_tag: devstats_period - other_tags: - es_period: [es_period_name, f] - name: Licenses sql: licenses_tags series_name: licenses diff --git a/metrics/shared/tags.yaml b/metrics/shared/tags.yaml index fd7cc360d..877a8fcc7 100644 --- a/metrics/shared/tags.yaml +++ b/metrics/shared/tags.yaml @@ -57,12 +57,6 @@ tags: sql: cumulative_periods series_name: cumperiods name_tag: cumperiod_name - - name: Elasticsearch periods - sql: es_periods_tags - series_name: es_periods - name_tag: devstats_period - other_tags: - es_period: [es_period_name, f] - name: Licenses sql: licenses_tags series_name: licenses diff --git a/metrics/tinkerbell/tags.yaml b/metrics/tinkerbell/tags.yaml index 1955a45c9..f0dcd04c0 100644 --- a/metrics/tinkerbell/tags.yaml +++ b/metrics/tinkerbell/tags.yaml @@ -58,12 +58,6 @@ tags: sql: cumulative_periods series_name: cumperiods name_tag: cumperiod_name - - name: Elasticsearch periods - sql: es_periods_tags - series_name: es_periods - name_tag: devstats_period - other_tags: - es_period: [es_period_name, f] - name: Licenses sql: licenses_tags series_name: licenses diff --git a/util_sh/gha2es.sh b/util_sh/gha2es.sh deleted file mode 100755 index a3d0958a3..000000000 --- a/util_sh/gha2es.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -if [ -z "$PG_PASS" ] -then - echo "$0: PG_PASS environment variable must be set" - exit 1 -fi -if [ -z "$1" ] -then - echo "$0: please specify date from YYYY-MM-DD as a first argument" - exit 2 -fi -if [ -z "$2" ] -then - echo "$0: please specify hour from HH as a second argument" - exit 3 -fi -# GHA2DB_DEBUG=1 GHA2DB_LOCAL=1 GHA2DB_USE_ES_RAW=1 GHA2DB_PROJECT=cncf PG_DB=cncf gha2es 2018-06-01 4 today now -# GHA2DB_DEBUG=1 GHA2DB_LOCAL=1 GHA2DB_USE_ES_RAW=1 GHA2DB_PROJECT=all PG_DB=allprj gha2es "$1" "$2" today now -GHA2DB_ES_BULK_SIZE=1000 GHA2DB_LOCAL=1 GHA2DB_USE_ES_RAW=1 GHA2DB_PROJECT=all PG_DB=allprj gha2es "$1" "$2" today now diff --git a/util_sh/gha2es_inside_container.sh b/util_sh/gha2es_inside_container.sh deleted file mode 100755 index 61f8db12c..000000000 --- a/util_sh/gha2es_inside_container.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -GHA2DB_LOCAL=1 GHA2DB_PROJECT=buildpacks PG_DB=buildpacks PG_HOST="127.0.0.1" PG_PORT=65432 GHA2DB_USE_ES_RAW=1 GHA2DB_USE_ES=1 GHA2DB_ES_URL="http://127.0.0.1:19200" gha2es "$1" "$2" today now -#./docker/docker_es_query.sh d_buildpacks _doc 'type:tvars'