Files
Olares/cli/pkg/pipelines/install_terminus.go
Eliott van Nuffel df38148149
Some checks failed
Native Verification / Build Docs (pull_request) Successful in 1m12s
Native Verification / Build App-Service Native (pull_request) Successful in 1m27s
Native Verification / Build Daemon Native (pull_request) Successful in 42s
Lint and Test Charts / lint-test (pull_request_target) Failing after 19s
Lint and Test Charts / test-version (pull_request_target) Successful in 0s
Lint and Test Charts / push-image (pull_request_target) Failing after 15s
Lint and Test Charts / upload-cli (pull_request_target) Failing after 1m15s
Lint and Test Charts / upload-daemon (pull_request_target) Failing after 1m12s
Lint and Test Charts / push-deps (pull_request_target) Has been skipped
Lint and Test Charts / push-deps-arm64 (pull_request_target) Has been skipped
Lint and Test Charts / push-image-arm64 (pull_request_target) Has been cancelled
Lint and Test Charts / upload-package (pull_request_target) Has been cancelled
Lint and Test Charts / install-test (pull_request_target) Has been cancelled
continue beOS rebrand and add native verification
2026-03-10 13:48:45 +01:00

59 lines
1.7 KiB
Go

package pipelines
import (
"fmt"
"path"
"github.com/pkg/errors"
"github.com/beclab/beos/cli/pkg/common"
"github.com/beclab/beos/cli/pkg/core/logger"
"github.com/beclab/beos/cli/pkg/phase"
"github.com/beclab/beos/cli/pkg/phase/cluster"
"github.com/spf13/viper"
)
func CliInstallTerminusPipeline() error {
var terminusVersion, _ = phase.GetBeOSVersion()
if terminusVersion != "" {
return errors.New("beOS Pro is already installed, please uninstall it first.")
}
arg := common.NewArgument()
arg.SetKubeVersion(viper.GetString(common.FlagKubeType))
arg.SetBeOSVersion(viper.GetString(common.FlagVersion))
arg.SetMinikubeProfile(viper.GetString(common.FlagMiniKubeProfile))
arg.SetStorage(getStorageConfig())
arg.SetSwapConfig(common.SwapConfig{
EnablePodSwap: viper.GetBool(common.FlagEnablePodSwap),
Swappiness: viper.GetInt(common.FlagSwappiness),
EnableZRAM: viper.GetBool(common.FlagEnableZRAM),
ZRAMSize: viper.GetString(common.FlagZRAMSize),
ZRAMSwapPriority: viper.GetInt(common.FlagZRAMSwapPriority),
})
if err := arg.SwapConfig.Validate(); err != nil {
return err
}
arg.WithJuiceFS = viper.GetBool(common.FlagEnableJuiceFS)
if viper.IsSet(common.FlagEnableReverseProxy) {
val := viper.GetBool(common.FlagEnableReverseProxy)
arg.NetworkSettings.EnableReverseProxy = &val
}
runtime, err := common.NewKubeRuntime(*arg)
if err != nil {
return fmt.Errorf("error creating runtime: %v", err)
}
manifest := path.Join(runtime.GetInstallerDir(), "installation.manifest")
runtime.Arg.SetManifest(manifest)
var p = cluster.InstallSystemPhase(runtime)
logger.InfoInstallationProgress("Start to Install beOS Pro ...")
if err := p.Start(); err != nil {
return err
}
return nil
}