当前位置: 首页 > news >正文

helm部署graph-node服务

还得先部署postgresql

-- 创建一个名为 my_app_user 的用户,并设置密码
CREATE USER my_app_user WITH PASSWORD 'your_secure_password';-- 授予 my_app_user 连接到 my_application_db 的权限
GRANT CONNECT ON DATABASE my_application_db TO my_app_user;-- 授予 my_app_user 在 my_application_db 数据库中创建表、索引等的权限
-- 你需要连接到 my_application_db 才能执行此步骤
\c my_application_db; -- 切换到你的新数据库GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO my_app_user;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO my_app_user;
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO my_app_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO my_app_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO my_app_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON FUNCTIONS TO my_app_user;\c my_application_db;-- 创建 uuid-ossp 扩展(用于生成 UUID)
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";-- 创建 pg_trgm 扩展(用于模糊匹配和全文搜索)
CREATE EXTENSION IF NOT EXISTS pg_trgm;

1、加载helm仓库

helm repo add stakewise https://charts.stakewise.io

2、安装graph-node

helm install my-graph-node stakewise/graph-node --version 3.0.3

3、导出value.yaml,然后自定义value.yaml

helm show values stakewise/graph-node > values.yaml

4、自定义values.yaml

# Default values for graph-node.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.global:serviceAccount:create: truereplicaCount: 1image:# -- Image for Graph Noderegistry: "docker.io"repository: graphprotocol/graph-nodepullPolicy: IfNotPresent# -- Overrides the image tag# @default -- Chart.appVersiontag: ""# -- Pull secrets required to fetch the Image
imagePullSecrets: []nameOverride: ""
fullnameOverride: ""## -- Graph Node
##
graph:# -- PostgreSQL configurationpostgresql:host: "parasail-graph-node-postgresql"port: "5432"database: "subgraph-dev"username: "graphnode"password: "XXXXXXXXXXX"poolSize: "30"# -- Blockchain configuration for Graph Nodechains:# -- Ethereum Mainnet# mainnet:fluence_test_net:   # -- Enable this configuring graph-node with this chain#  enabled: falseenabled: true# -- The database shard to use for this chainshard: primary## -- A list of JSON-RPC endpoints for this nodeprovider:- # -- Label for the RPC endpoint#label: eth-mainnetlabel: fluence-testnet-rpc# -- URL for JSON-RPC endpointurl: "https://rpc.testnet.fluence.dev"# -- Data capabilities this node hasfeatures: [archive, traces]ipfsUrl: ""# -- Deployment rule configurationdeployment:rule:- shard: primaryindexers: "{{ include 'graph-node.indexersList' . }}"# -- [Configuration for graph-node](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md)# @default -- See default template in [values.yaml](values.yaml)configTemplate: |# Store configuration[store][store.primary]connection = "postgresql://{{ $.Values.graph.postgresql.username }}:{{ $.Values.graph.postgresql.password }}@{{ $.Values.graph.postgresql.host }}:{{ $.Values.graph.postgresql.port }}/{{ $.Values.graph.postgresql.database }}"pool_size = {{ $.Values.graph.postgresql.poolSize }}weight = 1# Chain configuration{{- $patchedChains := dict "ingestor" (print (include "common.names.fullname" $) "-0" ) }}{{- range $chainName, $chainValues := $.Values.graph.chains }}{{- if $chainValues.enabled }}{{- $_ := set $patchedChains $chainName (omit $chainValues "enabled") }}{{- end }}{{- end }}{{ toToml (dict "chains" $patchedChains) }}# Deployment rule configuration[deployment][[deployment.rule]]indexers = [ {{ include "graph-node.indexersList" . }} ]shard = "primary"# -- Additional CLI arguments to pass to Graph NodeextraArgs: []# -- Additional container environment variables.env:# How often to poll Ethereum for new blocks (in ms)ETHEREUM_POLLING_INTERVAL: "500"# "instant" or "synced". Synced will only switch a named subgraph to a new deployment once it has synced,# making the new deployment the "Pending" versionEXPERIMENTAL_SUBGRAPH_VERSION_SWITCHING_MODE: "synced"# Number of Ethereum blocks to request in parallel.# Also limits other parallel requests such such as trace_filterETHEREUM_BLOCK_BATCH_SIZE: "50"# Maximum number of blocks to scan for triggers in each requestGRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE: "1000"# How many simultaneous connections to allow to the store.# Due to implementation details, this value may not be strictly adhered toSTORE_CONNECTION_POOL_SIZE: "25"GRAPH_ALLOW_NON_DETERMINISTIC_IPFS: trueGRAPH_MAX_IPFS_FILE_BYTES: "1048576"# Control log levels# Options: debug, error, info, warn, or traceGRAPH_LOG: "info"GRAPH_GRAPHQL_DISABLE_BOOL_FILTERS: "false"# Timeout for IPFS, which includes requests for manifest files and from mappingsGRAPH_IPFS_TIMEOUT: "300"serviceAccount:# -- Specifies whether a service account should be createdcreate: true# -- Annotations to add to the service accountannotations: {}# -- The name of the service account to use.# If not set and create is true, a name is generated using the fullname templatename: ""service:#type: ClusterIPtype: NodePort ports:# Port for the GraphQL HTTP serverhttp: 8000# Port for the GraphQL WebSocket serverwebsocket: 8001# Port for the JSON-RPC admin serverjsonrpc: 8020# Port for index statusindexStatus: 8030# Port for Prometheus Exportermetrics: 8040ingress:enabled: trueclassName: albannotations:kubernetes.io/ingress.class: albalb.ingress.kubernetes.io/scheme: internet-facingalb.ingress.kubernetes.io/target-type: instancealb.ingress.kubernetes.io/load-balancer-name: graph-node-test alb.ingress.kubernetes.io/certificate-arn: ""alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-2-2017-01alb.ingress.kubernetes.io/healthcheck-path: "/"alb.ingress.kubernetes.io/success-codes: "200"alb.ingress.kubernetes.io/ssl-redirect: '443'alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'alb.ingress.kubernetes.io/tags: user:product=parasail,user:product_service=graph-node-parasail   hosts:- host: graph-node-test.parasail.networkpaths:- path: /pathType: ImplementationSpecifictls: []#  - secretName: chart-example-tls#    hosts:#      - chart-example.local## -- Configure resource requests and limits.
## http://kubernetes.io/docs/user-guide/compute-resources/
##
resources: {}## -- Node labels for pod assignment
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}## -- Tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []## -- Affinity for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}## -- used to assign priority to pods
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
##
priorityClassName: ""## -- IPFS Server
##
ipfs:enabled: true## -- Prometheus Service Monitor
## ref: https://github.com/coreos/prometheus-operator
##      https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
##
serviceMonitor:# Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperatorenabled: false# The namespace in which the ServiceMonitor will be creatednamespace: ""# The interval at which metrics should be scrapedinterval: 30s# The timeout after which the scrape is endedscrapeTimeout: ""# Metrics RelabelConfigs to apply to samples before scraping.relabellings: []# Metrics RelabelConfigs to apply to samples before ingestion.metricRelabelings: []# Specify honorLabels parameter to add the scrape endpointhonorLabels: false# Additional labels that can be used so ServiceMonitor resource(s) can be discovered by PrometheusadditionalLabels: {}## -- Custom PrometheusRule to be defined
## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions
##
prometheusRule:# Create a custom prometheusRule Resource for scraping metrics using PrometheusOperatorenabled: false# Create a default set of Alertsdefault: true# The namespace in which the prometheusRule will be creatednamespace: ""# Additional labels for the prometheusRuleadditionalLabels: {}# Custom Prometheus rulesrules: []# -- Readiness probe
readinessProbe:initialDelaySeconds: 60timeoutSeconds: 1periodSeconds: 10failureThreshold: 3successThreshold: 1httpGet:path: /port: httpscheme: HTTP# -- Liveness probe
livenessProbe:initialDelaySeconds: 60timeoutSeconds: 1periodSeconds: 10failureThreshold: 3successThreshold: 1httpGet:path: /port: httpscheme: HTTP

