Forge Home

opscenter

Installs DataStax OpsCenter on RHEL/Ubuntu/Debian.

26,315 downloads

7,169 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 2.0.10 (latest)
  • 2.0.9
  • 2.0.8
  • 2.0.7
  • 2.0.6 (deleted)
  • 2.0.5
  • 2.0.4
  • 2.0.3
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.0.0
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Sep 16th 2017
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.0.0 < 5.0.0
  • , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'locp-opscenter', '2.0.10'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add locp-opscenter
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install locp-opscenter --version 2.0.10

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

locp/opscenter — version 2.0.10 Sep 16th 2017

opscenter

Table of Contents

  1. Description
  2. Setup - The basics of getting started with opscenter
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Development - Guide for contributing to the module

Description

CircleCI Coverage Status Join the chat at https://gitter.im/locp/opscenter

Installs DataStax OpsCenter on RHEL/Ubuntu/Debian. This functionality used to be included with the locp/cassandra Puppet module, but now that DataStax are about to change their support policy, this functionality has been moved to here.

Change of DataStax OpsCenter Policy

From DataStax OpsCenter Policy Changes:

Starting with OpsCenter version 6.0, OpsCenter will only be compatible with DataStax Enterprise (DSE) clusters. DataStax will discontinue OpsCenter compatibility with:

  • Open Source Software (OSS) Cassandra clusters
  • DataStax Distributions of Cassandra (DDC) clusters, formerly known as DataStax Community (DSC)

Customers currently using OpsCenter to provision, manage, and maintain their OSS Cassandra, DSC, and DDC clusters must look for other tools to continue their management and maintenance activities. Please see Planet Cassandra for some alternatives.

Setup

Upgrading

We follow SemVer Versioning and an update of the major release (i.e. from 1.Y.Z to 2.Y.Z) will indicate a significant change to the API which will most probably require a change to your manifest.

Upgrading to 2.0.0

The majority of class and type attributes were removed in favour of the more generic and flexible settings attribute. The settings attribute requires you to know the section and setting that was previously being used. This can be obtained from either checing the OpsCenter configuration properties or the Version 1.0 Reference of this module. An example of an update to the opscenter::cluster_name type to change the following code:

opscenter::cluster_name { 'Cluster1':
  cassandra_seed_hosts       => 'host1,host2',
  storage_cassandra_username => 'opsusr',
  storage_cassandra_password => 'opscenter',
  storage_cassandra_keyspace => 'OpsCenter_Cluster1'
}

to this new code:

opscenter::cluster_name { 'Cluster1':
  settings => {
    'cassandra' => {
      'seed_hosts' => 'node0,node1',
    },
    'storage_cassandra' => {
      'username' => 'opsusr',
      'password' => 'opscenter',
      'keyspace' => 'OpsCenter_Cluster1',
    },
  },
}

Beginning with opscenter

class { 'opscenter::datastax_repo':
  before => Class['cassandra', 'opscenter'],
}

class { 'opscenter::pycrypto':
  manage_epel => true,
}

class { 'opscenter':
  settings  => {
    'authentication' => {
      'enabled' => 'False',
    },
    'logging'   => {
      'level' => 'WARN',
    },
    'webserver' => { 
      'interface' => '0.0.0.0',
      'port'      => 8888,
    },
}

Usage

DataStax Enterprise (DSE)

With DataStax Enterprise (DSE) one can specify a remote keyspace for storing the metrics for a cluster:

opscenter::cluster_name { 'Cluster1':
  settings => {
    'cassandra' => {
      'seed_hosts' => 'node0,node1',
    },
  },
}

Reference

Classes

Public Classes

  • opscenter: Install and configure DataStax OpsCenter.
  • opscenter::datastax_repo: Configure a repository for packages to install OpsCenter.
  • opscenter::pycrypto: If you intend to use encryption for configuration values, install the pycrypto library. The pycrypto library dependency is automatically included in the Debian package install.

Defined Types

Public Defined Types

Attributes

Class opscenter

This class installs and manages the DataStax OpsCenter. Leaving the defaults as they are will provide a running OpsCenter without any authentication on port 8888.

config_file

The full path to the OpsCenter configuration file. Default value '/etc/opscenter/opscenterd.conf'

config_purge

Whether to remove cluster configurations that are not controlled by this puppet module. Valid values are true or false. Default value false

package_ensure

This is passed to the package reference for opscenter. Valid values are present or a version number. Default value 'present'

package_name

The name of the OpsCenter package. Default value 'opscenter'

service_enable

Enable the OpsCenter service to start at boot time. Valid values are true or false. Default value 'true'

service_ensure

Ensure the OpsCenter service is running. Valid values are running or stopped. Default value 'running'

service_name

The name of the service that runs the OpsCenter software. Default value 'opscenterd'

service_provider

The name of the provider that runs the service. If left as undef then the OS family specific default will be used, otherwise the specified value will be used instead. Default value undef

service_systemd

If set to true then a systemd service file called ${systemd_path}/${service_name}.service will be added to the node with basic settings to ensure that the Cassandra service interacts with systemd better where systemd_path will be:

  • /usr/lib/systemd/system on the Red Hat family.
  • /lib/systemd/system on Debian the family.

Default value is false except on RedHat 7 where it is true.

service_systemd_tmpl

The location for the template for the systemd service file. This attribute only has any effect if service_systemd is set to true.

Default value cassandra/opscenterd.service.erb

settings

A hash that is passed to create_ini_settings to set values in config_file. These files need to follow the format specified in http://docs.datastax.com/en/opscenter/5.2/opsc/configure/opscConfigProps_r.html . Default value {} also the settings will have the following defaults:

{
  ensure  => present,
  path    => $config_file,
  require => Package['opscenter'],
  notify  => Service['opscenterd'],
}

Class opscenter::datastax_repo

An optional class that will allow a suitable repository to be configured from which packages for DataStax Community can be downloaded. Changing the defaults will allow any Debian Apt or Red Hat Yum repository to be configured.

descr

On the Red Hat family, this is passed as the descr attribute to a yumrepo resource. On the Debian family, it is passed as the comment attribute to an apt::source resource. Default value 'DataStax Repo for Apache Cassandra'

key_id

On the Debian family, this is passed as the id attribute to an apt::key resource. On the Red Hat family, it is ignored. Default value '7E41C00F85BFC1706C4FFFB3350200F2B999A372'

key_url

On the Debian family, this is passed as the source attribute to an apt::key resource. On the Red Hat family, it is ignored. Default value 'http://debian.datastax.com/debian/repo_key'

pkg_url

If left as the default, this will set the baseurl to 'http://rpm.datastax.com/community' on a yumrepo resource on the Red Hat family. On the Debian family, leaving this as the default will set the location attribute on an apt::source to 'http://debian.datastax.com/community'. Default value undef

release

On the Debian family, this is passed as the release attribute to an apt::source resource. On the Red Hat family, it is ignored. Default value 'stable'

Class opscenter::pycrypto

On the Red Hat family of operating systems, if one intends to use encryption for configuration values then the pycrypto library is required. This class will install it for the user. See http://docs.datastax.com/en/opscenter/5.2//opsc/configure/installPycrypto.html for more details.

This class has no effect when included on nodes that are not in the Red Hat family.

manage_epel

If set to true, the epel-release package will be installed. Default value 'false'

package_ensure

This is passed to the package reference for pycrypto. Valid values are present or a version number. Default value 'present'

package_name

The name of the PyCrypto package. Default value 'pycrypto'

provider

The name of the provider of the pycrypto package. Default value 'pip'

reqd_pckgs

Packages that are required to install the pycrypto package. Default value '['python-devel', 'python-pip' ]'

Defined Type opscenter::cluster_name

With DataStax Enterprise, one can specify a remote keyspace for OpsCenter to store metric data (this is not available in the DataStax Community Edition).

config_path

The path to where OpsCenter stores the cluster configurations. Default value '/etc/opscenter/clusters'

settings

A hash that is passed to create_ini_settings to set values in ${config_path}/title.conf. These files need to follow the format specified in http://docs.datastax.com/en/opscenter/5.2/opsc/configure/opscConnectionConfig_r.html Default value {} also the settings will have the following defaults:

{
  ensure  => present,
  path    => $cluster_file,
  require => [
    File["opscenter: ${title}"],
    Package['opscenter'],
  ],
  notify  => Service['opscenterd'],
}

Development

Contributions will be gratefully accepted. Please go to the project page, fork the project, make your changes locally and then raise a pull request. Details on how to do this are available at https://guides.github.com/activities/contributing-to-open-source.

Contributors

Before this project was spun off from locp-cassandra contributions to how OpsCenter was configured in that module were made by @Mike-Petersen and @jonen10.