chore(clustertool): Docs and Command changes

This commit is contained in:
Kjeld Schouten
2024-10-20 11:37:41 +02:00
parent 8a96795584
commit 61635eaf26
16 changed files with 208 additions and 24 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ var initLongHelp = strings.TrimSpace(`
ClusterTool requires a specific directory layout to ensure smooth operators and standardised environments.
To ensure smooth deployment, the init function can pre-generate all required files in the right places.
Afterwards you can edit talconfig.yaml and talenv.yaml to reflect your personal settings.
Afterwards you can edit talconfig.yaml and clusterenv.yaml to reflect your personal settings.
When done, please run clustertool genconfig to generate all configarion based on your personal settings
+24
View File
@@ -0,0 +1,24 @@
package cmd
import (
"strings"
"github.com/spf13/cobra"
)
var scaleLongHelp = strings.TrimSpace(`
These are all advanced commands that should generally not be needed
`)
var scaleCmd = &cobra.Command{
Use: "scale",
Short: "Commands for handling TrueNAS SCALE",
Long: advLongHelp,
SilenceUsage: true,
SilenceErrors: true,
}
func init() {
RootCmd.AddCommand(scaleCmd)
}
@@ -6,7 +6,7 @@ import (
)
var scaleexport = &cobra.Command{
Use: "scaleexport",
Use: "export",
Short: "Export SCALE Apps to file",
Run: func(cmd *cobra.Command, args []string) {
scale.ExportApps()
@@ -14,5 +14,5 @@ var scaleexport = &cobra.Command{
}
func init() {
adv.AddCommand(scaleexport)
scaleCmd.AddCommand(scaleexport)
}
@@ -7,7 +7,7 @@ import (
)
var scalemigrate = &cobra.Command{
Use: "scalemigrate",
Use: "migrate",
Short: "Migrate exported SCALE Apps to the Talos Cluster",
Run: func(cmd *cobra.Command, args []string) {
err := scale.ProcessJSONFiles("./truenas_exports")
@@ -18,5 +18,5 @@ var scalemigrate = &cobra.Command{
}
func init() {
adv.AddCommand(scalemigrate)
scaleCmd.AddCommand(scalemigrate)
}