mirror of
https://github.com/openziti/ziti.git
synced 2026-10-11 23:12:35 +00:00
4b2d97d293
* Merge branch 'action-test' of github.com:openziti/ziti into simple-transfer-test * added metricbeat initialization * updates to the simple network testing * update zitilab and fablad deps and integrate env variables * removed incorrect file * move env up to top * added run and test * mod tidy * mod got out of sync * remove influx logging from ziti-probe due to being removed from metrics * add ls to see why simple-transfer isnt built * dig deeper * need to copy not move * back to release dir * might need to sudo * mke files executable * bootsrap from correct directory * add extra restart to confirm network spins up * add retry for inrastructure * build correct binaries * add build ignore ot stages as well * don't return error after successful retry * fix err assign * update zitilab version * removed local testing paths * update configs and env variables * added env prepend * remove build number for debugging * add different formatting * updated build/run number * paren in incorrect place * added specific version of metricbeat to install * flip back correct ziti loc * removed builds for mac & windows * Removed test build for mac & windows * remove ziti-probe * flip ziti test to run alongside mac & windows builds * remove unneeded needs * remove for sanity check * remove old uploads * remove space * setup ziti version properly * remove zitilab testing to confirm running * try removing all changes? * remove even comments? * I dont understand * revert * start from scratch. Small increments. * simplify first job? * try spearating build and publish * run all 3 builds at the same time * missed env variables * update to run zitilab tests * corrected dirs * fixing ziti root * redo build in publish step * applied pr comments * add in mkdir and remove buildint test binaries in publish step * forgot to remove move * update linux build requirement to 1.19
37 lines
969 B
Go
37 lines
969 B
Go
package actions
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/openziti/fablab/kernel/lib"
|
|
"github.com/openziti/fablab/kernel/model"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
type echoServerStart struct {
|
|
componentSpec string
|
|
}
|
|
|
|
func StartEchoServers(componentSpec string) model.Action {
|
|
return &echoServerStart{
|
|
componentSpec: componentSpec,
|
|
}
|
|
}
|
|
|
|
func (esi *echoServerStart) Execute(m *model.Model) error {
|
|
return m.ForEachComponent(esi.componentSpec, 1, func(c *model.Component) error {
|
|
ssh := lib.NewSshConfigFactory(c.GetHost())
|
|
remoteConfigFile := "/home/ubuntu/fablab/cfg/" + c.PublicIdentity + ".json"
|
|
|
|
echoServerCmd := fmt.Sprintf("screen -d -m nohup /home/%s/fablab/bin/ziti-echo server --identity %s 2>&1 &",
|
|
ssh.User(), remoteConfigFile)
|
|
|
|
if output, err := lib.RemoteExec(ssh, echoServerCmd); err != nil {
|
|
logrus.Errorf("error starting echo server [%s] (%v)", output, err)
|
|
return err
|
|
}
|
|
logrus.Error("After remote starting echo server")
|
|
return nil
|
|
})
|
|
}
|