Giter Site home page Giter Site logo

jcustenborder / puppet-confluent Goto Github PK

View Code? Open in Web Editor NEW
14.0 5.0 18.0 350 KB

Puppet Module for installing and configuring the Confluent Platform

Home Page: http://www.confluent.io

License: Apache License 2.0

Puppet 61.79% Ruby 37.05% HTML 1.16%
puppet confluent kafka schema-registry

puppet-confluent's Introduction

Introduction

This puppet module is used to install and configure the Confluent Platform. The documentation is available here.

Note on versioning

Puppet only allows version numbers in <major>.<minor>.<version> format. Due to this limitation the versioning schema matches the major and minor versions of the Confluent Platform. Meaning 3.2.1234 of the puppet module is for 3.2.x of the Confluent platform.

Usage

Zookeeper

Class installation

class{'confluent::zookeeper':
  zookeeper_id => '1',
  heap_size => '4000M'
}

Hiera Installation

include ::confluent::zookeeper
confluent::zookeeper::zookeeper_id: '1'
confluent::zookeeper::config:
  server.1:
    value: 'zookeeper-01.example.com:2888:3888'
  server.2:
    value: 'zookeeper-02.example.com:2888:3888'
  server.3:
    value: 'zookeeper-03.example.com:2888:3888'
confluent::zookeeper::heap_size: '4000M'

Kafka Broker

Class installation

class{'confluent::kafka::broker':
  broker_id => '1',
  zookeeper_connect => [
    'zookeeper-01:2181',
    'zookeeper-02:2181',
    'zookeeper-03:2181'
  ],
  heap_size => '4000M'
}

Heira installation

include ::confluent::kafka::broker
confluent::kafka::broker::broker_id: '1'
confluent::kafka::broker::heap_size: '4000M'
confluent::kafka::broker::zookeeper_connect:
  - 'zookeeper-01:2181',
  - 'zookeeper-02:2181',
  - 'zookeeper-03:2181'
confluent::kafka::broker::data_path: '/var/lib/kafka'

Kafka Connect

Distributed

Class Installation

class{'confluent::kafka::connect::distributed':
  heap_size => '4000M',
  bootstrap_servers => [
    'broker-01:9092',
    'broker-02:9092',
    'broker-03:9092'
  ],
  config => {
    'key.converter' => {
      'value' => 'io.confluent.connect.avro.AvroConverter'
    },
    'value.converter' => {
      'value' => 'io.confluent.connect.avro.AvroConverter'
    },
    'key.converter.schema.registry.url' => {
      'value' => 'http://schema-registry-01:8081'
    },
    'value.converter.schema.registry.url' => {
      'value' => 'http://schema-registry-01:8081'
    },
  },
}

Heira installation

include ::confluent::kafka::connect::distributed
 confluent::kafka::connect::distributed::heap_size: '4000M'
 confluent::kafka::connect::distributed::bootstrap_servers:
  - broker-01:9092
  - broker-02:9092
  - broker-03:9092
 confluent::kafka::connect::distributed::config:
   'key.converter':
     value: 'io.confluent.connect.avro.AvroConverter'
   'value.converter':
     value: 'io.confluent.connect.avro.AvroConverter'
   'key.converter.schema.registry.url':
     value: 'http://schema-registry-01.example.com:8081'
   'value.converter.schema.registry.url':
     value: 'http://schema-registry-01.example.com:8081'

Standalone

Class Installation

class{'confluent::kafka::connect::standalone':
  heap_size => '4000M',
  bootstrap_servers => [
    'broker-01:9092',
    'broker-02:9092',
    'broker-03:9092'
  ],
  config => {
    'key.converter' => {
      'value' => 'io.confluent.connect.avro.AvroConverter'
    },
    'value.converter' => {
      'value' => 'io.confluent.connect.avro.AvroConverter'
    },
    'key.converter.schema.registry.url' => {
      'value' => 'http://schema-registry-01:8081'
    },
    'value.converter.schema.registry.url' => {
      'value' => 'http://schema-registry-01:8081'
    },
  },
}

Heira installation

include ::confluent::kafka::connect::standalone
 confluent::kafka::connect::standalone::heap_size: '4000M'
 confluent::kafka::connect::standalone::bootstrap_servers:
  - broker-01:9092
  - broker-02:9092
  - broker-03:9092
 confluent::kafka::connect::standalone::config:
   'key.converter':
     value: 'io.confluent.connect.avro.AvroConverter'
   'value.converter':
     value: 'io.confluent.connect.avro.AvroConverter'
   'key.converter.schema.registry.url':
     value: 'http://schema-registry-01.example.com:8081'
   'value.converter.schema.registry.url':
     value: 'http://schema-registry-01.example.com:8081'

Schema Registry

Class installation

class {'confluent::schema::registry':
  heap_size => '1024M',
  kafkastore_connection_url => [
      'zookeeper-01:2181',
      'zookeeper-02:2181',
      'zookeeper-03:2181'
  ]
}

Hiera installation

include ::confluent::schema::registry
confluent::schema::registry::heap_size: '1024M'
confluent::schema::registry::kafkastore_connection_url:
  - 'zookeeper-01:2181'
  - 'zookeeper-02:2181'
  - 'zookeeper-03:2181'

Confluent Control Center

Class installation

class {'confluent::control::center':
  heap_size => '6g',
  zookeeper_connect => [
    'zookeeper-01:2181',
    'zookeeper-02:2181',
    'zookeeper-03:2181'
  ],
  bootstrap_servers => [
    'broker-01:9092',
    'broker-02:9092',
    'broker-03:9092'
  ],
  connect_cluster => [
    'kafka-connect-01.example.com:8083',
    'kafka-connect-02.example.com:8083',
    'kafka-connect-03.example.com:8083'
  ]
}

