Initial version of the Orchard orchestration system (#3)

* Initial version of the Orchard orchestration system

* Update README.md

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
This commit is contained in:
Nikolay Edigaryev
2023-01-26 23:46:23 +04:00
committed by GitHub
co-authored by Fedor Korotkov
parent dcbbb8b8de
commit 92e8732d46
46 changed files with 2746 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
package controller
import (
"github.com/cirruslabs/orchard/internal/orchardhome"
"github.com/spf13/cobra"
"log"
"path/filepath"
)
var dataDir string
func NewCommand() *cobra.Command {
command := &cobra.Command{
Use: "controller",
Short: "Initialize and run a controller on the local machine",
}
command.AddCommand(newRunCommand())
orchardHome, err := orchardhome.Path()
if err != nil {
log.Fatal(err)
}
command.PersistentFlags().StringVar(&dataDir, "data-dir", filepath.Join(orchardHome, "controller"),
"path to the data directory")
return command
}