安装命令

helm install parasail-graph-node-test stakewise/graph-node --version 3.1.0 -n graph-node-test --create-namespace -f values.yaml

更新命令

helm upgrade parasail-graph-node-test stakewise/graph-node --version 3.1.0 -n graph-node-test --create-namespace -f values.yaml
http://www.dtcms.com/a/316494.html

相关文章:

  • linux nfs+autofs
  • 并发 Vs 并行
  • 管式土壤墒情监测站在高标准农田的作用
  • 具身智能触觉传感器全景调研
  • HTML 如何转 Markdown
  • 【YOLO学习笔记】YOLOv1详解
  • 亚马逊标品与非标品广告运营:从架构搭建到策略优化的专业方法论
  • Could not load the Qt platform plugin “xcb“ in “无法调试与显示Opencv
  • Natural Language Processing in Computational Creativity: A Systematic Review
  • 2025年08月05日Github流行趋势
  • 3477. 水果成篮 II
  • 电子器械行业的主数据有哪些?
  • Linux NFS 服务部署、客户端配置及 autofs 自动挂载操作指南
  • Tinylog
  • 通俗版23种设计模式解析
  • 机械手的眼睛,视觉系统如何让机器人学会精准抓取
  • GaussDB 常见问题-集中式
  • 05-栈 stack
  • 机器学习算法系列专栏:决策树算法(初学者)
  • TCP如何实现可靠传输?实现细节?
  • 三坐标测量技术解析:从基础原理到斜孔测量难点突破
  • 重生之我在暑假学习微服务第十天《网关篇》
  • Mysql常用语句
  • 广州客户 戴尔R720服务器 liunx系统 RAID5无损升级扩容
  • CTF-XXE 漏洞解题思路总结
  • AI自主任务执行系统 AI Agent无限循环,发任务给AI,让生成脚本,运行执行任务,直到成功。
  • adjtimex系统调用及示例
  • 阿里招AI产品运营
  • 从数据洪流到智能决策:Apache IoTDB如何重塑工业物联网的DB+AI新范式
  • Java技术栈/面试题合集(12)-Maven篇