Installs and configures a Zenoss server with the zenoss::server
recipe.
LWRPs are available for installing ZenPacks, zenpatches, loading devices and users and running zendmd commands.
Core 4 is not available in a 32 bit distribution. You will need to ensure you are running on a 64 bit machine
CAUTION. Version 2.0.0 of this cookbook represents a large number of changes. Please refer to the change log of a list of breaking changes. You should not run 2.0.0 of this cookbook against an existing Zenoss installation without careful planning, and lots of TESTING, TESTING AND MORE TESTING
Core 4 is now the default version that will be installed. If are currently using an older version of this cookbook to manage a Core 3 installation please refer to the upgrading section below.
Core 4 introduces alot of new dependencies. In an attempt to keep all Zenoss
clients from needing to carrying the burden of all these dependencies the
zenoss::client
recipe code has been moved to a a new dedicated zenoss_client cookbook
cookbook. In an attempt to reduce the impact the zenoss::client
recipe still
exists however it is simpler a wrapper that will call zenoss_client::default
Attempts were made to preserve the Core 3 code base with as few alterations as possible. Very few changes were made to any of the supporting LWRPs. The goal is that with a few run_list changes existing users should be able to continue managing their 3.x installations, however it will require care, planning, and testing. Please refer to the section on upgrading below.
Every upgrade scenario is unique in it is own way so your mileage may vary, and you should test your upgrade on a pre-production configuration first.
If you intend to continue to manage your existing Core 3 installation using this new version, you should take the following steps:
node['zenoss']['server']['version']
to "3.2.1-0" using a normal or
override level. Don't set it in any of the default levelszenoss::server
with zenoss::server3
in your node's run_list.The example roles in the zenoss/roles
directory should be loaded for use,
refer to the Roles subsection.
With the release of Core 4 came a reduction in the number of support platforms that Zenoss will on. As its made available on other platforms this cookbook will hopefully keep up. To make things a little easier the following table should help to Identify what versions are supported on which platforms
Core 4 | Core3 | |
---|---|---|
Ubuntu 10.04 | X | |
RHEL/Centos 5 | X | X |
RHEL/Centos 6 | X |
Attributes are under the zenoss
namespace. The number of attributes are
starting to grow, so they are getting sub divided and in some cases getting
put into a separate file where it makes sense. The attribute files themselves
are self documented and rather than try and keep a large amount of attribute
documentation in sync, please refer directly to the attribute files.
Attributes that independent of the Zenoss version are in the default.rb file. Attributes that are specific to Core 4 are stored are in the core4.rb file
This LWRP builds a list of devices, their Device Classes, Systems, Groups,
Locations and their properties and populates the zenoss::server
with them.
This LWRP takes a command to be executed by the zendmd
command on the Zenoss
server. Examples include setting passwords and other changes to the Zope object
database.
Installs ZenPacks on the zenoss::server
for use for extending the base
functionality.
Installs patches on the zenoss::server
based on the number referenced in
the ticket.
The default recipe is essentially unused, but it is intended to handle setting up things that might be required to leverage the LWRPs this cookbook provide. If you are not using this cookbook to manage a server installation, then you should add this cookbook to your nodes run_list to ensure in future versions you'll continue be able to leverage the LWRPs.
Usage of this recipe is deprecated. The recipe exists for backward compatibility.
You should replace references to this recipe with zenoss_client::default
The server recipe should be considered your main entry point into this cookbook. It will make some decisions based on your configuration and dispatch execution to the necessary recipes in the cookbook. For the most part the rest of the recipes in this cookbook shouldn't get added directly to your node's run_list unless you have a very compelling reason to do so.
This recipe is used to set some meta data around your admin user.
Warning: This recipe is currently not idempotent due to its usage of the
zenoss_zendmd
resource. A future release to aim to make this idempotent.
This recipe is used to configure SMTP settings in your Zenoss server installation allowing your Zenoss server to send email notifications.
Warning: This recipe is currently not idempotent due to its usage of the
zenoss_zendmd
resource. A future release to aim to make this idempotent.
This is the work horse recipe for installing Core 4 on a node. This recipe is automatically invoked when you request a Zenoss version of 4.x be installed
NOT USED. This recipe is currently not used, but exists to express intent. The current code inside relies on some direct file edit nastiness. Future versions of this cookbook intend to make this a usable and idempotent recipe
This recipe wraps the java::default
recipe. It will setup some node attributes
used by the Java cookbook and then call it.
At the time of this writing the community MySQL cookbook didn't handle installing MySQL 5.5 on RHEL. This recipe will ensure a version of MySQL gets installed that is compatible with Zenoss Core 4. NOTE On some RHEL systems postfix is installed and depends on an early version of mysql which will get removed which results in postfix getting removed as well. If want to keep postfix on the node you will need to install it after mysql has been upgraded.
This recipe will run any post installation tasks that will make installing Zenoss Core 4 a little easier. Right now this simply sets a flag so you can skip the new setup wizard the first time you access the Zenoss UI.
With the release of 4.2.4 Zenoss Core now requires Redis. This recipe performs a simple check to determine what version you are installing and if its needed Redis will be installed via the redisio cookbook.
Zenoss is pretty particular around the version of RRD Tool that it needs. This recipe ensures you get the exact version that Zenoss wants to have.
This is for the most part the unaltered code of the server recipe before this cookbook was updated to support Core 4. The server recipe will call this recipe if you have requested a 3.x installation.
This recipe will handle setting up an SSH Key pair for your Zenoss server.
Create a users
data bag that will contain the users that will be able to log
into the Zenoss server (members of the 'sysadmin' group). The admin user is
automatically provided. Zenoss-specific information is stored in the zenoss
hash. Passwords may be set or left out. Multiple roles may be set; the choices
with Zenoss Core are Manager, ZenManager, ZenUser or empty. Users may belong
to User Groups within Zenoss (listing them here will create them). Example user
data bag item:
{
"id": "zenossadmin",
"groups": "sysadmin",
"zenoss": {
"password": "abc",
"roles": ["Manager", "ZenUser"],
"user_groups": ["managers"],
"pager": "zpager@example.com",
"email": "zemail@example.com"
}
}
Two example data bags are provided and may be loaded like this:
knife data bag create users
knife data bag from file users cookbooks/zenoss/data_bags/Zenoss_User.json
knife data bag from file users cookbooks/zenoss/data_bags/Zenoss_Readonly_User.json
This cookbook provides a number of example roles for mapping attributes to Zenoss Device Classes, Groups and Locations. There is also a role called "ZenossServer" that may be used to configure the Zenoss server for convenience. These roles may be loaded like this:
knife role from file cookbooks/zenoss/roles/Class_Server-SSH-Linux.rb
[:zenoss][:device][:device_class]
. This is an override_attribute on the role.[:zenoss][:device][:modeler_plugins]
, [:zenoss][:device][:templates]
and [:zenoss][:device][:properties]
to be applied to the Device Class.name
for the role is unused by Zenoss.[:zenoss][:device][:location]
. This is an override_attribute on the role.[:zenoss][:device][:address]
attribute for the Google map address. If you are using a newline, make sure it is entered as \\n
in the role. This is an override_attribute on the role.name
and the description
for the role map to the name and description of the Location.IMPORTANT Zenoss relies on Oracle's Flavor of Java. This requires you
to accept the license agreement but setting a value of true
for the node
attribute ['java']['oracle']['accept_oracle_download_terms']
. You can read
a bit more about this in the details of the Java cookbook
For a Zenoss server add the following recipe to the run_list:
recipe[zenoss::server]
This will allow device nodes to search for the server by this role. Devices are currently added by their external IP addresses, which is effective in hybrid clouds but you may want to modify this for environments in a single platform (ie. EC2-only). Check the providers/zenbatchload.rb
for this setting. Running chef-client --log_level debug
on the server node will show the calls for zendmd and zenbatchload commands.
To register a device for monitoring with Zenoss on a client node:
include_recipe "zenoss::client"
Any Properties that need to be set are exposed as attributes on the node and the Roles used by this cookbook.
Zenoss has the concept of Devices, which belong to a single Device Class and
Location. Chef nodes implementing the zenoss::client
recipe become Zenoss
Devices and the Device Class and Location roles may be used for placing in the
proper organizers. Zenoss also has Groups and Systems which are essentially
ways of tagging and organizing devices (and devices may belong to multiple
Groups and Systems). Searches for nodes that belong to other roles will
populate the Groups. Searches for nodes applying recipes are used to populate
the Systems.
If you are monitoring devices running on Amazon's EC2 with Zenoss, you will need to allow ICMP ping from your Zenoss server.
Because of limitations in zenbatchload, changing settings after initial configuration may not persist. This will be revisited with the upcoming Zenoss 4.x release (COO-895).
Author:: Matt Ray matt@opscode.com
Author:: David Petzel davidpetzel@gmail.com
Contributor:: Stephen Figggins stephen.figgins@gmail.com
Copyright:: 2010, Zenoss, Inc
Copyright:: 2010, 2011 Opscode, Inc
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.