Skip to content

Commit

Permalink
feat(release): bump zentao version
Browse files Browse the repository at this point in the history
  • Loading branch information
ysicing committed Dec 22, 2023
1 parent daca7f5 commit 75dd1ee
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 31 deletions.
10 changes: 6 additions & 4 deletions cmd/app/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ func NewCmdAppExec(f factory.Factory) *cobra.Command {
log := f.GetLog()
var useip bool
app := &cobra.Command{
Use: "exec",
Short: "exec app",
Args: cobra.ExactArgs(1),
Example: `q app exec http://console.example.corp.cc/instance-view-39.html`,
Use: "exec",
Short: "exec app",
Args: cobra.ExactArgs(1),
Hidden: true,
Deprecated: "zentao not support query by url",
Example: `z app exec http://console.example.corp.cc/instance-view-39.html`,
RunE: func(cmd *cobra.Command, args []string) error {
url := args[0]
apidebug := log.GetLevel() == logrus.DebugLevel
Expand Down
3 changes: 2 additions & 1 deletion cmd/app/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ func NewCmdAppGet(f factory.Factory) *cobra.Command {
Use: "get",
Short: "get app info",
Args: cobra.ExactArgs(1),
Example: `q get app https://example.corp.cc/instance-view-39.html`,
Hidden: true,
Example: `z get app https://example.corp.cc/instance-view-39.html`,
RunE: func(cmd *cobra.Command, args []string) error {
url := args[0]
apidebug := log.GetLevel() == logrus.DebugLevel
Expand Down
3 changes: 2 additions & 1 deletion cmd/app/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ func NewCmdAppInstall(f factory.Factory) *cobra.Command {
app := &cobra.Command{
Use: "install",
Short: "install app",
Example: `q app install -n zentao or q app install zentao`,
Hidden: true,
Example: `z app install -n zentao or z app install zentao`,
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 1 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/app/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewCmdAppList(f factory.Factory) *cobra.Command {
app := &cobra.Command{
Use: "list",
Short: "list app",
Example: `q app list`,
Example: `z app list`,
RunE: func(cmd *cobra.Command, args []string) error {
hc, err := helm.NewClient(&helm.Config{Namespace: ""})
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion cmd/app/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func NewCmdAppLogs(f factory.Factory) *cobra.Command {
Aliases: []string{"log"},
Short: "logs app",
Args: cobra.ExactArgs(1),
Example: `q app logs http://console.example.corp.cc/instance-view-39.html`,
Hidden: true,
Example: `z app logs http://console.example.corp.cc/instance-view-39.html`,
RunE: func(cmd *cobra.Command, args []string) error {
url := args[0]
apidebug := log.GetLevel() == logrus.DebugLevel
Expand Down
8 changes: 4 additions & 4 deletions cmd/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ import (
var (
initExample = templates.Examples(`
# init default cluster
q cluster init
z cluster init
# init cluster with custom cidr
q cluster init --pod-cidr 10.100.0.0/16 --service-cidr 10.200.0.0/16
z cluster init --pod-cidr 10.100.0.0/16 --service-cidr 10.200.0.0/16
# init cluster use mysql as datastore
q cluster init --datastore mysql://root:123456@localhost:3306/k3s
z cluster init --datastore mysql://root:123456@localhost:3306/k3s
# more args
q cluster init --help
z cluster init --help
`)
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/experimental/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
var (
installExample = templates.Examples(`
# install tools
q experimental install helm`)
z experimental install helm`)
)

// InstallCommand install some tools
Expand Down
2 changes: 1 addition & 1 deletion cmd/status/top.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

var (
KRNodeExample = templates.Examples(`
q cluster status node
z cluster status node
`)
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
var (
nfsExample = templates.Examples(`
# deploy local nfs storage
q cluster storage nfs
z cluster storage nfs
# deploy qcloud cfs v3
q cluster storage nfs --ip cfsip --path cfspath
z cluster storage nfs --ip cfsip --path cfspath
`)
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/upgrade/q.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (up option) DoQcadmin() {
}
cmdPath, err := os.Executable()
if err != nil {
up.log.Errorf("q executable err:%v", err)
up.log.Errorf("load executable err:%v", err)
return
}
up.log.StartWait(fmt.Sprintf("downloading version %s...", lastVersion))
Expand All @@ -78,7 +78,7 @@ func (up option) DoQcadmin() {
os.Symlink(common.K3sDefaultDir, common.GetDefaultQuickonPlatformDir(""))
}
os.Chmod(common.GetDefaultQuickonBackupDir(cfg.DataDir), common.FileMode0777)
up.log.Donef("Successfully updated q to version %s", lastVersion)
up.log.Donef("Successfully updated cli to version %s", lastVersion)
up.log.Debugf("gen new version manifest")
up.log.Infof("Release note: \n\t release %s ", lastVersion)
up.log.Infof("Upgrade docs: \n\t https://github.com/easysoft/quickon_cli/releases")
Expand Down
8 changes: 4 additions & 4 deletions common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ const (
const (
DefaultQuickonOSSVersion = "3.0.2" // 开源版本
DefaultQuickonEEVersion = "1.0"
DefaultZentaoDevOPSOSSVersion = "18.9"
DefaultZentaoDevOPSMaxVersion = "4.9"
DefaultZentaoDevOPSBizVersion = "8.9"
DefaultZentaoDevOPSIPDVersion = "1.1.1"
DefaultZentaoDevOPSOSSVersion = "18.10"
DefaultZentaoDevOPSMaxVersion = "4.10"
DefaultZentaoDevOPSBizVersion = "8.10"
DefaultZentaoDevOPSIPDVersion = "1.1.2"
K3sBinName = "k3s"
K3sBinPath = "/usr/local/bin/k3s"
HelmBinName = "helm"
Expand Down
2 changes: 1 addition & 1 deletion common/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ package common
import "k8s.io/kubectl/pkg/util/templates"

var (
RootTPl = templates.Examples(`q --help`)
RootTPl = templates.Examples(`z --help`)
)
4 changes: 2 additions & 2 deletions docs/install/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ task
# 稳定版本 / stable / tag (Recommended)
curl -sfL https://pkg.qucheng.com/quickon/get.sh | sh -
# 安装渠成平台
q init --provider quickon
z init --provider quickon
# 安装禅道DevOPS
q init --provider devops
z init --provider devops
# 一键安装
curl -sfL https://pkg.qucheng.com/quickon/install.sh | INSTALL_DOMAIN=example.com sh -
```
Expand Down
4 changes: 2 additions & 2 deletions hack/scripts/getk3s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
set -xe

if [ ! -f "hack/bin/k3s-linux-amd64" ]; then
wget -O hack/bin/k3s-linux-amd64 https://github.com/k3s-io/k3s/releases/download/v1.26.10%2Bk3s2/k3s
wget -O hack/bin/k3s-linux-amd64 https://github.com/k3s-io/k3s/releases/download/v1.26.11%2Bk3s2/k3s
fi
if [ ! -f "hack/bin/k3s-linux-arm64" ]; then
wget -O hack/bin/k3s-linux-arm64 https://github.com/k3s-io/k3s/releases/download/v1.26.10%2Bk3s2/k3s-arm64
wget -O hack/bin/k3s-linux-arm64 https://github.com/k3s-io/k3s/releases/download/v1.26.11%2Bk3s2/k3s-arm64
fi

chmod +x hack/bin/k3s-linux-amd64 hack/bin/k3s-linux-arm64
4 changes: 2 additions & 2 deletions pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@ func (c *Cluster) preinit(mip, ip string, sshClient ssh.Interface) error {
qbin, _ := os.Executable()
if qbin != common.QcAdminBinPath {
if err := sshClient.Copy(ip, qbin, common.QcAdminBinPath); err != nil {
return errors.Errorf("copy q bin (%s:%s -> %s:%s) failed, reason: %v", ip, mip, qbin, common.QcAdminBinPath, ip, err)
return errors.Errorf("copy cli bin (%s:%s -> %s:%s) failed, reason: %v", ip, mip, qbin, common.QcAdminBinPath, ip, err)
}
}

if err := sshClient.CmdAsync(ip, "/usr/bin/qcadmin version"); err != nil {
return errors.Errorf("load q version failed, reason: %v", err)
return errors.Errorf("load cli version failed, reason: %v", err)
}
c.log.StartWait(ip + " start run init script")
if err := sshClient.CmdAsync(ip, common.GetCustomScripts("hack/manifests/scripts/init.sh")); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/devops/devops.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ func (q *Devops) GetMeta() *quickon.Meta {
func (q *Devops) GetUsageExample() string {
return templates.Examples(i18n.T(`
# init devops platform with example domain your.example.devops.domain
q init --provider devops --domain your.example.devops.domain`))
z init --provider devops --domain your.example.devops.domain`))
}
2 changes: 1 addition & 1 deletion pkg/providers/quickon/quickon.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,5 @@ func (q *Quickon) GetMeta() *quickon.Meta {
func (q *Quickon) GetUsageExample() string {
return templates.Examples(i18n.T(`
# init quickon platform use example domain your.example.quickon.domain
q init --provider quickon --domain your.example.quickon.domain`))
z init --provider quickon --domain your.example.quickon.domain`))
}

0 comments on commit 75dd1ee

Please sign in to comment.