From a1bce4661bb0bf46d056da4fd865237900885f30 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Mon, 2 Aug 2021 00:30:03 +0200 Subject: [PATCH] docs: server CLI documentation --- cli/server.go | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/cli/server.go b/cli/server.go index 9027d9b4..68e7d539 100644 --- a/cli/server.go +++ b/cli/server.go @@ -55,7 +55,7 @@ var serverListCommand = &cli.Command{ var serverAddCommand = &cli.Command{ Name: "add", - Usage: "Add a server, reachable on .", + Usage: "Add a new server, reachable on .", ArgsUsage: " [] []", Description: "[], [] SSH connection details", Action: func(c *cli.Context) error { @@ -74,8 +74,8 @@ var serverAddCommand = &cli.Command{ var serverNewCommand = &cli.Command{ Name: "new", - Usage: "Creates a VPS from a provider in your terminal!", - Description: "Use a provider plugin to create an actual new server resource (VPS or otherwise) which can then be used to house a new Co-op Cloud installation.", + Usage: "Create a new server using a 3rd party provider", + Description: "Use a provider plugin to create a new server which can then be used to house a new Co-op Cloud installation.", ArgsUsage: "", HideHelp: true, } @@ -83,7 +83,7 @@ var serverNewCommand = &cli.Command{ var serverRemoveCommand = &cli.Command{ Name: "remove", Aliases: []string{"rm", "delete"}, - Usage: "Remove server ", + Usage: "Remove a locally-defined server", HideHelp: true, Action: func(c *cli.Context) error { server := c.Args().First() @@ -96,16 +96,19 @@ var serverRemoveCommand = &cli.Command{ var serverInitCommand = &cli.Command{ Name: "init", - Usage: "Set up a server for Docker swarm", + Usage: "Initialise server for deploying apps", HideHelp: true, ArgsUsage: "", - Description: `This initialisation explicitly chooses the "single host swarm" mode -which uses the default IPv4 address as the advertising address. This -can be re-configured later for more advanced use cases. - -POWERED BY -docker swarm init -docker network create ...`, + Description: ` +Initialise swarm mode on the target . + +This initialisation explicitly chooses the "single host swarm" mode which uses +the default IPv4 address as the advertising address. This can be re-configured +later for more advanced use cases. +`, + Action: func(c *cli.Context) error { + return nil + }, } // Reminder: The list commands are in is the order they appear in the help menu @@ -113,7 +116,13 @@ var ServerCommand = &cli.Command{ Name: "server", ArgsUsage: "", Usage: "Manage the servers that host your apps", - HideHelp: true, + Description: ` +Manage the lifecycle of a server. + +These commands support creating new servers using 3rd party integrations, +initialising existing servers to support Co-op Cloud deployments and managing +the connections to those servers. +`, Subcommands: []*cli.Command{ serverNewCommand, serverInitCommand, @@ -121,5 +130,4 @@ var ServerCommand = &cli.Command{ serverListCommand, serverRemoveCommand, }, - Action: func(c *cli.Context) error { fmt.Println("server"); return nil }, }