From 7ecda2177139c9529490f235eecab98d2261ef31 Mon Sep 17 00:00:00 2001 From: mudler Date: Mon, 27 Feb 2023 19:11:22 +0100 Subject: [PATCH 01/11] :seedling: Allow to embed custom data into offline ISOs Signed-off-by: mudler --- deployer/deployer.go | 14 ++- deployer/register.go | 162 ++++++++++++++------------- go.mod | 2 +- go.sum | 101 ++--------------- internal/cmd/config.go | 7 +- pkg/ops/iso.go | 57 +++++++++- {deployer => pkg/schema}/artifact.go | 2 +- {deployer => pkg/schema}/config.go | 8 +- 8 files changed, 172 insertions(+), 181 deletions(-) rename {deployer => pkg/schema}/artifact.go (98%) rename {deployer => pkg/schema}/config.go (89%) diff --git a/deployer/deployer.go b/deployer/deployer.go index 259e03d1..3e26790b 100644 --- a/deployer/deployer.go +++ b/deployer/deployer.go @@ -5,14 +5,16 @@ import ( "io/ioutil" "os" + "github.com/kairos-io/AuroraBoot/pkg/schema" + "github.com/rs/zerolog/log" "github.com/spectrocloud-labs/herd" "gopkg.in/yaml.v3" ) -func LoadByte(b []byte) (*Config, *ReleaseArtifact, error) { - config := &Config{} - release := &ReleaseArtifact{} +func LoadByte(b []byte) (*schema.Config, *schema.ReleaseArtifact, error) { + config := &schema.Config{} + release := &schema.ReleaseArtifact{} if err := yaml.Unmarshal(b, config); err != nil { return nil, nil, err @@ -27,7 +29,7 @@ func LoadByte(b []byte) (*Config, *ReleaseArtifact, error) { // LoadFile loads a configuration file and returns the AuroraBoot configuration // and release artifact information -func LoadFile(file string) (*Config, *ReleaseArtifact, error) { +func LoadFile(file string) (*schema.Config, *schema.ReleaseArtifact, error) { dat, err := os.ReadFile(file) if err != nil { @@ -38,7 +40,7 @@ func LoadFile(file string) (*Config, *ReleaseArtifact, error) { } // Start starts the auroraboot deployer -func Start(config *Config, release *ReleaseArtifact) error { +func Start(config *schema.Config, release *schema.ReleaseArtifact) error { f, err := ioutil.TempFile("", "auroraboot-dat") if err != nil { @@ -68,7 +70,7 @@ func writeDag(d [][]herd.GraphEntry) { if op.Error != nil { log.Printf(" <%s> (error: %s) (background: %t)", op.Name, op.Error.Error(), op.Background) } else { - log.Printf(" <%s> (background: %t)", op.Name, op.Background) + log.Printf(" <%s> (background: %t enabled: %t)", op.Name, op.Background) } } log.Print("") diff --git a/deployer/register.go b/deployer/register.go index 59af04ed..c53a0e83 100644 --- a/deployer/register.go +++ b/deployer/register.go @@ -12,7 +12,7 @@ import ( "github.com/kairos-io/AuroraBoot/pkg/netboot" "github.com/kairos-io/AuroraBoot/pkg/ops" - "github.com/kairos-io/kairos/pkg/utils" + "github.com/kairos-io/AuroraBoot/pkg/schema" "github.com/spectrocloud-labs/herd" ) @@ -41,7 +41,7 @@ const ( ) // Register register the op dag based on the configuration and the artifact wanted. -func Register(g *herd.Graph, artifact ReleaseArtifact, c Config, cloudConfigFile string) { +func Register(g *herd.Graph, artifact schema.ReleaseArtifact, c schema.Config, cloudConfigFile string) { dst := c.StateDir("iso") dstNetboot := c.StateDir("netboot") @@ -64,14 +64,27 @@ func Register(g *herd.Graph, artifact ReleaseArtifact, c Config, cloudConfigFile kernelFile := filepath.Join(dstNetboot, "kairos-kernel") initrdFile := filepath.Join(dstNetboot, "kairos-initrd") isoFile := filepath.Join(dst, "kairos.iso") - tmpRootfs := c.StateDir("temp-rootfs") + fromImage := artifact.ContainerImage != "" + fromImageOption := func() bool { return fromImage } + isoOption := func() bool { return !fromImage } + + // Pull locak docker daemon if container image starts with docker:// + containerImage := artifact.ContainerImage + local := false + if strings.HasPrefix(containerImage, "docker://") { + local = true + containerImage = strings.ReplaceAll(containerImage, "docker://", "") + } + + // Preparation steps g.Add(opPreparetmproot, herd.WithCallback( func(ctx context.Context) error { return os.MkdirAll(dstNetboot, 0700) }, )) + g.Add(opPrepareNetboot, herd.WithCallback( func(ctx context.Context) error { return os.MkdirAll(dstNetboot, 0700) @@ -82,80 +95,75 @@ func Register(g *herd.Graph, artifact ReleaseArtifact, c Config, cloudConfigFile return os.MkdirAll(dst, 0700) })) - fromImage := artifact.ContainerImage != "" - - // Pull locak docker daemon if container image starts with docker:// - containerImage := artifact.ContainerImage - local := false - - if strings.HasPrefix(containerImage, "docker://") { - local = true - containerImage = strings.ReplaceAll(containerImage, "docker://", "") - } - - if fromImage { - g.Add(opContainerPull, herd.WithDeps(opPreparetmproot), herd.WithCallback(ops.PullContainerImage(containerImage, tmpRootfs, local))) - g.Add(opGenISO, herd.WithDeps(opContainerPull), herd.WithCallback(ops.GenISO(kairosDefaultArtifactName, tmpRootfs, dst))) - if !c.DisableNetboot { - g.Add(opExtractNetboot, herd.WithDeps(opGenISO), herd.WithCallback(ops.ExtractNetboot(isoFile, dstNetboot, kairosDefaultArtifactName))) - } - } else { - //TODO: add Validate step - g.Add(opDownloadInitrd, herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.InitrdURL(), initrdFile))) - g.Add(opDownloadKernel, herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.KernelURL(), kernelFile))) - g.Add(opDownloadSquashFS, herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.SquashFSURL(), squashFSfile))) - g.Add(opDownloadISO, herd.WithCallback(ops.DownloadArtifact(artifact.ISOUrl(), isoFile))) - } - - if !c.DisableISOboot { - g.Add(opCopyCloudConfig, - herd.WithDeps(opPrepareISO), - herd.WithCallback(func(ctx context.Context) error { - _, err := copy(cloudConfigFile, filepath.Join(dst, "config.yaml")) - return err - })) - - g.Add(opInjectCC, - herd.WithDeps(opCopyCloudConfig), - herd.ConditionalOption(func() bool { return !fromImage }, herd.WithDeps(opDownloadISO)), - herd.ConditionalOption(func() bool { return fromImage }, herd.WithDeps(opGenISO)), - herd.WithCallback(func(ctx context.Context) error { - os.Chdir(dst) - injectedIso := isoFile + ".custom.iso" - os.Remove(injectedIso) - out, err := utils.SH(fmt.Sprintf("xorriso -indev %s -outdev %s -map %s /config.yaml -boot_image any replay", isoFile, injectedIso, filepath.Join(dst, "config.yaml"))) - log.Print(out) - return err - })) - - if !c.DisableHTTPServer { - g.Add( - opStartHTTPServer, - herd.Background, - herd.ConditionalOption(func() bool { return fromImage }, herd.WithDeps(opGenISO, opCopyCloudConfig, opInjectCC)), - herd.ConditionalOption(func() bool { return !fromImage }, herd.WithDeps(opDownloadISO, opCopyCloudConfig, opInjectCC)), - herd.WithCallback(ops.ServeArtifacts(listenAddr, dst)), - ) - } - } - - if !c.DisableNetboot { - g.Add( - opStartNetboot, - herd.ConditionalOption(func() bool { return !fromImage }, herd.WithDeps(opDownloadInitrd, opDownloadKernel, opDownloadSquashFS)), - herd.ConditionalOption(func() bool { return fromImage }, herd.WithDeps(opExtractNetboot)), - herd.Background, - herd.WithCallback(func(ctx context.Context) error { - log.Info().Msgf("Start pixiecore") - - configFile := cloudConfigFile - - cmdLine := `rd.neednet=1 ip=dhcp rd.cos.disable root=live:{{ ID "%s" }} netboot nodepair.enable config_url={{ ID "%s" }} console=tty1 console=ttyS0 console=tty0` - return netboot.Server(kernelFile, "AuroraBoot", fmt.Sprintf(cmdLine, squashFSfile, configFile), address, netbootPort, []string{initrdFile}, true) - }, - ), - ) - } + g.Add(opCopyCloudConfig, + herd.WithDeps(opPrepareISO), + herd.WithCallback(func(ctx context.Context) error { + _, err := copy(cloudConfigFile, filepath.Join(dst, "config.yaml")) + return err + })) + + // Ops to generate from container image + g.Add(opContainerPull, + herd.EnableIf(fromImageOption), + herd.WithDeps(opPreparetmproot), herd.WithCallback(ops.PullContainerImage(containerImage, tmpRootfs, local))) + g.Add(opGenISO, + herd.EnableIf(fromImageOption), + herd.WithDeps(opContainerPull, opCopyCloudConfig), herd.WithCallback(ops.GenISO(kairosDefaultArtifactName, tmpRootfs, dst, c.ISO))) + g.Add(opExtractNetboot, + herd.EnableIf(func() bool { return fromImage && !c.DisableNetboot }), + herd.WithDeps(opGenISO), herd.WithCallback(ops.ExtractNetboot(isoFile, dstNetboot, kairosDefaultArtifactName))) + + //TODO: add Validate step + // Ops to download from releases + g.Add(opDownloadInitrd, + herd.EnableIf(isoOption), + herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.InitrdURL(), initrdFile))) + g.Add(opDownloadKernel, + herd.EnableIf(isoOption), + herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.KernelURL(), kernelFile))) + g.Add(opDownloadSquashFS, + herd.EnableIf(isoOption), + herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.SquashFSURL(), squashFSfile))) + g.Add(opDownloadISO, + herd.EnableIf(isoOption), + herd.WithCallback(ops.DownloadArtifact(artifact.ISOUrl(), isoFile))) + + // Inject the data into the ISO + g.Add(opInjectCC, + herd.EnableIf(isoOption), + herd.WithDeps(opCopyCloudConfig), + herd.ConditionalOption(isoOption, herd.WithDeps(opDownloadISO)), + herd.WithCallback(ops.InjectISO(dst, isoFile, c.ISO))) + + // Start servers + g.Add( + opStartHTTPServer, + herd.Background, + herd.EnableIf(func() bool { return !c.DisableISOboot && !c.DisableHTTPServer }), + herd.IfElse( + fromImage, + herd.WithDeps(opGenISO, opCopyCloudConfig), + herd.WithDeps(opDownloadISO, opCopyCloudConfig, opInjectCC), + ), + herd.WithCallback(ops.ServeArtifacts(listenAddr, dst)), + ) + + g.Add( + opStartNetboot, + herd.EnableIf(func() bool { return !c.DisableNetboot }), + herd.ConditionalOption(isoOption, herd.WithDeps(opDownloadInitrd, opDownloadKernel, opDownloadSquashFS)), + herd.ConditionalOption(fromImageOption, herd.WithDeps(opExtractNetboot)), + herd.Background, + herd.WithCallback(func(ctx context.Context) error { + log.Info().Msgf("Start pixiecore") + + configFile := cloudConfigFile + + cmdLine := `rd.neednet=1 ip=dhcp rd.cos.disable root=live:{{ ID "%s" }} netboot nodepair.enable config_url={{ ID "%s" }} console=tty1 console=ttyS0 console=tty0` + return netboot.Server(kernelFile, "AuroraBoot", fmt.Sprintf(cmdLine, squashFSfile, configFile), address, netbootPort, []string{initrdFile}, true) + }, + ), + ) } func copy(src, dst string) (int64, error) { diff --git a/go.mod b/go.mod index 9bc02bf9..0e60dfda 100644 --- a/go.mod +++ b/go.mod @@ -5,10 +5,10 @@ go 1.19 require ( github.com/cavaliergopher/grab/v3 v3.0.1 github.com/kairos-io/kairos v1.5.0 + github.com/otiai10/copy v1.9.0 github.com/rs/zerolog v1.29.0 github.com/spectrocloud-labs/herd v0.4.2 github.com/urfave/cli v1.22.12 - github.com/urfave/cli/v2 v2.24.4 go.universe.tf/netboot v0.0.0-20230225040044-0e2ca55deb50 gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index 733a854c..70f8f7c1 100644 --- a/go.sum +++ b/go.sum @@ -407,7 +407,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -443,24 +442,15 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -476,7 +466,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -492,10 +481,8 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -588,11 +575,7 @@ github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQ github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI= github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.18.0/go.mod h1:owRRGJ9M5xReDC5nfT8FTJrNAPbT4NM6p/k+d03q2v4= github.com/hashicorp/consul/sdk v0.13.0/go.mod h1:0hs/l5fOVhJy/VdcoaNqUSi2AUs95eF5WKtv+EYIQqE= @@ -630,7 +613,6 @@ github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4 github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/itchyny/gojq v0.12.11 h1:YhLueoHhHiN4mkfM+3AyJV6EPcCxKZsOnYf+aVSwaQw= @@ -639,7 +621,6 @@ github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm github.com/itchyny/timefmt-go v0.1.5/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -648,14 +629,12 @@ github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kairos-io/kairos v1.5.0 h1:aL+AvZ2EIyDxf2BaYQFeBejB06DfuAxxUqhtVAUtxb8= github.com/kairos-io/kairos v1.5.0/go.mod h1:Th2QAMG1Sze2d8S2vb/XjB/o3ap1yjQC+G/WzIX6v04= github.com/kendru/darwin/go/depgraph v0.0.0-20221105232959-877d6a81060c h1:eKb4PqwAMhlqwXw0W3atpKaYaPGlXE/Fwh+xpCEYaPk= github.com/kendru/darwin/go/depgraph v0.0.0-20221105232959-877d6a81060c/go.mod h1:VOfm8h1NySetVlpHDSnbpCMsvCgYaU+YDn4XezUy2+4= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -666,19 +645,17 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lithammer/fuzzysearch v1.1.5 h1:Ag7aKU08wp0R9QCfF4GoGST9HbmAIeLP7xwMrOBEp1c= github.com/lithammer/fuzzysearch v1.1.5/go.mod h1:1R1LRNk7yKid1BaQkmuLQaHruxcC4HmAH30Dh61Ih1Q= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -707,7 +684,6 @@ github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXx github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -719,13 +695,17 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo/v2 v2.7.1 h1:YgLPk+gpqDtAPeRCWEmfO8oxE6ru3xcVSXAM7wn8w9I= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/otiai10/copy v1.9.0 h1:7KFNiCgZ91Ru4qW4CWPf/7jqtxLagGRmIxWldPP9VY4= +github.com/otiai10/copy v1.9.0/go.mod h1:hsfX19wcn0UWIHUQ3/4fHuehhk2UyArQ9dVFAn3FczI= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.4.0 h1:umwcf7gbpEwf7WFzqmWwSv0CzbeMsae2u9ZvpP8j2q4= +github.com/otiai10/mint v1.4.0/go.mod h1:gifjb2MYOoULtKLqUAEILUG/9KONW6f7YsJ6vQLTlFI= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -736,7 +716,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= @@ -745,19 +724,15 @@ github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1: github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pterm/pterm v0.12.27/go.mod h1:PhQ89w4i95rhgE+xedAoqous6K9X+r6aSOI2eFF7DZI= github.com/pterm/pterm v0.12.29/go.mod h1:WI3qxgvoQFFGKGjGnJR849gU0TsEOvKn5Q8LlY1U7lg= github.com/pterm/pterm v0.12.30/go.mod h1:MOqLIyMOgmTDz9yorcYbcw+HsgoZo3BQfg2wtl3HEFE= @@ -772,14 +747,13 @@ github.com/qeesung/image2ascii v1.0.1/go.mod h1:kZKhyX0h2g/YXa/zdJR3JnLnJ8avHjZ3 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -793,31 +767,15 @@ github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spectrocloud-labs/herd v0.3.0 h1:n/VmHC/3NKfteYhiBonlFtohMRiMGuc6in0krqkyWMw= -github.com/spectrocloud-labs/herd v0.3.0/go.mod h1:RHPSzrH+Jd05+ewEpqk8ZgBgTsnHN8erkxwRdQAiw3Q= -github.com/spectrocloud-labs/herd v0.4.0 h1:6EGSR2Z5yah4oFcnYrytU9y00MgrV59tJ+CDtnaa574= -github.com/spectrocloud-labs/herd v0.4.0/go.mod h1:RHPSzrH+Jd05+ewEpqk8ZgBgTsnHN8erkxwRdQAiw3Q= github.com/spectrocloud-labs/herd v0.4.2 h1:90cYZmW0yxNw4PEbqNGSerrtqKSx1nvRbSwAwjc/5AY= github.com/spectrocloud-labs/herd v0.4.2/go.mod h1:WBlMIs1QZ7XtVrt9rAAFZpkh/fZYA4l2gGOCUS1LDHE= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.9.4/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -835,30 +793,21 @@ github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= -github.com/urfave/cli/v2 v2.24.3/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= -github.com/urfave/cli/v2 v2.24.4/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/wayneashleyberry/terminal-dimensions v1.1.0 h1:EB7cIzBdsOzAgmhTUtTTQXBByuPheP/Zv1zL2BRPY6g= github.com/wayneashleyberry/terminal-dimensions v1.1.0/go.mod h1:2lc/0eWCObmhRczn2SdGSQtgBooLUzIotkkEGXqghyg= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd/api/v3 v3.5.6/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.6/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.6/go.mod h1:BHha8XJGe8vCIBfWBpbBLVZ4QjOIlfoouvOwydu63E0= @@ -872,35 +821,26 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -go.universe.tf/netboot v0.0.0-20210617221821-fc2840fa7b05 h1:divajFsb4aHTjgtuZodtcFuT4TOLC0rGCQGcU1bd2uU= -go.universe.tf/netboot v0.0.0-20210617221821-fc2840fa7b05/go.mod h1:bm5r5Be3Bb7PPjUGBfGWOFeAKj63GC5pWXDAzIDVM3c= go.universe.tf/netboot v0.0.0-20230225040044-0e2ca55deb50 h1:etPgSAjrfcnFnbkiV+G8UiGGe6ZP1EJDNgxJDH6oEw8= go.universe.tf/netboot v0.0.0-20230225040044-0e2ca55deb50/go.mod h1:jZPXsMFfVKJUwVH9M+YVpYx7jIT8L3M7/ubZthsi1oI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -944,14 +884,12 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -998,8 +936,6 @@ golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -1046,9 +982,7 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1070,7 +1004,6 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1128,13 +1061,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1142,8 +1074,6 @@ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1158,8 +1088,6 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1167,14 +1095,12 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1405,7 +1331,6 @@ google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614G google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -1464,13 +1389,9 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/cmd/config.go b/internal/cmd/config.go index c34ead70..45c5a552 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -11,6 +11,7 @@ import ( "strings" "text/template" + "github.com/kairos-io/AuroraBoot/pkg/schema" "github.com/rs/zerolog/log" "github.com/kairos-io/AuroraBoot/deployer" @@ -55,9 +56,9 @@ func render(data string, foo any) string { return b.String() } -func ReadConfig(fileConfig, cloudConfig string, options []string) (*deployer.Config, *deployer.ReleaseArtifact, error) { - c := &deployer.Config{} - r := &deployer.ReleaseArtifact{} +func ReadConfig(fileConfig, cloudConfig string, options []string) (*schema.Config, *schema.ReleaseArtifact, error) { + c := &schema.Config{} + r := &schema.ReleaseArtifact{} if fileConfig != "" { var err error diff --git a/pkg/ops/iso.go b/pkg/ops/iso.go index e9e6872d..f79e2b58 100644 --- a/pkg/ops/iso.go +++ b/pkg/ops/iso.go @@ -3,16 +3,35 @@ package ops import ( "context" "fmt" + "os" + "path/filepath" + "github.com/kairos-io/AuroraBoot/pkg/schema" "github.com/kairos-io/kairos/pkg/utils" + "github.com/otiai10/copy" "github.com/rs/zerolog/log" ) // GenISO generates an ISO from a rootfs, and stores results in dst -func GenISO(name, src, dst string) func(ctx context.Context) error { +func GenISO(name, src, dst string, i schema.ISO) func(ctx context.Context) error { return func(ctx context.Context) error { + tmp, err := os.MkdirTemp("", "geniso") + if err != nil { + return err + } + defer os.RemoveAll(tmp) + overlay := tmp + if i.DataPath != "" { + overlay = i.DataPath + } + + err = copy.Copy(filepath.Join(dst, "config.yaml"), filepath.Join(overlay, "config.yaml")) + if err != nil { + return err + } + log.Info().Msgf("Generating iso '%s' from '%s' to '%s'", name, src, dst) - out, err := utils.SH(fmt.Sprintf("/entrypoint.sh --debug --name %s build-iso --date=false --output %s dir:%s", name, dst, src)) + out, err := utils.SH(fmt.Sprintf("/entrypoint.sh --debug --name %s build-iso --overlay-iso %s --date=false --output %s dir:%s", name, overlay, dst, src)) log.Printf("Output '%s'", out) if err != nil { log.Error().Msgf("Failed generating iso '%s' from '%s'. Error: %s", name, src, err.Error()) @@ -20,3 +39,37 @@ func GenISO(name, src, dst string) func(ctx context.Context) error { return err } } + +func InjectISO(dst, isoFile string, i schema.ISO) func(ctx context.Context) error { + return func(ctx context.Context) error { + os.Chdir(dst) + injectedIso := isoFile + ".custom.iso" + os.Remove(injectedIso) + + log.Info().Msgf("Adding cloud config file to '%s'", isoFile) + + tmp, err := os.MkdirTemp("", "injectiso") + if err != nil { + return err + } + defer os.RemoveAll(tmp) + + err = copy.Copy(i.DataPath, tmp) + if err != nil { + return err + } + + err = copy.Copy(filepath.Join(dst, "config.yaml"), filepath.Join(tmp, "config.yaml")) + if err != nil { + return err + } + + out, err := utils.SH(fmt.Sprintf("xorriso -indev %s -outdev %s -map %s / -boot_image any replay", isoFile, injectedIso, tmp)) + log.Print(out) + if err != nil { + return err + } + + return err + } +} diff --git a/deployer/artifact.go b/pkg/schema/artifact.go similarity index 98% rename from deployer/artifact.go rename to pkg/schema/artifact.go index b6b9a4d6..9c7b07e8 100644 --- a/deployer/artifact.go +++ b/pkg/schema/artifact.go @@ -1,4 +1,4 @@ -package deployer +package schema import ( "fmt" diff --git a/deployer/config.go b/pkg/schema/config.go similarity index 89% rename from deployer/config.go rename to pkg/schema/config.go index 67a7982f..ec7551da 100644 --- a/deployer/config.go +++ b/pkg/schema/config.go @@ -1,4 +1,4 @@ -package deployer +package schema import "path/filepath" @@ -26,6 +26,12 @@ type Config struct { State string `yaml:"state_dir"` ListenAddr string `yaml:"listen_addr"` + + ISO ISO `yaml:"iso"` +} + +type ISO struct { + DataPath string `yaml:"data"` } func (c Config) StateDir(s ...string) string { From b3b29df082e696289febcdb7560d2a5f17f5e005 Mon Sep 17 00:00:00 2001 From: mudler Date: Mon, 27 Feb 2023 22:16:40 +0100 Subject: [PATCH 02/11] :seedling: Pull netboot artifact only when netboot is enabled Signed-off-by: mudler --- deployer/register.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/deployer/register.go b/deployer/register.go index c53a0e83..5164c238 100644 --- a/deployer/register.go +++ b/deployer/register.go @@ -68,6 +68,8 @@ func Register(g *herd.Graph, artifact schema.ReleaseArtifact, c schema.Config, c fromImage := artifact.ContainerImage != "" fromImageOption := func() bool { return fromImage } isoOption := func() bool { return !fromImage } + netbootOption := func() bool { return !c.DisableNetboot } + netbootReleaseOption := func() bool { return !c.DisableNetboot && !fromImage } // Pull locak docker daemon if container image starts with docker:// containerImage := artifact.ContainerImage @@ -116,13 +118,13 @@ func Register(g *herd.Graph, artifact schema.ReleaseArtifact, c schema.Config, c //TODO: add Validate step // Ops to download from releases g.Add(opDownloadInitrd, - herd.EnableIf(isoOption), + herd.EnableIf(netbootReleaseOption), herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.InitrdURL(), initrdFile))) g.Add(opDownloadKernel, - herd.EnableIf(isoOption), + herd.EnableIf(netbootReleaseOption), herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.KernelURL(), kernelFile))) g.Add(opDownloadSquashFS, - herd.EnableIf(isoOption), + herd.EnableIf(netbootReleaseOption), herd.WithDeps(opPrepareNetboot), herd.WithCallback(ops.DownloadArtifact(artifact.SquashFSURL(), squashFSfile))) g.Add(opDownloadISO, herd.EnableIf(isoOption), @@ -150,7 +152,7 @@ func Register(g *herd.Graph, artifact schema.ReleaseArtifact, c schema.Config, c g.Add( opStartNetboot, - herd.EnableIf(func() bool { return !c.DisableNetboot }), + herd.EnableIf(netbootOption), herd.ConditionalOption(isoOption, herd.WithDeps(opDownloadInitrd, opDownloadKernel, opDownloadSquashFS)), herd.ConditionalOption(fromImageOption, herd.WithDeps(opExtractNetboot)), herd.Background, From 20127df9e2c847345d19d1c60b1c13575e8502c2 Mon Sep 17 00:00:00 2001 From: mudler Date: Mon, 27 Feb 2023 22:16:50 +0100 Subject: [PATCH 03/11] :seedling: Allow to override cmdline Signed-off-by: mudler --- deployer/register.go | 5 +++++ pkg/schema/config.go | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/deployer/register.go b/deployer/register.go index 5164c238..043738e3 100644 --- a/deployer/register.go +++ b/deployer/register.go @@ -162,6 +162,11 @@ func Register(g *herd.Graph, artifact schema.ReleaseArtifact, c schema.Config, c configFile := cloudConfigFile cmdLine := `rd.neednet=1 ip=dhcp rd.cos.disable root=live:{{ ID "%s" }} netboot nodepair.enable config_url={{ ID "%s" }} console=tty1 console=ttyS0 console=tty0` + + if c.NetBoot.Cmdline != "" { + cmdLine = `root=live:{{ ID "%s" }} config_url={{ ID "%s" }} ` + c.NetBoot.Cmdline + } + return netboot.Server(kernelFile, "AuroraBoot", fmt.Sprintf(cmdLine, squashFSfile, configFile), address, netbootPort, []string{initrdFile}, true) }, ), diff --git a/pkg/schema/config.go b/pkg/schema/config.go index ec7551da..51bf7a4b 100644 --- a/pkg/schema/config.go +++ b/pkg/schema/config.go @@ -27,7 +27,15 @@ type Config struct { ListenAddr string `yaml:"listen_addr"` + // ISO block configuration ISO ISO `yaml:"iso"` + + // Netboot block configuration + NetBoot NetBoot `yaml:"netboot"` +} + +type NetBoot struct { + Cmdline string `yaml:"cmdline"` } type ISO struct { From 580a879285b79b745abfc5c05a1639594b47227e Mon Sep 17 00:00:00 2001 From: mudler Date: Mon, 27 Feb 2023 22:17:14 +0100 Subject: [PATCH 04/11] :seedling: Add airgap example Signed-off-by: mudler --- examples/airgap/build.sh | 26 +++++++++++++++++++++++++ examples/airgap/config.yaml | 20 +++++++++++++++++++ examples/airgap/image-bundle/Dockerfile | 7 +++++++ examples/airgap/image-bundle/run.sh | 4 ++++ 4 files changed, 57 insertions(+) create mode 100644 examples/airgap/build.sh create mode 100644 examples/airgap/config.yaml create mode 100644 examples/airgap/image-bundle/Dockerfile create mode 100755 examples/airgap/image-bundle/run.sh diff --git a/examples/airgap/build.sh b/examples/airgap/build.sh new file mode 100644 index 00000000..2530c785 --- /dev/null +++ b/examples/airgap/build.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -ex + +pushd image-bundle + docker build -t bundle . +popd + +mkdir data + +pushd data + docker save bundle -o bundle.tar +popd + +docker run -v $PWD/config.yaml:/config.yaml \ + -v $PWD/build:/tmp/auroraboot \ + -v $PWD/data:/tmp/data \ + --rm -ti auroraboot \ + --set "disable_http_server=true" \ + --set "disable_netboot=true" \ + --set "iso.data=/tmp/data" \ + --cloud-config /config.yaml \ + --set "state_dir=/tmp/auroraboot" \ + --set "artifact_version=v1.6.1-k3sv1.26.1+k3s1" \ + --set "release_version=v1.6.1" \ + --set "flavor=fedora" \ + --set "repository=kairos-io/provider-kairos" \ No newline at end of file diff --git a/examples/airgap/config.yaml b/examples/airgap/config.yaml new file mode 100644 index 00000000..51a5a330 --- /dev/null +++ b/examples/airgap/config.yaml @@ -0,0 +1,20 @@ +#cloud-config + +install: + auto: true + device: "auto" + reboot: true + bundles: + - targets: + - run:///run/initramfs/live/bundle.tar + local_file: true + +# Define the user accounts on the node. +users: +- name: "kairos" # The username for the user. + passwd: "kairos" # The password for the user. + ssh_authorized_keys: # A list of SSH keys to add to the user's authorized keys. + - github:mudler # A key from the user's GitHub account. + +k3s: + enable: true \ No newline at end of file diff --git a/examples/airgap/image-bundle/Dockerfile b/examples/airgap/image-bundle/Dockerfile new file mode 100644 index 00000000..505515f5 --- /dev/null +++ b/examples/airgap/image-bundle/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine as build +WORKDIR /build +RUN wget https://github.com/k3s-io/k3s/releases/download/v1.23.16%2Bk3s1/k3s-airgap-images-amd64.tar.gz + +FROM scratch +COPY ./run.sh / +COPY --from=build /build/k3s-airgap-images-amd64.tar.gz /assets diff --git a/examples/airgap/image-bundle/run.sh b/examples/airgap/image-bundle/run.sh new file mode 100755 index 00000000..8c57d52e --- /dev/null +++ b/examples/airgap/image-bundle/run.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +mkdir -p /var/lib/rancher/k3s/agent/images/ +cp ./assets/k3s-airgap-images-amd64.tar /var/lib/rancher/k3s/agent/images/ From 8f776b0b255a43930d5b8692b4c6c0bc5d9748ca Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 28 Feb 2023 00:06:47 +0100 Subject: [PATCH 05/11] :seedling: Refactor pixie op Signed-off-by: mudler --- deployer/register.go | 18 ++---------------- pkg/ops/netboot.go | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/deployer/register.go b/deployer/register.go index 043738e3..87715a63 100644 --- a/deployer/register.go +++ b/deployer/register.go @@ -8,9 +8,6 @@ import ( "path/filepath" "strings" - "github.com/rs/zerolog/log" - - "github.com/kairos-io/AuroraBoot/pkg/netboot" "github.com/kairos-io/AuroraBoot/pkg/ops" "github.com/kairos-io/AuroraBoot/pkg/schema" @@ -156,19 +153,8 @@ func Register(g *herd.Graph, artifact schema.ReleaseArtifact, c schema.Config, c herd.ConditionalOption(isoOption, herd.WithDeps(opDownloadInitrd, opDownloadKernel, opDownloadSquashFS)), herd.ConditionalOption(fromImageOption, herd.WithDeps(opExtractNetboot)), herd.Background, - herd.WithCallback(func(ctx context.Context) error { - log.Info().Msgf("Start pixiecore") - - configFile := cloudConfigFile - - cmdLine := `rd.neednet=1 ip=dhcp rd.cos.disable root=live:{{ ID "%s" }} netboot nodepair.enable config_url={{ ID "%s" }} console=tty1 console=ttyS0 console=tty0` - - if c.NetBoot.Cmdline != "" { - cmdLine = `root=live:{{ ID "%s" }} config_url={{ ID "%s" }} ` + c.NetBoot.Cmdline - } - - return netboot.Server(kernelFile, "AuroraBoot", fmt.Sprintf(cmdLine, squashFSfile, configFile), address, netbootPort, []string{initrdFile}, true) - }, + herd.WithCallback( + ops.StartPixiecore(cloudConfigFile, squashFSfile, address, netbootPort, initrdFile, kernelFile, c.NetBoot), ), ) } diff --git a/pkg/ops/netboot.go b/pkg/ops/netboot.go index c726a441..23513f79 100644 --- a/pkg/ops/netboot.go +++ b/pkg/ops/netboot.go @@ -4,6 +4,8 @@ import ( "context" "fmt" + "github.com/kairos-io/AuroraBoot/pkg/netboot" + "github.com/kairos-io/AuroraBoot/pkg/schema" "github.com/kairos-io/kairos/pkg/utils" "github.com/rs/zerolog/log" ) @@ -20,3 +22,19 @@ func ExtractNetboot(src, dst, name string) func(ctx context.Context) error { return err } } + +func StartPixiecore(cloudConfigFile, squashFSfile, address, netbootPort, initrdFile, kernelFile string, nb schema.NetBoot) func(ctx context.Context) error { + return func(ctx context.Context) error { + log.Info().Msgf("Start pixiecore") + + configFile := cloudConfigFile + + cmdLine := `rd.neednet=1 ip=dhcp rd.cos.disable root=live:{{ ID "%s" }} netboot nodepair.enable config_url={{ ID "%s" }} console=tty1 console=ttyS0 console=tty0` + + if nb.Cmdline != "" { + cmdLine = `root=live:{{ ID "%s" }} config_url={{ ID "%s" }} ` + nb.Cmdline + } + + return netboot.Server(kernelFile, "AuroraBoot", fmt.Sprintf(cmdLine, squashFSfile, configFile), address, netbootPort, []string{initrdFile}, true) + } +} From 603fe3faf30008247dc5c5e7c9247697ad28726a Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 28 Feb 2023 00:07:27 +0100 Subject: [PATCH 06/11] :seedling: Add gitignore Signed-off-by: mudler --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..bc7c936c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +examples/airgap/build +examples/airgap/data \ No newline at end of file From 5ea07a7b44a9000753786f72ec5524954423ed97 Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 28 Feb 2023 00:18:59 +0100 Subject: [PATCH 07/11] :seedling: Bundle should copy into persistent dir Signed-off-by: mudler --- examples/airgap/image-bundle/run.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/airgap/image-bundle/run.sh b/examples/airgap/image-bundle/run.sh index 8c57d52e..56df823c 100755 --- a/examples/airgap/image-bundle/run.sh +++ b/examples/airgap/image-bundle/run.sh @@ -1,4 +1,8 @@ #!/bin/bash -mkdir -p /var/lib/rancher/k3s/agent/images/ -cp ./assets/k3s-airgap-images-amd64.tar /var/lib/rancher/k3s/agent/images/ +# This bundle needs to run after-install as it consumes assets from the LiveCD, which is not accessible at the first boot (there is no live-cd in) +persistent=$(blkid -L COS_PERSISTENT) +mkdir /tmp/persistent +mount $persistent /tmp/persistent +mkdir -p /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ +cp ./assets/k3s-airgap-images-amd64.tar /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ From 7227bcc5c3064b03449e2a1fe1902f1d1401ce53 Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 28 Feb 2023 00:23:09 +0100 Subject: [PATCH 08/11] :seedling: Enhance output Signed-off-by: mudler --- pkg/ops/iso.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/ops/iso.go b/pkg/ops/iso.go index f79e2b58..96ff65b8 100644 --- a/pkg/ops/iso.go +++ b/pkg/ops/iso.go @@ -46,19 +46,21 @@ func InjectISO(dst, isoFile string, i schema.ISO) func(ctx context.Context) erro injectedIso := isoFile + ".custom.iso" os.Remove(injectedIso) - log.Info().Msgf("Adding cloud config file to '%s'", isoFile) - tmp, err := os.MkdirTemp("", "injectiso") if err != nil { return err } defer os.RemoveAll(tmp) - err = copy.Copy(i.DataPath, tmp) - if err != nil { - return err + if i.DataPath != "" { + log.Info().Msgf("Adding data in '%s' to '%s'", i.DataPath, isoFile) + err = copy.Copy(i.DataPath, tmp) + if err != nil { + return err + } } + log.Info().Msgf("Adding cloud config file to '%s'", isoFile) err = copy.Copy(filepath.Join(dst, "config.yaml"), filepath.Join(tmp, "config.yaml")) if err != nil { return err @@ -69,7 +71,7 @@ func InjectISO(dst, isoFile string, i schema.ISO) func(ctx context.Context) erro if err != nil { return err } - + log.Info().Msgf("Wrote '%s'", injectedIso) return err } } From 4245d542222e0a4d9fca4d022e3d222eeff5cef9 Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 28 Feb 2023 00:29:17 +0100 Subject: [PATCH 09/11] :seedling: Fixup run.sh typo Signed-off-by: mudler --- examples/airgap/image-bundle/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/airgap/image-bundle/run.sh b/examples/airgap/image-bundle/run.sh index 56df823c..0f7c744d 100755 --- a/examples/airgap/image-bundle/run.sh +++ b/examples/airgap/image-bundle/run.sh @@ -5,4 +5,4 @@ persistent=$(blkid -L COS_PERSISTENT) mkdir /tmp/persistent mount $persistent /tmp/persistent mkdir -p /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ -cp ./assets/k3s-airgap-images-amd64.tar /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ +cp ./assets/k3s-airgap-images-amd64.tar.gz /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ From 71d34cd8b28b7599ff79a99d895c12a11660c8b0 Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 28 Feb 2023 00:39:00 +0100 Subject: [PATCH 10/11] :seedling: Update sample Signed-off-by: mudler --- examples/airgap/config.yaml | 4 +++- examples/airgap/image-bundle/run.sh | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/airgap/config.yaml b/examples/airgap/config.yaml index 51a5a330..c07fe737 100644 --- a/examples/airgap/config.yaml +++ b/examples/airgap/config.yaml @@ -5,6 +5,8 @@ install: device: "auto" reboot: true bundles: + # This bundle needs to run after-install as it consumes assets from the LiveCD + # which is not accessible otherwise at the first boot (there is no live-cd with any bundle.tar) - targets: - run:///run/initramfs/live/bundle.tar local_file: true @@ -17,4 +19,4 @@ users: - github:mudler # A key from the user's GitHub account. k3s: - enable: true \ No newline at end of file + enabled: true \ No newline at end of file diff --git a/examples/airgap/image-bundle/run.sh b/examples/airgap/image-bundle/run.sh index 0f7c744d..b3fab977 100755 --- a/examples/airgap/image-bundle/run.sh +++ b/examples/airgap/image-bundle/run.sh @@ -1,8 +1,4 @@ #!/bin/bash -# This bundle needs to run after-install as it consumes assets from the LiveCD, which is not accessible at the first boot (there is no live-cd in) -persistent=$(blkid -L COS_PERSISTENT) -mkdir /tmp/persistent -mount $persistent /tmp/persistent mkdir -p /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ cp ./assets/k3s-airgap-images-amd64.tar.gz /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ From 03b047c21100b88d905ae7b9a61cbc045df49c44 Mon Sep 17 00:00:00 2001 From: mudler Date: Tue, 28 Feb 2023 09:50:43 +0100 Subject: [PATCH 11/11] :bug: Small fixups to the bundle image Signed-off-by: mudler --- deployer/deployer.go | 2 +- examples/airgap/image-bundle/Dockerfile | 2 +- examples/airgap/image-bundle/run.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deployer/deployer.go b/deployer/deployer.go index 3e26790b..a11d7db4 100644 --- a/deployer/deployer.go +++ b/deployer/deployer.go @@ -70,7 +70,7 @@ func writeDag(d [][]herd.GraphEntry) { if op.Error != nil { log.Printf(" <%s> (error: %s) (background: %t)", op.Name, op.Error.Error(), op.Background) } else { - log.Printf(" <%s> (background: %t enabled: %t)", op.Name, op.Background) + log.Printf(" <%s> (background: %t)", op.Name, op.Background) } } log.Print("") diff --git a/examples/airgap/image-bundle/Dockerfile b/examples/airgap/image-bundle/Dockerfile index 505515f5..ee994e52 100644 --- a/examples/airgap/image-bundle/Dockerfile +++ b/examples/airgap/image-bundle/Dockerfile @@ -4,4 +4,4 @@ RUN wget https://github.com/k3s-io/k3s/releases/download/v1.23.16%2Bk3s1/k3s-air FROM scratch COPY ./run.sh / -COPY --from=build /build/k3s-airgap-images-amd64.tar.gz /assets +COPY --from=build /build/k3s-airgap-images-amd64.tar.gz /k3s-airgap-images-amd64.tar.gz diff --git a/examples/airgap/image-bundle/run.sh b/examples/airgap/image-bundle/run.sh index b3fab977..3ce6e076 100755 --- a/examples/airgap/image-bundle/run.sh +++ b/examples/airgap/image-bundle/run.sh @@ -1,4 +1,4 @@ #!/bin/bash mkdir -p /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ -cp ./assets/k3s-airgap-images-amd64.tar.gz /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ +cp -rfv ./k3s-airgap-images-amd64.tar.gz /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/ \ No newline at end of file