diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2629784..ea06f6a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: '1.19.x' + go-version: '1.20.x' - name: Install Ziti CI uses: openziti/ziti-ci@v1 diff --git a/.github/workflows/update-dependency.yml b/.github/workflows/update-dependency.yml index 14d36b1..ffa1c3f 100644 --- a/.github/workflows/update-dependency.yml +++ b/.github/workflows/update-dependency.yml @@ -19,7 +19,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: '1.19.x' + go-version: '1.20.x' - name: Install Ziti CI uses: openziti/ziti-ci@v1 diff --git a/actions/edge/login.go b/actions/edge/login.go index 42e9d99..c9cca13 100644 --- a/actions/edge/login.go +++ b/actions/edge/login.go @@ -34,7 +34,7 @@ func (l *login) Execute(m *model.Model) error { return errors.New("variable credentials/edge/password must be a string") } - if _, err = cli.Exec(m, "edge", "login", edgeApiBaseUrl, "-i", model.ActiveInstanceId(), "-c", caChain, "-u", username, "-p", password); err != nil { + if _, err = cli.Exec(m, "edge", "login", edgeApiBaseUrl, "-i", model.ActiveInstanceId(), "--ca", caChain, "-u", username, "-p", password); err != nil { return err } diff --git a/stageziti/stageziti.go b/stageziti/stageziti.go new file mode 100644 index 0000000..5919d8e --- /dev/null +++ b/stageziti/stageziti.go @@ -0,0 +1,31 @@ +package stageziti + +import ( + "github.com/openziti/fablab/kernel/lib/runlevel/2_kitting/devkit" + "github.com/openziti/fablab/kernel/model" +) + +func FetchZitiEdgeTunnel(version string) model.ConfigurationStage { + return &ZitiEdgeTunnelFetchStage{ + Version: version, + } +} + +type ZitiEdgeTunnelFetchStage struct { + Version string + OS string + Arch string +} + +func (self *ZitiEdgeTunnelFetchStage) Configure(run model.Run) error { + return devkit.FetchBinaries(func(binDir string) error { + if self.OS == "" { + self.OS = "linux" + } + if self.Arch == "" { + self.Arch = "amd64" + } + panic("not yet implemented") + //return getziti.InstallZitiEdgeTunnel(self.Version, self.OS, self.Arch, binDir, false) + }).Configure(run) +}