barnumbirr / puppet-zipkin

This module installs, configures and upgrades OpenZipkin via Puppet.

Home Page:https://forge.puppet.com/barnumbirr/zipkin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

puppet-zipkin

Puppet Forge Puppet Forge - downloads

  1. Module Description - What the module does and why it is useful
  2. Usage - Configuration options and additional functionality
  3. Reference - An under-the-hood peek at what the module is doing and how
  4. Limitations - OS compatibility, etc.
  5. License

Description

This module installs, configures and upgrades OpenZipkin via Puppet. Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in microservice architectures. It manages both the collection and lookup of this data.

Usage

Prerequisites

To use this module Java and Elasticsearch will need to be installed. We recommend managing your Java installation with puppetlabs-java, Elasticsearch with puppet-elasticsearch and mvisonneau-curator.

Beginning with OpenZipkin

class { '::java':
  package   => 'openjdk-17-jre-headless',
  version   => '17.0.11+9-1~deb12u1',
  java_home => '/usr/lib/jvm/java-11-openjdk-amd64/',
}->
class { '::elasticsearch':
}->
class { '::zipkin':
    # JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
    java_home => '/usr/lib/jvm/java-17-openjdk-amd64/',
}

More complex example (using hiera)

java::package: openjdk-17-jre-headless
java::version: '17.0.11+9-1~deb12u1'
java::java_home: '/usr/lib/jvm/java-17-openjdk-amd64/'

elasticsearch::version: '7.9.3'
elasticsearch::manage_repo: true
elasticsearch::java_install: false
elasticsearch::restart_on_change: true
elasticsearch::status: 'enabled'
elasticsearch::instances:
  default:
    config:
      'cluster.name': 'zipkin'
      'node.name': 'zipkin'
      'network.host': '127.0.0.1'
    jvm_options:
      - '-Xms4G'
      - '-Xmx8G'
      - '8:-XX:+PrintGCDetails'
      - '8:-XX:GCLogFileSize=64m'
      - '8:-XX:+PrintGCDateStamps'
      - '8:-XX:NumberOfGCLogFiles=32'
      - '8:-XX:+UseGCLogFileRotation'
      - '8:-XX:+PrintTenuringDistribution'
      - '9:-XX:+UseConcMarkSweepGC'
      - '8:-Xloggc:/var/log/elasticsearch/default/gc.log'
      - '9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/default/gc.log:utctime,pid,tags:filecount=32,filesize=64m'

curator::repository_version: '8'
curator::package_name: 'elasticsearch-curator'

curator::actions::values:
  'delete_zipkin_index':
    entities:
      1:
        action: delete_indices
        description: Delete indices older than 30 days (based on index name)
        options:
          continue_if_exception: True
          disable_action: False
          ignore_empty_list: True
        filters:
          - filtertype: pattern
            kind: prefix
            value: zipkin
          - filtertype: age
            source: name
            direction: older
            timestring: '%Y-%m-%d'
            unit: days
            unit_count: 30

curator::jobs::values:
  'delete_zipkin_index':
    action: 'delete_zipkin_index'
    minute: 0
    hour: 5

zipkin::java_home: "%{hiera('java::java_home')}"
zipkin::version: '3.3.0'
zipkin::use_slim: true
zipkin::user: 'zipkin'
zipkin::group: 'zipkin'
zipkin::install_dir: '/opt/zipkin'
zipkin::jvm_xms: '2048m'
zipkin::jvm_xmx: '4096m'
zipkin::java_opts: '-DSTORAGE_TYPE=elasticsearch -DES_HOSTS=http://localhost:9200'

Reference

Classes

Public Classes

  • zipkin: Main class, manages the installation and configuration of OpenZipkin.

Private Classes

  • zipkin::install: Installs Zipkin jar file
  • zipkin::params: Modifiy Zipkin configuration
  • zipkin::service: Manage the Zipkin service

Parameters

Zipkin parameters

TODO

Java JVM parameters

TODO

Miscellaneous parameters

TODO

Limitations

This module is currently only written to work on Debian and Redhat based operating systems, although it may work on others. The supported Puppet versions are defined in the metadata.json file.

License:

Copyright 2019-2024 Martin Simon

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

This module installs, configures and upgrades OpenZipkin via Puppet.

https://forge.puppet.com/barnumbirr/zipkin

License:Apache License 2.0


Languages

Language:Puppet 64.0%Language:Shell 25.6%Language:HTML 5.8%Language:Ruby 4.6%