Skip to content

Commit

Permalink
Update mothership endpoint (#82)
Browse files Browse the repository at this point in the history
* feat(manager): manager init

Signed-off-by: cardyok <[email protected]>

* feat(server): update endpoint to prod

Signed-off-by: cardyok <[email protected]>

* support join command

Signed-off-by: cardyok <[email protected]>
  • Loading branch information
cardyok authored Oct 25, 2024
1 parent 3379dd8 commit e134fee
Show file tree
Hide file tree
Showing 22 changed files with 1,821 additions and 35 deletions.
88 changes: 82 additions & 6 deletions cmd/gpud/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ sudo gpud up
`

var (
logLevel string
debug bool
uid string
logLevel string
debug bool
statusWatch bool
uid string

annotations string
listenAddress string
Expand Down Expand Up @@ -82,7 +83,7 @@ sudo gpud login --token <LEPTON_AI_TOKEN>
cli.StringFlag{
Name: "endpoint",
Usage: "endpoint for control plane",
Value: "mothership-machine-mothership-machine-dev.cloud.lepton.ai",
Value: "mothership-machine.app.lepton.ai",
},
},
},
Expand Down Expand Up @@ -111,7 +112,38 @@ nohup sudo gpud run &>> <your log file path> &
cli.StringFlag{
Name: "endpoint",
Usage: "endpoint for checking in",
Value: "mothership-machine-mothership-machine-dev.cloud.lepton.ai",
Value: "mothership-machine.app.lepton.ai",
},
},
},
{
Name: "kubeconfig",
Usage: "Writes the kubeconfig with gpud.",
Action: cmdKubeConfig,
Flags: []cli.Flag{
cli.StringFlag{
Name: "file",
Usage: "file path to output the kubelet config",
},
cli.StringFlag{
Name: "region",
Usage: "region of target cluster",
},
cli.StringFlag{
Name: "cluster",
Usage: "name of target cluster",
},
cli.StringFlag{
Name: "role",
Usage: "role",
},
cli.StringFlag{
Name: "session",
Usage: "cluster session name",
},
cli.StringFlag{
Name: "cluster-ca",
Usage: "cluster ca file path",
},
},
},
Expand Down Expand Up @@ -189,7 +221,7 @@ sudo rm /etc/systemd/system/gpud.service
cli.StringFlag{
Name: "endpoint",
Usage: "endpoint for control plane",
Value: "mothership-machine-mothership-machine-dev.cloud.lepton.ai",
Value: "mothership-machine.app.lepton.ai",
},
&cli.BoolTFlag{
Name: "enable-auto-update",
Expand Down Expand Up @@ -357,6 +389,13 @@ sudo rm /etc/systemd/system/gpud.service

Usage: "checks the status of gpud",
Action: cmdStatus,
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "watch, w",
Usage: "watch for package install status",
Destination: &statusWatch,
},
},
},
{
Name: "logs",
Expand Down Expand Up @@ -438,6 +477,43 @@ cat summary.txt
},
},
},
{
Name: "join",
Usage: "join gpud machine into a lepton cluster",
UsageText: `# to join gpud into a lepton cluster
sudo gpud join
`,
Action: cmdJoin,
Flags: []cli.Flag{
cli.StringFlag{
Name: "endpoint",
Usage: "endpoint for control plane",
Value: "mothership-machine.app.lepton.ai",
},
cli.StringFlag{
Name: "cluster-name",
Usage: "cluster name for control plane (e.g.: lepton-prod-0)",
Value: "lepton-prod-0",
},
cli.StringFlag{
Name: "provider",
Usage: "provider of the machine",
Value: "personal",
},
cli.StringFlag{
Name: "node-group",
Usage: "node group to join",
},
cli.BoolFlag{
Name: "skip-interactive",
Usage: "use detected value instead of prompting for user input",
},
cli.StringFlag{
Name: "extra-info",
Usage: "base64 encoded extra info to pass to control plane",
},
},
},
}

return app
Expand Down
Loading

0 comments on commit e134fee

Please sign in to comment.