Last active
February 13, 2016 21:30
-
-
Save abhishekkr/6114760 to your computer and use it in GitHub Desktop.
Puppet Module : No Code In Data ~ using PuppetDB in masterless puppet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[main] | |
storeconfigs = true | |
storeconfigs_backend = puppetdb | |
reports = store,puppetdb | |
pluginsync = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[main] | |
server = $FQDN | |
port = 8081 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply: | |
facts: | |
terminus: facter | |
cache: facter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to download puppetdb and dependent puppet modules | |
puppet module install puppetlabs/puppetdb | |
# to install puppetdb and default postgresql | |
puppet apply -e "class { 'puppetdb': }" | |
puppet apply -e "package{ 'puppetdb-terminus': }" | |
# backing up ssl dirs if they exist | |
if [ -d /etc/puppet/ssl ]; then | |
mv /etc/puppet/ssl /etc/puppet/ssl.bak | |
fi | |
if [ -d /etc/puppetdb/ssl ]; then | |
mv /etc/puppetdb/ssl /etc/puppetdb/ssl.bak | |
fi | |
# Fixing CA usage as masterless | |
FQDN=`facter fqdn` | |
puppet cert generate $FQDN | |
puppetdb-ssl-setup -f | |
# adding FQDN to IP host mapping at PuppetDB and all nodes used | |
IPADDRESS=`facter ipaddress` | |
echo "$IPADDRESS $FQDN" >> /etc/hosts | |
# /sbin/service or whatever service command you use | |
/sbin/service puppetdb restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment