Merge pull request #2131 from anderbubble/docs-omnibus
Documentation improvements omnibus
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "hostfile [OPTIONS]",
|
||||
Use: "hostfile [OPTIONS]",
|
||||
Short: "update hostfile on master",
|
||||
Long: "Manage the hostfile on the master node\n",
|
||||
RunE: CobraRunE,
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
Use: "print",
|
||||
Short: "print wareweulf.conf",
|
||||
Short: "print warewulf.conf",
|
||||
Long: "This command prints the actual used warewulf.conf, can be used to create an empty valid warewulf.conf",
|
||||
RunE: CobraRunE,
|
||||
Args: cobra.NoArgs,
|
||||
|
||||
@@ -44,13 +44,13 @@ func init() {
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetUpdate, "update", "u", false, "Overwrite files in an existing image with the files of remote image")
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetBuild, "build", "b", false, "Build image after pulling")
|
||||
baseCmd.PersistentFlags().BoolVar(&SyncUser, "syncuser", false, "Synchronize UIDs/GIDs from host to image")
|
||||
baseCmd.PersistentFlags().BoolVar(&OciNoHttps, "nohttps", false, "Ignore wrong TLS certificates, superseedes env WAREWULF_OCI_NOHTTPS")
|
||||
baseCmd.PersistentFlags().StringVar(&OciUsername, "username", "", "Set username for the access to the registry, superseedes env WAREWULF_OCI_USERNAME")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "password", "", "Set password for the access to the registry, superseedes env WAREWULF_OCI_PASSWORD")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "passwd", "", "Set password for the access to the registry, superseedes env WAREWULF_OCI_PASSWORD")
|
||||
baseCmd.PersistentFlags().BoolVar(&OciNoHttps, "nohttps", false, "Ignore wrong TLS certificates, supersedes env WAREWULF_OCI_NOHTTPS")
|
||||
baseCmd.PersistentFlags().StringVar(&OciUsername, "username", "", "Set username for the access to the registry, supersedes env WAREWULF_OCI_USERNAME")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "password", "", "Set password for the access to the registry, supersedes env WAREWULF_OCI_PASSWORD")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "passwd", "", "Set password for the access to the registry, supersedes env WAREWULF_OCI_PASSWORD")
|
||||
_ = baseCmd.PersistentFlags().MarkHidden("passwd")
|
||||
baseCmd.PersistentFlags().StringVar(&Platform, "platform", "", "Set other hardware platform e.g. amd64 or arm64, superseedes env WAREWULF_OCI_PLATFORM")
|
||||
baseCmd.PersistentFlags().StringVar(&Platform, "arch", "", "Set other hardware platform, superseedes env WAREWULF_OCI_PLATFORM")
|
||||
baseCmd.PersistentFlags().StringVar(&Platform, "platform", "", "Set other hardware platform e.g. amd64 or arm64, supersedes env WAREWULF_OCI_PLATFORM")
|
||||
baseCmd.PersistentFlags().StringVar(&Platform, "arch", "", "Set other hardware platform, supersedes env WAREWULF_OCI_PLATFORM")
|
||||
_ = baseCmd.PersistentFlags().MarkHidden("arch")
|
||||
}
|
||||
|
||||
|
||||
@@ -19,11 +19,9 @@ var baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "image COMMAND [OPTIONS]",
|
||||
Short: "Operating system image management",
|
||||
Long: "Starting with version 4, Warewulf uses images to build the bootable\n" +
|
||||
"node images. These commands will help you import, manage, and transform\n" +
|
||||
"images into bootable Warewulf images.",
|
||||
Aliases: []string{"vnfs", "container"},
|
||||
Args: cobra.NoArgs,
|
||||
Long: "Import, manage, and transform OS images as bootable Warewulf images.",
|
||||
Aliases: []string{"vnfs", "container"},
|
||||
Args: cobra.NoArgs,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -22,7 +22,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
|
||||
if write && !build {
|
||||
// when write = true and build = false, we will print a warnning, this is the default case
|
||||
wwlog.Warn("Syncuser is completed. Rebuild image or add `--build` flag for automatic rebuild after syncuser.")
|
||||
wwlog.Info("Syncuser is completed. Rebuild image or add `--build` flag for automatic rebuild after syncuser.")
|
||||
} else if write && build {
|
||||
// if write = true and build = true, then it'll trigger the image build after sync
|
||||
cbp := &wwapiv1.ImageBuildParameter{
|
||||
|
||||
@@ -9,10 +9,15 @@ var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "syncuser [OPTIONS] IMAGE",
|
||||
Short: "Synchronizes user in image",
|
||||
Long: `Synchronize the uids and gids from the host to the image.
|
||||
Users/groups which are only present in the image will be preserved if no
|
||||
uid/gid collision is detected. File ownerships are also changed.`,
|
||||
Short: "Synchronize UIDs/GIDs from the server to an OS image",
|
||||
Long: `Synchronize UIDs and GIDs from the server into an OS image, updating
|
||||
/etc/passwd, /etc/group, and file ownerships within the image. Users and
|
||||
groups that exist only in the image are preserved unless a UID/GID collision
|
||||
is detected.
|
||||
|
||||
This command affects the image itself (a one-time operation at build/import
|
||||
time). To also make host users available on provisioned nodes at runtime, add
|
||||
the "syncuser" overlay to the node or profile.`,
|
||||
RunE: CobraRunE,
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
if len(args) != 0 {
|
||||
@@ -29,8 +34,8 @@ uid/gid collision is detected. File ownerships are also changed.`,
|
||||
)
|
||||
|
||||
func init() {
|
||||
baseCmd.PersistentFlags().BoolVar(&write, "write", true, "Synchronize uis/gids and write files in image")
|
||||
baseCmd.PersistentFlags().BoolVar(&build, "build", false, "Build image after syncuser is completed")
|
||||
baseCmd.PersistentFlags().BoolVar(&write, "write", true, "Synchronize UIDs/GIDs and write files in OS image")
|
||||
baseCmd.PersistentFlags().BoolVar(&build, "build", false, "Build OS image after syncuser is completed")
|
||||
}
|
||||
|
||||
// GetRootCommand returns the root cobra.Command for the application.
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "export NODENAME",
|
||||
Use: "export NODENAME",
|
||||
Short: "Export nodes as yaml to stdout",
|
||||
Long: "This command exports the given nodes as yaml to stdout.",
|
||||
RunE: CobraRunE,
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "node COMMAND [OPTONS]",
|
||||
Use: "node COMMAND [OPTIONS]",
|
||||
Short: "Node management",
|
||||
Long: "Management of node settings. All node ranges can use brackets to identify\n" +
|
||||
"node ranges. For example: n00[00-4].cluster[0-1] will identify the first 5 nodes\n" +
|
||||
|
||||
@@ -27,7 +27,7 @@ func init() {
|
||||
panic(err)
|
||||
}
|
||||
baseCmd.PersistentFlags().StringVarP(&OverlayDir, "output", "o", "", `Do not create an overlay image for distribution but write to
|
||||
the given directory. An overlay must also be ge given to use this option.`)
|
||||
the given directory. An overlay must also be given to use this option.`)
|
||||
baseCmd.PersistentFlags().IntVar(&Workers, "workers", 0, "The number of parallel workers building overlays (<=0 indicates 1 worker per CPU)")
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "edit [OPTIONS] NODENAME",
|
||||
Short: "Edit node(s) with editor",
|
||||
Use: "edit [OPTIONS] PROFILE",
|
||||
Short: "Edit profile(s) with editor",
|
||||
Long: "This command opens an editor for the given profiles.",
|
||||
RunE: CobraRunE,
|
||||
ValidArgsFunction: completions.Profiles,
|
||||
|
||||
Reference in New Issue
Block a user