From d764b154770da984765a8ea198307043a42a4e42 Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Sun, 12 Sep 2021 12:14:28 +0200 Subject: [PATCH 1/5] Add missing "n" in "endpoint" --- pkg/metadata/metadata.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/metadata/metadata.go b/pkg/metadata/metadata.go index 31d65b2..72f0d11 100644 --- a/pkg/metadata/metadata.go +++ b/pkg/metadata/metadata.go @@ -144,7 +144,7 @@ func (r *MDRun) AsMMDS() (interface{}, error) { return nil, errors.Wrap(err, "failed fetching public keys") } - entrypoitInfo := &mmds.MMDSRootfsEntrypointInfo{ + entrypointInfo := &mmds.MMDSRootfsEntrypointInfo{ Cmd: r.Rootfs.EntrypointInfo.Cmd, Entrypoint: r.Rootfs.EntrypointInfo.Entrypoint, Env: r.Rootfs.EntrypointInfo.Env, @@ -153,10 +153,10 @@ func (r *MDRun) AsMMDS() (interface{}, error) { Workdir: r.Rootfs.EntrypointInfo.Workdir, } if len(r.Configs.RunConfig.CapturedCmd()) > 0 { - entrypoitInfo.Cmd = r.Configs.RunConfig.CapturedCmd() + entrypointInfo.Cmd = r.Configs.RunConfig.CapturedCmd() } - entrypointJSON, err := entrypoitInfo.ToJsonString() + entrypointJSON, err := entrypointInfo.ToJsonString() if err != nil { return nil, errors.Wrap(err, "failed fetching public keys") } From 4e96bef851a684dfb59bdeab539c0642d5a9abc7 Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Sun, 12 Sep 2021 12:14:42 +0200 Subject: [PATCH 2/5] Add missing "n" in "mounting" --- cmd/baseos/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/baseos/cmd.go b/cmd/baseos/cmd.go index 5eedbea..cc2ee94 100644 --- a/cmd/baseos/cmd.go +++ b/cmd/baseos/cmd.go @@ -289,7 +289,7 @@ func processCommand() int { spanRootfsMkfs.Finish() - rootLogger.Info("EXT4 file system created, mouting", "path", rootFSFile, "size-mb", commandConfig.FSSizeMBs) + rootLogger.Info("EXT4 file system created, mounting", "path", rootFSFile, "size-mb", commandConfig.FSSizeMBs) spanMountRootfs := tracer.StartSpan("baseos-mount-rootfs", opentracing.ChildOf(spanRootfsMkfs.Context())) From 681cee42ec4927875b352ea341b7686e90bafa42 Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Sun, 12 Sep 2021 12:14:57 +0200 Subject: [PATCH 3/5] Remove extra "i" in "building" --- cmd/rootfs/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/rootfs/cmd.go b/cmd/rootfs/cmd.go index 1d08fe6..a2fcfd7 100644 --- a/cmd/rootfs/cmd.go +++ b/cmd/rootfs/cmd.go @@ -546,7 +546,7 @@ func processCommand() int { vmmLogger := rootLogger.With("vmm-id", jailingFcConfig.VMMID(), "veth-name", vethIfaceName) - vmmLogger.Info("buildiing VMM", + vmmLogger.Info("building VMM", "dockerfile", commandConfig.Dockerfile, "kernel-path", resolvedKernel.HostPath(), "source-rootfs", machineConfig.RootfsOverride(), From 563a8008f1b5427dd65e344c8f897c96f56d57a7 Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Sun, 12 Sep 2021 12:15:22 +0200 Subject: [PATCH 4/5] Correct spelling of "Firecracker" --- cmd/rootfs/cmd.go | 2 +- cmd/run/cmd.go | 2 +- configs/firecracker.go | 6 +++--- pkg/vmm/vmm.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/rootfs/cmd.go b/cmd/rootfs/cmd.go index a2fcfd7..41ac640 100644 --- a/cmd/rootfs/cmd.go +++ b/cmd/rootfs/cmd.go @@ -562,7 +562,7 @@ func processCommand() int { span.Finish() }) - strategy := configs.DefaultFirectackerStrategy(machineConfig). + strategy := configs.DefaultFirecrackerStrategy(machineConfig). AddRequirements(func() *arbitrary.HandlerPlacement { // add this one after the previous one so by he logic, // this one will be placed and executed before the first one diff --git a/cmd/run/cmd.go b/cmd/run/cmd.go index 3b967d9..8c0c994 100644 --- a/cmd/run/cmd.go +++ b/cmd/run/cmd.go @@ -278,7 +278,7 @@ func processCommand(args []string) int { Type: metadata.MetadataTypeRun, } - vmmStrategy := configs.DefaultFirectackerStrategy(machineConfig). + vmmStrategy := configs.DefaultFirecrackerStrategy(machineConfig). AddRequirements(func() *arbitrary.HandlerPlacement { // add this one after the previous one so by he logic, // this one will be placed and executed before the first one diff --git a/configs/firecracker.go b/configs/firecracker.go index 699398e..35db4da 100644 --- a/configs/firecracker.go +++ b/configs/firecracker.go @@ -13,8 +13,8 @@ import ( // DefaultVethIfaceName is the default veth interface name. const DefaultVethIfaceName = "veth0" -// DefaultFirectackerStrategy returns an instance of the default Firecracker Jailer strategy for a given machine config. -func DefaultFirectackerStrategy(machineConfig *MachineConfig) arbitrary.PlacingStrategy { +// DefaultFirecrackerStrategy returns an instance of the default Firecracker Jailer strategy for a given machine config. +func DefaultFirecrackerStrategy(machineConfig *MachineConfig) arbitrary.PlacingStrategy { return arbitrary.NewStrategy(func() *arbitrary.HandlerPlacement { return arbitrary.NewHandlerPlacement(firecracker. LinkFilesHandler(filepath.Base(machineConfig.KernelOverride())), @@ -101,7 +101,7 @@ func (c *defaultFcConfigProvider) ToSDKConfig() firecracker.Config { Daemonize: c.machineConfig.Daemonize(), ChrootStrategy: func() firecracker.HandlersAdapter { if c.fcStrategy == nil { - return DefaultFirectackerStrategy(c.machineConfig) + return DefaultFirecrackerStrategy(c.machineConfig) } return c.fcStrategy }(), diff --git a/pkg/vmm/vmm.go b/pkg/vmm/vmm.go index 376d93d..23c9428 100644 --- a/pkg/vmm/vmm.go +++ b/pkg/vmm/vmm.go @@ -49,7 +49,7 @@ func NewDefaultProvider(cniConfig *configs.CNIConfig, jailingFcConfig *configs.J jailingFcConfig: jailingFcConfig, machineConfig: machineConfig, - handlersAdapter: configs.DefaultFirectackerStrategy(machineConfig), + handlersAdapter: configs.DefaultFirecrackerStrategy(machineConfig), logger: hclog.Default(), vethIfaceName: configs.DefaultVethIfaceName, } From 96cc17b3b319782111d55ca7ec21d852ac09dffb Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Sun, 12 Sep 2021 12:15:43 +0200 Subject: [PATCH 5/5] Add missing "f" in "Dockerfiles" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 225ea31..35bd7b3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ With firebuild, you can build and deploy secure VMs directly from `Dockerfiles` and Docker images in just few minutes. -The concept of `firebuild` is to leverage as much of the existing Docker world as possible. There are thousands of Docker images out there. Docker images are awesome because they encapsulate the software we want to run in our workloads, they also encapsulate dependencies. Dockerfiles are what Docker images are built from. Dockeriles are the blueprints of the modern infrastructure. There are thousands of them for almost anything one can imagine and new ones are very easy to write. +The concept of `firebuild` is to leverage as much of the existing Docker world as possible. There are thousands of Docker images out there. Docker images are awesome because they encapsulate the software we want to run in our workloads, they also encapsulate dependencies. Dockerfiles are what Docker images are built from. Dockerfiles are the blueprints of the modern infrastructure. There are thousands of them for almost anything one can imagine and new ones are very easy to write. With firebuild it is possible to: