This documentation is for WSO2 Private PaaS 4.0.0. View documentation for the latest release.
Page Comparison - Configuring Puppet Master (v.2 vs v.3) - WSO2 Private PaaS 4.0.0 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Get root access.
    sudo -i
  2. Install Git. 
    apt-get install git 
  3. Obtain the Puppet Master installation script. This will create a folder named puppetinstall. 
    git clone https://github.com/thilinapiy/puppetinstall 
     
  4. Navigate to the  puppetinstall folder using the following command: 
    cd puppetinstall
  5. Install Puppet Master (v3) as follows:
    1. 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"
    2. Anchor
      hostname
      hostname
      Execute the hostname command. This will show that your system hostname has been modified.
       

      For example:
       puppet.test.org 
    3. 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:

      Code Block
      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
  6. Obtain the Private PaaS Puppet scripts as follows:
    1. Navigate to the home folder (or a folder of your choice).
      cd
    2. 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

      Info

       Make sure that you have setup Git properly. For more information, go to Getting Started with Git.

    3. Navigate to the <PRIVATE_PAAS_HOME>/ directory.
      cd PRIVATE_PAAS_HOME

    4. 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
    5. Obtain the Private PaaS Puppet scripts. 
      git clone https://github.com/wso2/private-paas.git  
    6. Navigate to the <PRIVATE_PAAS_HOME>/puppet/ directory to obtain the Private PaaS Puppet scripts. 
      cd <PRIVATE_PAAS_HOME>/puppet/
    7. Check the list of files.
      ls 
        
      The output should be as follows: 
      auth.conf  autosign.conf  fileserver.conf   manifests   modules  puppet.conf
  7. Copy the Private PaaS Puppet scripts to the Puppet Master configurations directory as follows:
    1. Navigate to the puppet folder.
      cd /etc/puppet/ 
    2. 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 
       
    3. 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/
    4. 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/ 
    5. Check the list of files in the /etc/puppet/manifests/ directory. 
      ls 
       manifests/ 
      The output should be as follows:
      nodes  nodes.pp  site.pp 
    6. 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
  8. Change the variables in the base.pp file accordingly.   
      vi /etc/puppet/manifests/nodes/base.pp

    Code Block
      #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'
  9. Enter the domain names that the master should automatically sign.
    1. Navigate to the /etc/puppet/ directory.
      cd /etc/puppet/  
    2. Add the domain names in the autosign.conf file and save the file.
    3. 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  
  10. Download the Java distribution to the /etc/puppet/modules/java/files/ directory.  Define the Java distribution name and the unzipped folder name in the base.pp file, which is in the /etc/puppet/manifests/nodes/ directory, and save the file.

    Code Block
    $java_distribution    = 'jdk-7u51-linux-x64.tar.gz'
    $java_name            = 'jdk1.7.0_51'
    Info

    To get support for 32 bits, download the Java 32 bits distribution and change the $java_distribution and $java_name parameters in the base.pp file accordingly.

  11. 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.

  12. Create a folder named activemq in the /etc/puppet/modules/agent/files/ directory.

    Info

    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.

    Example: If the value you gave for the mb_type parameter is ' activemq', then you should create the name of this folder as activemq.
    1. Navigate to the /etc/puppet/modules/agent/files/ directory.
      cd /etc/puppet/modules/agent/files/
    2. 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
  13. Download any dependency on 5.9.1 or any latest stable ActiveMQ TAR file from https://activemq.apache.org/download.htmlThe 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. 

    Info
    • 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

    1. Navigate to the /etc/puppet/modules/agent/files/activemq/ directory.
      cd /etc/puppet/modules/agent/files/activemq
    2. 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
  14. 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.  

  15. Repeat the above step 13 and step 14 to copy the ActiveMQ JAR files to the /etc/puppet/modules/lb/files/directory.

  16. Based on the WSO2 cartridges that are being used, do the respective WSO2 cartridge configurations. For more information, see WSO2 cartridge configurations.

...