- Description
- Setup - The basics of getting started with opscenter
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Development - Guide for contributing to the module
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.
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.
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.
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',
},
},
}
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,
},
}
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',
},
},
}
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.
opscenter::cluster_name
: Configure a cluster to be monitored by 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.
The full path to the OpsCenter configuration file. Default value '/etc/opscenter/opscenterd.conf'
Whether to remove cluster configurations that are not controlled by this puppet module. Valid values are true or false. Default value false
This is passed to the package reference for opscenter. Valid values are present or a version number. Default value 'present'
The name of the OpsCenter package. Default value 'opscenter'
Enable the OpsCenter service to start at boot time. Valid values are true or false. Default value 'true'
Ensure the OpsCenter service is running. Valid values are running or stopped. Default value 'running'
The name of the service that runs the OpsCenter software. Default value 'opscenterd'
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
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.
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
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'],
}
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.
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'
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'
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'
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
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'
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.
If set to true, the epel-release package will be installed. Default value 'false'
This is passed to the package reference for pycrypto. Valid values are present or a version number. Default value 'present'
The name of the PyCrypto package. Default value 'pycrypto'
The name of the provider of the pycrypto package. Default value 'pip'
Packages that are required to install the pycrypto package. Default value '['python-devel', 'python-pip' ]'
With DataStax Enterprise, one can specify a remote keyspace for OpsCenter to store metric data (this is not available in the DataStax Community Edition).
The path to where OpsCenter stores the cluster configurations. Default value '/etc/opscenter/clusters'
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'],
}
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.
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.