Skip to content

Commit

Permalink
add quickstart support for ha
Browse files Browse the repository at this point in the history
  • Loading branch information
dovholuknf committed Nov 14, 2024
1 parent e7c3be1 commit e48c687
Show file tree
Hide file tree
Showing 15 changed files with 1,135 additions and 160 deletions.
4 changes: 3 additions & 1 deletion ziti/cmd/create/config_templates/controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ v: 3

{{ if .Controller.Ctrl.MinClusterSize }}
raft:
dataDir: "{{ .ZitiHome }}/raft"
dataDir: "{{ .ZitiHome }}/raft{{ .InstanceId }}"
minClusterSize: {{ .Controller.Ctrl.MinClusterSize }}
{{ else }}
db: "{{ .Controller.Database.DatabaseFile }}"
Expand Down Expand Up @@ -233,6 +233,8 @@ web:
options: { }
- binding: fabric
options: { }
- binding: edge-oidc
options: { }
{{ if not .Controller.Web.BindPoints.Console.Enabled }}#{{- end }}- binding: zac
{{ if not .Controller.Web.BindPoints.Console.Enabled }}#{{- end }} options:
{{ if not .Controller.Web.BindPoints.Console.Enabled }}#{{- end }} location: {{ .Controller.Web.BindPoints.Console.Location }}
Expand Down
3 changes: 3 additions & 0 deletions ziti/cmd/create/config_templates/router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ identity:
{{ if not .Router.AltCertsEnabled }}#{{ end }} - server_cert: "{{ .Router.AltServerCert }}"
{{ if not .Router.AltCertsEnabled }}#{{ end }} server_key: "{{ .Router.AltServerKey }}"

ha:
enabled: {{ .Router.IsHA }}

ctrl:
endpoint: tls:{{ .Controller.Ctrl.AdvertisedAddress }}:{{ .Controller.Ctrl.AdvertisedPort }}

Expand Down
5 changes: 3 additions & 2 deletions ziti/cmd/create/create_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ type BindPointsValues struct {
}

type ConsoleValues struct {
Enabled bool
Location string
Enabled bool
Location string
}

type IdentityValues struct {
Expand Down Expand Up @@ -165,6 +165,7 @@ type RouterTemplateValues struct {
Wss WSSRouterTemplateValues
Forwarder RouterForwarderTemplateValues
Listener RouterListenerTemplateValues
IsHA bool
}

type EdgeRouterTemplateValues struct {
Expand Down
1 change: 1 addition & 0 deletions ziti/cmd/create/create_config_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type CreateConfigRouterOptions struct {
IsPrivate bool
TunnelerMode string
LanInterface string
IsHA bool
}

type NewCreateConfigRouterCmd struct {
Expand Down
1 change: 1 addition & 0 deletions ziti/cmd/create/create_config_router_edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func NewCmdCreateConfigRouterEdge(routerOptions *CreateConfigRouterOptions, data
data.Router.Edge.LanInterface = routerOptions.LanInterface
data.Router.Edge.Resolver = cmdhelper.GetZitiEdgeRouterResolver()
data.Router.Edge.DnsSvcIpRange = cmdhelper.GetZitiEdgeRouterDnsSvcIpRange()
data.Router.IsHA = routerOptions.IsHA
},
Run: func(cmd *cobra.Command, args []string) {
routerOptions.Cmd = cmd
Expand Down
Loading

0 comments on commit e48c687

Please sign in to comment.