Coder Social home page Coder Social logo

isabella232 / opscenter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from locp/opscenter

0.0 0.0 0.0 144 KB

Installs DataStax OpsCenter on RHEL/Ubuntu/Debian. https://forge.puppetlabs.com/locp/opscenter

License: Other

Shell 17.35% Ruby 56.87% Python 1.63% Puppet 22.76% HTML 1.39%

opscenter's Introduction

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.

opscenter's People

Contributors

dallinb avatar gitter-badger avatar

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.