Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Add stageziti and fix login
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed May 30, 2023
1 parent 1ef808f commit 13e1f51
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion actions/edge/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
31 changes: 31 additions & 0 deletions stageziti/stageziti.go
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit 13e1f51

Please sign in to comment.