创建 Helm 部署 values.yaml 文件
您需要创建一个包含 Neo4j 单机实例所有配置的 Helm 部署 YAML 文件。
重要配置参数
neo4j.name-
单机服务器与集群服务器之间没有区别。这意味着可以通过添加更多服务器将单机服务器升级为集群。因此,用于关联集群中服务器的
neo4j.name参数是强制性的,如果不指定,安装将会失败。neo4j.name在同一个命名空间内必须是唯一的。 neo4j.resources-
Neo4j 实例的大小由
neo4j.resources.cpu和neo4j.resources.memory参数的值定义。最低要求为0.5CPU 和2GB内存。如果提供的值无效或低于最小值,Helm 将抛出错误,例如:Error: template: neo4jtemplates/_helpers.tpl:157:11: executing "neo4j.resources.evaluateCPU" at <fail (printf "Provided cpu value %s is less than minimum. \n %s" (.Values.neo4j.resources.cpu) (include "neo4j.resources.invalidCPUMessage" .))>: error calling fail: Provided cpu value 0.25 is less than minimum. cpu value cannot be less than 0.5 or 500m有关详细信息,请参阅重要配置参数。
neo4j.password-
neo4j用户的密码。
如果您不提供密码,Neo4j Helm Chart 将会自动为您生成一个。(请务必记下它。)你不能使用
neo4j作为初始密码,因为这是默认密码。 neo4j.edition和neo4j.acceptLicenseAgreement-
默认情况下,单机版 Helm Chart 会安装 Neo4j 社区版(Community Edition)。
如果您想安装 Neo4j 企业版(Enterprise Edition),请设置配置参数edition: "enterprise",并确认许可合规性:如果您拥有有效的许可证,请将neo4j.acceptLicenseAgreement设置为"yes";如果您想接受 Neo4j 评估许可协议,请将其设置为"eval"。
有关如何获取 Neo4j 企业版有效许可的更多信息,请参阅 /licensing/ 和 link:/terms/licensing/,或使用 联系 Neo4j 表单。 volumes.data-
volumes.data参数将您的 Neo4jdata卷挂载映射到该实例所使用的持久卷(Persistent Volume)。有关详细信息,请参阅卷挂载和持久卷。
|
有关所有 Neo4j Helm Chart 配置选项的详细信息,请参阅配置 Neo4j Helm 部署。 |
创建 values.yaml 文件
根据您的 Kubernetes 环境选择对应的标签页,并使用提供的示例为您的单机实例创建 YAML 文件。
本指南假定该 YAML 文件命名为 my-neo4j.values.yaml。
neo4j:
name: my-standalone
resources:
cpu: "0.5"
memory: "2Gi"
# Uncomment to set the initial password
#password: "my-initial-password"
# Uncomment to use enterprise edition
#edition: "enterprise"
#acceptLicenseAgreement: "yes"
volumes:
data:
mode: "dynamic"
dynamic:
# In GKE;
# * premium-rwo provisions SSD disks (recommended)
# * standard-rwo provisions balanced SSD-backed disks
# * standard provisions HDD disks
storageClassName: premium-rwo
neo4j:
name: my-standalone
resources:
cpu: "0.5"
memory: "2Gi"
# Uncomment to set the initial password
#password: "my-initial-password"
# Uncomment to use enterprise edition
#edition: "enterprise"
#acceptLicenseAgreement: "yes"
volumes:
data:
mode: "dynamic"
dynamic:
# gp2 is a general-purpose SSD volume
storageClassName: gp2
neo4j:
name: my-standalone
resources:
cpu: "0.5"
memory: "2Gi"
# Uncomment to set the initial password
#password: "my-initial-password"
# Uncomment to use enterprise edition
#edition: "enterprise"
#acceptLicenseAgreement: "yes"
volumes:
data:
mode: "dynamic"
dynamic:
# * managed-csi-premium provisions premium SSD disks (recommended)
# * managed-csi provisions standard SSD-backed disks
storageClassName: managed-csi-premium
neo4j:
name: my-standalone
resources:
cpu: "0.5"
memory: "2Gi"
# Uncomment to set the initial password
#password: "my-initial-password"
# Uncomment to use enterprise edition
#edition: "enterprise"
#acceptLicenseAgreement: "yes"
volumes:
data:
mode: defaultStorageClass
defaultStorageClass:
requests:
storage: 2Gi