diff --git a/zititest/models/ha/actions/bootstrap.go b/zititest/models/ha/actions/bootstrap.go index 4692c7cdb1..130b374dc1 100644 --- a/zititest/models/ha/actions/bootstrap.go +++ b/zititest/models/ha/actions/bootstrap.go @@ -1,6 +1,24 @@ +/* + (c) Copyright NetFoundry Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + package actions import ( + "fmt" + "github.com/openziti/ziti/zititest/zitilab" "time" "github.com/openziti/fablab/kernel/lib/actions" @@ -23,15 +41,26 @@ func NewBootstrapAction() model.ActionBinder { func (a *bootstrapAction) bind(m *model.Model) model.Action { workflow := actions.Workflow() + ctrlCount := len(m.SelectHosts(".ctrl")) + workflow.AddAction(component.Stop(".ctrl")) workflow.AddAction(host.GroupExec("*", 25, "rm -f logs/*")) - workflow.AddAction(host.GroupExec(".ctrl", 5, "rf -rf ./fablab/ctrldata")) + workflow.AddAction(host.GroupExec("component.ctrl", 5, "rm -rf ./fablab/ctrldata")) + + if ctrlCount == 1 { + workflow.AddAction(component.Exec("#ctrl", zitilab.ControllerActionInitStandalone)) + } + workflow.AddAction(component.Start(".ctrl")) - workflow.AddAction(semaphore.Sleep(2 * time.Second)) - workflow.AddAction(edge.RaftJoin(".ctrl")) - workflow.AddAction(semaphore.Sleep(2 * time.Second)) - workflow.AddAction(edge.InitRaftController("#ctrl1")) - workflow.AddAction(semaphore.Sleep(time.Second)) + + if ctrlCount > 1 { + workflow.AddAction(semaphore.Sleep(2 * time.Second)) + workflow.AddAction(edge.RaftJoin(".ctrl")) + workflow.AddAction(semaphore.Sleep(2 * time.Second)) + workflow.AddAction(edge.InitRaftController("#ctrl1")) + } + + workflow.AddAction(edge.ControllerAvailable("#ctrl1", 30*time.Second)) workflow.AddAction(edge.Login("#ctrl1")) @@ -44,10 +73,74 @@ func (a *bootstrapAction) bind(m *model.Model) model.Action { workflow.AddAction(zitilib_actions.Edge("create", "service-policy", "echo-servers", "Bind", "--service-roles", "@echo", "--identity-roles", "#service")) workflow.AddAction(zitilib_actions.Edge("create", "service-policy", "echo-client", "Dial", "--service-roles", "@echo", "--identity-roles", "#client")) - workflow.AddAction(zitilib_actions.Edge("create", "edge-router-policy", "echo-servers", "--edge-router-roles", "@router-east", "--identity-roles", "#service")) - workflow.AddAction(zitilib_actions.Edge("create", "edge-router-policy", "echo-clients", "--edge-router-roles", "@router-west", "--identity-roles", "#client")) + workflow.AddAction(zitilib_actions.Edge("create", "edge-router-policy", "echo-servers", "--edge-router-roles", "#host", "--identity-roles", "#service")) + workflow.AddAction(zitilib_actions.Edge("create", "edge-router-policy", "echo-clients", "--edge-router-roles", "#client", "--identity-roles", "#client")) + + workflow.AddAction(zitilib_actions.Edge("create", "service-edge-router-policy", "serp-all", "--service-roles", "#all", "--edge-router-roles", "#all")) + + workflow.AddAction(zitilib_actions.Edge("create", "config", "files-host", "host.v1", ` + { + "address" : "ziti-smoketest-files.s3-us-west-1.amazonaws.com", + "port" : 443, + "protocol" : "tcp" + }`)) + + workflow.AddAction(zitilib_actions.Edge("create", "config", "iperf-host", "host.v1", ` + { + "address" : "localhost", + "port" : 5201, + "protocol" : "tcp" + }`)) + + for _, encrypted := range []bool{false, true} { + for _, hostType := range []string{"ert", "zet", "ziti-tunnel"} { + suffix := "" + encryptionFlag := "ON" + + if !encrypted { + suffix = "-unencrypted" + encryptionFlag = "OFF" + } + + filesConfigName := fmt.Sprintf("files-intercept-%s%s", hostType, suffix) + filesConfigDef := fmt.Sprintf(` + { + "addresses": ["files-%s%s.s3-us-west-1.amazonaws.ziti"], + "portRanges" : [ { "low": 443, "high": 443 } ], + "protocols": ["tcp"] + }`, hostType, suffix) + + workflow.AddAction(zitilib_actions.Edge("create", "config", filesConfigName, "intercept.v1", filesConfigDef)) + + iperfConfigName := fmt.Sprintf("iperf-intercept-%s%s", hostType, suffix) + iperfConfigDef := fmt.Sprintf(` + { + "addresses": ["iperf-%s%s.ziti"], + "portRanges" : [ { "low": 5201, "high": 5201 } ], + "protocols": ["tcp"] + }`, hostType, suffix) + + workflow.AddAction(zitilib_actions.Edge("create", "config", iperfConfigName, "intercept.v1", iperfConfigDef)) + + filesServiceName := fmt.Sprintf("%s-files%s", hostType, suffix) + filesConfigs := fmt.Sprintf("files-host,%s", filesConfigName) + workflow.AddAction(zitilib_actions.Edge("create", "service", filesServiceName, "-c", filesConfigs, "-e", encryptionFlag, "-a", hostType)) + + iperfServiceName := fmt.Sprintf("%s-iperf%s", hostType, suffix) + iperfConfigs := fmt.Sprintf("iperf-host,%s", iperfConfigName) + workflow.AddAction(zitilib_actions.Edge("create", "service", iperfServiceName, "-c", iperfConfigs, "-e", encryptionFlag, "-a", hostType)) + } + } + + workflow.AddAction(zitilib_actions.Edge("create", "service-policy", "ert-hosts", "Bind", "--service-roles", "#ert", "--identity-roles", "#ert-host")) + workflow.AddAction(zitilib_actions.Edge("create", "service-policy", "zet-hosts", "Bind", "--service-roles", "#zet", "--identity-roles", "#zet-host")) + workflow.AddAction(zitilib_actions.Edge("create", "service-policy", "ziti-tunnel-hosts", "Bind", "--service-roles", "#ziti-tunnel", "--identity-roles", "#ziti-tunnel-host")) + workflow.AddAction(zitilib_actions.Edge("create", "service-policy", "client-tunnelers", "Dial", "--service-roles", "#all", "--identity-roles", "#client")) + + workflow.AddAction(zitilib_actions.Edge("create", "edge-router-policy", "client-routers", "--edge-router-roles", "#client", "--identity-roles", "#client")) + workflow.AddAction(zitilib_actions.Edge("create", "edge-router-policy", "host-routers", "--edge-router-roles", "#host", "--identity-roles", "#host")) - workflow.AddAction(zitilib_actions.Edge("create", "service-edge-router-policy", "echo", "--semantic", "AnyOf", "--service-roles", "@echo", "--edge-router-roles", "#all")) + workflow.AddAction(component.Stop(models.ControllerTag)) return workflow } diff --git a/zititest/models/ha/actions/start.go b/zititest/models/ha/actions/start.go index 4b4b232cc7..a4246ed15d 100644 --- a/zititest/models/ha/actions/start.go +++ b/zititest/models/ha/actions/start.go @@ -1,6 +1,7 @@ package actions import ( + "github.com/openziti/ziti/zititest/zitilab/actions/edge" "time" "github.com/openziti/fablab/kernel/lib/actions" @@ -21,16 +22,20 @@ func NewStartAction(metricbeat MetricbeatConfig, consul ConsulConfig) model.Acti func (a *startAction) bind(m *model.Model) model.Action { workflow := actions.Workflow() - workflow.AddAction(component.Start("#ctrl")) - workflow.AddAction(semaphore.Sleep(2 * time.Second)) + workflow.AddAction(component.Start(".ctrl")) + workflow.AddAction(edge.ControllerAvailable("#ctrl1", 30*time.Second)) workflow.AddAction(component.StartInParallel(models.EdgeRouterTag, 25)) + workflow.AddAction(component.StartInParallel(".iperf", 5)) workflow.AddAction(semaphore.Sleep(2 * time.Second)) workflow.AddAction(zitilib_actions.StartMetricbeat("*", a.Metricbeat.ConfigPath, a.Metricbeat.DataPath, a.Metricbeat.LogPath)) workflow.AddAction(zitilib_actions.StartConsul("*", a.Consul.ServerAddr, a.Consul.ConfigDir, a.Consul.DataPath, a.Consul.LogPath)) workflow.AddAction(semaphore.Sleep(2 * time.Second)) - workflow.AddAction(component.Start("#echo-server")) - workflow.AddAction(semaphore.Sleep(2 * time.Second)) + workflow.AddAction(component.StartInParallel(".sdk-app", 5)) + + workflow.AddAction(semaphore.Sleep(5 * time.Second)) + workflow.AddAction(zitilib_actions.Edge("list", "edge-routers", "limit none")) + workflow.AddAction(zitilib_actions.Edge("list", "terminators", "limit none")) return workflow } diff --git a/zititest/models/ha/configs/router.yml.tmpl b/zititest/models/ha/configs/router.yml.tmpl index 4cb9afca5d..0f5bd0e01e 100644 --- a/zititest/models/ha/configs/router.yml.tmpl +++ b/zititest/models/ha/configs/router.yml.tmpl @@ -1,5 +1,5 @@ {{$ssh_username := .Model.MustVariable "credentials.ssh.username"}} -{{$identity := .Component.PublicIdentity}} +{{$identity := .Component.Id}} {{$router_ip := .Host.PublicIp}} v: 3 diff --git a/zititest/models/ha/main.go b/zititest/models/ha/main.go index 0b38d50176..ee453c7313 100644 --- a/zititest/models/ha/main.go +++ b/zititest/models/ha/main.go @@ -19,6 +19,7 @@ package main import ( "embed" "fmt" + "github.com/michaelquigley/pfxlog" "github.com/openziti/fablab" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/binding" @@ -51,12 +52,22 @@ func getConfigData(filePath string) []byte { return data } +func getUniqueId() string { + if runId := os.Getenv("GITHUB_RUN_ID"); runId != "" { + return "-" + runId + "." + os.Getenv("GITHUB_RUN_ATTEMPT") + } + return "-" + os.Getenv("USER") +} + var m = &model.Model{ Id: "ha", Scope: model.Scope{ Defaults: model.Variables{ - "environment": "ha-smoketest", + "environment": "ha-smoketest" + getUniqueId(), "credentials": model.Variables{ + "aws": model.Variables{ + "managed_key": true, + }, "ssh": model.Variables{ "username": "ubuntu", }, @@ -68,6 +79,20 @@ var m = &model.Model{ }, }, + Factories: []model.Factory{ + model.FactoryFunc(func(m *model.Model) error { + pfxlog.Logger().Infof("environment [%s]", m.MustStringVariable("environment")) + m.AddActivationActions("stop", "bootstrap", "start") + return nil + }), + model.FactoryFunc(func(m *model.Model) error { + return m.ForEachHost("*", 1, func(host *model.Host) error { + host.InstanceType = "t3.micro" + return nil + }) + }), + }, + Resources: model.Resources{ resources.Configs: resources.SubFolder(configResource, "configs"), resources.Terraform: test_resources.TerraformResources(), @@ -79,7 +104,6 @@ var m = &model.Model{ Site: "us-east-1a", Hosts: model.Hosts{ "ctrl1": { - InstanceType: "t3.micro", Components: model.Components{ "ctrl1": { Scope: model.Scope{Tags: model.Tags{"ctrl"}}, @@ -88,7 +112,6 @@ var m = &model.Model{ }, }, "ctrl2": { - InstanceType: "t3.micro", Components: model.Components{ "ctrl2": { Scope: model.Scope{Tags: model.Tags{"ctrl"}}, @@ -96,17 +119,44 @@ var m = &model.Model{ }, }, }, - - "router-east": { - InstanceType: "t2.micro", + "router-east-1": { + Scope: model.Scope{Tags: model.Tags{"ert-client"}}, Components: model.Components{ - "router-east": { - Scope: model.Scope{Tags: model.Tags{"edge-router", "terminator"}}, + "router-east-1": { + Scope: model.Scope{Tags: model.Tags{"edge-router", "terminator", "tunneler", "client"}}, Type: &zitilab.RouterType{}, }, - "echo-server": { - Scope: model.Scope{Tags: model.Tags{"sdk-app", "service"}}, - Type: &zitilab.EchoServerType{}, + "zcat": { + Scope: model.Scope{Tags: model.Tags{"sdk-app", "client"}}, + Type: &zitilab.ZCatType{}, + }, + }, + }, + "router-east-2": { + Components: model.Components{ + "router-east-2": { + Scope: model.Scope{Tags: model.Tags{"edge-router", "initiator"}}, + Type: &zitilab.RouterType{}, + }, + }, + }, + "ziti-edge-tunnel-client": { + Scope: model.Scope{Tags: model.Tags{"zet-client"}}, + Components: model.Components{ + "ziti-edge-tunnel-client": { + Scope: model.Scope{Tags: model.Tags{"sdk-app", "client"}}, + Type: &zitilab.ZitiEdgeTunnelType{ + Version: "v0.21.4", + }, + }, + }, + }, + "ziti-tunnel-client": { + Scope: model.Scope{Tags: model.Tags{"ziti-tunnel-client"}}, + Components: model.Components{ + "ziti-tunnel-client": { + Scope: model.Scope{Tags: model.Tags{"ziti-tunnel", "sdk-app", "client"}}, + Type: &zitilab.ZitiTunnelType{}, }, }, }, @@ -117,7 +167,6 @@ var m = &model.Model{ Site: "us-west-2b", Hosts: model.Hosts{ "ctrl3": { - InstanceType: "t3.micro", Components: model.Components{ "ctrl3": { Scope: model.Scope{Tags: model.Tags{"ctrl"}}, @@ -127,16 +176,46 @@ var m = &model.Model{ }, "router-west": { - Scope: model.Scope{Tags: model.Tags{}}, - InstanceType: "t2.micro", Components: model.Components{ "router-west": { - Scope: model.Scope{Tags: model.Tags{"edge-router", "terminator"}}, + Scope: model.Scope{Tags: model.Tags{"edge-router", "tunneler", "host", "ert-host"}}, Type: &zitilab.RouterType{}, }, - "zcat": { - Scope: model.Scope{Tags: model.Tags{"sdk-app"}}, - Type: &zitilab.ZCatType{}, + "echo-server": { + Scope: model.Scope{Tags: model.Tags{"sdk-app", "service"}}, + Type: &zitilab.EchoServerType{}, + }, + "iperf-server-ert": { + Scope: model.Scope{Tags: model.Tags{"iperf", "service"}}, + Type: &zitilab.IPerfServerType{}, + }, + }, + }, + "ziti-edge-tunnel-host": { + Components: model.Components{ + "ziti-edge-tunnel-host": { + Scope: model.Scope{Tags: model.Tags{"sdk-app", "host", "zet-host"}}, + Type: &zitilab.ZitiEdgeTunnelType{ + Version: "v0.21.4", + }, + }, + "iperf-server-zet": { + Scope: model.Scope{Tags: model.Tags{"iperf", "service"}}, + Type: &zitilab.IPerfServerType{}, + }, + }, + }, + "ziti-tunnel-host": { + Components: model.Components{ + "ziti-tunnel-host": { + Scope: model.Scope{Tags: model.Tags{"ziti-tunnel", "sdk-app", "host", "ziti-tunnel-host"}}, + Type: &zitilab.ZitiTunnelType{ + Mode: zitilab.ZitiTunnelModeHost, + }, + }, + "iperf-server-zt": { + Scope: model.Scope{Tags: model.Tags{"iperf", "service"}}, + Type: &zitilab.IPerfServerType{}, }, }, }, @@ -163,8 +242,12 @@ var m = &model.Model{ Infrastructure: model.Stages{ aws_ssh_key.Express(), - terraform_0.Express(), - semaphore0.Ready(time.Minute), + &terraform_0.Terraform{ + Retries: 3, + ReadyCheck: &semaphore0.ReadyStage{ + MaxWait: 90 * time.Second, + }, + }, }, Distribution: model.Stages{ @@ -241,8 +324,6 @@ var m = &model.Model{ } func main() { - m.AddActivationActions("stop", "bootstrap", "start") - model.AddBootstrapExtension(binding.AwsCredentialsLoader) model.AddBootstrapExtension(aws_ssh_key.KeyManager) diff --git a/zititest/models/simple/actions/bootstrap.go b/zititest/models/simple/actions/bootstrap.go index f9c7f43914..0a0846672e 100644 --- a/zititest/models/simple/actions/bootstrap.go +++ b/zititest/models/simple/actions/bootstrap.go @@ -18,6 +18,7 @@ package actions import ( "fmt" + "github.com/openziti/fablab/kernel/lib/actions/semaphore" "github.com/openziti/ziti/zititest/zitilab" "time" @@ -40,13 +41,28 @@ func NewBootstrapAction() model.ActionBinder { func (a *bootstrapAction) bind(m *model.Model) model.Action { workflow := actions.Workflow() + isHA := len(m.SelectComponents(".ctrl")) > 1 + + workflow.AddAction(component.Stop(".ctrl")) workflow.AddAction(host.GroupExec("*", 25, "rm -f logs/*")) - workflow.AddAction(component.Stop("#ctrl")) - workflow.AddAction(component.Exec("#ctrl", zitilab.ControllerActionInitStandalone)) - workflow.AddAction(component.Start("#ctrl")) - workflow.AddAction(edge.ControllerAvailable("#ctrl", 30*time.Second)) + workflow.AddAction(host.GroupExec("component.ctrl", 5, "rm -rf ./fablab/ctrldata")) + + if !isHA { + workflow.AddAction(component.Exec("#ctrl", zitilab.ControllerActionInitStandalone)) + } + + workflow.AddAction(component.Start(".ctrl")) + + if isHA { + workflow.AddAction(semaphore.Sleep(2 * time.Second)) + workflow.AddAction(edge.RaftJoin(".ctrl")) + workflow.AddAction(semaphore.Sleep(2 * time.Second)) + workflow.AddAction(edge.InitRaftController("#ctrl1")) + } + + workflow.AddAction(edge.ControllerAvailable("#ctrl1", 30*time.Second)) - workflow.AddAction(edge.Login("#ctrl")) + workflow.AddAction(edge.Login("#ctrl1")) workflow.AddAction(component.StopInParallel(models.EdgeRouterTag, 25)) workflow.AddAction(edge.InitEdgeRouters(models.EdgeRouterTag, 2)) diff --git a/zititest/models/simple/actions/start.go b/zititest/models/simple/actions/start.go index 5762677069..a1220c1291 100644 --- a/zititest/models/simple/actions/start.go +++ b/zititest/models/simple/actions/start.go @@ -38,8 +38,8 @@ func NewStartAction(metricbeat MetricbeatConfig, consul ConsulConfig) model.Acti func (a *startAction) bind(m *model.Model) model.Action { workflow := actions.Workflow() - workflow.AddAction(component.Start("#ctrl")) - workflow.AddAction(edge.ControllerAvailable("#ctrl", 30*time.Second)) + workflow.AddAction(component.Start(".ctrl")) + workflow.AddAction(edge.ControllerAvailable("#ctrl1", 30*time.Second)) workflow.AddAction(component.StartInParallel(models.EdgeRouterTag, 25)) workflow.AddAction(component.StartInParallel(".iperf", 5)) diff --git a/zititest/models/simple/simple.go b/zititest/models/simple/simple.go index a156115ec2..dee8958681 100644 --- a/zititest/models/simple/simple.go +++ b/zititest/models/simple/simple.go @@ -31,7 +31,7 @@ import ( "github.com/openziti/fablab/kernel/lib/runlevel/6_disposal/terraform" "github.com/openziti/fablab/kernel/model" "github.com/openziti/fablab/resources" - actions2 "github.com/openziti/ziti/zititest/models/simple/actions" + "github.com/openziti/ziti/zititest/models/simple/actions" "github.com/openziti/ziti/zititest/models/test_resources" "github.com/openziti/ziti/zititest/zitilab" "github.com/openziti/ziti/zititest/zitilab/actions/edge" @@ -78,6 +78,17 @@ var Model = &model.Model{ }, }, + StructureFactories: []model.Factory{ + model.FactoryFunc(func(m *model.Model) error { + if val, _ := m.GetBoolVariable("ha"); !val { + for _, host := range m.SelectHosts("component.ha") { + delete(host.Region.Hosts, host.Id) + } + } + return nil + }), + }, + Factories: []model.Factory{ model.FactoryFunc(func(m *model.Model) error { pfxlog.Logger().Infof("environment [%s]", m.MustStringVariable("environment")) @@ -102,10 +113,18 @@ var Model = &model.Model{ Region: "us-east-1", Site: "us-east-1a", Hosts: model.Hosts{ - "ctrl": { + "ctrl1": { Components: model.Components{ - "ctrl": { - Scope: model.Scope{Tags: model.Tags{"ctrl", "long-running"}}, + "ctrl1": { + Scope: model.Scope{Tags: model.Tags{"ctrl"}}, + Type: &zitilab.ControllerType{}, + }, + }, + }, + "ctrl2": { + Components: model.Components{ + "ctrl2": { + Scope: model.Scope{Tags: model.Tags{"ctrl", "ha"}}, Type: &zitilab.ControllerType{}, }, }, @@ -114,7 +133,7 @@ var Model = &model.Model{ Scope: model.Scope{Tags: model.Tags{"ert-client"}}, Components: model.Components{ "router-east-1": { - Scope: model.Scope{Tags: model.Tags{"edge-router", "terminator", "tunneler", "client", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"edge-router", "terminator", "tunneler", "client"}}, Type: &zitilab.RouterType{}, }, "zcat": { @@ -126,7 +145,7 @@ var Model = &model.Model{ "router-east-2": { Components: model.Components{ "router-east-2": { - Scope: model.Scope{Tags: model.Tags{"edge-router", "initiator", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"edge-router", "initiator"}}, Type: &zitilab.RouterType{}, }, }, @@ -135,7 +154,7 @@ var Model = &model.Model{ Scope: model.Scope{Tags: model.Tags{"zet-client"}}, Components: model.Components{ "ziti-edge-tunnel-client": { - Scope: model.Scope{Tags: model.Tags{"sdk-app", "client", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"sdk-app", "client"}}, Type: &zitilab.ZitiEdgeTunnelType{ Version: "v0.21.4", }, @@ -146,7 +165,7 @@ var Model = &model.Model{ Scope: model.Scope{Tags: model.Tags{"ziti-tunnel-client"}}, Components: model.Components{ "ziti-tunnel-client": { - Scope: model.Scope{Tags: model.Tags{"ziti-tunnel", "sdk-app", "client", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"ziti-tunnel", "sdk-app", "client"}}, Type: &zitilab.ZitiTunnelType{}, }, }, @@ -157,18 +176,27 @@ var Model = &model.Model{ Region: "us-west-2", Site: "us-west-2b", Hosts: model.Hosts{ + "ctrl3": { + Components: model.Components{ + "ctrl3": { + Scope: model.Scope{Tags: model.Tags{"ctrl", "ha"}}, + Type: &zitilab.ControllerType{}, + }, + }, + }, + "router-west": { Components: model.Components{ "router-west": { - Scope: model.Scope{Tags: model.Tags{"edge-router", "tunneler", "host", "ert-host", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"edge-router", "tunneler", "host", "ert-host"}}, Type: &zitilab.RouterType{}, }, "echo-server": { - Scope: model.Scope{Tags: model.Tags{"sdk-app", "service", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"sdk-app", "service"}}, Type: &zitilab.EchoServerType{}, }, "iperf-server-ert": { - Scope: model.Scope{Tags: model.Tags{"iperf", "service", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"iperf", "service"}}, Type: &zitilab.IPerfServerType{}, }, }, @@ -176,13 +204,13 @@ var Model = &model.Model{ "ziti-edge-tunnel-host": { Components: model.Components{ "ziti-edge-tunnel-host": { - Scope: model.Scope{Tags: model.Tags{"sdk-app", "host", "zet-host", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"sdk-app", "host", "zet-host"}}, Type: &zitilab.ZitiEdgeTunnelType{ Version: "v0.21.4", }, }, "iperf-server-zet": { - Scope: model.Scope{Tags: model.Tags{"iperf", "service", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"iperf", "service"}}, Type: &zitilab.IPerfServerType{}, }, }, @@ -190,13 +218,13 @@ var Model = &model.Model{ "ziti-tunnel-host": { Components: model.Components{ "ziti-tunnel-host": { - Scope: model.Scope{Tags: model.Tags{"ziti-tunnel", "sdk-app", "host", "ziti-tunnel-host", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"ziti-tunnel", "sdk-app", "host", "ziti-tunnel-host"}}, Type: &zitilab.ZitiTunnelType{ Mode: zitilab.ZitiTunnelModeHost, }, }, "iperf-server-zt": { - Scope: model.Scope{Tags: model.Tags{"iperf", "service", "long-running"}}, + Scope: model.Scope{Tags: model.Tags{"iperf", "service"}}, Type: &zitilab.IPerfServerType{}, }, }, @@ -206,20 +234,20 @@ var Model = &model.Model{ }, Actions: model.ActionBinders{ - "bootstrap": actions2.NewBootstrapAction(), - "start": actions2.NewStartAction(actions2.MetricbeatConfig{ + "bootstrap": actions.NewBootstrapAction(), + "start": actions.NewStartAction(actions.MetricbeatConfig{ ConfigPath: "metricbeat", DataPath: "metricbeat/data", LogPath: "metricbeat/logs", }, - actions2.ConsulConfig{ + actions.ConsulConfig{ ServerAddr: os.Getenv("CONSUL_ENDPOINT"), ConfigDir: "consul", DataPath: "consul/data", LogPath: "consul/log.out", }), "stop": model.Bind(component.StopInParallel("*", 15)), - "login": model.Bind(edge.Login("#ctrl")), + "login": model.Bind(edge.Login("#ctrl1")), }, Infrastructure: model.Stages{ diff --git a/zititest/zitilab/component_common.go b/zititest/zitilab/component_common.go index 9268d6b912..f30216a9d6 100644 --- a/zititest/zitilab/component_common.go +++ b/zititest/zitilab/component_common.go @@ -45,10 +45,6 @@ func startZitiComponent(c *model.Component, zitiType string, version string, con configPath := fmt.Sprintf("/home/%s/fablab/cfg/%s", factory.User(), configName) logsPath := fmt.Sprintf("/home/%s/logs/%s.log", factory.User(), c.Id) - if zitiType == "tunnel" { - - } - useSudo := "" if zitiType == "tunnel" || c.HasTag("tunneler") { useSudo = "sudo"