Hiera installation

include ::confluent::control::center
confluent::control::center::heap_size: '6g'
confluent::control::center::zookeeper_connect: 
  - 'zookeeper-01:2181'
  - 'zookeeper-02:2181'
  - 'zookeeper-03:2181'
confluent::control::center::bootstrap_servers: 
  - 'broker-01:9092'
  - 'broker-02:9092'
  - 'broker-03:9092'
confluent::control::center::connect_cluster: 
  - 'kafka-connect-01.example.com:8083'
  - 'kafka-connect-02.example.com:8083'
  - 'kafka-connect-03.example.com:8083'

Run tests

rake spec

Rebuild github pages

rake strings:gh_pages:update

puppet-confluent's People

Contributors

ccarlfjord avatar dimino avatar jcustenborder avatar jouir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

puppet-confluent's Issues

Expose Metrics on Kafka Broker

Hi,

first of all thanks for this module. I've been playing with it for some days now and it works great! Saved me a lot of work!

I have the Control Center up and running and I wanted to see the broker health metrics. I see, your default config contains
'confluent.support.metrics.enable' => true,

'confluent.support.metrics.enable' => true,

However, in order to actually see metrics, I needed to do two more things:

Firstly, extend the broker config by this:
"metric.reporters" => "io.confluent.metrics.reporter.ConfluentMetricsReporter",

and furthermore, add a

  package { 'confluent-rebalancer':
    ensure => latest,
    tag    => 'confluent',
  }

Am I missing something, or is this the right way to do it? Would you want a patch to extend that in your module?

Cheers,
Constantin

Puppet 3.x

Last master branch broke puppet 3.x compatibility
Error 400 on SERVER: Syntax error at 'Integer'; expected ')'
Var type declaration only works with puppet 4.x

Documentation Issues

I was helping someone new to puppet setup this module, and we found that several of the documentation examples have issues. I might be able to convince him to submit a PR, or if not, I will try to fit it in. Just in case someone else is trying to figure out why things are not working when they paste in the example code.

I will try to itemize the ones I see for now:

  • There are several places where the code expects an "Integer" but the example code has '1', which is a "String" ... This results in the following error:
Error: Evaluation Error: Error while evaluating a Function Call, Class[Confluent::Kafka::Broker]: parameter 'broker_id' expects an Integer value, got String (file: /etc/puppetlabs/code/environments/vagrant/site/profile/manifests/confluent_kafka/broker.pp, line: 3, column: 3) on node kafka01.vagrant.local`)

It can be solved by removing the quotes around the 1, like:

confluent::zookeeper::zookeeper_id: 1

or

class{'confluent::zookeeper':
  zookeeper_id => 1,
}

NOTE: I feel like there should be some "automated" way to determine this ID by default, but that is another story.

  • The hieradata lists should not have commas or quotes (some of the hiera examples appear to be copied from the Puppet code example, with minimal reformatting). It should look like:
confluent::kafka::broker::zookeeper_connect:
  - zookeeper01:2181
  - zookeeper02:2181
  - zookeeper03:2181
  • The hashes are represented incorrectly in the examples and readme. It should just be key: value. Like:
confluent::zookeeper::config:
  server.1: zookeeper01:2888:3888
  server.2: zookeeper02:2888:3888
  server.3: zookeeper03:2888:3888

Zookeeper should refuse to start in standalone mode (triple split-brain)

If the server.1, server.2 and server.3 Hiera properties are not provided (or mapped incorrectly) Zookeeper will start in standalone mode. The way this Puppet module is structured, three standalone Zookeepers is an erroneous state.

This is due to the fact that the ZK manifest will proceed with or without the server list when creating the conf file for a ZK instance. According to the way ZK interpret its config, the absence of a server list will implicitly assume standalone mode. This will result in a triple split-brain that leads to data corruption among the Brokers.

Zookeeper v3.5.0 adds a config standaloneEnabled that will stop ZK from assuming standalone mode when no server list is specified. As of currently, this is not yet available in the Confluent Platform and this Puppet module. Until then, I suggest that the zookeeper.pp profile explicitly checks for the presence of the server list configuration and fail hard without it.

Please tag your releases

It would be helpful if you would use git tags to "tag" each release. That way, when we are looking at the code in GitHub, we can ensure we are seeing the same code that is deployed to the puppet server by R10k/code-manager.

Thanks in advance,
Tommy

automatic tagging causes the ordering defined in init.pp to be applied to every module in some situations

Because of automatic tagging, https://puppet.com/docs/puppet/5.3/lang_tags.html#automatic-tagging the tag "confluent" gets applied to all modules included in a profile and applies the order specified in init.pp to all resources. This breaks runs when using this module and for e.g forge sssd module in a role/profile setup. I've tested the changes in #67 in our environment and it works for us.

Example log output:
Failed to apply catalog: Found 2 dependency cycles: (Exec[authconfig-mkhomedir] => File[sssd.conf] => Service[oddjobd] => Class[Sssd::Dependencies] => Class[Sssd::Config] => File[sssd.conf])

Our role:

class role::confluent::kafka::standalone_control_center {
  include profile::base
  include profile::java
  include profile::confluent::standalone::control_center
  include profile::yum::confluent
}

Profile:

class profile::confluent::control::center {
  include ::confluent::control::center
  include ::profile::nginx

  nginx::resource::server { 'confluent-control-center':
    server_name => [ $facts['networking']['fqdn'] ],
    listen_port => 80,
    proxy       => 'http://localhost:9021/',
  }
}

If you're not able to reproduce and need/want a debug output I can provide you an anonymized one.

This is the sssd module we're using https://forge.puppet.com/sgnl05/sssd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.