<commit_before>
# OpenTSDB Install

    module.exports = header: 'OpenTSDB Install', handler: -> 
      {opentsdb, realm} = @config.ryba
      krb5 = @config.krb5.etc_krb5_conf.realms[realm] 

## Register

      @register 'write_jaas', 'ryba/lib/write_jaas'

## Users & Groups

      @group opentsdb.group
      @user opentsdb.user

## IPTables

| Service  | Port | Proto | Info               |
|----------|------|-------|--------------------|
| opentsdb | 4242 | http  | OpenTSDB HTTP GUI  |

IPTables rules are only inserted if the parameter "iptables.action" is set to
"start" (default value).

      @iptables
        header: 'IPTables'
        rules: [
          { chain: 'INPUT', jump: 'ACCEPT', dport: opentsdb.config['tsd.network.port'], protocol: 'tcp', state: 'NEW', comment: "OpenTSDB HTTP GUI" }
        ]
        if: @config.iptables.action is 'start'

## Install

OpenTSDB archive comes with an RPM

      @call header: 'Packages', handler: ->
        @download
          source: opentsdb.source
          destination: "/var/tmp/opentsdb-#{opentsdb.version}.noarch.rpm"
          shy: true
          unless_exec: "rpm -q --queryformat '%{VERSION}' opentsdb | grep '#{opentsdb.version}'"
        @execute
          cmd: "yum localinstall -y --nogpgcheck /var/tmp/opentsdb-#{opentsdb.version}.noarch.rpm"
          unless_exec: "rpm -q --queryformat '%{VERSION}' opentsdb | grep '#{opentsdb.version}'"
        @remove
          destination: "/var/tmp/opentsdb-#{opentsdb.version}.noarch.rpm"
        @remove
          destination: "#{opentsdb.user.home}/lib/zookeeper-3.3.6.jar"
        @link
          source: '/usr/hdp/current/zookeeper-client/zookeeper.jar'
          destination: "#{opentsdb.user.home}/lib/zookeeper.jar"

## Kerberos

      @call
        header: 'Kerberos'
        if: opentsdb.config['hbase.security.authentication'] is 'kerberos'
        handler: ->
          @krb5_addprinc krb5,<commit_msg>opentsdb: cache upload<commit_after>
# OpenTSDB Install

    module.exports = header: 'OpenTSDB Install', handler: -> 
      {opentsdb, realm} = @config.ryba
      krb5 = @config.krb5.etc_krb5_conf.realms[realm] 

## Register

      @register 'write_jaas', 'ryba/lib/write_jaas'

## Users & Groups

      @group opentsdb.group
      @user opentsdb.user

## IPTables

| Service  | Port | Proto | Info               |
|----------|------|-------|--------------------|
| opentsdb | 4242 | http  | OpenTSDB HTTP GUI  |

IPTables rules are only inserted if the parameter "iptables.action" is set to
"start" (default value).

      @iptables
        header: 'IPTables'
        rules: [
          { chain: 'INPUT', jump: 'ACCEPT', dport: opentsdb.config['tsd.network.port'], protocol: 'tcp', state: 'NEW', comment: "OpenTSDB HTTP GUI" }
        ]
        if: @config.iptables.action is 'start'

## Install

OpenTSDB archive comes with an RPM

      @call header: 'Packages', handler: ->
        @download
          source: opentsdb.source
          destination: "/var/tmp/opentsdb-#{opentsdb.version}.noarch.rpm"
          unless_exec: "rpm -q --queryformat '%{VERSION}' opentsdb | grep '#{opentsdb.version}'"
        @execute
          cmd: "yum localinstall -y --nogpgcheck /var/tmp/opentsdb-#{opentsdb.version}.noarch.rpm"
          unless_exec: "rpm -q --queryformat '%{VERSION}' opentsdb | grep '#{opentsdb.version}'"
        # Dont want to clean to speed this up
        # @remove
        #   skip: true
        #   destination: "/var/tmp/opentsdb-#{opentsdb.version}.noarch.rpm"
        # Mecano shall detect the change in mecano.link
        # @remove
        #   destination: "#{opentsdb.user.home}/lib/zookeeper-3.3.6.jar"
        @link
          source: '/usr/hdp/current/zookeeper-client/zookeeper.jar'
          destination: "#{opentsdb.user.home}/lib/zookeeper.jar"

## Kerberos

      @call
        header: 'Kerberos'
        if: opentsdb.config['hbase.security.authentication'] is 'kerberos'
        handler: ->
          @krb5_addprinc krb5,
{'fraction_non_alphanumeric': 0.15610859728506787, 'fraction_numerical': 0.006033182503770739, 'mean_word_length': 2.299336650082919, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2236397', 'n_tokens_mistral': 1348, 'n_tokens_neox': 1313, 'n_words': 284}