Follow the instructions below to configure Puppet Master for Apache Stratos on Debian/Ubuntu 12.04.1 LTS based Linux distributions:
sudo -i
apt-get install git
puppetinstall.
git clone https://github.com/thilinapiy/puppetinstall
puppetinstall
folder using the following command: cd puppetinstall
./puppetinstall -m -d <PUPPETMASTER-DOMAIN>
-s <PUPPET-MASTER-IP>
./puppetinstall -m -d test.org
Installation completed successfully
"hostname
command. This will show that your system hostname has been modified. 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
Clone the Apache Stratos Git repository to a folder of your choice. The location of the extracted source will be referred to as <STRATOS_SOURCE_HOME>
.git clone https://git-wip-us.apache.org/repos/asf/stratos.git
<LOCAL_FOLDER_NAME>
For example: git clone https://git-wip-us.apache.org/repos/asf/stratos.git STRATOS_SOURCE_HOME
Make sure that you have setup Git properly. For more information, go to Getting Started with Git.
Navigate to the <STRATOS_SOURCE_HOME>/
directory.cd STRATOS_SOURCE_HOME
git checkout -b <REMOTE_BRANCH/TAG> <LOCAL_BRANCH>
git checkout -b 4.0.0 4.0.0
stratos>/tools/puppet3/
directory to obtain the Puppet scripts. cd stratos/tools/puppet3/
ls
auth.conf autosign.conf fileserver.conf manifests modules puppet.conf
puppet
folder. cd /etc/puppet/
puppet
folder:ls
The output will be as follows: auth.conf autosign.conf fileserver.conf manifests modules puppet.conf templates
/root/stratos/tools/puppet3/manifests/
directory to the /etc/puppet/manifests/
directory.
cp -R /root/stratos/tools/puppet3/manifests/* manifests/
Copy the content from the /root/stratos/tools/puppet3/modules/
directory to the /etc/puppet/modules/
directory.
For example: cp -R /root/stratos/tools/puppet3/modules/* modules/
/etc/puppet/manifests/
directory. ls
manifests/
nodes.pp site.pp
/etc/puppet/modules/
directory. ls
modules/
nodejs php ruby tomcat wordpress
Change the variables in the nodes.pp
file accordingly.
vi /etc/puppet/manifests/nodes.pp
#following directory is used to store binary packages $local_package_dir = '/mnt/packs' # Stratos message broker IP and port $mb_ip = '10.4.128.12' $mb_port = '61616' $mb_type = 'activemq' # Stratos CEP IP and port $cep_ip = '10.4.128.10' $cep_port = '7611' # Stratos Cartridge Agent’s trust store password $truststore_password = 'wso2carbon'
/etc/puppet/
directory.cd /etc/puppet/
autosign.conf
file and save the file.autosign.conf
file as follows:cat autosign.conf
*.test.org
Download a Java distribution and define the Java distribution in the /etc/puppet/manifests/
directory.
Create the files
folder in the /etc/puppet/modules/java/
directory.
mkdir /etc/puppet/modules/java/files
Download the Java distribution to the /etc/puppet/modules/java/files/
directory. Define the Java distribution name and the unzipped folder name in the nodes.pp
file, which is in the /etc/puppet/manifests/
directory, and save the file.
$java_distribution = 'jdk-7u7-linux-x64.tar.gz' $java_name = 'jdk1.7.0_07'
To get support for 32 bits, download the Java 32-bit distribution and change the $java_distribution
parameter in the nodes.pp
file accordingly.
Copy the Cartridge Agent distribution (apache-stratos-cartridge-
agent-4.0.0.zip
), which is in the <STRATOS_HOME>/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 mb_type
parameter.
mb_type
parameter is activemq
, then you should create the name of this folder as activemq
./etc/puppet/modules/agent/files/
directory. cd /etc/puppet/modules/agent/files/
puppet
folder:ls
The output will be as follows: activemq apache-stratos-cartridge-agent-4.0.0.zip
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 JARSs 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
/etc/puppet/modules/agent/files/
activemq/
directory.cd /etc/puppet/modules/agent/files/activemq
puppet
folder:ls
The output will be as follows: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 Apache Stratos Load Balancer distribution (apache-stratos-load-balancer-
4.0.0.zip
), which is in the <source-home>/products/load-balancer/modules/distribution/target/
directory, to the /etc/puppet/modules/lb/files/
directory.
Repeat steps 13 and step 14 to copy the ActiveMQ JAR files to the /etc/puppet/modules/lb/files/
directory.