Exemplo n.º 1
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"), content=Template("metron.j2"))

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if not commands.is_pcap_configured():
            commands.init_pcap()
        if not commands.is_metron_user_hdfs_dir_configured():
            commands.create_metron_user_hdfs_dir()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()
        if params.security_enabled and not commands.is_pcap_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_pcap()
            commands.set_pcap_perm_configured()
Exemplo n.º 2
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"), content=Template("metron.j2"))

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if not commands.is_metron_user_hdfs_dir_configured():
            commands.create_metron_user_hdfs_dir()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()

        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."
            )
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"),
             content=Template("metron.j2")
             )

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if not commands.is_pcap_configured():
            commands.init_pcap()
        if not commands.is_metron_user_hdfs_dir_configured():
            commands.create_metron_user_hdfs_dir()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()
        if params.security_enabled and not commands.is_pcap_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_pcap()
            commands.set_pcap_perm_configured()
Exemplo n.º 4
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"), content=Template("metron.j2"))

        commands = RestCommands(params)
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()
Exemplo n.º 5
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"),
             content=Template("metron.j2")
             )

        commands = RestCommands(params)
        commands.init_kafka_topics()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()
Exemplo n.º 6
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        if params.security_enabled:
            params.metron_jvm_flags = format(
                '-Djava.security.auth.login.config={client_jaas_path}')

        env.set_params(params)
        File(format("/etc/sysconfig/metron"), content=Template("metron.j2"))

        commands = RestCommands(params)
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()
Exemplo n.º 7
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"), content=Template("metron.j2"))

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        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_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()
Exemplo n.º 8
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"),
             content=Template("metron.j2")
             )

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if not commands.is_metron_user_hdfs_dir_configured():
            commands.create_metron_user_hdfs_dir()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()