Configuring Puppet Master for PPaaS
Follow steps given below to install Puppet Master on Ubuntu:
Download the Puppet Master distribution package for the Ubuntu release.
wget https://apt.puppetlabs.com/puppetlabs-release-<CODE_NAME>.deb # For example for Ubuntu 14.04 Trusty: wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
Install the downloaded distribution package.
sudo dpkg -i puppetlabs-release-<CODE_NAME>.deb
Install Puppet Master.
sudo apt-get update sudo apt-get install puppetmaster
Install Passenger with Apache.
For more information, see Install Apache and Passenger.
- Change the Ubuntu hostname. Please follow the steps given below to change the Ubuntu hostname:
Update the
/etc/hosts
file.sudo echo "127.0.0.1 puppet.test.org" >> /etc/hosts
Change the value of the hostname.
sudo hostname puppet.test.org
- Add the following entry to the
/etc/puppet/autosign.conf
file:*.test.org
Add the
server=puppet.test.org
line to thepuppet.conf
file, which is in the/etc/puppet
directory.[main] server=puppet.test.org logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter templatedir=$confdir/templates dns_alt_names=puppet [master] # These are needed when the puppetmaster is run by passenger # and can safely be removed if webrick is used. ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY
Restart the Puppet Master.
/etc/init.d/puppetmaster restart
Download the VM Tools by navigating to the following path via the PPaaS product page.
Cartridges > common >
wso2ppaas-vm-tools-4.1.1
Copy and replace the content in the Puppet Master's
/etc/puppet
folder with the content in the<VM_TOOLS>/Puppet
directory.- Configure the mandatory modules.
Mandatory modules
It is mandatory to configure the following modules when configuring Puppet Master for PPaaS:
Python Cartridge Agent Module
Download the Cartridge Agent via the PPaaS product page.
Copy the downloaded
apache-stratos-python-cartridge-agent-4.1.4.zip
to the/etc/puppet/modules/python_agent/files
directory.Change the file permission value, of the
apache-stratos-python-cartridge-agent-4.1.4.zip
file, to0755
.chmod 755 apache-stratos-python-cartridge-agent-4.1.4.zip
Update the
base.pp
file in the/etc/puppet/manifests/nodes
directory, with the following Python agent variables.$pca_name = 'apache-stratos-python-cartridge-agent' $pca_version = '4.1.4' $mb_ip = 'MB-IP' $mb_port = 'MB-PORT' $mb_type = 'activemq' #in wso2mb case, value should be 'wso2mb' $cep_ip = "CEP-IP" $cep_port = "7711" $cep_username = "admin" $cep_password = "admin" $bam_ip = '192.168.30.96' $bam_port = '7611' $bam_secure_port = '7711' $bam_username = 'admin' $bam_password = 'admin' $metadata_service_url = 'METADATA-SERVICE-URL' $agent_log_level = 'INFO' $enable_log_publisher = 'false'
Optionally you can configure the
MB_IP
,MB_PORT
,PUPPET_IP
and thePUPPET_HOSTNAME
in the network partition as shown below.It must be noted that the values defined in the network partition receives higher priority over the values declared in the
base.pp
file ( i.e., The values declared in thebase.pp
file are overwritten by the values declared in the network partition.).{ "id": "network-partition-openstack", "provider": "openstack", "partitions": [ { "id": "partition-1", "property": [ { "name": "region", "value": "<REGION>" } ] }, { "id": "partition-2", "property": [ { "name": "region", "value": "<REGION>" } ] } ], "properties": [ { "name": "payload_parameter.PUPPET_IP", "value": "<PUPPET_MASTER_IP>" }, { "name": "payload_parameter.MB_IP", "value": "<MESSAGE_BROKER_IP>" }, { "name": "payload_parameter.MB_PORT", "value": "<MESSAGE_BROKER_PORT>" }, { "name": "payload_parameter.PUPPET_HOSTNAME", "value": "<PUPPET_MASTER_HOSTNAME>" } ] }
Java Module
Copy the downloaded
jdk-7u72-linux-x64.tar.gz
file to thefiles
folder, which is in the/etc/puppet/modules/java
directory.You can download
jdk-7u72-linux-x64.tar.gz
from here.Change file permission value, of the
jdk-7u72-linux-x64.tar.gz
file, to0755
.chmod 755 jdk-7u72-linux-x64.tar.gz
Update the
base.pp
file, which is in the/etc/puppet/manifests/nodes
directory, with the following Java variables.$java_distribution = 'jdk-7u72-linux-x64.tar.gz' $java_folder = 'jdk1.7.0_72'
Configurator Module
Download the Configurator by navigating to the following path via the PPaaS product page.
Cartridges > common >
wso2ppaas-configurator-4.1.1
- Copy the Configurator (
ppaas-configurator-4.1.1.zip)
to the/etc/puppet/modules/configurator/files
directory. Change the file permission value, of the
ppaas-configurator-4.1.1.zip
file, to0755
.chmod 755 ppaas-configurator-4.1.1.zip
Update the
base.pp
file, which is in the/etc/puppet/manifests/nodes
directory, with the following configurator variables.$configurator_name = 'ppaas-configurator' $configurator_version = '4.1.1'