wangpengfei
2023-06-08 2ad213b923c4475efe7d76dfdcbb8323616a6a3a
src/rancher/rancher.go
@@ -6,9 +6,19 @@
   "basic.com/aps/aps_deploy.git/src/util"
)
type RancherConfig struct {
type Node struct {
   Roles       []string `json:"roles"`
   IP          string   `json:"ip"`
   SSHUsername string   `json:"sshUsername"`
   SSHPassword string   `json:"sshPassword"`
   SSHPort     int      `json:"sshPort"`
}
type RancherClusterConfig struct {
   RancherURL  string `json:"rancherURL"`
   BearerToken string `json:"bearerToken"`
   ClusterName string `mapstructure:"ClusterName"`
   Nodes       []Node `mapstructure:"Nodes"`
}
func isRancherInstalled(ip, username, password string, sshPort int) (bool, error) {