mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-10-09 08:16:07 +02:00
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:
co-authored by
Fedor Korotkov
parent
dcbbb8b8de
commit
92e8732d46
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user