Objects matching the expression 'stored'
- #731 rails changes break collections that return their own resources (configs, puppetmaster, rails, stored)
- #786 exported resources not refreshed (configs, puppetmaster, rails, stored)
- ExportedResources Exporting and collecting resources is an extension of virtual resources_. Puppet provides an experimental superset of virtual resources, using a similar syntax. In addition to these resources being virtual, they're also "exported" to other hosts on your network. While virtual resources can only be collected by the host that specified them, exported resources can be collected by any host. You must set the storeconfigs configuration parameter to true to enable this functionality (you can see information about stored configuration on the Using Stored Configuration_ wiki page), and Puppet will automatically create a database for storing configurations (using Ruby on Rails_). This allows one host to configure another host; for instance, a host could configure its services using Puppet, and then could export Nagios configurations to monitor those services. The key syntactical difference between virtual and exported resources is that the special sigils (@ and <| |>) are doubled (@@ and <<| |>>) when referring to an exported resource. Here is an example with exported resources:: class ssh { @@sshkey { $hostname: type (collected, configuration, exported, resources, stored, virtual)
- Recipes/MySQLStoredConfiguration MySQL Server Recipe for Stored Configuraton (MySQL, configuration, database, puppet, recipe, stored)
- UsingStoredConfiguration Puppet uses a technique called stored configuration, enabled with the storeconfigs configuration option, to store data in a database. This technique make use of the Ruby on Rails framework and one of three database back-ends: SQLite (the default), MySQL or PostgreSQL. Currently stored configurations are principally used by exported resources. It is important to note that once a node is in the stored configuration database it will not be automatically purged - even if you remove the corresponding node from your configuration. If you wish to purge nodes from your database you will need to do this manually. There is a script attached to this page that allows you to remove a node by name from the database. .. contents:: Installing Prerequisites ------------------------ To make use of stored configuration you will need to install some prerequisites principally the database back-end you wish to use and the Rails framework. At present (2008-01-17) Puppet requires rails 1.x. If 2.x is used you will see the following warning:: err: Could not store configs: You cannot call create unless the parent is saved with 1.x you will get some deprecation warnings (let us know that 2.x won't work for us) these can be safely ignored:: DEPRECATION WARNING: Calling .create on a has_many association without saving its owner will not work in rails 2.0, you probably want .build instead See http://www.rubyonrails.org/deprecation for details. (called from create at /usr/lib/gems/1.8/gems/activerecord-1.15.6/lib/active_record/associations/association_collection.rb:95) We start by installing the rails Ruby Gem, either with the distribution's package management (e.g. Debian/Ubuntu have a 'rails' package) or as a ruby gem:: gem install rails -v 1.2.6 MySQL +++++ For MySQL you will need to install a number of packages. For Red Hat/Fedora the typical packages required would be:: mysql mysql-devel mysql-server Or for Debian/Ubuntu you would need the following packages. libmysql-ruby provides the mysql gem, so installing via gems is unneccesary:: mysql-server libmysql-ruby You may also need to install the mysql Ruby Gem (not required on Debian/Ubuntu). You may need to specify the --with-mysql-config option to tell Gems where to find your MySQL libraries and headers:: # gem install mysql -- --with-mysql-config (configuration, storeconfigs, stored)