hzero-front

by Helm

Helm chartv0.23.0App 0.23.0

hzero-front for Choerodon

About this chart

Quick start

部署文件的渲染模板,我们下文将定义一些变量,helm执行时会将变量渲染进模板文件中。

_helpers.tpl

这个文件我们用来进行标签模板的定义,以便在上文提到的位置进行标签渲染。

此项目标签总共分为两个部分: 平台、日志。

平台标签

deployment 级:

{{- define "service.labels.standard" -}}
choerodon.io/release: {{ .Release.Name | quote }}
{{- end -}}

平台管理实例需要的实例ID。

日志标签

deployment 级:

{{- define "service.logging.deployment.label" -}}
choerodon.io/logs-parser: {{ .Values.logs.parser | quote }}
{{- end -}}

日志管理所需要的应用标签。该标签指定应用程序的日志格式,内置格式有nginx,spring-boot,docker对于前端服务请使用nginx,如果不需要收集日志请移除此段代码,并删除模板文件关于service.logging.deployment.label的引用。

values.yaml

这个文件中的键值对,即为我们上文中所引用的变量。

将所以有变量集中在一个文件中,方便部署的时候进行归档以及灵活替换。

同时,helm命令支持使用 --set FOO_BAR=FOOBAR 参数对values 文件中的变量进行赋值,可以进一步简化部署流程。

参数对照表

参数名含义
preJob.preConfig.mysql{}初始化配置所需manager_service数据库信息
env.open.PRO_API_HOSTapi地址
env.open.PRO_DEVOPS_HOSTdevops service地址
env.open.PRO_CLIENT_IDclient id
env.open.PRO_TITLE_NAME页面显示标题
env.open.PRO_HEADER_TITLE_NAME页面header标题
env.open.PRO_HTTP使用协议
service.enable创建service对象
ingress.enable创建ingress对象
ingress.host域名地址,此处不能带http://

Deploy hzero-front with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has hzero-front on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthzero-front is pinned at v0.23.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply