Documentation
¶
Index ¶
- Constants
- func CompileTemplateFromMap(tmplt string, configMap interface{}) (string, error)
- func ConstructCluster(cfgDir string, cluster *v1alpha1.OnecloudCluster) error
- func ConstructClusterConfig(cfgDir string, cfg *v1alpha1.OnecloudClusterConfig) error
- func ConstructClusterResource(cfgDir string, ef func(cpnt Component, cpntOpt interface{}) error) error
- func EnsureClusterClickhouseUser(oc *v1alpha1.OnecloudCluster, dbConfig v1alpha1.DBConfig) error
- func EnsureClusterDBUser(oc *v1alpha1.OnecloudCluster, dbConfig v1alpha1.DBConfig) error
- func EnsureDBUser(conn dbutil.IConnection, dbName string, username string, password string) error
- func EnsureServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) error
- func GetComponentCloudUser(cmpt Component, cfg *v1alpha1.OnecloudClusterConfig, ...) (*v1alpha1.CloudUser, error)
- func GetComponentDBConfig(cmpt Component, cfg *v1alpha1.OnecloudClusterConfig, ...) (*v1alpha1.DBConfig, error)
- func GetComponents() map[v1alpha1.ComponentType]Component
- func GetRCAdminEnv(oc *v1alpha1.OnecloudCluster) []corev1.EnvVar
- func GetRCAdminFilePath(cfgDir string) string
- func LoginByServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) (mcclient.TokenCredential, error)
- func NewComposeComponentManager(oc *v1alpha1.OnecloudCluster) controller.ComponentManager
- func ParseSQLAchemyURL(pySQLSrc string) (*v1alpha1.DBConfig, error)
- func RegisterComponent(comp Component)
- type ApiOptions
- type Component
- func GetComponent(cType v1alpha1.ComponentType) Component
- func NewAPIMap() Component
- func NewAnsibleServer() Component
- func NewApiGateway() Component
- func NewClimc() Component
- func NewCloudId() Component
- func NewCloudmon() Component
- func NewEtcd() Component
- func NewGlance() Component
- func NewInfluxdb() Component
- func NewKeystone() Component
- func NewKubeserver() Component
- func NewLogger() Component
- func NewMonitor() Component
- func NewNotify() Component
- func NewRegion() Component
- func NewScheduledTask() Component
- func NewScheduler() Component
- func NewVictoriaMetrics() Component
- func NewWeb() Component
- func NewWebconsole() Component
- func NewYunionconf() Component
- type GlobalSettingsValue
- type InfluxdbConfig
- type KubeOptions
- type PrepareManager
- type WebNginxConfig
Constants ¶
View Source
const ( ENV_DEFAULT_CLIMC_USER = "CLIMC_DEFAULT_USER" ENV_DEFAULT_CLIMC_USER_PASSWORD = "CLIMC_DEFAULT_USER_PASSWORD" )
View Source
const ( CEConfig = `` /* 264-byte string literal not displayed */ EEConfig = `` /* 812-byte string literal not displayed */ WebNginxConfigTemplate = `` /* 5838-byte string literal not displayed */ )
View Source
const (
InfluxDBConfigTemplate = `` /* 815-byte string literal not displayed */
)
View Source
const (
YUNION_ETC_CONFIG_DIR = "/etc/yunion"
)
Variables ¶
This section is empty.
Functions ¶
func CompileTemplateFromMap ¶
func ConstructCluster ¶
func ConstructCluster(cfgDir string, cluster *v1alpha1.OnecloudCluster) error
func ConstructClusterConfig ¶
func ConstructClusterConfig(cfgDir string, cfg *v1alpha1.OnecloudClusterConfig) error
func EnsureClusterClickhouseUser ¶
func EnsureClusterClickhouseUser(oc *v1alpha1.OnecloudCluster, dbConfig v1alpha1.DBConfig) error
func EnsureClusterDBUser ¶
func EnsureClusterDBUser(oc *v1alpha1.OnecloudCluster, dbConfig v1alpha1.DBConfig) error
func EnsureDBUser ¶
func EnsureServiceAccount ¶
func EnsureServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) error
func GetComponentCloudUser ¶
func GetComponentCloudUser(cmpt Component, cfg *v1alpha1.OnecloudClusterConfig, existOpt jsonutils.JSONObject) (*v1alpha1.CloudUser, error)
func GetComponentDBConfig ¶
func GetComponentDBConfig(cmpt Component, cfg *v1alpha1.OnecloudClusterConfig, existOpt jsonutils.JSONObject) (*v1alpha1.DBConfig, error)
func GetComponents ¶
func GetComponents() map[v1alpha1.ComponentType]Component
func GetRCAdminEnv ¶
func GetRCAdminEnv(oc *v1alpha1.OnecloudCluster) []corev1.EnvVar
func GetRCAdminFilePath ¶
func LoginByServiceAccount ¶
func LoginByServiceAccount(s *mcclient.ClientSession, account v1alpha1.CloudUser) (mcclient.TokenCredential, error)
func NewComposeComponentManager ¶
func NewComposeComponentManager(oc *v1alpha1.OnecloudCluster) controller.ComponentManager
func RegisterComponent ¶
func RegisterComponent(comp Component)
Types ¶
type ApiOptions ¶
type ApiOptions struct { options.CommonOptions WsPort int `default:"10443"` ShowCaptcha bool `default:"true"` EnableTotp bool `default:"true"` }
type Component ¶
type Component interface { GetConfigFilePath(targetDir string) string GetCertsDirPath(targetDir string) string GetType() v1alpha1.ComponentType BuildCluster(oc *v1alpha1.OnecloudCluster, opts interface{}) error BuildClusterConfigDB(clsCfg *v1alpha1.OnecloudClusterConfig, dbCfg v1alpha1.DBConfig) error BuildClusterConfigCloudUser(clsCfg *v1alpha1.OnecloudClusterConfig, user v1alpha1.CloudUser) error GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.OnecloudClusterConfig) (interface{}, error) GetOptions() interface{} GetDefaultDBConfig(cfg *v1alpha1.OnecloudClusterConfig) *v1alpha1.DBConfig GetDefaultClickhouseConfig(cfg *v1alpha1.OnecloudClusterConfig) *v1alpha1.DBConfig GetDefaultCloudUser(cfg *v1alpha1.OnecloudClusterConfig) *v1alpha1.CloudUser GetPhaseControl(man controller.ComponentManager) controller.PhaseControl BeforeStart(oc *v1alpha1.OnecloudCluster, targetCfgDir string) error }
func GetComponent ¶
func GetComponent(cType v1alpha1.ComponentType) Component
func NewAnsibleServer ¶
func NewAnsibleServer() Component
func NewApiGateway ¶
func NewApiGateway() Component
func NewCloudId ¶
func NewCloudId() Component
func NewCloudmon ¶
func NewCloudmon() Component
func NewInfluxdb ¶
func NewInfluxdb() Component
func NewKeystone ¶
func NewKeystone() Component
func NewKubeserver ¶
func NewKubeserver() Component
func NewMonitor ¶
func NewMonitor() Component
func NewScheduledTask ¶
func NewScheduledTask() Component
func NewScheduler ¶
func NewScheduler() Component
func NewVictoriaMetrics ¶
func NewVictoriaMetrics() Component
func NewWebconsole ¶
func NewWebconsole() Component
func NewYunionconf ¶
func NewYunionconf() Component
type GlobalSettingsValue ¶
type GlobalSettingsValue struct { SetupKeys []string `json:"setupKeys"` SetupKeysVersion string `json:"setupKeysVersion"` SetupOneStackInitialized bool `json:"setupOneStackInitialized"` ProductVersion string `json:"productVersion"` }
func (GlobalSettingsValue) Equal ¶
func (v GlobalSettingsValue) Equal(o GlobalSettingsValue) bool
type InfluxdbConfig ¶
func (InfluxdbConfig) GetContent ¶
func (c InfluxdbConfig) GetContent() (string, error)
type KubeOptions ¶
type PrepareManager ¶
type PrepareManager interface { ConstructCluster(config v1alpha1.Mysql, cfgDir string) (*v1alpha1.OnecloudCluster, error) ConstructClusterConfig(cfgDir string) (*v1alpha1.OnecloudClusterConfig, error) Init(cpnt Component, oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.OnecloudClusterConfig, targetCfgDir string) error PostInit(cpnt Component, oc *v1alpha1.OnecloudCluster, targetCfgDir string) error }
func NewPrepareManager ¶
func NewPrepareManager() PrepareManager
type WebNginxConfig ¶
type WebNginxConfig struct { EditionConfig string WebconsoleURL string APIGatewayWsURL string APIGatewayURL string UseHTTP bool }
func (WebNginxConfig) GetContent ¶
func (c WebNginxConfig) GetContent() (string, error)
Source Files
¶
- ansibleserver.go
- apigateway.go
- apimap.go
- base_service.go
- climc.go
- cloudid.go
- cloudmon.go
- cloudutil.go
- component.go
- dbutil.go
- etcd.go
- glance.go
- influxdb.go
- keystone.go
- kubeserver.go
- logger.go
- monitor.go
- notify.go
- prepare.go
- region.go
- scheduledtask.go
- scheduler.go
- utils.go
- victoriametrics.go
- web.go
- webconsole.go
- yunoinconf.go
Click to show internal directories.
Click to hide internal directories.