mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[FIX] add test init
This commit is contained in:
parent
dcc844d612
commit
f2eba57d8c
@ -212,7 +212,8 @@ func (c *Conf) parse() error {
|
||||
c.Lock = cleanKeyPrefix(c.Lock)
|
||||
c.Group = cleanKeyPrefix(c.Group)
|
||||
c.Noticer = cleanKeyPrefix(c.Noticer)
|
||||
|
||||
//固定值
|
||||
c.HostIDFile = "/etc/goodrain/host_uuid.conf"
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ import (
|
||||
"github.com/goodrain/rainbond/pkg/util"
|
||||
)
|
||||
|
||||
//NewCmdInit grctl init
|
||||
func NewCmdInit() cli.Command {
|
||||
c := cli.Command{
|
||||
Name: "init",
|
||||
@ -61,6 +62,11 @@ func NewCmdInit() cli.Command {
|
||||
Name: "install_type",
|
||||
Usage: "online/offline ,online",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "test",
|
||||
Usage: "use test shell",
|
||||
Hidden: true,
|
||||
},
|
||||
},
|
||||
Usage: "初始化集群。grctl init cluster",
|
||||
Action: func(c *cli.Context) error {
|
||||
@ -106,7 +112,11 @@ func NewCmdInstallStatus() cli.Command {
|
||||
}
|
||||
|
||||
func initCluster(c *cli.Context) error {
|
||||
resp, err := http.Get("http://repo.goodrain.com/gaops/jobs/install/prepare/init.sh")
|
||||
url := "http://repo.goodrain.com/gaops/jobs/install/prepare/init.sh"
|
||||
if c.Bool("test") {
|
||||
url = "http://dev.repo.goodrain.com/gaops/jobs/install/prepare/init.sh"
|
||||
}
|
||||
resp, err := http.Get(url)
|
||||
|
||||
if err != nil {
|
||||
logrus.Errorf("error get init script,details %s", err.Error())
|
||||
@ -209,7 +219,6 @@ func initCluster(c *cli.Context) error {
|
||||
}
|
||||
Status("check_manage_base_services", []string{hostID})
|
||||
Status("check_manage_services", []string{hostID})
|
||||
|
||||
fmt.Println("install manage node success,next you can :")
|
||||
fmt.Println(" add compute node--grctl node add -h")
|
||||
fmt.Println(" install compute node--grctl install compute -h")
|
||||
|
Loading…
Reference in New Issue
Block a user