diff --git a/vearch/Chart.yaml b/vearch/Chart.yaml deleted file mode 100644 index e98680a..0000000 --- a/vearch/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -name: vearch -description: A Helm chart for vearch -home: https://vearch.github.io -kubeVersion: ">=1.14.6-23.3d03dd1" -version: 0.5.2 -appVersion: 0.5.2 -keywords: - - vearch - - vearch-helm - - vearch-csi -home: https://vearch.github.io -sources: - - https://github.com/vearch/vearch-helm -icon: https://raw.githubusercontent.com/vearch/vearch/master/docs/img/vearch_logo.png -maintainers: -- name: "vearch" - email: vearch-maintainers@groups.io diff --git a/vearch/config/grafana/grafana.ini b/vearch/config/grafana/grafana.ini deleted file mode 100644 index 3a639fc..0000000 --- a/vearch/config/grafana/grafana.ini +++ /dev/null @@ -1,556 +0,0 @@ -##################### Grafana Configuration Defaults ##################### -# -# Do not modify this file in grafana installs -# - -# possible values : production, development -app_mode = production - -# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty -instance_name = ${HOSTNAME} - -#################################### Paths ############################### -[paths] -# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) -data = data - -# Temporary files in `data` directory older than given duration will be removed -temp_data_lifetime = 24h - -# Directory where grafana can store logs -logs = data/log - -# Directory where grafana will automatically scan and look for plugins -plugins = data/plugins - -# folder that contains provisioning config files that grafana will apply on startup and while running. -provisioning = conf/provisioning - -#################################### Server ############################## -[server] -# Protocol (http, https, socket) -protocol = http - -# The ip address to bind to, empty will bind to all interfaces -http_addr = - -# The http port to use -http_port = 3000 - -# The public facing domain name used to access grafana from a browser -domain = localhost - -# Redirect to correct domain if host header does not match domain -# Prevents DNS rebinding attacks -enforce_domain = false - -# The full public facing url -root_url = %(protocol)s://%(domain)s:%(http_port)s/ - -# Log web requests -router_logging = false - -# the path relative working path -static_root_path = public - -# enable gzip -enable_gzip = false - -# https certs & key file -cert_file = -cert_key = - -# Unix socket path -socket = /tmp/grafana.sock - -#################################### Database ############################ -[database] -# You can configure the database connection by specifying type, host, name, user and password -# as separate properties or as on string using the url property. - -# Either "mysql", "postgres" or "sqlite3", it's your choice -type = sqlite3 -host = 127.0.0.1:3306 -name = grafana -user = root -# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" -password = -# Use either URL or the previous fields to configure the database -# Example: mysql://user:secret@host:port/database -url = - -# Max idle conn setting default is 2 -max_idle_conn = 2 - -# Max conn setting default is 0 (mean not set) -max_open_conn = - -# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours) -conn_max_lifetime = 14400 - -# Set to true to log the sql calls and execution times. -log_queries = - -# For "postgres", use either "disable", "require" or "verify-full" -# For "mysql", use either "true", "false", or "skip-verify". -ssl_mode = disable - -ca_cert_path = -client_key_path = -client_cert_path = -server_cert_name = - -# For "sqlite3" only, path relative to data_path setting -path = grafana.db - -#################################### Session ############################# -[session] -# Either "memory", "file", "redis", "mysql", "postgres", "memcache", default is "file" -provider = file - -# Provider config options -# memory: not have any config yet -# file: session dir path, is relative to grafana data_path -# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana` -# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable -# mysql: go-sql-driver/mysql dsn config string, examples: -# `user:password@tcp(127.0.0.1:3306)/database_name` -# `user:password@unix(/var/run/mysqld/mysqld.sock)/database_name` -# memcache: 127.0.0.1:11211 - - -provider_config = sessions - -# Session cookie name -cookie_name = grafana_sess - -# If you use session in https only, default is false -cookie_secure = false - -# Session life time, default is 86400 -session_life_time = 86400 -gc_interval_time = 86400 - -# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours) -conn_max_lifetime = 14400 - -#################################### Data proxy ########################### -[dataproxy] - -# This enables data proxy logging, default is false -logging = false - -#################################### Analytics ########################### -[analytics] -# Server reporting, sends usage counters to stats.grafana.org every 24 hours. -# No ip addresses are being tracked, only simple counters to track -# running instances, dashboard and error counts. It is very helpful to us. -# Change this option to false to disable reporting. -reporting_enabled = true - -# Set to false to disable all checks to https://grafana.com -# for new versions (grafana itself and plugins), check is used -# in some UI views to notify that grafana or plugin update exists -# This option does not cause any auto updates, nor send any information -# only a GET request to https://grafana.com to get latest versions -check_for_updates = true - -# Google Analytics universal tracking code, only enabled if you specify an id here -google_analytics_ua_id = - -# Google Tag Manager ID, only enabled if you specify an id here -google_tag_manager_id = - -#################################### Security ############################ -[security] -# default admin user, created on startup -admin_user = admin - -# default admin password, can be changed before first start of grafana, or in profile settings -admin_password = admin - -# used for signing -secret_key = SW2YcwTIb9zpOOhoPsMm - -# Auto-login remember days -login_remember_days = 7 -cookie_username = grafana_user -cookie_remember_name = grafana_remember - -# disable gravatar profile images -disable_gravatar = false - -# data source proxy whitelist (ip_or_domain:port separated by spaces) -data_source_proxy_whitelist = - -# disable protection against brute force login attempts -disable_brute_force_login_protection = false - -#################################### Snapshots ########################### -[snapshots] -# snapshot sharing options -external_enabled = true -external_snapshot_url = https://snapshots-origin.raintank.io -external_snapshot_name = Publish to snapshot.raintank.io - -# remove expired snapshot -snapshot_remove_expired = true - -#################################### Dashboards ################## - -[dashboards] -# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1 -versions_to_keep = 20 - -#################################### Users ############################### -[users] -# disable user signup / registration -allow_sign_up = false - -# Allow non admin users to create organizations -allow_org_create = false - -# Set to true to automatically assign new users to the default organization (id 1) -auto_assign_org = true - -# Set this value to automatically add new users to the provided organization (if auto_assign_org above is set to true) -auto_assign_org_id = 1 - -# Default role new users will be automatically assigned (if auto_assign_org above is set to true) -auto_assign_org_role = Viewer - -# Require email validation before sign up completes -verify_email_enabled = false - -# Background text for the user field on the login page -login_hint = email or username - -# Default UI theme ("dark" or "light") -default_theme = dark - -# External user management -external_manage_link_url = -external_manage_link_name = -external_manage_info = - -# Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard. -viewers_can_edit = false - -[auth] -# Set to true to disable (hide) the login form, useful if you use OAuth -disable_login_form = false - -# Set to true to disable the signout link in the side menu. useful if you use auth.proxy -disable_signout_menu = false - -# URL to redirect the user to after sign out -signout_redirect_url = - -#################################### Anonymous Auth ###################### -[auth.anonymous] -# enable anonymous access -enabled = true - -# specify organization name that should be used for unauthenticated users -org_name = Main Org. - -# specify role for unauthenticated users -org_role = Viewer - -#################################### Github Auth ######################### -[auth.github] -enabled = false -allow_sign_up = true -client_id = some_id -client_secret = some_secret -scopes = user:email,read:org -auth_url = https://github.com/login/oauth/authorize -token_url = https://github.com/login/oauth/access_token -api_url = https://api.github.com/user -team_ids = -allowed_organizations = - -#################################### GitLab Auth ######################### -[auth.gitlab] -enabled = false -allow_sign_up = true -client_id = some_id -client_secret = some_secret -scopes = api -auth_url = https://gitlab.com/oauth/authorize -token_url = https://gitlab.com/oauth/token -api_url = https://gitlab.com/api/v4 -allowed_groups = - -#################################### Google Auth ######################### -[auth.google] -enabled = false -allow_sign_up = true -client_id = some_client_id -client_secret = some_client_secret -scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email -auth_url = https://accounts.google.com/o/oauth2/auth -token_url = https://accounts.google.com/o/oauth2/token -api_url = https://www.googleapis.com/oauth2/v1/userinfo -allowed_domains = -hosted_domain = - -#################################### Grafana.com Auth #################### -# legacy key names (so they work in env variables) -[auth.grafananet] -enabled = false -allow_sign_up = true -client_id = some_id -client_secret = some_secret -scopes = user:email -allowed_organizations = - -[auth.grafana_com] -enabled = false -allow_sign_up = true -client_id = some_id -client_secret = some_secret -scopes = user:email -allowed_organizations = - -#################################### Generic OAuth ####################### -[auth.generic_oauth] -name = OAuth -enabled = false -allow_sign_up = true -client_id = some_id -client_secret = some_secret -scopes = user:email -email_attribute_name = email:primary -auth_url = -token_url = -api_url = -team_ids = -allowed_organizations = -tls_skip_verify_insecure = false -tls_client_cert = -tls_client_key = -tls_client_ca = - -#################################### Basic Auth ########################## -[auth.basic] -enabled = true - -#################################### Auth Proxy ########################## -[auth.proxy] -enabled = false -header_name = X-WEBAUTH-USER -header_property = username -auto_sign_up = true -ldap_sync_ttl = 60 -whitelist = - -#################################### Auth LDAP ########################### -[auth.ldap] -enabled = false -config_file = /etc/grafana/ldap.toml -allow_sign_up = true - -#################################### SMTP / Emailing ##################### -[smtp] -enabled = false -host = localhost:25 -user = -# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" -password = -cert_file = -key_file = -skip_verify = false -from_address = admin@grafana.localhost -from_name = Grafana -ehlo_identity = - -[emails] -welcome_email_on_sign_up = false -templates_pattern = emails/*.html - -#################################### Logging ########################## -[log] -# Either "console", "file", "syslog". Default is console and file -# Use space to separate multiple modes, e.g. "console file" -mode = console file - -# Either "debug", "info", "warn", "error", "critical", default is "info" -level = info - -# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug -filters = - -# For "console" mode only -[log.console] -level = - -# log line format, valid options are text, console and json -format = console - -# For "file" mode only -[log.file] -level = - -# log line format, valid options are text, console and json -format = text - -# This enables automated log rotate(switch of following options), default is true -log_rotate = true - -# Max line number of single file, default is 1000000 -max_lines = 1000000 - -# Max size shift of single file, default is 28 means 1 << 28, 256MB -max_size_shift = 28 - -# Segment log daily, default is true -daily_rotate = true - -# Expired days of log file(delete after max days), default is 7 -max_days = 7 - -[log.syslog] -level = - -# log line format, valid options are text, console and json -format = text - -# Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used. -network = -address = - -# Syslog facility. user, daemon and local0 through local7 are valid. -facility = - -# Syslog tag. By default, the process' argv[0] is used. -tag = - -#################################### Usage Quotas ######################## -[quota] -enabled = false - -#### set quotas to -1 to make unlimited. #### -# limit number of users per Org. -org_user = 10 - -# limit number of dashboards per Org. -org_dashboard = 100 - -# limit number of data_sources per Org. -org_data_source = 10 - -# limit number of api_keys per Org. -org_api_key = 10 - -# limit number of orgs a user can create. -user_org = 10 - -# Global limit of users. -global_user = -1 - -# global limit of orgs. -global_org = -1 - -# global limit of dashboards -global_dashboard = -1 - -# global limit of api_keys -global_api_key = -1 - -# global limit on number of logged in users. -global_session = -1 - -#################################### Alerting ############################ -[alerting] -# Disable alerting engine & UI features -enabled = true -# Makes it possible to turn off alert rule execution but alerting UI is visible -execute_alerts = true - -# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state) -error_or_timeout = alerting - -# Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok) -nodata_or_nullvalues = no_data - -# Alert notifications can include images, but rendering many images at the same time can overload the server -# This limit will protect the server from render overloading and make sure notifications are sent out quickly -concurrent_render_limit = 5 - -#################################### Explore ############################# -[explore] -# Enable the Explore section -enabled = false - -#################################### Internal Grafana Metrics ############ -# Metrics available at HTTP API Url /metrics -[metrics] -enabled = true -interval_seconds = 10 - -# Send internal Grafana metrics to graphite -[metrics.graphite] -# Enable by setting the address setting (ex localhost:2003) -address = -prefix = prod.grafana.%(instance_name)s. - -[grafana_net] -url = https://grafana.com - -[grafana_com] -url = https://grafana.com - -#################################### Distributed tracing ############ -[tracing.jaeger] -# jaeger destination (ex localhost:6831) -address = -# tag that will always be included in when creating new spans. ex (tag1:value1,tag2:value2) -always_included_tag = -# Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote -sampler_type = const -# jaeger samplerconfig param -# for "const" sampler, 0 or 1 for always false/true respectively -# for "probabilistic" sampler, a probability between 0 and 1 -# for "rateLimiting" sampler, the number of spans per second -# for "remote" sampler, param is the same as for "probabilistic" -# and indicates the initial sampling rate before the actual one -# is received from the mothership -sampler_param = 1 - -#################################### External Image Storage ############## -[external_image_storage] -# You can choose between (s3, webdav, gcs, azure_blob, local) -provider = - -[external_image_storage.s3] -bucket_url = -bucket = -region = -path = -access_key = -secret_key = - -[external_image_storage.webdav] -url = -username = -password = -public_url = - -[external_image_storage.gcs] -key_file = -bucket = -path = - -[external_image_storage.azure_blob] -account_name = -account_key = -container_name = - -[external_image_storage.local] -# does not require any configuration - -[rendering] -# Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer -server_url = -callback_url = diff --git a/vearch/config/grafana/init.sh b/vearch/config/grafana/init.sh deleted file mode 100755 index d4338d4..0000000 --- a/vearch/config/grafana/init.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -host=127.0.0.1 -port=3000 - -user=${GRAFANA_USERNAME:-admin} -pass=${GRAFANA_PASSWORD:-123456} -url="http://${user}:${pass}@${host}:${port}" -url2="http://${host}:${port}" -ds_url="${url2}/api/datasources" -dashboard_url="${url2}/api/dashboard/db" - -org="vearch.github.io" - -parse_json(){ - echo "$1" | sed "s/.*\"$2\":\([^,}]*\).*/\1/" - #echo "${1//\"/}" | sed "s/.*$2:\([^,}]*\).*/\1/" -} - -# add org -req=$(curl -s -X POST -H "Content-Type: application/json" -d '{"name":"${org}"}' ${url}/api/orgs) -echo ${req} - -message=$(parse_json "${req}" "message" ) - -echo "$message" - -orgid=$(parse_json "${req}" "orgId") -# set org to admin -curl -s -X POST ${url}/api/user/using/${orgid} - -# get token key -#curl -s -X POST -H "Content-Type: application/json" -d '{"name":"apikeycurl", "role": "Admin"}' ${url}/api/auth/keys -rep=$(curl -s -X POST -H "Content-Type: application/json" -d '{"name":"apikeycurl", "role": "Admin"}' ${url}/api/auth/keys) -echo ${req} -key=$(parse_json "${rep}" "key") -echo "key ${key}" - -echo "add ds" -# add datasource -curl -s -X POST -H "Content-Type: application/json" -u ${user}:${pass} ${ds_url} -d @/grafana/ds.json -#until curl -s -XPOST -H "Content-Type: application/json" --connect-timeout 1 -u ${userName}:${password} ${ds_url} -d @/grafana/ds.json >/dev/null; do - #sleep 1 -#done - -# add dashboard - -#echo "add dashboard" -curl -X POST --insecure -H "Authorization: Bearer ${key}" -H "Content-Type: application/json" -d @/grafana/dashboard.json ${url2}/api/dashboards/db diff --git a/vearch/config/grafana/provisioning/config.monitor b/vearch/config/grafana/provisioning/config.monitor deleted file mode 100644 index 1879a9b..0000000 --- a/vearch/config/grafana/provisioning/config.monitor +++ /dev/null @@ -1,2 +0,0 @@ -ECURITY_ADMIN_PASSWORD=GRAFANA_PASSWORD -GF_USERS_ALLOW_SIGN_UP=false diff --git a/vearch/config/grafana/provisioning/dashboards/dashboard.yml b/vearch/config/grafana/provisioning/dashboards/dashboard.yml deleted file mode 100644 index a6e0ab0..0000000 --- a/vearch/config/grafana/provisioning/dashboards/dashboard.yml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: 1 - -providers: -- name: 'Vearch' - orgId: 1 - folder: '' - type: file - disableDeletion: false - editable: true - options: - path: /etc/grafana/provisioning/dashboards diff --git a/vearch/config/grafana/provisioning/dashboards/vearch.json b/vearch/config/grafana/provisioning/dashboards/vearch.json deleted file mode 100644 index 0f8ed64..0000000 --- a/vearch/config/grafana/provisioning/dashboards/vearch.json +++ /dev/null @@ -1,1605 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 3, - "iteration": 1590029902603, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 22, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.99\",key='handleSearchDoc'}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key='handleSearchDoc'}[59s])) by (key)", - "interval": "", - "legendFormat": "tp99", - "refId": "A" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.9\",key='handleSearchDoc'}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key='handleSearchDoc'}[59s])) by (key)", - "interval": "", - "legendFormat": "tp90", - "refId": "B" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.5\",key='handleSearchDoc'}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key='handleSearchDoc'}[59s])) by (key)", - "interval": "", - "legendFormat": "tp50", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Search Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 20, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key='handleSearchDoc'}[59s])) by (key)", - "interval": "", - "legendFormat": "search", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Search Requests (minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "hiddenSeries": false, - "id": 16, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.99\",key='handleReplaceDoc'}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key='handleReplaceDoc'}[59s])) by (key)", - "interval": "", - "legendFormat": "tp99", - "refId": "A" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.9\",key='handleReplaceDoc'}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key='handleReplaceDoc'}[59s])) by (key)", - "interval": "", - "legendFormat": "tp90", - "refId": "B" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.5\",key='handleReplaceDoc'}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key='handleReplaceDoc'}[59s])) by (key)", - "interval": "", - "legendFormat": "tp50", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Add Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "hiddenSeries": false, - "id": 18, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key='handleReplaceDoc'}[59s])) by (key)", - "interval": "", - "legendFormat": "add", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Add Requests (minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 16 - }, - "hiddenSeries": false, - "id": 2, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "dbInfo{job=\"$cluster\",metric=\"DBNum\"}", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "DB数量", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 16 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(dbInfo{job=\"$cluster\",metric=\"docNum\"}) by (tag1)", - "interval": "", - "legendFormat": "{{tag1}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "单库文档量", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 23 - }, - "hiddenSeries": false, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "dbInfo{job=\"$cluster\",metric=\"SpaceNum\"}", - "interval": "", - "legendFormat": "{{tag1}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "space_num数量", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 23 - }, - "hiddenSeries": false, - "id": 4, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "dbInfo{job=\"$cluster\",metric=\"ServerNum\"}", - "interval": "", - "legendFormat": "节点数", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "PS节点数", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 30 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "dbInfo{job=\"$cluster\",metric=\"leaderNum\"}", - "interval": "", - "legendFormat": "{{tag1}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "leader_信息", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 30 - }, - "hiddenSeries": false, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "dbInfo{job=\"$cluster\",metric=\"partitionNum\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "partitionNum数量", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 37 - }, - "hiddenSeries": false, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(dbInfo{job=\"$cluster\",metric=\"PartitionDoc\"}) by (tag1,tag2)", - "interval": "", - "legendFormat": "{{tag1}}_{{tag2}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "机器文档数量", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 37 - }, - "hiddenSeries": false, - "id": 13, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(dbInfo{job=\"$cluster\",metric=\"PartitionSize\"}) by (tag2,tag1)", - "interval": "", - "legendFormat": "{{tag1}}_{{tag2}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "机器磁盘占用", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 44 - }, - "hiddenSeries": false, - "id": 9, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key!='nil'}[59s]))", - "interval": "1m", - "legendFormat": "总调用次数", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "总调用次数", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 44 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.999\"}[59s]))/sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\"}[59s]))", - "interval": "1m", - "legendFormat": "TP999", - "refId": "A" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.99\"}[59s]))/sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\"}[59s]))", - "interval": "1m", - "legendFormat": "TP99", - "refId": "B" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.95\"}[59s]))/sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\"}[59s]))", - "interval": "1m", - "legendFormat": "TP95", - "refId": "C" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.90\"}[59s]))/sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\"}[59s]))", - "interval": "1m", - "legendFormat": "TP90", - "refId": "D" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.5\"}[59s]))/sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\"}[59s]))", - "interval": "1m", - "legendFormat": "TP50", - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "总体性能指标", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 51 - }, - "hiddenSeries": false, - "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\",key!='nil'}[59s])) by (key)", - "interval": "1m", - "legendFormat": "{{key}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "方法调用次数", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 51 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.7.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.9\"}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\"}[59s])) by (key)", - "interval": "1m", - "legendFormat": "{{key}}_TP90", - "refId": "A" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.99\"}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\"}[59s])) by (key)", - "interval": "1m", - "legendFormat": "{{key}}_TP99", - "refId": "B" - }, - { - "expr": "sum(sum_over_time(Vearch_request_duration_seconds{job=\"$cluster\",quantile=\"0.95\"}[59s])) by (key) /sum(sum_over_time(Vearch_request_duration_seconds_count{job=\"$cluster\"}[59s])) by (key)", - "interval": "1m", - "legendFormat": "{{key}}_TP95", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "方法性能指标", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 22, - "style": "dark", - "tags": [ - "vearch" - ], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "vearch-default", - "value": "vearch-default" - }, - "datasource": "vearch", - "definition": "Vearch_request_duration_seconds_count", - "hide": 0, - "includeAll": false, - "index": -1, - "label": "集群", - "multi": false, - "name": "cluster", - "options": [], - "query": "Vearch_request_duration_seconds_count", - "refresh": 1, - "regex": "/.*job=\"([^\"]*).*/", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "browser", - "title": "vearch监控", - "uid": "qOQpmKrZz", - "variables": { - "list": [] - }, - "version": 102 -} diff --git a/vearch/config/grafana/provisioning/datasources/datasource.yml b/vearch/config/grafana/provisioning/datasources/datasource.yml deleted file mode 100644 index 7c7db78..0000000 --- a/vearch/config/grafana/provisioning/datasources/datasource.yml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: 1 - -# list of datasources that should be deleted from the database -deleteDatasources: - - name: Prometheus - orgId: 1 - -# list of datasources to insert/update depending -# whats available in the database -datasources: - # name of the datasource. Required -- name: vearch - # datasource type. Required - type: prometheus - # access mode. direct or proxy. Required - access: proxy - # org id. will default to orgId 1 if not specified - orgId: 1 - # url - url: PROMETHEUS_URL - # database password, if used - password: - # database user, if used - user: - # database name, if used - database: - # enable/disable basic auth - basicAuth: false - # basic auth username - basicAuthUser: admin - # basic auth password - basicAuthPassword: 123456 - # enable/disable with credentials headers - withCredentials: - # mark as default datasource. Max one per org - isDefault: true - # fields that will be converted to json and stored in json_data - jsonData: - graphiteVersion: "1.1" - tlsAuth: false - tlsAuthWithCACert: false - # json object of data that will be encrypted. - secureJsonData: - tlsCACert: "..." - tlsClientCert: "..." - tlsClientKey: "..." - version: 1 - # allow users to edit datasources from the UI. - editable: true diff --git a/vearch/config/prometheus/prometheus.yml b/vearch/config/prometheus/prometheus.yml deleted file mode 100644 index 9857e4a..0000000 --- a/vearch/config/prometheus/prometheus.yml +++ /dev/null @@ -1,35 +0,0 @@ -# my global config -global: - scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. - evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. - # scrape_timeout is set to the global default (10s). - - -scrape_configs: - - job_name: 'consul' - relabel_configs: - - source_labels: ["__meta_consul_service"] - action: replace - regex: "(.*)" - replacement: '${1}' - target_label: "service" - - source_labels: ["__meta_consul_tags"] - action: replace - regex: ',(?:[^,]+,){0}([^=]+)=([^,]+),.*' - replacement: '${2}' - target_label: '${1}' - - source_labels: ["__meta_consul_tags"] - action: replace - regex: ',(?:[^,]+,){1}([^=]+)=([^,]+),.*' - replacement: '${2}' - target_label: '${1}' - - source_labels: ["__meta_consul_tags"] - action: replace - regex: ',(?:[^,]+,){2}([^=]+)=([^,]+),.*' - replacement: '${2}' - target_label: '${1}' - metrics_path: /metrics - scheme: http - consul_sd_configs: - - server: CONSUL_ADDRESS - services: [] diff --git a/vearch/templates/_helpers.tpl b/vearch/templates/_helpers.tpl deleted file mode 100644 index 5fdc751..0000000 --- a/vearch/templates/_helpers.tpl +++ /dev/null @@ -1,126 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "vearch-helm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "vearch-helm.namespace" -}} -{{- .Release.Namespace | default .Values.namespace -}} -{{- end -}} - -{{- define "vearch.master.peers" -}} -{{- range $i, $e := until (.Values.master.replicas | int) -}} -master-{{- $.Release.Name -}}-{{ $i | add1 }}.master-service.{{- $.Values.namespace -}}.svc.cluster.local -{{- end -}} -{{- end -}} - -{{- define "vearch.master.master-service" -}} -master-service-{{- $.Release.Name -}}.{{- $.Values.namespace -}}.svc.cluster.local -{{- end -}} - -{{- define "vearch.router.router-service" -}} -router-service-{{- $.Release.Name -}}.{{- $.Values.namespace -}}.svc.cluster.local -{{- end -}} - -{{- define "vearch.monitor.consul.address" -}} -{{- $envAll := index . 0 -}} -consul-service-{{- $envAll.Release.Name -}}.{{- $envAll.Values.namespace -}}.svc.cluster.local:{{- $envAll.Values.consul.port }} -{{- end -}} - -{{- define "vearch.monitor.consul.url" -}} -{{- $envAll := index . 0 -}} -http://consul-service-{{- $envAll.Release.Name -}}.{{- $envAll.Values.namespace -}}.svc.cluster.local:{{- $envAll.Values.consul.port }} -{{- end -}} - -{{- define "vearch.monitor.prometheus.url" -}} -{{- $envAll := index . 0 -}} -http://prometheus-service-{{- $envAll.Release.Name -}}.{{- $envAll.Values.namespace -}}.svc.cluster.local:{{- $envAll.Values.prometheus.port }} -{{- end -}} - -{{- define "helm-toolkit.metadata_labels" -}} -{{- $envAll := index . 0 -}} -{{- $application := index . 1 -}} -{{- $component := index . 2 -}} -app.kubernetes.io/app: {{ $envAll.Chart.Name }} -app.kubernetes.io/version: {{ $envAll.Chart.Version }} -app.kubernetes.io/instance: {{ $application }} -app.kubernetes.io/components: {{ $component }} -app.kubernetes.io/managed-by: helm -{{- end -}} - -{{- define "helm-toolkit.utils.template" -}} -{{- $name := index . 0 -}} -{{- $context := index . 1 -}} -{{- $last := base $context.Template.Name }} -{{- $wtf := $context.Template.Name | replace $last $name -}} -{{ include $wtf $context }} -{{- end -}} - -{{- define "helm-toolkit.utils.container_port" -}} -{{- $envAll := index . 0 -}} -{{- $name := index . 1 -}} -{{- $containerPort := index . 2 -}} -- name: {{ $name }} - containerPort: {{ $containerPort }} - protocol: TCP -{{- end -}} - -{{- define "helm-toolkit.utils.env" -}} -{{- $envAll := index . 0 -}} -env: - - name: GLOBAL_NAME - value: {{ $envAll.Release.Name }} - - name: NAMESPACE - value: {{ $envAll.Values.namespace }} - - name: GLOBAL_DATA - value: {{ $envAll.Values.global.data }} - - name: GLOBAL_LOG - value: {{ $envAll.Values.global.log }} - - name: GLOBAL_LEVEL - value: {{ $envAll.Values.global.level }} - - name: GLOBAL_SIGNKEY - value: {{ $envAll.Values.global.signkey }} - - name: GLOBAL_SKIP_AUTH - value: {{ $envAll.Values.global.skip_auth | quote }} - - name: GLOBAL_SELF_MANAGE_ETCD - value: {{ $envAll.Values.global.self_manage_etcd | quote }} - - name: VEARCH_MASTER_NUM - value: {{ $envAll.Values.master.replicas | quote }} - - name: VEARCH_MASTER_API_PORT - value: {{ $envAll.Values.master.api_port | quote }} - - name: VEARCH_MASTER_MONITOR_PORT - value: {{ $envAll.Values.master.monitor_port | quote }} - - name: VEARCH_ROUTER_PORT - value: {{ $envAll.Values.router.port | quote }} - - name: VEARCH_ROUTER_MONITOR_PORT - value: {{ $envAll.Values.router.monitor_port | quote }} - - name: VEARCH_ETCD_ADDRESS - value: {{ $envAll.Values.etcd.address | quote }} - - name: VEARCH_ETCD_PORT - value: {{ $envAll.Values.etcd.port | quote }} - - name: VEARCH_ETCD_USER - value: {{ $envAll.Values.etcd.user | quote }} - - name: VEARCH_ETCD_PWD - value: {{ $envAll.Values.etcd.pwd | quote }} - - name: PODIP - valueFrom: - fieldRef: - fieldPath: status.podIP -{{- end -}} - -{{- define "helm-toolkit.snippets.kubernetes_resources" -}} -{{- $envAll := index . 0 -}} -{{- $component := index . 1 -}} -{{- if $component.enabled -}} -resources: - limits: - cpu: {{ $component.limits.cpu | quote }} - memory: {{ $component.limits.memory | quote }} - requests: - cpu: {{ $component.requests.cpu | quote }} - memory: {{ $component.requests.memory | quote }} -{{- end -}} -{{- end -}} - diff --git a/vearch/templates/bin/_config_master.sh.tpl b/vearch/templates/bin/_config_master.sh.tpl deleted file mode 100644 index 08116ef..0000000 --- a/vearch/templates/bin/_config_master.sh.tpl +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -set -ex -if [ ${GLOBAL_DATA:0-1} == "/" ];then - GLOBAL_DATA=${GLOBAL_DATA:0:0-1} -fi -if [ ${GLOBAL_LOG:0-1} == "/" ];then - GLOBAL_LOG=${GLOBAL_LOG:0:0-1} -fi - -echo " -[global] - name = \"${GLOBAL_NAME}\" - domain_name = \"master-service-${GLOBAL_NAME}\" - data = [\"${GLOBAL_DATA}/\"] - log = \"${GLOBAL_LOG}/\" - level = \"${GLOBAL_LEVEL}\" - signkey = \"${GLOBAL_SIGNKEY}\" - skip_auth = ${GLOBAL_SKIP_AUTH} - self_manage_etcd = ${GLOBAL_SELF_MANAGE_ETCD} -" > /vearch/config.toml - -for i in $(seq 0 ${VEARCH_MASTER_NUM}) -do - if [ $i == ${VEARCH_MASTER_NUM} ];then - break - fi - echo " -[[masters]] - name = \"master-${i}\" - address = \"master-${GLOBAL_NAME}-${i}.master-service-${GLOBAL_NAME}.${NAMESPACE}.svc.cluster.local\" - api_port = ${VEARCH_MASTER_API_PORT} - etcd_port = 2378 - etcd_peer_port = 2390 - etcd_client_port = 2370 - pprof_port = 6062 - monitor_port = ${VEARCH_MASTER_MONITOR_PORT} -" >> /vearch/config.toml -done - -echo " -# self_manage_etcd = true,means manage etcd by yourself,need provide additional configuration -[etcd] - #etcd server ip or domain - address = [\"${VEARCH_ETCD_ADDRESS}\"] - # advertise_client_urls AND listen_client_urls - etcd_client_port = ${VEARCH_ETCD_PORT} - # provider username and password,if you turn on auth - user_name = \"${VEARCH_ETCD_USER}\" - password = \"${VEARCH_ETCD_PWD}\" - -[router] - port = ${VEARCH_ROUTER_PORT} - pprof_port = 6061 - monitor_port = ${VEARCH_ROUTER_MONITOR_PORT} - -[ps] - rpc_port = 8081 - raft_heartbeat_port = 8898 - raft_replicate_port = 8899 - heartbeat-interval = 200 #ms - raft_retain_logs = 20000000 - raft_replica_concurrency = 1 - raft_snap_concurrency = 1 - raft_truncate_count = 20000 - engine_dwpt_num = 8 - pprof_port = 6060 - private = false -" >> /vearch/config.toml - -cat /vearch/config.toml -echo "after prepare config" diff --git a/vearch/templates/bin/_start_master.sh.tpl b/vearch/templates/bin/_start_master.sh.tpl deleted file mode 100644 index 896197b..0000000 --- a/vearch/templates/bin/_start_master.sh.tpl +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -ex -sh /vearch/script/config-master.sh -cat /vearch/config.toml -echo "start master" - -export LD_LIBRARY_PATH=/vearch/lib/:$LD_LIBRARY_PATH -# /vearch/bin/vearch -conf /vearch/config.toml master -/vearch/bin/vearch -conf /vearch/config.toml -master ${HOSTNAME} master diff --git a/vearch/templates/bin/_start_ps.sh.tpl b/vearch/templates/bin/_start_ps.sh.tpl deleted file mode 100644 index f3283ca..0000000 --- a/vearch/templates/bin/_start_ps.sh.tpl +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -ex -sh /vearch/script/config-master.sh -cat /vearch/config.toml -echo "start ps" - -export LD_LIBRARY_PATH=/vearch/lib/:$LD_LIBRARY_PATH -/vearch/bin/vearch -conf /vearch/config.toml ps \ No newline at end of file diff --git a/vearch/templates/bin/_start_router.sh.tpl b/vearch/templates/bin/_start_router.sh.tpl deleted file mode 100644 index 59a757a..0000000 --- a/vearch/templates/bin/_start_router.sh.tpl +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -ex -sh /vearch/script/config-master.sh -cat /vearch/config.toml -echo "start router" - -export LD_LIBRARY_PATH=/vearch/lib/:$LD_LIBRARY_PATH -/vearch/bin/vearch -conf /vearch/config.toml router diff --git a/vearch/templates/configmap-bin.yaml b/vearch/templates/configmap-bin.yaml deleted file mode 100644 index 40778c4..0000000 --- a/vearch/templates/configmap-bin.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.component.master }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: vearch-bin-{{ .Release.Name }} - namespace: {{ .Values.namespace }} -data: -{{- if .Values.component.master }} - config-master.sh: |+ -{{ tuple "bin/_config_master.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} - start-master.sh: |+ -{{ tuple "bin/_start_master.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} -{{- end }} - -{{- if .Values.component.router }} - start-router.sh: |+ -{{ tuple "bin/_start_router.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} -{{- end }} - -{{- if .Values.component.ps }} - start-ps.sh: |+ -{{ tuple "bin/_start_ps.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} -{{- end }} - - -{{- end }} diff --git a/vearch/templates/configmap-monitor.yaml b/vearch/templates/configmap-monitor.yaml deleted file mode 100644 index cf77cd4..0000000 --- a/vearch/templates/configmap-monitor.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $consulURL := tuple $envAll | include "vearch.monitor.consul.url" }} -{{- $consulAddress := tuple $envAll | include "vearch.monitor.consul.address" }} -{{- $prometheusURL := tuple $envAll | include "vearch.monitor.prometheus.url" }} -{{- $grafanaPassword := $envAll.Values.grafana.admin_password }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: monitor-config-{{ .Release.Name }} - namespace: {{ .Values.namespace }} -data: - grafana.ini: |+ -{{ .Files.Get "config/grafana/grafana.ini" | indent 4 }} - init.sh: |+ -{{ .Files.Get "config/grafana/init.sh" | indent 4 }} - config.monitor: |+ -{{ .Files.Get "config/grafana/provisioning/config.monitor" | replace "GRAFANA_PASSWORD" $grafanaPassword | indent 4 }} - vearch.json: |+ -{{ .Files.Get "config/grafana/provisioning/dashboards/vearch.json" | indent 4 }} - dashboard.yml: |+ -{{ .Files.Get "config/grafana/provisioning/dashboards/dashboard.yml" | indent 4 }} - datasource.yml: |+ -{{ .Files.Get "config/grafana/provisioning/datasources/datasource.yml" | replace "PROMETHEUS_URL" $prometheusURL | indent 4 }} - prometheus.yml: |+ -{{ .Files.Get "config/prometheus/prometheus.yml" | replace "CONSUL_ADDRESS" $consulAddress | indent 4 }} -{{- end }} diff --git a/vearch/templates/deployment-consul.yaml b/vearch/templates/deployment-consul.yaml deleted file mode 100644 index f22e464..0000000 --- a/vearch/templates/deployment-consul.yaml +++ /dev/null @@ -1,42 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $consul := printf "consul-%s" .Release.Name }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: consul-{{ .Release.Name }} - labels: -{{ tuple $envAll $namespace $consul | include "helm-toolkit.metadata_labels" | indent 4 }} - namespace: {{ $namespace }} -spec: - replicas: {{ .Values.consul.replicas }} - selector: - matchLabels: -{{ tuple $envAll $namespace $consul | include "helm-toolkit.metadata_labels" | indent 6 }} - template: - metadata: - labels: -{{ tuple $envAll $namespace $consul | include "helm-toolkit.metadata_labels" | indent 8 }} - spec: - imagePullSecrets: - - name: {{ .Values.image.pull_secret }} - containers: - - name: consul-pod - image: {{ .Values.image.consul }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: - privileged: true - ports: -{{ tuple $envAll "port" .Values.consul.port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll $envAll.Values.consul.resources | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - volumeMounts: - - name: date-config - mountPath: /etc/localtime - readOnly: true - volumes: - - name: date-config - hostPath: - path: /etc/localtime -{{ end }} diff --git a/vearch/templates/deployment-grafana.yaml b/vearch/templates/deployment-grafana.yaml deleted file mode 100644 index 6b96be9..0000000 --- a/vearch/templates/deployment-grafana.yaml +++ /dev/null @@ -1,89 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $grafana := printf "grafana-%s" .Release.Name }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: grafana-{{ .Release.Name }} - labels: -{{ tuple $envAll $namespace $grafana | include "helm-toolkit.metadata_labels" | indent 4 }} - namespace: {{ $namespace }} -spec: - replicas: {{ .Values.grafana.replicas }} - selector: - matchLabels: -{{ tuple $envAll $namespace $grafana | include "helm-toolkit.metadata_labels" | indent 6 }} - template: - metadata: - labels: -{{ tuple $envAll $namespace $grafana | include "helm-toolkit.metadata_labels" | indent 8 }} - spec: - imagePullSecrets: - - name: {{ .Values.image.pull_secret }} - containers: - - name: grafana-pod - image: {{ .Values.image.grafana }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: - privileged: true - ports: -{{ tuple $envAll "port" .Values.grafana.port | include "helm-toolkit.utils.container_port" | indent 12 }} - env: - # The following env variables set up basic auth twith the default admin user and admin password. - - name: GF_AUTH_BASIC_ENABLED - value: "true" - - name: GF_AUTH_ANONYMOUS_ENABLED - value: "false" - - name: GF_SECURITY_ADMIN_PASSWORD - value: "123456" - # - name: GF_AUTH_ANONYMOUS_ORG_ROLE - # value: Admin - # does not really work, because of template variables in exported dashboards: - # - name: GF_DASHBOARDS_JSON_ENABLED - # value: "true" - # - name: GF_SECURITY_ADMIN_PASSWORD__FILE - # value: "" - readinessProbe: - httpGet: - path: /login - port: 3000 - # initialDelaySeconds: 30 - # timeoutSeconds: 1 - volumeMounts: - - name: grafana-persistent-storage - mountPath: /var/lib/grafana - - name: monitor-config-{{ .Release.Name }} - mountPath: /grafana/init.sh - subPath: init.sh - - name: monitor-config-{{ .Release.Name }} - mountPath: /etc/grafana/grafana.ini - subPath: grafana.ini - - name: monitor-config-{{ .Release.Name }} - mountPath: /etc/grafana/provisioning/dashboards/vearch.json - subPath: vearch.json - - name: monitor-config-{{ .Release.Name }} - mountPath: /etc/grafana/provisioning/dashboards/dashboard.yml - subPath: dashboard.yml - - name: monitor-config-{{ .Release.Name }} - mountPath: /etc/grafana/provisioning/datasources/datasource.yml - subPath: datasource.yml - - name: date-config - mountPath: /etc/localtime - readOnly: true -{{ tuple $envAll $envAll.Values.grafana.resources | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - volumes: - - name: monitor-config-{{ .Release.Name }} - configMap: - name: monitor-config-{{ .Release.Name }} - defaultMode: 0555 - - name: grafana-persistent-storage - emptyDir: {} - - name: date-config - hostPath: - path: /etc/localtime - # - name: grafana-security-admin-password - # secret: - # secretName: monitor-secret -{{ end }} diff --git a/vearch/templates/deployment-prometheus.yaml b/vearch/templates/deployment-prometheus.yaml deleted file mode 100644 index 2e5994a..0000000 --- a/vearch/templates/deployment-prometheus.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $prometheus := printf "prometheus-%s" .Release.Name }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: prometheus-{{ .Release.Name }} - labels: -{{ tuple $envAll $namespace $prometheus | include "helm-toolkit.metadata_labels" | indent 4 }} - namespace: {{ $namespace }} -spec: - replicas: {{ .Values.prometheus.replicas }} - selector: - matchLabels: -{{ tuple $envAll $namespace $prometheus | include "helm-toolkit.metadata_labels" | indent 6 }} - template: - metadata: - labels: -{{ tuple $envAll $namespace $prometheus | include "helm-toolkit.metadata_labels" | indent 8 }} - spec: - imagePullSecrets: - - name: {{ .Values.image.pull_secret }} - containers: - - name: prometheus-pod - image: {{ .Values.image.prometheus }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: -{{ tuple $envAll "port" .Values.prometheus.port | include "helm-toolkit.utils.container_port" | indent 12 }} - volumeMounts: - - name: monitor-config-{{ .Release.Name }} - mountPath: /etc/prometheus/prometheus.yml - subPath: prometheus.yml - - name: prometheus-data - mountPath: /prometheus-data - - name: date-config - mountPath: /etc/localtime - readOnly: true -{{ tuple $envAll $envAll.Values.prometheus.resources | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - volumes: - - name: monitor-config-{{ .Release.Name }} - configMap: - name: monitor-config-{{ .Release.Name }} - defaultMode: 0555 - - name: prometheus-data - emptyDir: {} - - name: date-config - hostPath: - path: /etc/localtime -{{ end }} diff --git a/vearch/templates/deployment-ps.yaml b/vearch/templates/deployment-ps.yaml deleted file mode 100644 index 983f469..0000000 --- a/vearch/templates/deployment-ps.yaml +++ /dev/null @@ -1,77 +0,0 @@ -{{- if .Values.component.ps }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $ps := printf "ps-%s" .Release.Name }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ps-{{ .Release.Name }} - labels: -{{ tuple $envAll $namespace $ps | include "helm-toolkit.metadata_labels" | indent 4 }} - namespace: {{ $namespace }} -spec: - replicas: {{ .Values.ps.replicas }} - selector: - matchLabels: -{{ tuple $envAll $namespace $ps | include "helm-toolkit.metadata_labels" | indent 6 }} - template: - metadata: - labels: -{{ tuple $envAll $namespace $ps | include "helm-toolkit.metadata_labels" | indent 8 }} - spec: - imagePullSecrets: - - name: {{ .Values.image.pull_secret }} - initContainers: - - name: init-config - image: {{ .Values.image.server }} - imagePullPolicy: {{ .Values.image.pull_policy }} - command: [ "/bin/sh", "-c", "yum install -y bind-utils; until nslookup master-{{ .Release.Name }}-0.master-service-{{ .Release.Name }}; do echo waiting for master; sleep 2; done;"] - containers: - - name: ps-pod - image: {{ .Values.image.server }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: [ "/bin/sh", "-c", "sh /vearch/script/start-ps.sh" ] - securityContext: - privileged: true - ports: -{{ tuple $envAll "rpc-port" .Values.ps.rpc_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "heartbeat" .Values.ps.raft_heartbeat_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "replicate" .Values.ps.raft_replicate_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "pprof-port" .Values.ps.pprof_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll | include "helm-toolkit.utils.env" | indent 10 }} - volumeMounts: - - name: vearch-bin-{{ .Release.Name }} - mountPath: /vearch/script - readOnly: true - {{- if .Values.global.log }} - - name: pod-log-path - mountPath: {{ .Values.global.log }} - readOnly: false - {{- end }} - {{- if .Values.global.data }} - - name: pod-data-path - mountPath: {{ .Values.global.data }} - readOnly: false - {{- end }} - - name: date-config - mountPath: /etc/localtime - readOnly: true -{{ tuple $envAll $envAll.Values.ps.resources | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - volumes: - - name: vearch-bin-{{ .Release.Name }} - configMap: - name: vearch-bin-{{ .Release.Name }} - defaultMode: 0555 - {{- if .Values.global.log }} - - name: pod-log-path - emptyDir: {} - {{- end }} - {{- if .Values.global.data }} - - name: pod-data-path - emptyDir: {} - {{- end }} - - name: date-config - hostPath: - path: /etc/localtime -{{ end }} diff --git a/vearch/templates/deployment-router.yaml b/vearch/templates/deployment-router.yaml deleted file mode 100644 index 6984b1f..0000000 --- a/vearch/templates/deployment-router.yaml +++ /dev/null @@ -1,83 +0,0 @@ -{{- if .Values.component.router }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $router := printf "router-%s" .Release.Name }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: router-{{ .Release.Name }} - labels: -{{ tuple $envAll $namespace $router | include "helm-toolkit.metadata_labels" | indent 4 }} - namespace: {{ $namespace }} -spec: - replicas: {{ .Values.router.replicas }} - selector: - matchLabels: -{{ tuple $envAll $namespace $router | include "helm-toolkit.metadata_labels" | indent 6 }} - template: - metadata: - labels: -{{ tuple $envAll $namespace $router | include "helm-toolkit.metadata_labels" | indent 8 }} - spec: - imagePullSecrets: - - name: {{ .Values.image.pull_secret }} - initContainers: - - name: init-config - image: {{ .Values.image.server }} - imagePullPolicy: {{ .Values.image.pull_policy }} - command: [ "/bin/sh", "-c", "yum install -y bind-utils; until nslookup master-{{ .Release.Name }}-0.master-service-{{ .Release.Name }}; do echo waiting for master; sleep 2; done;"] - {{- if .Values.component.monitor }} - initContainers: - - name: init-consul - image: {{ .Values.image.server }} - imagePullPolicy: {{ .Values.image.pull_policy }} - command: [ "/bin/sh", "-c", "yum install -y bind-utils; until nslookup consul-service-{{ .Release.Name }}; do echo waiting for consul; sleep 2; done;"] - {{- end }} - containers: - - name: router-pod - image: {{ .Values.image.server }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: [ "/bin/sh", "-c", "curl -X PUT -d \"{\\\"ID\\\": \\\"router-$PODIP\\\", \\\"Name\\\": \\\"router-$PODIP\\\", \\\"Address\\\": \\\"$PODIP\\\", \\\"Port\\\": 8818}\" consul-service-{{ .Release.Name }}:8500/v1/agent/service/register;sh /vearch/script/start-router.sh" ] - securityContext: - privileged: true - ports: -{{ tuple $envAll "port" .Values.router.port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "pprof-port" .Values.router.pprof_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "mport" .Values.router.monitor_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll | include "helm-toolkit.utils.env" | indent 10 }} - volumeMounts: - - name: vearch-bin-{{ .Release.Name }} - mountPath: /vearch/script - readOnly: true - {{- if .Values.global.log }} - - name: pod-log-path - mountPath: {{ .Values.global.log }} - readOnly: false - {{- end }} - {{- if .Values.global.data }} - - name: pod-data-path - mountPath: {{ .Values.global.data }} - readOnly: false - {{- end }} - - name: date-config - mountPath: /etc/localtime - readOnly: true -{{ tuple $envAll $envAll.Values.router.resources | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - volumes: - - name: vearch-bin-{{ .Release.Name }} - configMap: - name: vearch-bin-{{ .Release.Name }} - defaultMode: 0555 - {{- if .Values.global.log }} - - name: pod-log-path - emptyDir: {} - {{- end }} - {{- if .Values.global.data }} - - name: pod-data-path - emptyDir: {} - {{- end }} - - name: date-config - hostPath: - path: /etc/localtime -{{ end }} diff --git a/vearch/templates/ingress-grafana.yaml b/vearch/templates/ingress-grafana.yaml deleted file mode 100644 index b596135..0000000 --- a/vearch/templates/ingress-grafana.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: grafana-{{ .Release.Name }} - namespace: {{ $namespace }} - # annotations: - # nginx.ingress.kubernetes.io/rewrite-target: /$2 -spec: - ingressClassName: nginx - rules: - - host: {{ .Release.Name }}.{{ .Values.namespace }}.grafana{{ .Values.global.base_domain }} - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: grafana-service-{{ .Release.Name }} - port: - number: {{ .Values.grafana.port }} -{{ end }} diff --git a/vearch/templates/ingress-master.yaml b/vearch/templates/ingress-master.yaml deleted file mode 100644 index 3509eb5..0000000 --- a/vearch/templates/ingress-master.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.component.master }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: vearch-ingress-{{ .Release.Name }} - namespace: {{ $namespace }} - # annotations: - # nginx.ingress.kubernetes.io/rewrite-target: /$2 -spec: - ingressClassName: nginx - rules: - - host: {{ .Release.Name }}.{{ .Values.namespace }}{{ .Values.global.base_domain }} - http: - paths: - # - path: /master(/|$)(.*) - # pathType: Prefix - # backend: - # service: - # name: master-service-{{ .Release.Name }} - # port: - # number: {{ .Values.master.api_port }} - - path: / - pathType: Prefix - backend: - service: - name: router-service-{{ .Release.Name }} - port: - number: {{ .Values.router.port }} -{{ end }} diff --git a/vearch/templates/ingress-prometheus.yaml b/vearch/templates/ingress-prometheus.yaml deleted file mode 100644 index 0f2af97..0000000 --- a/vearch/templates/ingress-prometheus.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: prometheus-{{ .Release.Name }} - namespace: {{ $namespace }} - # annotations: - # nginx.ingress.kubernetes.io/rewrite-target: /$2 -spec: - ingressClassName: nginx - rules: - - host: {{ .Release.Name }}.{{ .Values.namespace }}.prometheus{{ .Values.global.base_domain }} - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: prometheus-service-{{ .Release.Name }} - port: - number: {{ .Values.prometheus.port }} -{{ end }} diff --git a/vearch/templates/namespace.yaml b/vearch/templates/namespace.yaml deleted file mode 100644 index 3c0c8b9..0000000 --- a/vearch/templates/namespace.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if not (lookup "v1" "Namespace" .Release.Namespace "vearch") }} - -apiVersion: v1 -kind: Namespace -metadata: - name: {{ .Values.namespace }} - -{{- end }} diff --git a/vearch/templates/service-consul.yaml b/vearch/templates/service-consul.yaml deleted file mode 100644 index 4576316..0000000 --- a/vearch/templates/service-consul.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $consul := printf "consul-%s" .Release.Name }} ---- -apiVersion: v1 -kind: Service -metadata: - name: consul-service-{{ .Release.Name }} - namespace: {{ $namespace }} -spec: - ports: - - port: {{ .Values.consul.port }} - protocol: TCP - targetPort: {{ .Values.consul.port }} - selector: -{{ tuple $envAll $namespace $consul | include "helm-toolkit.metadata_labels" | indent 4 }} -{{ end }} diff --git a/vearch/templates/service-grafana.yaml b/vearch/templates/service-grafana.yaml deleted file mode 100644 index 19f7778..0000000 --- a/vearch/templates/service-grafana.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $grafana := printf "grafana-%s" .Release.Name }} ---- -apiVersion: v1 -kind: Service -metadata: - name: grafana-service-{{ .Release.Name }} - namespace: {{ $namespace }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.grafana.port }} - protocol: TCP - targetPort: {{ .Values.grafana.port }} - selector: -{{ tuple $envAll $namespace $grafana | include "helm-toolkit.metadata_labels" | indent 4 }} -{{ end }} diff --git a/vearch/templates/service-master.yaml b/vearch/templates/service-master.yaml deleted file mode 100644 index dfa3b27..0000000 --- a/vearch/templates/service-master.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.component.master }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $master := printf "master-%s" .Release.Name }} ---- -apiVersion: v1 -kind: Service -metadata: - name: master-service-{{ .Release.Name }} - namespace: {{ $namespace }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.master.api_port }} - protocol: TCP - targetPort: {{ .Values.master.api_port }} - selector: -{{ tuple $envAll $namespace $master | include "helm-toolkit.metadata_labels" | indent 4 }} -{{ end }} diff --git a/vearch/templates/service-prometheus.yaml b/vearch/templates/service-prometheus.yaml deleted file mode 100644 index 8ff1c7f..0000000 --- a/vearch/templates/service-prometheus.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.component.monitor }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $prometheus := printf "prometheus-%s" .Release.Name }} ---- -apiVersion: v1 -kind: Service -metadata: - name: prometheus-service-{{ .Release.Name }} - namespace: {{ $namespace }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.prometheus.port }} - protocol: TCP - targetPort: {{ .Values.prometheus.port }} - selector: -{{ tuple $envAll $namespace $prometheus | include "helm-toolkit.metadata_labels" | indent 4 }} -{{ end }} diff --git a/vearch/templates/service-router.yaml b/vearch/templates/service-router.yaml deleted file mode 100644 index 8cbb86e..0000000 --- a/vearch/templates/service-router.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.component.router }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $router := printf "router-%s" .Release.Name }} ---- -apiVersion: v1 -kind: Service -metadata: - name: router-service-{{ .Release.Name }} - namespace: {{ $namespace }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.router.port }} - protocol: TCP - targetPort: {{ .Values.router.port }} - selector: -{{ tuple $envAll $namespace $router | include "helm-toolkit.metadata_labels" | indent 4 }} -{{ end }} diff --git a/vearch/templates/statefulset-master.yaml b/vearch/templates/statefulset-master.yaml deleted file mode 100644 index 6ce9d72..0000000 --- a/vearch/templates/statefulset-master.yaml +++ /dev/null @@ -1,82 +0,0 @@ -{{- if .Values.component.master }} -{{- $envAll := . }} -{{- $namespace := .Values.namespace }} -{{- $master := printf "master-%s" .Release.Name }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: master-{{ .Release.Name }} - labels: -{{ tuple $envAll $namespace $master | include "helm-toolkit.metadata_labels" | indent 4 }} - namespace: {{ $namespace }} -spec: - replicas: {{ .Values.master.replicas }} - serviceName: master-service-{{ .Release.Name }} - selector: - matchLabels: -{{ tuple $envAll $namespace $master | include "helm-toolkit.metadata_labels" | indent 6 }} - template: - metadata: - labels: -{{ tuple $envAll $namespace $master | include "helm-toolkit.metadata_labels" | indent 8 }} - spec: - imagePullSecrets: - - name: {{ .Values.image.pull_secret }} - {{- if .Values.component.monitor }} - initContainers: - - name: init-consul - image: {{ .Values.image.server }} - imagePullPolicy: {{ .Values.image.pull_policy }} - command: [ "/bin/sh", "-c", "yum install -y bind-utils; until nslookup consul-service-{{ .Release.Name }}; do echo waiting for consul; sleep 2; done;"] - {{- end }} - containers: - - name: master-pod - image: {{ .Values.image.server }} - imagePullPolicy: {{ .Values.image.pull_policy }} - command: [ "/bin/sh", "-c", "curl -X PUT -d \"{\\\"ID\\\": \\\"master-$PODIP\\\", \\\"Name\\\": \\\"master-$PODIP\\\", \\\"Address\\\": \\\"$PODIP\\\", \\\"Port\\\": 8818}\" consul-service-{{ .Release.Name }}:8500/v1/agent/service/register;sh /vearch/script/start-master.sh;" ] - securityContext: - privileged: true - ports: -{{ tuple $envAll "api-port" .Values.master.api_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "etcd-port" .Values.master.etcd_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "peer-port" .Values.master.etcd_peer_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "client-port" .Values.master.etcd_client_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "pprof-port" .Values.master.pprof_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll "mport" .Values.master.monitor_port | include "helm-toolkit.utils.container_port" | indent 12 }} -{{ tuple $envAll | include "helm-toolkit.utils.env" | indent 10 }} - volumeMounts: - - name: vearch-bin-{{ .Release.Name }} - mountPath: /vearch/script - readOnly: true - {{- if .Values.global.log }} - - name: pod-log-path - mountPath: {{ .Values.global.log }} - readOnly: false - {{- end }} - {{- if .Values.global.data }} - - name: pod-data-path - mountPath: {{ .Values.global.data }} - readOnly: false - {{- end }} - - name: date-config - mountPath: /etc/localtime - readOnly: true -{{ tuple $envAll $envAll.Values.master.resources | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - volumes: - - name: vearch-bin-{{ .Release.Name }} - configMap: - name: vearch-bin-{{ .Release.Name }} - defaultMode: 0555 - {{- if .Values.global.log }} - - name: pod-log-path - emptyDir: {} - {{- end }} - {{- if .Values.global.data }} - - name: pod-data-path - emptyDir: {} - {{- end }} - - name: date-config - hostPath: - path: /etc/localtime -{{ end }} diff --git a/vearch/values.yaml b/vearch/values.yaml deleted file mode 100644 index 58b13dc..0000000 --- a/vearch/values.yaml +++ /dev/null @@ -1,126 +0,0 @@ - -namespace: vearch - -component: - master: true - router: true - ps: true - monitor: true - -image: - server: vearch/vearch:3.3.4 - grafana: grafana/grafana:6.4.4 - prometheus: prom/prometheus:v2.13.1 - consul: consul:1.6.1 - pull_policy: "IfNotPresent" - pull_secret: tpaas-itg - -# store data,log and other data -global: - data: /export/vearch/datas/ - log: /export/vearch/logs/ - level: debug - self_manage_etcd: false - signkey: secret - skip_auth: true - monitor: /export/vearch/prometheus - base_domain: .dev51.cvessel.jdcloud.com - -master: - replicas: 3 - cluster: my-cluster - labels: - node_selector_key: vearch-master - node_selector_value: enabled - api_port: 8817 - etcd_port: 2378 - etcd_peer_port: 2390 - etcd_client_port: 2370 - pprof_port: 6062 - monitor_port: 8818 - resources: - enabled: true - requests: - memory: "1Gi" - cpu: "500m" - limits: - memory: "2Gi" - cpu: "1000m" - -router: - replicas: 1 - labels: - node_selector_key: vearch-router - node_selector_value: enabled - port: 9001 - pprof_port: 6061 - monitor_port: 8818 - plugin_path: "plugin" - resources: - enabled: true - requests: - memory: "2Gi" - cpu: "2000m" - limits: - memory: "4Gi" - cpu: "4000m" - -ps: - replicas: 1 - labels: - node_selector_key: vearch-ps - node_selector_value: enabled - rpc_port: 8081 - raft_heartbeat_port: 8898 - raft_replicate_port: 8899 - heartbeat-interval: 200 #ms - raft_retain_logs: 20000000 - raft_replica_concurrency: 1 - raft_snap_concurrency: 1 - raft_truncate_count: 20000 - engine_dwpt_num: 8 - pprof_port: 6060 - private: false - resources: - enabled: true - requests: - memory: "2Gi" - cpu: "1000m" - limits: - memory: "4Gi" - cpu: "8000m" - -consul: - port: 8500 - replicas: 1 - -grafana: - port: 3000 - replicas: 1 - admin_password: !!string 123456 - resources: - enabled: false - requests: - memory: "512Mi" - cpu: "500m" - limits: - memory: "1024Mi" - cpu: "1000m" - -prometheus: - port: 9090 - replicas: 1 - resources: - enabled: false - requests: - memory: "512Mi" - cpu: "500m" - limits: - memory: "1024Mi" - cpu: "1000m" - -etcd: - address: tpaas-etcd-client.tpaas-etcd - port: 2379 - user: root - pwd: ""