Initial implementation of mcdeploy deployment tool
Single Go binary with five commands: - build: podman build locally with registry tags + git version - push: podman push to MCR - deploy: SSH pull/stop/rm/run on target node - cert renew: issue TLS cert from Metacrypt via REST API - status: show container status on a node Config-driven via TOML service registry describing images, Dockerfiles, container configs per node. Shells out to podman for container operations and ssh for remote access. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
31
main.go
Normal file
31
main.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var cfgPath string
|
||||
|
||||
func main() {
|
||||
root := &cobra.Command{
|
||||
Use: "mcdeploy",
|
||||
Short: "Metacircular deployment tool",
|
||||
}
|
||||
root.PersistentFlags().StringVarP(&cfgPath, "config", "c", "mcdeploy.toml", "config file path")
|
||||
|
||||
root.AddCommand(buildCommand())
|
||||
root.AddCommand(pushCommand())
|
||||
root.AddCommand(deployCommand())
|
||||
root.AddCommand(certCommand())
|
||||
root.AddCommand(statusCommand())
|
||||
|
||||
if err := root.Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func loadCfg() (*Config, error) {
|
||||
return LoadConfig(cfgPath)
|
||||
}
|
||||
Reference in New Issue
Block a user