Configuring Puppet Master
Follow the instructions below to configure Puppet Master for Private PaaS on Debian/Ubuntu 12.04.1 LTS based Linux distributions:
- Get root access.
sudo -i
- Install Git.
apt-get install git
- Obtain the Puppet Master installation script. This will create a folder named
puppetinstall.
git clone https://github.com/thilinapiy/puppetinstall
- Navigate to the
puppetinstall
folder using the following command:
cd puppetinstall - Install Puppet Master (v3) as follows:
- Execute the following command. When you execute this command, your system hostname will get modified.
./puppetinstall -m -d <PUPPETMASTER-DOMAIN>
-s<PUPPET-MASTER-IP>
For example:./puppetinstall -m -d test.org
If requested, press enter. If you have successfully installed Puppet Master, the following message will appear:
“Installation completed successfully
" - Execute the
hostname
command. This will show that your system hostname has been modified.
For example:
puppet.test.org
Verify your Puppet Master (v3) installation by running the following command in the
puppetinstall
folder:ps -ef | grep puppet
The output will be as follows:puppet 5324 1 0 14:59 ? 00:00:00 /usr/bin/ruby /usr/bin/puppet master --masterport=8140 root 5332 1071 0 15:05 pts/0 00:00:00 grep --color=auto puppet
- Execute the following command. When you execute this command, your system hostname will get modified.
- Obtain the Private PaaS Puppet scripts as follows:
Clone WSO2 Private PaaS Git repository to a folder of your choice. The location of the extracted source will be referred to as
<PRIVATE_PAAS_HOME>
.git clone https://github.com/wso2/private-paas.git
<local-folder-name>
For example:git clone https://github.com/wso2/private-paas.git
PRIVATE_PAAS_HOME
Make sure that you have setup Git properly. For more information, go to Getting Started with Git.
Navigate to the
<PRIVATE_PAAS_HOME>/
directory.cd PRIVATE_PAAS_HOME
- Check out WSO Private PaaS 4.0.0 tag to a folder of your choice:
git checkout -b <REMOTE_BRANCH/TAG> <LOCAL_BRANCH>
For example:git checkout -b 4.0.0 4.0.0
- Navigate to the <
PRIVATE_PAAS_HOME>/puppet/
directory to obtain the Private PaaS Puppet scripts.cd <
PRIVATE_PAAS_HOME>
/puppet/
- Check the list of files.
ls
The output should be as follows:auth.conf autosign.conf fileserver.conf manifests modules puppet.conf
- Copy the Private PaaS Puppet scripts to the Puppet Master configurations directory as follows:
- Navigate to the
puppet
folder.cd /etc/puppet/
- Check the list of files in the
puppet
folder:ls
The output will be as follows:auth.conf autosign.conf fileserver.conf manifests modules puppet.conf templates
- Copy the content from the
/root/private-paas/puppet/manifests/
directory to the/etc/puppet/manifests/
directory.
For example:
cp -R /root/private-paas/puppet/manifests/* manifests/ - Copy the content from the
/root/private-paas/puppet/modules/
directory to the/etc/puppet/modules/
directory.
For example:cp -R /root/private-paas/puppet/modules/* modules/
- Check the list of files in the
/etc/puppet/manifests/
directory.ls
manifests/
The output should be as follows:nodes nodes.pp site.pp
- Check the list of files in the
/etc/puppet/modules/
directory.ls
modules/
The output should be as follows:agent apimanager appserver autoscaler bps cc cep esb is java lb manager messagebroker mysql nodejs php ruby stratos_base tomcat wordpress
- Navigate to the
Change the variables in the
base.pp
file accordingly.vi /etc/puppet/manifests/nodes/base.pp
#essential variables $package_repo = '' $local_package_dir = '/mnt/packs' $mb_ip = '10.4.128.9' $mb_port = '61616' $mb_type = 'activemq' $cep_ip = '10.4.128.9' $cep_port = '7611' $truststore_password = 'wso2carbon' $java_distribution = 'jdk-7u51-linux-x64.tar.gz' $java_name = 'jdk1.7.0_51' $member_type_ip = 'private' $lb_httpPort = '80' $lb_httpsPort = '443' $tomcat_version = '7.0.52' $enable_log_publisher = 'false'
- Enter the domain names that the master should automatically sign.
- Navigate to the
/etc/puppet/
directory.cd /etc/puppet/
- Add the domain names in the
autosign.conf
file and save the file. - You can view the contents of the
autosign.conf
file as follows:cat autosign.conf
Based on the example the output will be as follows:*.test.org
- Navigate to the
Download the Java distribution to the
/etc/puppet/modules/java/files/
directory. Define the Java distribution name and the unzipped folder name in thebase.pp
file, which is in the/etc/puppet/manifests/nodes/
directory, and save the file.$java_distribution = 'jdk-7u51-linux-x64.tar.gz' $java_name = 'jdk1.7.0_51'
To get support for 32 bits, download the Java 32 bits distribution and change the
$java_distribution
and$java_name
parameters in thebase.pp
file accordingly.Copy the Cartridge Agent distribution (
apache-stratos-cartridge-agent-4.0.0-wso2v1-bin.zip
), which is in the <PRIVATE_PAAS_HOME>
/source/products/cartridge-agent/
modules/distribution/target/
directory, to the/etc/puppet/modules/agent/files/
directory.Create a folder named
activemq
in the/etc/puppet/modules/agent/files/
directory.The name of the folder you create in this step depends on the value you entered in step 8 above, for the
Example: If the value you gave for themb_type
parameter.mb_type
parameter is 'activemq
', then you should create the name of this folder asactivemq
.- Navigate to the
/etc/puppet/modules/agent/files/
directory.cd /etc/puppet/modules/agent/files/
- Check the list of files in the folder:
ls
The output will be as follows:README.txt activemq apache-stratos-cartridge-agent-4.0.0-wso2v1-bin.zip
- Navigate to the
Download any dependency on 5.9.1 or any latest stable ActiveMQ TAR file from https://activemq.apache.org/download.html. The folder path of this file will be referred to as
<ACTIVEMQ_HOME>
. Copy the following ActiveMQ client JARs from<ACTIVEMQ_HOME>/lib/
directory to the/etc/puppet/modules/agent/files/activemq/
directory.activemq-broker-5.9.1.jar
activemq-client-5.9.1.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
hawtbuf-1.9.jar
- Navigate to the
/etc/puppet/modules/agent/files/
activemq
/ directory.cd /etc/puppet/modules/agent/files/activemq
- Check the list of files in the
puppet
folder:ls
The output will be as follows:README.txt activemq-broker-5.9.1.jar
activemq-client-5.9.1.jar geronimo-j2ee-management_1.1_spec-1.0.1.jar geronimo-jms_1.1_spec-1.1.1.jar hawtbuf-1.9.jar
Copy the Private PaaS Load Balancer distribution (
apache-stratos-load-balancer-4.0.0-wso2v1.zip
), which is in the<PRIVATE_PAAS_HOME>/source/products/load-balancer/modules/distribution/target/
directory, to the/etc/puppet/modules/lb/files/
directory.Repeat the above step 13 and step 14 to copy the ActiveMQ JAR files to the
/etc/puppet/modules/lb/files/
directory.- Based on the WSO2 cartridges that are being used, do the respective WSO2 cartridge configurations. For more information, see WSO2 cartridge configurations.
WSO2 cartridge configurations
DevOps need to carry out WSO2 product specific configurations in Puppet Master to configure the respective WSO2 cartridges. The product specific Puppet Master configurations are as follows:
Configuring WSO2 Enterprise Service Bus (ESB)
Download WSO2 ESB 4.8.1.
Copy the
wso2esb-4.8.1.zip
ZIP file to the/etc/puppet/modules/esb/files/
directory.Copy the MySQL connector JAR to the /
etc/puppet/modules/esb/files/configs/repository/components/lib/
directory.Copy the patch0008 folder, which is in the
<PRIVATE_PAAS_HOME>/patches/
directory, to the/etc/puppet/modules/esb/files/patches/repository/components/patches/
directory.Edit the following properties in the
esb.pp
file, which is in the/etc/puppet/manifests/nodes/
directory, according to your environment:ESB_CONFIG_DB, ESB_CONFIG_PATH
andCLUSTERING.
Edit the following properties in the
params.pp
file, which is in the/etc/puppet/modules/esb/manifests/
directory, according to your setup environment:ADMIN_USER,
ADMIN_PASSWORD,
DB_USER,
DB_PASSWORD,
REGISTRY_DB
andUSERSTORE_DB
Create the
esb_config
database as follows:Create a backup copy of the
config.sql
file, which is in the<PRIVATE_PAAS_HOME>/resources/dbscripts/
directory.Replace
CONFIG_DB_SCHEMA
withesb_config
in theconfig.sql
file. Note that there are two instances whereCONFIG_DB_SCHEMA
appears.Run the
config.sql
DB script.Delete the updated
config.sql
file and rename the backup file asconfig.sql
.
Configuring WSO2 Identity Server (IS)
Download WSO2 IS 5.0.0.
Copy the
wso2is-5.0.0.zip
ZIP file to the/etc/puppet/modules/is/files/
directory.Copy the MySQL connector JAR to the /
etc/puppet/modules/is/files/configs/repository/components/lib/
directory.Edit the following properties in the
is.pp
file, which is in the/etc/puppet/manifests/nodes/
directory, according to your environment:IS_CONFIG_DB, IS_CONFIG_PATH
andCLUSTERING.
Edit the following properties in the
params.pp
file, which is in the/etc/puppet/modules/is/manifests/
directory, according to your setup environment:ADMIN_USER,
ADMIN_PASSWORD,
DB_USER, DB_PASSWORD,
REGISTRY_DB
andUSERSTORE_DB
Create the
is_config
database as follows:Create a backup copy of the
config.sql
file, which is in the<PRIVATE_PAAS_HOME>/resources/dbscripts/
directory.Replace
CONFIG_DB_SCHEMA
withis_config
in theconfig.sql
file. Note that there are two instances whereCONFIG_DB_SCHEMA
appears.Run the
config.sql
DB script.Delete the updated
config.sql
file and rename the backup file asconfig.sql
.
Configuring WSO2 Business Process Server (BPS)
Download WSO2 BPS 3.2.0.
Copy the
wso2bps-3.2.0.zip
ZIP file to the/etc/puppet/modules/bps/files/
directory.Copy the MySQL connector JAR to the /
etc/puppet/modules/bps/files/configs/repository/components/lib/
directory.Copy the patch0008 folder, which is in the
<PRIVATE_PAAS_HOME>/patches/
directory, to the/etc/puppet/modules/bps/files/patches/repository/components/patches/
directory.Edit the following properties in the
bps.pp
file, which is in the/etc/puppet/manifests/nodes/
directory, according to your environment:BPS_CONFIG_DB, BPS_CONFIG_PATH
andCLUSTERING.
Edit the following properties in the
params.pp
file, which is in the/etc/puppet/modules/bps/manifests/
directory, according to your setup environment:ADMIN_USER, ADMIN_PASSWORD, DB_USER, DB_PASSWORD, REGISTRY_DB
andUSERSTORE_DB
Create the
bps_config
database as follows:Create a backup copy of the
config.sql
file, which is in the<PRIVATE_PAAS_HOME>/resources/dbscripts/
directory.Replace
CONFIG_DB_SCHEMA
withbps_config
in theconfig.sql
file. Note that there are two instances whereCONFIG_DB_SCHEMA
appears.Run the
config.sql
DB script.Delete the updated
config.sql
file and rename the backup file asconfig.sql
.
Configuring WSO2 Application Server (AS)
Download WSO2 AS 5.2.1.
Copy the
wso2as-5.2.1.zip
ZIP file to the/etc/puppet/modules/appserver/files/
directory.Copy the MySQL connector JAR to the /
etc/puppet/modules/appserver/files/configs/repository/components/lib/
directory.Copy the patch0008 folder, which is in the
<PRIVATE_PAAS_HOME>/patches/
directory, to the/etc/puppet/modules/appserver/files/patches/repository/components/patches/
directory.Edit the following properties in the
appserver.pp
file, which is in the/etc/puppet/manifests/nodes/
directory, according to your environment:AS_CONFIG_DB, AS_CONFIG_PATH
andCLUSTERING.
Edit the following properties in the
params.pp
file, which is in the/etc/puppet/modules/appserver/manifests/
directory, according to your setup environment:ADMIN_USER, ADMIN_PASSWORD, DB_USER, DB_PASSWORD, REGISTRY_DB
andUSERSTORE_DB
Configure SSO in Application Server as follows:
If you want to enable SSO in Application Server change the
SSO_DISABLED
property to false in theauthenticators.xml.erb
file, which is in the/etc/puppet/modules/appserver/templates/conf/security/
directory.Change the value of the
IDP_URL
parameter accordingly in theauthenticators.xml.erb
file, which is in the/etc/puppet/modules/appserver/templates/conf/security/
directory.
Create the
as_config
database as follows:Create a backup copy of the
config.sql
file, which is in the<PRIVATE_PAAS_HOME>/resources/dbscripts/
directory.Replace
CONFIG_DB_SCHEMA
withas_config
in theconfig.sql
file. Note that there are two instances whereCONFIG_DB_SCHEMA
appears.Run the
config.sql
DB script.Delete the updated
config.sql
file and rename the backup file asconfig.sql
.
Configuring WSO2 API Manager (AM)
Download WSO2 AM 1.7.0.
Copy the
wso2am-1.7.0.zip
ZIP file to the/etc/puppet/modules/apimanager/files/
directory.Copy the MySQL connector JAR to the /
etc/puppet/modules/apimanager/files/configs/repository/components/lib/
directory.Copy the patch0008 folder, which is in the
<PRIVATE_PAAS_HOME>/patches/
directory, to the/etc/puppet/modules/apimanager/files/patches/repository/components/patches/
directory.Edit the following properties in the
api.pp
file, which is in the/etc/puppet/manifests/nodes/
directory, according to your environment:GATEWAY_CONFIG_DB, STORE_CONFIG_DB, KEYMANAGER_CONFIG_DB, GATEWAY_CONFIG_PATH, STORE_CONFIG_PATH
andKEYMANAGER_CONFIG_PATH
Edit the following properties in the
params.pp
file, which is in the/etc/puppet/modules/apimanager/manifests/
directory, according to your setup environment:ADMIN_USER, ADMIN_PASSWORD, DB_USER, DB_PASSWORD, REGISTRY_DB, USERSTORE_DB, STATS_DB, APIM_DB
Create the
apim_db
database as follows:Change the value of the
APIM_DB_SCHEMA
property toapim_db,
in theapim.sql
file, which is the<PRIVATE_PAAS_HOME>/resources/dbscripts/
directory.Run the
apim.sql
DB script.Create the
apim_store_config
database as follows:Create a backup copy of the
config.sql
file, which is in the<PRIVATE_PAAS_HOME>/resources/dbscripts/
directory.Replace
CONFIG_DB_SCHEMA
withapi_store_config
in theconfig.sql
file. Note that there are two instances whereCONFIG_DB_SCHEMA
appears.Run the
config.sql
DB script.Delete the updated
config.sql
file and rename the backup file asconfig.sql
.Create the
apim_gateway_config
database as follows:Create a backup copy of the
config.sql
file, which is in the<PRIVATE_PAAS_HOME>/resources/dbscripts/
directory.Replace
CONFIG_DB_SCHEMA
withapim_gateway_config
in theconfig.sql
file. Note that there are two instances whereCONFIG_DB_SCHEMA
appears.Run the
config.sql
DB script.Delete the updated
config.sql
file and rename the backup file asconfig.sql
.Create the
apim_keymanager_config
database as follows:Create a backup copy of the
config.sql
file, which is in the<PRIVATE_PAAS_HOME>/resources/dbscripts/
directory.Replace
CONFIG_DB_SCHEMA
withapim_keymanager_config
in theconfig.sql
file. Note that there are two instances whereCONFIG_DB_SCHEMA
appears.Run the
config.sql
DB script.Delete the updated
config.sql
file and rename the backup file asconfig.sql
.