A central Hub for all scripts around our new SOE Initiative. We put them on github because we can manage Issues and do Release Planning.
The libraries and Jenkins plugins listed below are to support the proposed approach for automating application and JBoss EAP configuration. For further details refer to Configuration Automation document.
PuppetGen Jenkins Plugin
This Jenkins plugin is a wrapper for Puppet Module Generator library. https://github.com/RedHatEMEA/soe-ng/tree/master/jenkins/puppetgen-jenkins-plugin
PuppetGen Jenkins Plugin
This maven plugin is a wrapper for Puppet Module Generator library. https://github.com/RedHatEMEA/soe-ng/tree/master/maven/puppetgen-maven-plugin
This project defines a schema for expressing application config which needs to be applied to JBoss EAP. https://github.com/RedHatEMEA/soe-ng/tree/master/lib/app-config-schema
Example available in Configuration Automation document.
Puppet Module API
A Java API modling Puppet module structure. This API can be used to generate Puppet modules. https://github.com/RedHatEMEA/soe-ng/tree/master/lib/puppet-module-api
Puppet Module Generator
A Puppet module generator library that creates Puppet modules based on a config descriptor as defined in AppConfig Schema. https://github.com/RedHatEMEA/soe-ng/tree/master/lib/puppet-module-generator
The RH_LDAP-config folder contains scripts and schemas to set up an ldap
server to serve as an External Node Classifier in order to produce the
etc/facter/facts.d/ENC-CONFIG.txt file that would have key-value pairs
for the following:
/etc/facter/facts.d/ENC-CONFIG.txt file that would
have key-value pairs for the following:
designated_hostname=vm212.mydomain.com Brand=RHEV Model=KVM country=GE state=Munic site=muc firewall=normal business_unit=GPS cluster_name=RHEV server_type=free build=1.0-1 stage=dev designated_ip=10.32.69.212 designated_gateway=10.32.69.254 designated_netmask=255.255.255.0
- A slapd instance can be created by running the following so that there's access to all the slapd commands, and the client ldapmodify commands in order to add and delete entries from the ldap database.
$ yum -y install openldap-servers openldap-clients $ yum -y install httpd python-ldap
- Create a Database folder with ldap ownership and create a
$ mkdir /var/lib/rh; $ cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/rh/DB_CONFIG; $ chown -R ldap.ldap /var/lib/rh
rh.schemato reflect your configuration and dc (i.e. change
slappasswdto create a Manager password output and copy it next to rootpw in the
slapd.conf. Copy the
populate_scripts/create_new_entry.shfile to represent the domain changes in the
slapd.conffile and run it to create an intial ldif file. Create a test instance with ALL the entries. Change the bottom entry of the
data_test/rh-detailed.ldifto the content of the file that you've just created (the location of which will be indicated by the
create_new_entry.shoutput). Edit the
rh-detailed.ldiffile further so that the dn of all items represents your domain.
data_testdirectory run the
setup.shscript. This should populate the database. Make sure that the ownership of all items in
chown -Rvvv ldap.ldap).
slaptestto test the configuration files. Use
slapcat -f /etc/openlap/slapd.conf -F /etc/openldap/slapd.d -n 1to get the output of the ldap database (
yesthis should work even if the ldap server is not running yet.
slapddaemon and search for your entry:
$ ldapsearch -b ou=machines,dc=yourdomain,dc=com -v -x -LLL '(cn=shortname)'
- Edit the
cgi-scripts/gethostdetails.pyto reflect your entry and copy it in the
/var/www/cgi-bin folder. Start the httpd entry.
wget -0 /tmp/hostdetails http://<ldap_server>/cgi-bin/gethostdetails.py?servername=<unique_servername_cn>to test that you get the desired output.
- copy the puppet-config folder in
- Install puppet
- Add your puppet server to the ldap Server above using the
create_new_entry.shscript and then adding the ldif file created to the database using
ldapmodify(see create new entry output). Make sure that:
- designatedHostname is lower case and the FQDN
- cn is the shortname
- stage is dev/qa/prod
- serverType is free/web/app/db
- you can add more than one nics
- all the other entries exist (you can put N/A next to them)
- Create an
/etc/facter/facts.dfolder and add the generated hostdetails file in there under the name
- Change the
/etc/puppet-config/hieradbfiles to reflect the values you need in your organization
- Make sure that if you need any network/iptables configurations changed that you have console access to the Machine
puppet apply --config /etc/puppet-config/puppet.conf /etc/puppet-config/manifests/site.pp --noopto see what will change
- If you are not happy with what will change edit the
/etc/puppet-config/manifests/site.ppto your satisfaction
- Test again and when you are happy, apply all changes
$ puppet apply --config /etc/puppet-config/puppet.conf /etc/puppet-config/manifests/site.pp