Documentation ¶
Index ¶
- Constants
- type DefaultDeployHandler
- func (h *DefaultDeployHandler) BuildDeployResult(tmcInstance *db.Instance, tenant *db.InstanceTenant) ResourceDeployResult
- func (h *DefaultDeployHandler) BuildRequestRelation(parentRequest string, childRequest string) error
- func (h *DefaultDeployHandler) BuildServiceGroupRequest(resourceInfo *ResourceInfo, tmcInstance *db.Instance, ...) interface{}
- func (h *DefaultDeployHandler) BuildSubResourceDeployRequest(name string, addon *diceyml.AddOn, req *ResourceDeployRequest) *ResourceDeployRequest
- func (h *DefaultDeployHandler) BuildTmcInstanceConfig(tmcInstance *db.Instance, serviceGroupDeployResult interface{}, ...) map[string]string
- func (h *DefaultDeployHandler) Callback(url string, id string, success bool, config map[string]string, ...) error
- func (h *DefaultDeployHandler) CheckIfHasCustomConfig(clusterConfig map[string]string) (map[string]string, bool)
- func (h *DefaultDeployHandler) CheckIfNeedTmcInstance(req *ResourceDeployRequest, resourceInfo *ResourceInfo) (*db.Instance, bool, error)
- func (h *DefaultDeployHandler) CheckIfNeedTmcInstanceTenant(req *ResourceDeployRequest, resourceInfo *ResourceInfo) (*db.InstanceTenant, bool, error)
- func (h *DefaultDeployHandler) DeleteRequestRelation(parentId string, childId string) error
- func (h *DefaultDeployHandler) DeleteTenant(tenant *db.InstanceTenant, tmcInstance *db.Instance, ...) error
- func (h *DefaultDeployHandler) DeleteTmcInstance(tmcInstance *db.Instance, status string) error
- func (h *DefaultDeployHandler) DoApplyTmcInstanceTenant(req *ResourceDeployRequest, resourceInfo *ResourceInfo, ...) (map[string]string, error)
- func (h *DefaultDeployHandler) DoDeploy(serviceGroupDeployRequest interface{}, resourceInfo *ResourceInfo, ...) (interface{}, error)
- func (h *DefaultDeployHandler) DoPostDeployJob(tmcInstance *db.Instance, serviceGroupDeployResult interface{}, ...) (map[string]string, error)
- func (h *DefaultDeployHandler) DoPreDeployJob(resourceInfo *ResourceInfo, tmcInstance *db.Instance) error
- func (h *DefaultDeployHandler) GetClusterConfig(az string) (map[string]string, error)
- func (h *DefaultDeployHandler) GetDiceOperatorId() string
- func (h *DefaultDeployHandler) GetInstanceById(id string) (instance *db.Instance, tenant *db.InstanceTenant, tmc *db.Tmc, ...)
- func (h *DefaultDeployHandler) GetRelationResourceIds(parentId string) []string
- func (h *DefaultDeployHandler) GetResourceInfo(req *ResourceDeployRequest) (*ResourceInfo, error)
- func (h *DefaultDeployHandler) InitializeTmcInstance(req *ResourceDeployRequest, resourceInfo *ResourceInfo, ...) (*db.Instance, error)
- func (h *DefaultDeployHandler) InitializeTmcInstanceTenant(req *ResourceDeployRequest, tmcInstance *db.Instance, ...) (*db.InstanceTenant, error)
- func (h *DefaultDeployHandler) IsMatch(tmc *db.Tmc) bool
- func (h *DefaultDeployHandler) IsNotDCOSCluster(clusterType string) bool
- func (h *DefaultDeployHandler) UnDeploy(tmcInstance *db.Instance) error
- func (h *DefaultDeployHandler) UpdateTmcInstanceOnCustom(tmcInstance *db.Instance, sgConfig map[string]string) error
- func (h *DefaultDeployHandler) UpdateTmcInstanceOnFinish(tmcInstance *db.Instance, sgConfig map[string]string, sgStatus string) error
- func (h *DefaultDeployHandler) UpdateTmcInstanceTenantOnFinish(tenant *db.InstanceTenant, config map[string]string) (*db.InstanceTenant, error)
- type ResourceDeployHandler
- type ResourceDeployRequest
- type ResourceDeployResult
- type ResourceInfo
Constants ¶
View Source
const ( TmcInstanceStatusInit = "INIT" TmcInstanceStatusRunning = "RUNNING" TmcInstanceStatusError = "ERROR" TmcInstanceStatusDeleted = "DELETED" TmcInstanceStatusDeleteError = "DELETE_ERROR" )
View Source
const ( ResourceConfigCenter = "config-center" ResourceNacos = "nacos" ResourceMysql = "mysql" ResourceTerminusZKProxy = "terminus-zkproxy" ResourceRegisterCenter = "registercenter" ResourceZookeeper = "zookeeper" ResourceZKProxy = "zkproxy" ResourceEtcd = "etcd" ResourceApiGateway = "api-gateway" ResourcePostgresql = "postgresql" ResourceMonitor = "monitor" ResourceJvmProfiler = "jvm-profiler" ResourceLogAnalytics = "log-analytics" ResourceLogEs = "log-es" ResourceLogExporter = "log-exporter" ResourceMonitorCollector = "monitor-collector" ResourceMonitorKafka = "monitor-kafka" ResourceMonitorZk = "monitor-zk" ResourceServiceMesh = "service-mesh" ResourceLogService = "log-service" )
View Source
const ( DeployModeSAAS = "SAAS" DeployModePAAS = "PAAS" )
View Source
const RuntimeMaxUpTimeoutSeconds = 15 * 60
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultDeployHandler ¶
type DefaultDeployHandler struct { TenantDb *db.InstanceTenantDB InstanceDb *db.InstanceDB TmcRequestRelationDb *db.TmcRequestRelationDB TmcDb *db.TmcDB TmcVersionDb *db.TmcVersionDB TmcIniDb *db.TmcIniDB Bdl *bundle.Bundle Log logs.Logger }
func NewDefaultHandler ¶
func NewDefaultHandler(dbClient *gorm.DB, logger logs.Logger) *DefaultDeployHandler
func (*DefaultDeployHandler) BuildDeployResult ¶
func (h *DefaultDeployHandler) BuildDeployResult(tmcInstance *db.Instance, tenant *db.InstanceTenant) ResourceDeployResult
func (*DefaultDeployHandler) BuildRequestRelation ¶
func (h *DefaultDeployHandler) BuildRequestRelation(parentRequest string, childRequest string) error
func (*DefaultDeployHandler) BuildServiceGroupRequest ¶
func (h *DefaultDeployHandler) BuildServiceGroupRequest(resourceInfo *ResourceInfo, tmcInstance *db.Instance, clusterConfig map[string]string) interface{}
func (*DefaultDeployHandler) BuildSubResourceDeployRequest ¶
func (h *DefaultDeployHandler) BuildSubResourceDeployRequest(name string, addon *diceyml.AddOn, req *ResourceDeployRequest) *ResourceDeployRequest
func (*DefaultDeployHandler) BuildTmcInstanceConfig ¶
func (*DefaultDeployHandler) CheckIfHasCustomConfig ¶
func (*DefaultDeployHandler) CheckIfNeedTmcInstance ¶
func (h *DefaultDeployHandler) CheckIfNeedTmcInstance(req *ResourceDeployRequest, resourceInfo *ResourceInfo) (*db.Instance, bool, error)
func (*DefaultDeployHandler) CheckIfNeedTmcInstanceTenant ¶
func (h *DefaultDeployHandler) CheckIfNeedTmcInstanceTenant(req *ResourceDeployRequest, resourceInfo *ResourceInfo) (*db.InstanceTenant, bool, error)
func (*DefaultDeployHandler) DeleteRequestRelation ¶
func (h *DefaultDeployHandler) DeleteRequestRelation(parentId string, childId string) error
func (*DefaultDeployHandler) DeleteTenant ¶
func (h *DefaultDeployHandler) DeleteTenant(tenant *db.InstanceTenant, tmcInstance *db.Instance, clusterConfig map[string]string) error
func (*DefaultDeployHandler) DeleteTmcInstance ¶
func (h *DefaultDeployHandler) DeleteTmcInstance(tmcInstance *db.Instance, status string) error
func (*DefaultDeployHandler) DoApplyTmcInstanceTenant ¶
func (h *DefaultDeployHandler) DoApplyTmcInstanceTenant(req *ResourceDeployRequest, resourceInfo *ResourceInfo, tmcInstance *db.Instance, tenant *db.InstanceTenant, clusterConfig map[string]string) (map[string]string, error)
func (*DefaultDeployHandler) DoDeploy ¶
func (h *DefaultDeployHandler) DoDeploy(serviceGroupDeployRequest interface{}, resourceInfo *ResourceInfo, tmcInstance *db.Instance, clusterConfig map[string]string) ( interface{}, error)
DoDeploy submit to scheduler and wait status ready
func (*DefaultDeployHandler) DoPostDeployJob ¶
func (*DefaultDeployHandler) DoPreDeployJob ¶
func (h *DefaultDeployHandler) DoPreDeployJob(resourceInfo *ResourceInfo, tmcInstance *db.Instance) error
func (*DefaultDeployHandler) GetClusterConfig ¶
func (h *DefaultDeployHandler) GetClusterConfig(az string) (map[string]string, error)
func (*DefaultDeployHandler) GetDiceOperatorId ¶
func (h *DefaultDeployHandler) GetDiceOperatorId() string
func (*DefaultDeployHandler) GetInstanceById ¶
func (*DefaultDeployHandler) GetRelationResourceIds ¶
func (h *DefaultDeployHandler) GetRelationResourceIds(parentId string) []string
func (*DefaultDeployHandler) GetResourceInfo ¶
func (h *DefaultDeployHandler) GetResourceInfo(req *ResourceDeployRequest) (*ResourceInfo, error)
func (*DefaultDeployHandler) InitializeTmcInstance ¶
func (h *DefaultDeployHandler) InitializeTmcInstance(req *ResourceDeployRequest, resourceInfo *ResourceInfo, subResults []*ResourceDeployResult) (*db.Instance, error)
func (*DefaultDeployHandler) InitializeTmcInstanceTenant ¶
func (h *DefaultDeployHandler) InitializeTmcInstanceTenant(req *ResourceDeployRequest, tmcInstance *db.Instance, subResults []*ResourceDeployResult) (*db.InstanceTenant, error)
func (*DefaultDeployHandler) IsNotDCOSCluster ¶
func (h *DefaultDeployHandler) IsNotDCOSCluster(clusterType string) bool
func (*DefaultDeployHandler) UnDeploy ¶
func (h *DefaultDeployHandler) UnDeploy(tmcInstance *db.Instance) error
func (*DefaultDeployHandler) UpdateTmcInstanceOnCustom ¶
func (*DefaultDeployHandler) UpdateTmcInstanceOnFinish ¶
func (*DefaultDeployHandler) UpdateTmcInstanceTenantOnFinish ¶
func (h *DefaultDeployHandler) UpdateTmcInstanceTenantOnFinish(tenant *db.InstanceTenant, config map[string]string) (*db.InstanceTenant, error)
type ResourceDeployHandler ¶
type ResourceDeployHandler interface { IsMatch(tmc *db.Tmc) bool GetResourceInfo(req *ResourceDeployRequest) (*ResourceInfo, error) GetClusterConfig(az string) (map[string]string, error) CheckIfHasCustomConfig(clusterConfig map[string]string) (map[string]string, bool) UpdateTmcInstanceOnCustom(tmcInstance *db.Instance, sgConfig map[string]string) error CheckIfNeedTmcInstance(req *ResourceDeployRequest, resourceInfo *ResourceInfo) (*db.Instance, bool, error) DoPreDeployJob(resourceInfo *ResourceInfo, tmcInstance *db.Instance) error BuildServiceGroupRequest(resourceInfo *ResourceInfo, tmcInstance *db.Instance, clusterConfig map[string]string) interface{} DoDeploy(serviceGroupDeployRequest interface{}, resourceInfo *ResourceInfo, tmcInstance *db.Instance, clusterConfig map[string]string) (interface{}, error) BuildTmcInstanceConfig(tmcInstance *db.Instance, serviceGroupDeployResult interface{}, clusterConfig map[string]string, additionalConfig map[string]string) map[string]string UpdateTmcInstanceOnFinish(tmcInstance *db.Instance, sgConfig map[string]string, sgStatus string) error DoPostDeployJob(tmcInstance *db.Instance, serviceGroupDeployResult interface{}, clusterConfig map[string]string) (map[string]string, error) CheckIfNeedTmcInstanceTenant(req *ResourceDeployRequest, resourceInfo *ResourceInfo) (*db.InstanceTenant, bool, error) DoApplyTmcInstanceTenant(req *ResourceDeployRequest, resourceInfo *ResourceInfo, tmcInstance *db.Instance, tenant *db.InstanceTenant, clusterConfig map[string]string) (map[string]string, error) InitializeTmcInstance(req *ResourceDeployRequest, resourceInfo *ResourceInfo, subResults []*ResourceDeployResult) (*db.Instance, error) InitializeTmcInstanceTenant(req *ResourceDeployRequest, tmcInstance *db.Instance, subResults []*ResourceDeployResult) (*db.InstanceTenant, error) UpdateTmcInstanceTenantOnFinish(tenant *db.InstanceTenant, config map[string]string) (*db.InstanceTenant, error) BuildSubResourceDeployRequest(name string, addon *diceyml.AddOn, req *ResourceDeployRequest) *ResourceDeployRequest BuildRequestRelation(parentRequest string, childRequest string) error BuildDeployResult(tmcInstance *db.Instance, tenant *db.InstanceTenant) ResourceDeployResult DeleteTmcInstance(tmcInstance *db.Instance, status string) error DeleteTenant(tenant *db.InstanceTenant, tmcInstance *db.Instance, clusterConfig map[string]string) error UnDeploy(tmcInstance *db.Instance) error GetRelationResourceIds(parentId string) []string DeleteRequestRelation(parentId string, childId string) error }
type ResourceDeployRequest ¶
type ResourceDeployResult ¶
type ResourceInfo ¶
type ResourceInfo struct { Tmc *db.Tmc TmcVersion *db.TmcVersion Spec *apistructs.AddonExtension Dice *diceyml.Object }
Click to show internal directories.
Click to hide internal directories.