mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
Update logging info: add timestamp, refine wording
This commit is contained in:
parent
272b93413f
commit
e64abdc72b
|
|
@ -70,13 +70,13 @@ func PrecheckConfirm(mgr *manager.Manager) {
|
|||
table.OutputA(results)
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
fmt.Println("")
|
||||
fmt.Println("This is a simple check of your machines.")
|
||||
fmt.Println("Before installation, you should ensure that your machines meet all requirements.")
|
||||
fmt.Println("This is a simple check of your environment.")
|
||||
fmt.Println("Before installation, you should ensure that your machines meet all requirements specified at")
|
||||
fmt.Println("https://github.com/kubesphere/kubekey#requirements-and-recommendations")
|
||||
fmt.Println("")
|
||||
Loop:
|
||||
for {
|
||||
fmt.Printf("Whether to continue this installation? [yes/no]: ")
|
||||
fmt.Printf("Continue this installation? [yes/no]: ")
|
||||
input, err := reader.ReadString('\n')
|
||||
if err != nil {
|
||||
mgr.Logger.Fatal(err)
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ func ExecTasks(mgr *manager.Manager) error {
|
|||
}
|
||||
}
|
||||
|
||||
fmt.Printf("\n\033[1;36;40m%s\033[0m\n", "Successful.")
|
||||
mgr.Logger.Infoln("Successful.")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -123,7 +124,7 @@ func deleteFiles(mgr *manager.Manager) error {
|
|||
|
||||
func Confirm(reader *bufio.Reader) (string, error) {
|
||||
for {
|
||||
fmt.Printf("Are you sure you want to delete this cluster? [yes/no]: ")
|
||||
fmt.Printf("Are you sure to delete this cluster? [yes/no]: ")
|
||||
input, err := reader.ReadString('\n')
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package install
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/kubesphere/kubekey/pkg/cluster/etcd"
|
||||
"github.com/kubesphere/kubekey/pkg/cluster/kubernetes"
|
||||
"github.com/kubesphere/kubekey/pkg/cluster/preinstall"
|
||||
|
|
@ -69,7 +68,8 @@ func ExecTasks(mgr *manager.Manager) error {
|
|||
}
|
||||
}
|
||||
|
||||
fmt.Printf("\n\033[1;36;40m%s\033[0m\n", "Successful.")
|
||||
mgr.Logger.Infoln("Congradulations! Installation is successful.")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package scale
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/kubesphere/kubekey/pkg/cluster/kubernetes"
|
||||
"github.com/kubesphere/kubekey/pkg/cluster/preinstall"
|
||||
"github.com/kubesphere/kubekey/pkg/container-engine/docker"
|
||||
|
|
@ -41,6 +40,7 @@ func ExecTasks(mgr *manager.Manager) error {
|
|||
}
|
||||
}
|
||||
|
||||
fmt.Printf("\n\033[1;36;40m%s\033[0m\n", "Successful.")
|
||||
mgr.Logger.Infoln("Cluster scaling is successful.")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue