Dashboard > Server Inventory App > Home > Requirements gathering
Server Inventory App Log In   View a printable version of the current page.
Requirements gathering
Added by Corey Shields, last edited by Kees Cook on May 24, 2006  (view change) show comment
Labels: 
(None)

Ideal requirements for the new application..

The basic information we need to manage

People:
  • We are a hosting center with various clients (could be considered "customers" by other hosting entities)
  • Most clients are associated with an OSS group (could be considered "companies")
  • contact information
    • Name
    • Email
    • Address
    • Telephone
    • Cellphone
    • Pager
    • IM
    • Homepage
    • Additional Notes
    • Community (company) connection(s)
  • Give the option to store contact information in an ldap directory?? (low-priority feature. MUST be an option for those who do not have ldap)
Systems:
  • We have servers that we manage (hands-on) and those that we don't (hands-off)
  • The servers are all different makes/models, sizes, configurations, etc.
  • They are all various uses as well. We need to know at a moment's notice what a server is setup to do (web? mail? etc.. what ports are open?)
  • Other inventory-like information should be tracked as well, such as purchasing data, service contracts, etc.
  • Location and size information should be kept to integrate into a visualization interface (such as a new "rackview")
  • virtualized hosts will be an issue as well. We may have one physical host that serves many virtual hosts.
  • We want to rely heavily on this app as a central changelog and change-management system. Changelog entries for each host (as well as global changelog entries) should be there.

Various app requirements & needs

  • Themeability/skinning.. Does not have to be fancy, but being able to easily change a logo or css settings would be great
  • Modularity: Ability to add plugins that manage other pieces of information maybe?
  • User control: To begin with, let apache handle user access and just pull the user from the apache variable. This user info could be used to control access to certain pieces of information, and to know who is making a changelog entry.

Possible db tables

Earlier this year, Kees and Corey got together and drew out a db schema for a combined rackview/inventory app. These are the tables laid out, put in the wiki so we can modify them and comment them as needed:

physical_hosts

id
physical_name
description
serial_number
initial_cost
current_value (how will this be kept up to date? -c)
purchase_date
service_date (next date the host requires a regular servicing check-up (cleaning, etc))
host_type_id (pointer to the host table for physical information)
service_contract_start
service_contract_end
service_contract_renewal
note_id (pointer to the note table for more details on this object)
rack_id
u_count_from_bottom (how many U of space from the bottom of a rack does this box start.. size will pull from host_type table)
racked_orientation_id (pointer to the racked_orientation table for direction of racking)

operating_systems

(operating system gets installed on to a host. this is where OS info and admin info tie in to a host)
id
hostname
contact_id
primary_admin_id
secondary_admin_id
os_name
os_version
physical_host_id
note_id (notes table)

host_types

(describes the physical aspects of a host. Can be linked to many hosts. ie, a Dell 2850 server could be found running dozens of hosts)
id
description
cpu
ram_qty
platform
note_id (notes table)
max_btus (heat info)
height_u (measured in U space)
width (measured in cm, even though we're generally going to see a 19" device)
depth (measured in cm)
supplier
supplier_model_number
brand
brand_model_number
hardware_class_id (pointer into table of hardware classes)

notes

id
note
private?? (how should we tie this in.. I like the concept of keeping some notes private, but from whom?)

connector_types

id
wire_type_id
name ("5-15P", "RJ45", "RJ11", "DB9", etc)

rooms

id
name
address_id (address table)
user_id (contact info)
note_id (notes table)

racks

id
rack_type_id (rack_type table)
room_id (rooms table)

groups_operating_systems

(this is to associate a given group to a set of operating_systems -- assigning Mozilla to os instances X, Y, Z)
group_id
operating_system_id

groups_physical_hosts

(same as groups_operating_systems, but for the phys host)
group_id
physical_host_id

rack_types

id
name
height (total height of rack, in cm)
width (total width of rack, in cm)
depth (total depth of rack, in cm)
height_u (how many U slots are available for use)
width_u (how wide is the U area, in cm -- most US racks are 19in)
height_upper (cm between top of U slots to top of rack)
width_left (cm between left side of U slots to side of rack)
depth_front (cm between front of U space to front of rack)

(went with "cm" since "in" seemed too US-centric, even if they're all 19" racks...) 

physical_host_changelogs

(changelog entries that are mapped to a host)
id
phys_host_id
date
note_id (notes table)
user_id (users table)

operating_systems_changelogs

(changelog entries that are mapped to an operating system)
id
operating_system_id
date
note_id (notes table)
user_id (users table)

fqdns

(for mapping a DNS fully qualified domain name to a host)
id
host_id
domainname

tcp_ports

(most of this will be an /etc/services import)
id
number
service

tcp_ports_servers

(maps ports from tcp_ports to hosts that should have those ports open appropriately.. if they have open ports not in the db, we worry. port 1337, heh)
port_id
host_id

(I notice we added "tcp" at the end.. should we drop it and add a field designating tcp/udp, or how do we want to handle udp?)

 wire_types

id
name ("power", "ethernet", "serial", etc) 

wires

id
wire_type_id

physical_ports

host_id
wire_id (can be null to signify an open port)
name
direction
connector_type_id

(this is the mapping table for connections, via two phys_ports sharing a common wire_id (even if connectors are different) -- allows for buses too)

users

(rename "people"?? they are not always "users" here, but could be contacts.. said contacts could also end up in ldap)
id
name
email
address_id
telephone
cellphone
pager
im
homepage
note_id
group_id
secondary_email
ssh_public_key
gpg_public_key
password (if using an internal auth mechanism)

groups

id
name
email
address_id (if it's a company, there would be a physical address for the group)
homepage
irc
note_id
group_state_id (optional "approval state of the group")

 group_states

id
name ("Approved", "Pending", "Closed", etc) 

users_groups

user_id
group_id
role? (leaving the ? here for comment)

Good ideas:

20:34 <@Ramereth> cshields: is writing client inventory apps part ofit?
20:34 <@Ramereth> i.e. something that runs every night, gets an inventory, then sends it off to the inventory app server
20:34 <@Ramereth> (thinking it could be done in perl or python easily via xmlrpc) but just a thought
20:35 <@cshields> more details please, what do you mean? (short answer is that it should be modular enough to do anything)
20:35 <@Ramereth> well, how do you plan on gathering the information? by hand?
20:35 <@Ramereth> i'm thinking of things like, having all the packages installed in a database on this server
20:36 <@Ramereth> stuff like that
20:36 <@Ramereth> rpm/deb/gentoo all have stuff that can work for that
20:36 <@cshields> oooo! that's a good idea
20:36 <@cshields> so yeah.
20:36 <@cshields>
20:36 <@Ramereth> 'course, i'm thinking more like what RHN is like
20:36 <@Ramereth> but better
20:36 <@Ramereth> more flexible
20:37 <@Ramereth> for now just being able to see the patch level/package database in one location wuld rawk
20:37 <@Ramereth> doing remote upgrades would be something down the road
20:37 <@cshields> sure
20:37 <@cshields> totally possible
20:37 <@Ramereth> filesystem layouts, hardware info, etc
20:38 <@Ramereth> lspci inventory
20:38 <@cshields> oh, I'm liking it
20:38 <@cshields> just send out an agent to collect said info
20:38 <@cshields> we're already hoping for hooks into nagios and cacti
20:38 <@Ramereth> yeah, and it has some network transport that talks to the main server
20:39 <@Ramereth> so, instead of runnign glsa-check on all the boxes... just do a db query
20:39 <@Ramereth> and generate one report for a group of boxes
20:39 <@cshields> yeah
20:39 <@Ramereth> or, "show me what needs upgraded on these group of boxes"
20:39 <@Ramereth> that one might be tricky.. but doable
20:40 <@Ramereth> solar's q (portage-utils) package would kick ass
20:40 <@Ramereth> you can also do integrity checking with his tool, then input it into the database
20:40 <@Ramereth> so you can see all the stuff out of wack
20:40 <@Ramereth> "show me all packages on all servers that have missing files for packages"
20:40 <@Ramereth> or MD5SUM's off
20:40 <@cshields> right
20:41 <@Ramereth>
20:41 <@cshields> that's an ideal result of this package

Posted by Corey Shields at May 24, 2006 20:44 | Permalink

Regarding the host type, how would we handle say two Dell 2850's with different specs?  Ideally we would want to have a base type for the 2850 as dimensions and such won't change, but installed hardware could.  Creating a new hosttype for each 2850 with a different configuration seems inefficient.  One possibility here would be to seperate the "hard" characteristics from the "soft" characteristics.

Second, I was thinking about how to keep track of the virtual machines.  There are a couple of possibilities here.  One way would be to make use of the current tables and add a field to the host table, something like "parent_host."  In the case of a virtual machine, this could be set to the host id of the host computer.  Alternatively, VM could be stored in a seperate table.  Either way, splitting the "hard" and "soft" specs of the server would be beneficial here, as physical dimensions for a VM doesn't make sense, but ram and such does.

On tcp_ports, we either need an equivalent set of tables for UDP, or we combine these and have a field to specify the protocol.  I also think we need a place to record the IP address(es) of a host.

I think People or Contacts would be better name for the users table.  I also think the roles attribute would be useful, just not sure where to define it, as a particular person may fulfill the role of "Admin" for a certain set of servers, and may only be "User" or something lower for another set.  If we can make it work, we could use this tailor the options and priveleges available to a person.  It would also make the private option on the notes portion meaningful, as certain notes could be restricted to admins only.

Posted by Matthew Isaacs at May 26, 2006 21:24 | Permalink

The current value of a specific piece of hardware is a complex task, especially if one is performing hardware upgrades and such.  Accounting folks probably have some formulas that can estimate the value of a piece of hardware, so that might be a place to look.  If there were a formula to calculate, or at least estimate, the current value that would be good.  But I'm not an accountant so I can't say for sure.

Posted by Matthew Isaacs at May 26, 2006 21:28 | Permalink

As for the People/Contacts/Users issue.. In the case of this app there will mostly be Contacts, but there may also be Users (for internal authentication and access control). However, one thing is for sure and that is that in both cases they are still "People" regardless of their "Role", so I agree with People.

Agreed about tcp_ports.. I almost think that a single table for ports with an added field for type (tcp/udp) would be sufficient. Let me get Kees to chime in on why we wrote in "tcp" to those 2 tables, as it did look added in after the fact. I don't remember what the reasoning was..

So, for the host spec issue.. Maybe the specifics need to be kept in the hosts table. The host_types table is more of the outside physical aspect. While the hosts table does not touch on hardware (yet), that is the most ideal place to keep cpu and ram as it will differ from host to host, just like the serial number, purchase date, etc. Also, this will work well when using the hosts table for VM's, as they will have specific ram sizes as well.

Posted by Corey Shields at May 27, 2006 08:00 | Permalink

I think that this may have been added with ITIL requirements in mind. I agree with the complexities of keeping it up to date, and it is out of the realm of what I would use it for here. However, someone else might find that a key use at some point.

Let's leave it in the schema, but don't worry about it in the UI.

Posted by Corey Shields at May 27, 2006 08:04 | Permalink

I've been giving some thought to the database, in particular the hosts and OS portion.  Here's what I propose:

host_types
host_type_id
description
notes_id
max_btus
watts
height_u
width
depth
supplier
supplier_model_number
brand
brand_model_number
base_cpu
base_ram
base_disk
arch (hardware architecture)

physical_hosts
physical_host_id
name
description
serial_number
initial_cost
current_value
purchase_date
service_date
service_contract_start
service_contract_end
service_contract_renewal
notes_id
rack_id
u_count_from_bottom
racked_orientation_id (where does this come from??)
host_type_id

os_type
os_type_id
name
description
contact_info
current_version (perhaps a list of key packages and the newest version available?)
notes_id

OS
os_id
os_type_id
host_id (we can link hosts->OS by os_od or OS->hosts by host_id...not sure which is better)
contacts (expand to necessary #of attributes, link to people)
current_version (like current version above, list currently installed versions of key packages)
licensing_info (some manner of storing necessary licensing info, i.e. client access licenses, etc)

hosts
host_id
name
description
parent_host_id (allows us to point to the host that a VM is running on, or the head node in a cluster)
os_type_id (points to os_type, stores generic info on various OS's)
os_id (points to an OS table, stores host specific OS info, perhaps what versions of packages are installed, etc)
physical_host_id (points to the physical_hosts table, were the physical aspects, such as size, are described)
contact_info (not necessarily and attribute, but a placeholder for the various necessary pointers to the people table for contact/admin info)

Also, similar to the FQDNS table, an IP_address table would be good to.  Perhaps link it to FQDNS or the Ports table?
In one of the hosts  table, an attribute for the number of CPUs installed could be useful, and/or a CPUs table.  The CPUs table in particular would let us represented heterogenous clusters.  Recording the number of cpu's would be useful for multprocessor machines.

Posted by Matthew Isaacs at Jun 08, 2006 16:44 | Permalink
Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.7 Build:#524 Jul 28, 2006) - Bug/feature request - Contact Administrators