Skip to content

Commit

Permalink
Merge pull request #7 from beclab/feat/apps
Browse files Browse the repository at this point in the history
feat: integrate installation shell scripts into the installer cli
  • Loading branch information
eball authored Oct 29, 2024
2 parents 935cfdc + cfffd19 commit ce3974f
Show file tree
Hide file tree
Showing 219 changed files with 3,222 additions and 5,237 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ jobs:
with:
fallback: latest

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "18"

- name: Build
run: cd frontend;npm install;npm i -g @quasar/cli;quasar build;rm -rf ./package-lock.json;

- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
10 changes: 0 additions & 10 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,7 @@ archives:
linux: linux
amd64: amd64
arm: arm64
files:
- none*
checksum:
name_template: "checksums.txt"
changelog:
skip: true
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
prerelease: true
draft: false
8 changes: 4 additions & 4 deletions apis/kubekey/v1alpha2/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ const (
DefaultKubeVipMode = "ARP"
)

func (cfg *ClusterSpec) SetDefaultClusterSpec(incluster bool, minikube bool) (*ClusterSpec, map[string][]*KubeHost) {
func (cfg *ClusterSpec) SetDefaultClusterSpec(incluster bool, macos bool) (*ClusterSpec, map[string][]*KubeHost) {
clusterCfg := ClusterSpec{}

clusterCfg.Hosts = SetDefaultHostsCfg(cfg)
clusterCfg.RoleGroups = cfg.RoleGroups
clusterCfg.Etcd = SetDefaultEtcdCfg(cfg, minikube)
clusterCfg.Etcd = SetDefaultEtcdCfg(cfg, macos)
roleGroups := clusterCfg.GroupHosts()
clusterCfg.ControlPlaneEndpoint = SetDefaultLBCfg(cfg, roleGroups[Master], incluster)
clusterCfg.Network = SetDefaultNetworkCfg(cfg)
Expand Down Expand Up @@ -339,8 +339,8 @@ func SetDefaultClusterCfg(cfg *ClusterSpec) Kubernetes {
return defaultClusterCfg
}

func SetDefaultEtcdCfg(cfg *ClusterSpec, minikube bool) EtcdCluster {
if minikube {
func SetDefaultEtcdCfg(cfg *ClusterSpec, macos bool) EtcdCluster {
if macos {
cfg.Etcd.Type = MiniKube
} else if cfg.Etcd.Type == "" || ((cfg.Kubernetes.Type == "k3s" || (len(strings.Split(cfg.Kubernetes.Version, "-")) > 1) && strings.Split(cfg.Kubernetes.Version, "-")[1] == "k3s") && cfg.Etcd.Type == Kubeadm) {
cfg.Etcd.Type = KubeKey
Expand Down
99 changes: 0 additions & 99 deletions cmd/ctl/api/api.go

This file was deleted.

15 changes: 0 additions & 15 deletions cmd/ctl/helper/logger.go

This file was deleted.

158 changes: 0 additions & 158 deletions cmd/ctl/helper/machine.go

This file was deleted.

6 changes: 4 additions & 2 deletions cmd/ctl/info/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package info
import (
"fmt"

"bytetrade.io/web3os/installer/pkg/constants"
"bytetrade.io/web3os/installer/pkg/core/connector"
"github.com/spf13/cobra"
)

Expand All @@ -24,13 +24,15 @@ func showInfoCommand() *cobra.Command {
Short: "Print os information",
Long: "help for printing os info",
Run: func(cmd *cobra.Command, args []string) {
systemInfo := connector.GetSystemInfo()
host := systemInfo.HostInfo
fmt.Printf(`OS_TYPE=%s
OS_PLATFORM=%s
OS_ARCH=%s
OS_VERSION=%s
OS_KERNEL=%s
OS_INFO=%s
`, constants.OsType, constants.OsPlatform, constants.OsArch, constants.OsVersion, constants.OsKernel, constants.OsInfo)
`, host.OsType, host.OsPlatformFamily, host.OsArch, host.OsVersion, host.OsKernel, host.OsInfo)
},
}
return cmd
Expand Down
19 changes: 0 additions & 19 deletions cmd/ctl/options/api_options.go

This file was deleted.

17 changes: 0 additions & 17 deletions cmd/ctl/options/artifact_options.go

This file was deleted.

Loading

0 comments on commit ce3974f

Please sign in to comment.