Version information
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
Add this module to your Puppetfile:
mod 'locp-opscenter', '2.0.10'
Learn more about managing modules with a PuppetfileDocumentation
opscenter
Table of Contents
- 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
Description
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
opscenter::cluster_name
: Configure a cluster to be monitored by OpsCenter.
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.
Change Log
##2017-09-16 - Release 2.0.10 (diff)
Summary
Hotfix to remedy build failures.
##2017-04-05 - Release 2.0.9 (diff)
Summary
Hotfix to remedy build failures.
Bugfix
- Rubocop errors (see #16).
- Puppet metadata errors (see #17).
##2016-12-03 - Release 2.0.8 (diff)
Summary
Bugfix
- Fixed a problem that was showing the master build as failed.
##2016-12-02 - Release 2.0.7 (diff)
Summary
Bugfix
- Rubocop appeasement since upgrade of that gem to 0.46.0.
##2016-10-01 - Release 2.0.5 (diff)
Summary
Fixed automated acceptance tests now that locp-cassandra
2.0.0 has been released.
##2016-07-20 - Release 2.0.4 (diff)
Summary
A non-functional improvement. We now test against Ubuntu 16.04.
##2016-07-09 - Release 2.0.3 (diff)
Summary
Removed puppetlabs-firewall dependency as it is not required.
##2016-06-26 - Release 2.0.2 (diff)
Summary
Minor bugfix after the new version of RuboCop picked up formatting issues in Vagrantfile.
##2016-06-06 - Release 2.0.1 (diff)
Summary
Minor bugfix for the puppetlabs-inifile version and fixed some typos in the README.
##2016-06-03 - Release 2.0.0 (diff)
Summary
Note that this is an update of the major release number, please see the notes on Upgrading.
Features
- A radical overhaul of the API making it more flexible/powerful.
- Automatically set
service_systemd
to a suitable value.
Bugfixes
- Corrected typos in the change log.
##2016-06-03 - Release 1.0.0 (diff)
Bumping version from 0.1.2 to 1.0.0. The API of this module is now the same as the OpsCenter related classes of version 1.24.0 locp-cassandra and is passing all the unit and acceptance tests as expected.
##2016-06-03 - Release 0.1.2 (diff)
Summary
A non-functional release.
Improvements
- A full suite of acceptance/beaker tests.
- Code refactoring.
##2016-06-02 - Release 0.1.1 (diff)
Summary
Fixed a problem with automatic deployments to Puppet Forge from CircleCI.
##2016-06-02 - Release 0.1.0
Summary
Initial release. This functionality used to be included with the locp-cassandra but now that DataStax are about to change their support policy, this functionality has been moved to here.
Dependencies
- puppetlabs-apt (>= 2.0.0 < 3.0.0)
- puppetlabs-inifile (>= 1.5.0 < 2.0.0)
- puppetlabs-stdlib (>= 3.0.0 < 5.0.0)
Copyright 2016, 2017 League of Crafty Programmers Ltd. 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.