本文整理汇总了Python中cm.services.ServiceRole.to_string方法的典型用法代码示例。如果您正苦于以下问题:Python ServiceRole.to_string方法的具体用法?Python ServiceRole.to_string怎么用?Python ServiceRole.to_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cm.services.ServiceRole
的用法示例。
在下文中一共展示了ServiceRole.to_string方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(PostgresService, self).__init__(app)
self.name = ServiceRole.to_string(ServiceRole.GALAXY_POSTGRES)
self.svc_roles = [ServiceRole.GALAXY_POSTGRES]
self.psql_port = app.path_resolver.psql_db_port
self.dependencies = [ServiceDependency(self, ServiceRole.GALAXY_DATA),
ServiceDependency(self, ServiceRole.MIGRATION)]
示例2: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(ClouderaManagerService, self).__init__(app)
self.svc_roles = [ServiceRole.CLOUDERA_MANAGER]
self.name = ServiceRole.to_string(ServiceRole.CLOUDERA_MANAGER)
self.dependencies = []
self.db_pwd = misc.random_string_generator()
# Indicate if the web server has been configured and started
self.started = False
self.cm_port = 7180
# Default cluster configuration
self.cm_host = socket.gethostname()
self.host_list = [self.cm_host]
self.cluster_name = "Cluster 1"
self.cdh_version = "CDH5"
self.cdh_version_number = "5"
self.cm_username = "admin"
self.cm_password = "admin"
self.cm_service_name = "ManagementService"
self.host_username = "ubuntu"
# Read the password from the system!
self.host_password = self.app.config.get('password')
self.cm_repo_url = None
self.service_types_and_names = {
"HDFS": "HDFS",
"YARN": "YARN",
"ZOOKEEPER": "ZooKeeper"
}
示例3: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app, instance_role='master'):
super(PSSService, self).__init__(app)
self.svc_roles = [ServiceRole.PSS]
self.name = ServiceRole.to_string(ServiceRole.PSS)
self.svc_type = ServiceType.CM_SERVICE
self.instance_role = instance_role
log.debug("Configured PSS as {0}".format(self.instance_role))
示例4: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(HadoopService, self).__init__(app)
self.svc_roles = [ServiceRole.HADOOP]
self.name = ServiceRole.to_string(ServiceRole.HADOOP)
self.dependencies = [ServiceDependency(self, ServiceRole.SGE)]
self.id_rsa_path = os.path.join(paths.P_HADOOP_HOME, "id_rsa")
self.id_rsa_pub_key_path = os.path.join(
paths.P_HADOOP_HOME, "id_rsa.pub")
示例5: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(NodejsProxyService, self).__init__(app)
self.svc_roles = [ServiceRole.NODEJSPROXY]
self.name = ServiceRole.to_string(ServiceRole.NODEJSPROXY)
self.dependencies = [ServiceDependency(self, ServiceRole.GALAXY_TOOLS),
ServiceDependency(self, ServiceRole.SUPERVISOR)]
self.np_port = 8800
self.supervisor_conf_dir = '/etc/supervisor/conf.d'
self.supervisor_prog_name = 'galaxy_nodejs_proxy'
示例6: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(CloudgeneService, self).__init__(app)
self.svc_roles = [ServiceRole.CLOUDGENE]
self.name = ServiceRole.to_string(ServiceRole.CLOUDGENE)
self.dependencies = [ServiceDependency(self, ServiceRole.CLOUDERA_MANAGER)]
self.port = 8085
self.cg_url = "https://cloudman.s3.amazonaws.com/files/cloudgene-cloudman-daemon.tar.gz"
self.cg_base_dir = '/mnt/galaxy/cloudgene/'
self.cg_home = os.path.join(self.cg_base_dir, 'cloudgene-daemon')
示例7: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(SlurmdService, self).__init__(app)
self.svc_roles = [ServiceRole.SLURMD]
self.name = ServiceRole.to_string(ServiceRole.SLURMD)
self.dependencies = [
ServiceDependency(self, ServiceRole.SLURMCTLD),
]
self.num_restarts = 0
self.max_restarts = 3
示例8: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(PulsarService, self).__init__(app)
self.pulsar_home = None
self.pulsar_port = DEFAULT_PULSAR_PORT
self.name = ServiceRole.to_string(ServiceRole.PULSAR)
self.svc_roles = [ServiceRole.PULSAR]
self.dependencies = [
ServiceDependency(self, ServiceRole.JOB_MANAGER)
]
示例9: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(LwrService, self).__init__(app)
self.lwr_home = self.app.path_resolver.lwr_home
self.lwr_port = DEFAULT_LWR_PORT
self.name = ServiceRole.to_string(ServiceRole.LWR)
self.svc_roles = [ServiceRole.LWR]
self.dependencies = [
ServiceDependency(self, ServiceRole.SGE), # Well someday anyway :)
ServiceDependency(self, ServiceRole.GALAXY_TOOLS) # Anyway to make this depend on where LWR installed?
]
示例10: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
"""
Initialize the service class by setting role and indicating dependencies
"""
super(ProFTPdService, self).__init__(app)
log.debug("Initializing ProFTPdService")
self.svc_roles = [ServiceRole.PROFTPD]
self.name = ServiceRole.to_string(ServiceRole.PROFTPD)
self.dependencies = [ServiceDependency(self, ServiceRole.GALAXY_POSTGRES),
ServiceDependency(self, ServiceRole.GALAXY_DATA)]
示例11: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(GalaxyReportsService, self).__init__(app)
self.galaxy_home = self.app.path_resolver.galaxy_home
self.reports_port = DEFAULT_REPORTS_PORT
self.name = ServiceRole.to_string(ServiceRole.GALAXY_REPORTS)
self.svc_roles = [ServiceRole.GALAXY_REPORTS]
self.dependencies = [ServiceDependency(
self, ServiceRole.GALAXY)] # Hopefully Galaxy dependency alone enough to ensure database migrated, etc...
self.conf_dir = os.path.join(
self.app.path_resolver.galaxy_home, 'reports.conf.d')
示例12: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app, as_min=-1, as_max=-1, instance_type=None):
super(AutoscaleService, self).__init__(app)
self.state = service_states.UNSTARTED
self.svc_roles = [ServiceRole.AUTOSCALE]
self.svc_type = ServiceType.CM_SERVICE
self.name = ServiceRole.to_string(ServiceRole.AUTOSCALE)
self.dependencies = [ServiceDependency(self, ServiceRole.MIGRATION)]
self.as_max = as_max # Max number of nodes autoscale should maintain
self.as_min = as_min # Min number of nodes autoscale should maintain
self.instance_type = instance_type # Type of instances to start
示例13: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app):
super(SupervisorService, self).__init__(app)
self.svc_roles = [ServiceRole.SUPERVISOR]
self.name = ServiceRole.to_string(ServiceRole.SUPERVISOR)
self.dependencies = []
self.sv_port = 9002
self.pid_file = '/var/run/supervisord.pid'
self.main_conf_file = '/etc/supervisord.conf'
self.conf_dir = '/etc/supervisor/conf.d'
self.server = None
self.log_file = '/var/log/supervisor/supervisord.log'
示例14: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, app, instance_role='master'):
super(PSSService, self).__init__(app)
self.svc_roles = [ServiceRole.PSS]
self.name = ServiceRole.to_string(ServiceRole.PSS)
self.instance_role = instance_role
log.debug("Configured PSS as {0}".format(self.instance_role))
# Name of the default script to run
self.pss_filename = 'post_start_script' if self.instance_role == 'master' \
else 'worker_post_start_script'
self.pss_url = self.app.ud.get('post_start_script_url', None) if self.instance_role == 'master' \
else self.app.ud.get('worker_post_start_script_url', None)
示例15: __init__
# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
def __init__(self, filesystem, from_archive=None):
"""
Instance's transient storage exposed over NFS.
"""
super(TransientStorage, self).__init__(filesystem.app)
self.fs = filesystem
self.app = self.fs.app
self.device = None
self.from_archive = from_archive
self.svc_roles = [ServiceRole.TRANSIENT_NFS]
self.name = ServiceRole.to_string(ServiceRole.TRANSIENT_NFS)