コード例 #1
0
ファイル: postgres.py プロジェクト: inarihtam/cloudman
 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
0
ファイル: nodejsproxy.py プロジェクト: nuwang/cloudman
 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'
コード例 #3
0
ファイル: pulsar.py プロジェクト: nuwang/cloudman
 def __init__(self, app):
     super(PulsarService, self).__init__(app)
     self.name = ServiceRole.to_string(ServiceRole.PULSAR)
     self.svc_roles = [ServiceRole.PULSAR]
     self.dependencies = [
         ServiceDependency(self, ServiceRole.JOB_MANAGER),
         ServiceDependency(self, ServiceRole.SUPERVISOR)
     ]
     self.pulsar_home = '/mnt/pulsar'
     self.pulsar_port = 8913
     self.supervisor_conf_dir = '/etc/supervisor/conf.d'
     self.supervisor_prog_name = 'pulsar'
コード例 #4
0
 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)
     ]
コード例 #5
0
 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]
     # Hopefully Galaxy dependency alone enough to ensure database migrated, etc...
     self.dependencies = [
         ServiceDependency(self, ServiceRole.GALAXY),
         ServiceDependency(self, ServiceRole.GALAXY_POSTGRES)
     ]
     self.conf_dir = os.path.join(self.app.path_resolver.galaxy_home,
                                  'reports.conf.d')
コード例 #6
0
ファイル: hadoop.py プロジェクト: nuwang/cloudman
 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")
コード例 #7
0
    def __init__(self, app):
        super(MigrationService, self).__init__(app)

        self.svc_roles = [ServiceRole.MIGRATION]
        self.name = ServiceRole.to_string(ServiceRole.MIGRATION)
        self.svc_type = ServiceType.CM_SERVICE
        self.dependencies = []

        if 'filesystems' in self.app.config.user_data:
            for fs in self.app.config.user_data.get('filesystems') or []:
                # Wait for galaxy data, indices and tools to come up before attempting migration
                if ServiceRole.GALAXY_DATA in ServiceRole.from_string_array(fs['roles']):
                    self.dependencies.append(ServiceDependency(self, ServiceRole.GALAXY_DATA))
                if ServiceRole.GALAXY_TOOLS in ServiceRole.from_string_array(fs['roles']):
                    self.dependencies.append(ServiceDependency(self, ServiceRole.GALAXY_TOOLS))
                if ServiceRole.GALAXY_INDICES in ServiceRole.from_string_array(fs['roles']):
                    self.dependencies.append(ServiceDependency(self, ServiceRole.GALAXY_INDICES))
コード例 #8
0
ファイル: cloudgene.py プロジェクト: nuwang/cloudman
 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')
コード例 #9
0
ファイル: slurmd.py プロジェクト: nuwang/cloudman
 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
コード例 #10
0
ファイル: slurmctld.py プロジェクト: inarihtam/cloudman
 def __init__(self, app):
     super(SlurmctldService, self).__init__(app)
     self.svc_roles = [ServiceRole.SLURMCTLD, ServiceRole.JOB_MANAGER]
     self.name = ServiceRole.to_string(ServiceRole.SLURMCTLD)
     self.dependencies = [
         ServiceDependency(self, ServiceRole.MIGRATION),
         ServiceDependency(self, ServiceRole.TRANSIENT_NFS),
     ]
     self.slurm_info = SlurmInfo()
     self.num_restarts = 0
     self.max_restarts = 3
     # This must be the same on the workers
     self.slurm_lock_file = os.path.join(
         self.app.path_resolver.slurm_root_nfs, 'slurm.lockfile')
     # Following a cluster reboot, this file may have been left over so
     # clean it up before starting the service
     if os.path.exists(self.slurm_lock_file):
         os.remove(self.slurm_lock_file)
コード例 #11
0
ファイル: galaxy.py プロジェクト: inarihtam/cloudman
 def __init__(self, app):
     super(GalaxyService, self).__init__(app)
     self.name = ServiceRole.to_string(ServiceRole.GALAXY)
     self.svc_roles = [ServiceRole.GALAXY]
     self.remaining_start_attempts = NUM_START_ATTEMPTS
     # Indicates if the environment for running Galaxy has been configured
     self.configured = False
     self.ssl_is_on = False
     # Environment variables to set before executing galaxy's run.sh
     self.env_vars = {}
     self.dependencies = [
         ServiceDependency(self, ServiceRole.JOB_MANAGER),
         ServiceDependency(self, ServiceRole.GALAXY_POSTGRES),
         ServiceDependency(self, ServiceRole.GALAXY_DATA),
         ServiceDependency(self, ServiceRole.GALAXY_INDICES),
         # ServiceDependency(self, ServiceRole.PROFTPD),
         ServiceDependency(self, ServiceRole.GALAXY_TOOLS)
     ]
     self.option_manager = galaxy_option_manager(app)
コード例 #12
0
 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
0
ファイル: autoscale.py プロジェクト: nuwang/cloudman
    def __init__(self,
                 app,
                 as_min=-1,
                 as_max=-1,
                 instance_type=None,
                 num_queued_jobs=2,
                 mean_runtime_threshold=60,
                 num_instances_to_add=1):
        """
        :type as_min: int
        :param as_min: The minimum number of worker nodes of maintain.

        :type as_max: int
        :param as_max: The maximum number of worker nodes to maintain.

        :type instance_type: str
        :param instance_type: The type of instance to use.

        :type num_queued_jobs: int
        :param num_queued_jobs: Minimum number of jobs that need to be queued
                                before autoscaling will trigger.

        :type mean_runtime_threshold: int
        :param mean_runtime_threshold: Mean running job runtime before
                                       autoscaling will trigger.

        :type num_instances_to_add: int
        :param num_instances_to_add: Number of instances to add when scaling up.
        """
        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
        self.as_min = as_min
        self.instance_type = instance_type
コード例 #14
0
ファイル: sge.py プロジェクト: ddavidovic/cloudman
 def __init__(self, app):
     super(SGEService, self).__init__(app)
     self.svc_roles = [ServiceRole.SGE, ServiceRole.JOB_MANAGER]
     self.name = ServiceRole.to_string(ServiceRole.SGE)
     self.dependencies = [ServiceDependency(self, ServiceRole.MIGRATION)]
     self.sge_info = SGEInfo()