Installation - drwahl/yape GitHub Wiki
Overview
Setting up your puppet master to use yape as an ENC is simple. If installing from source, you will need to do a few extra steps (outlined below). If installing from an RPM, there should be little configuration required.
Install/setup
The following will guide you through installation and setup of yape.
Install from source:
For RedHat/CentOS:
-
sudo yum install pymongo PyYAML python-argparse
-
git clone git://github.com/drwahl/yape.git /opt/yape
-
Edit conf.ini (in either conf/conf.ini or /etc/yape/conf.ini) to point to your MongoDB server/database/collection. The database and collection will be created if they do not already exist.
-
Run /opt/yape/scripts/yape.py to add a host (which will add the host "none" if it does not already exist, and use it for inheritance, if not otherwise specified).
-
Modify puppet.conf to include:
node_terminus = exec
external_nodes = 'yape_node_classifier.py'
- Restart puppetmaster (or httpd, if you are using passenger)
Install from RPM
If the RPM is in your repos, then run:
sudo yum install yape
If the RPM is not in your repos, you can install the rpm with:
sudo rpm -i yape
Configuration
yape looks for it's config file (conf.ini) in /etc/yape/ or in the relative path "../conf/conf.ini" and looks for the section "mongodb_info". Inside this section are the following parameters:
[mongodb_info]
mongodb_servers = localhost
mongodb_db_name = instances
mongodb_collection_name = puppet_enc
-
mongodb_server - Hostname of the mongodb instance in which to connect. You can optionally supply port (e.g. localhost:27017 Replica sets have not been tested, but may work. Please send me feedback if you try this.
-
mongodb_db_name - Name of the database in which mongodb_collection_name resides. This will be created automatically if it does not exist.
-
mongodb_collection_name - Name of the collection in which documents (hosts) will be stored. This will be created automatically if it does not exist.
Preperation
Before attempting to query the database for hosts, something must first exist. Every time a host is added/modified, yape will verify (and create if necessary) that the host "none" exists. This node is intended to
-
Run /opt/yape/scripts/yape.py to add a host (which will add the host "none" if it does not already exist, and use it for inheritance, if not otherwise specified).
-
Modify puppet.conf to include:
node_terminus = exec
external_nodes = 'yape_node_classifier.py'
- Restart puppetmaster (or httpd, if you are using passenger)