Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed /Server/SSH/Linux/MySQL in favor or /Server/SSH/Linux for now…

…. zenbatchload seems to have changed syntax, need to figure why zenoss_zenbatchload is pickier
  • Loading branch information...
commit 5a0657afb5eb95e7d0255c8e2f0db5fb2563a145 1 parent 9315fd0
@mattray mattray authored
View
3  CHANGELOG.md
@@ -62,6 +62,9 @@ add support for Zenoss 3.1.0
yum cookbook dependency
CentOS 5.6 and Scientific Linux 5.5 support via yum_repository LWRP
+0.7.2
+=====
+add support for Zenoss 3.2.1
0.8
mysql::server dependency for rpm installs
View
2  attributes/default.rb
@@ -23,7 +23,7 @@
set_unless[:zenoss][:server][:admin_password] = secure_password
-default[:zenoss][:device][:device_class] = "/Discovered" #overwritten by roles or on nodes
+default[:zenoss][:device][:device_class] = "/Devices/Discovered" #overwritten by roles or on nodes
default[:zenoss][:device][:location] = "" #overwritten by roles or on nodes
default[:zenoss][:device][:modeler_plugins] = [] #overwritten by roles or on nodes
default[:zenoss][:device][:properties] = {} #overwritten by roles or on nodes
View
2  metadata.rb
@@ -2,7 +2,7 @@
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures Zenoss and registers nodes as devices"
-version "0.7.1"
+version "0.7.2"
depends "apt"
depends "openssh"
depends "openssl"
View
28 recipes/server.rb
@@ -24,12 +24,12 @@
case node[:platform]
when "centos","redhat","scientific"
include_recipe "yum"
-
+
yum_key "RPM-GPG-KEY-zenoss" do
url "http://dev.zenoss.com/yum/RPM-GPG-KEY-zenoss"
action :add
end
-
+
yum_repository "zenoss" do
description "Zenoss Stable repo"
key "RPM-GPG-KEY-zenoss"
@@ -37,7 +37,7 @@
failovermethod "priority"
action :add
end
-
+
packages = %w{mysql-server net-snmp net-snmp-utils gmp libgomp libgcj liberation-fonts}
packages.each do |pkg|
yum_package pkg do
@@ -65,21 +65,21 @@
#end redhat/centos/scientific block
when "debian","ubuntu"
include_recipe "apt"
-
+
apt_repository "zenoss" do
uri "http://dev.zenoss.org/deb"
distribution "main"
components ["stable"]
action :add
end
-
+
packages = %w{ttf-liberation ttf-linux-libertine}
packages.each do |pkg|
apt_package pkg do
action :install
end
end
-
+
#Zenoss hasn't signed their repository http://dev.zenoss.org/trac/ticket/7421
apt_package "zenoss-stack" do
version node["zenoss"]["server"]["version"]
@@ -91,7 +91,7 @@
#apply post 3.1.0 patches from http://dev.zenoss.com/trac/report/6 marked 'closed'
-node["zenoss"]["server"]["zenpatches"].each do |patch, url|
+node["zenoss"]["server"]["zenpatches"].each do |patch, url|
zenoss_zenpatch patch do
ticket url
action :install
@@ -155,7 +155,7 @@
end
#this list should get appended by other recipes
-node["zenoss"]["server"]["installed_zenpacks"].each do |package, zpversion|
+node["zenoss"]["server"]["installed_zenpacks"].each do |package, zpversion|
zenoss_zenpack "#{package}" do
version zpversion
action :install
@@ -168,7 +168,7 @@
locationlist = []
grouplist = []
search(:role, "*:*").each do |role|
- if role.override_attributes["zenoss"] and role.override_attributes["zenoss"]["device"]
+ if role.override_attributes["zenoss"] and role.override_attributes["zenoss"]["device"]
if role.override_attributes["zenoss"]["device"]["device_class"]
#add the role as a Device Class
deviceclasslist.push(role.name)
@@ -212,7 +212,7 @@
batch = "dev = dmd.Devices.findDevice('#{node[:fqdn]}')\n"
batch += "if not dev:\n"
batch += " dev = dmd.Devices.findDevice('localhost*')\n\n"
- batch += "dev.changeDeviceClass('/Server/SSH/Linux/MySQL')\n"
+ batch += "dev.changeDeviceClass('/Server/SSH/Linux')\n"
batch += "dev.setManageIp('#{node[:ipaddress]}')"
command batch
action :run
@@ -233,12 +233,14 @@
action :system
end
end
-#using the nodes list, write out a zenbatchload
+#using the nodes list, write out a zenbatchload
#find all the device classes and the devices each one has.
devices = {}
nodes.each do |node|
- if node.attribute["zenoss"] and node.attribute["zenoss"]["device"]
- dclass = node.attribute["zenoss"]["device"]["device_class"]
+ #drop out the server, but it still needs to be added properly
+ #also now complaining about /Discovered vs. /Devices/Discovered
+ if node['zenoss'] and node['zenoss']['device']
+ dclass = "/Devices/#{node['zenoss']['device']['device_class']}"
if devices.has_key?(dclass)
devices[dclass].push(node)
else
View
6 roles/ZenossServer.rb
@@ -4,7 +4,7 @@
#you may want to set the [:zenoss][:server][:admin_password]
default_attributes(
"zenoss" => {
- "device" => {
+ "device" => {
"properties" => {
"zCommandUsername" => "zenoss",
"zKeyPath" => "/home/zenoss/.ssh/id_dsa",
@@ -17,8 +17,8 @@
override_attributes(
"zenoss" => {
- "device" => {
- "device_class" => "/Server/SSH/Linux/MySQL"
+ "device" => {
+ "device_class" => "/Server/SSH/Linux"
}
}
)
Please sign in to comment.
Something went wrong with that request. Please try again.