コード例 #1
0
ファイル: indexing_master.py プロジェクト: wensincai/metron
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)

        Logger.info("Running indexing configure")
        File(format("{metron_config_path}/elasticsearch.properties"),
             content=Template("elasticsearch.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group)

        commands = IndexingCommands(params)
        metron_service.load_global_config(params)

        if not commands.is_configured():
            commands.init_kafka_topics()
            commands.init_hdfs_dir()
            commands.set_configured()
        if params.security_enabled and not commands.is_hdfs_perm_configured():
            # If we Kerberize the cluster, we need to call this again, to remove write perms from hadoop group
            # If we start off Kerberized, it just does the same thing twice.
            commands.init_hdfs_dir()
            commands.set_hdfs_perm_configured()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()

        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()

        Logger.info("Calling security setup")
        storm_security_setup(params)
コード例 #2
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)

        Logger.info("Running profiler configure")
        File(format("{metron_config_path}/profiler.properties"),
             content=Template("profiler.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group
             )

        if not metron_service.is_zk_configured(params):
            metron_service.init_zk_config(params)
            metron_service.set_zk_configured(params)
        metron_service.refresh_configs(params)

        commands = ProfilerCommands(params)
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()

        Logger.info("Calling security setup")
        storm_security_setup(params)
        if not commands.is_configured():
            commands.set_configured()
コード例 #3
0
ファイル: enrichment_master.py プロジェクト: mylovetop/metron
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)

        Logger.info("Running enrichment configure")
        File(format("{metron_config_path}/enrichment.properties"),
             content=Template("enrichment.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group)

        Logger.info("Calling security setup")
        storm_security_setup(params)
コード例 #4
0
    def configure(self, env):
        from params import params
        env.set_params(params)
        storm_security_setup(params)

        if params.metron_knox_enabled and not params.metron_ldap_enabled:
            raise Fail("Enabling Metron with Knox requires LDAP authentication.  Please set 'LDAP Enabled' to true in the Metron Security tab.")

        if params.metron_knox_enabled:
            if not is_metron_knox_installed(params):
                install_metron_knox(params)
            metron_knox_topology_setup(params)
コード例 #5
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        metron_service.load_global_config(params)
        commands = ParserCommands(params)
        if not commands.is_configured():
            commands.init_parsers()
            commands.init_kafka_topics()
            commands.set_configured()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()

        Logger.info("Calling security setup")
        storm_security_setup(params)
コード例 #6
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)

        Logger.info("Running indexing configure")
        metron_service.check_indexer_parameters()
        File(format("{metron_config_path}/elasticsearch.properties"),
             content=Template("elasticsearch.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group
             )
        File(format("{metron_config_path}/solr.properties"),
             content=Template("solr.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group
             )
        File(format("{metron_config_path}/hdfs.properties"),
             content=Template("hdfs.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group
             )

        if not metron_service.is_zk_configured(params):
            metron_service.init_zk_config(params)
            metron_service.set_zk_configured(params)
        metron_service.refresh_configs(params)

        commands = IndexingCommands(params)
        if not commands.is_configured():
            commands.init_kafka_topics()
            commands.init_hdfs_dir()
            commands.set_configured()
        if params.security_enabled and not commands.is_hdfs_perm_configured():
            # If we Kerberize the cluster, we need to call this again, to remove write perms from hadoop group
            # If we start off Kerberized, it just does the same thing twice.
            commands.init_hdfs_dir()
            commands.set_hdfs_perm_configured()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()

        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()

        Logger.info("Calling security setup")
        storm_security_setup(params)
コード例 #7
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)

        Logger.info("Running enrichment configure")
        File(format("{metron_config_path}/enrichment.properties"),
             content=Template("enrichment.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group
             )

        if not metron_service.is_zk_configured(params):
          metron_service.init_zk_config(params)
          metron_service.set_zk_configured(params)
        metron_service.refresh_configs(params)

        Logger.info("Calling security setup")
        storm_security_setup(params)
コード例 #8
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)

        if not metron_service.is_zk_configured(params):
            metron_service.init_zk_config(params)
            metron_service.set_zk_configured(params)
        metron_service.refresh_configs(params)
        commands = ParserCommands(params)
        if not commands.is_configured():
            commands.init_parsers()
            commands.init_kafka_topics()
            commands.set_configured()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()

        Logger.info("Calling security setup")
        storm_security_setup(params)
コード例 #9
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)

        Logger.info("Running enrichment configure")
        File(format("{metron_config_path}/enrichment-splitjoin.properties"),
             content=Template("enrichment-splitjoin.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group)

        File(format("{metron_config_path}/enrichment-unified.properties"),
             content=Template("enrichment-unified.properties.j2"),
             owner=params.metron_user,
             group=params.metron_group)

        if not metron_service.is_zk_configured(params):
            metron_service.init_zk_config(params)
            metron_service.set_zk_configured(params)
        metron_service.refresh_configs(params)

        Logger.info("Calling security setup")
        storm_security_setup(params)
コード例 #10
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)

        commands = IndexingCommands(params)
        metron_service.load_global_config(params)

        if not commands.is_configured():
            commands.init_kafka_topics()
            commands.init_hdfs_dir()
            commands.set_configured()
        if params.security_enabled and not commands.is_hdfs_perm_configured():
            # If we Kerberize the cluster, we need to call this again, to remove write perms from hadoop group
            # If we start off Kerberized, it just does the same thing twice.
            commands.init_hdfs_dir()
            commands.set_hdfs_perm_configured()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()

        Logger.info("Calling security setup")
        storm_security_setup(params)
コード例 #11
0
 def configure(self, env):
     from params import params
     env.set_params(params)
     storm_security_setup(params)
コード例 #12
0
 def configure(self, env):
     from params import params
     env.set_params(params)
     storm_security_setup(params)