This documentation is for WSO2 Private PaaS 4.0.0. View documentation for the latest release.
Configuring Puppet Master - WSO2 Private PaaS 4.0.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

Follow the instructions below to configure Puppet Master for Private PaaS on Debian/Ubuntu 12.04.1 LTS based Linux distributions:

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

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

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

    3. 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
    4. Navigate to the <PRIVATE_PAAS_HOME>/puppet/ directory to obtain the Private PaaS Puppet scripts. 
      cd <PRIVATE_PAAS_HOME>/puppet/
    5. 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

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

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

    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. 

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

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)

  1. Download WSO2 ESB 4.8.1.

  2. Copy the wso2esb-4.8.1.zip ZIP file to the /etc/puppet/modules/esb/files/ directory.

  3. Copy the MySQL connector JAR to the /etc/puppet/modules/esb/files/configs/repository/components/lib/ directory.

  4. 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.
  5. 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 and CLUSTERING.

  6. 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 and USERSTORE_DB

  7. Create the esb_config database as follows:

    1. Create a backup copy of the config.sql file, which is in the <PRIVATE_PAAS_HOME>/resources/dbscripts/ directory.

    2. Replace CONFIG_DB_SCHEMA with esb_config in the config.sql file. Note that there are two instances where CONFIG_DB_SCHEMA appears.

    3. Run the config.sql DB script.

    4. Delete the updated config.sql file and rename the backup file as config.sql.

Configuring WSO2 Identity Server (IS)

  1. Download WSO2 IS 5.0.0.

  2. Copy the wso2is-5.0.0.zip ZIP file to the /etc/puppet/modules/is/files/ directory.

  3. Copy the MySQL connector JAR to the /etc/puppet/modules/is/files/configs/repository/components/lib/ directory.

  4. 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 and CLUSTERING.

  5. 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 and USERSTORE_DB

  6. Create the is_config database as follows:

    1. Create a backup copy of the config.sql file, which is in the <PRIVATE_PAAS_HOME>/resources/dbscripts/ directory.

    2. Replace CONFIG_DB_SCHEMA with is_config in the config.sql file. Note that there are two instances where CONFIG_DB_SCHEMA appears.

    3. Run the config.sql DB script.

    4. Delete the updated config.sql file and rename the backup file as config.sql.

Configuring WSO2 Business Process Server (BPS)

  1. Download WSO2 BPS 3.2.0.

  2. Copy the wso2bps-3.2.0.zip ZIP file to the /etc/puppet/modules/bps/files/ directory.

  3. Copy the MySQL connector JAR to the /etc/puppet/modules/bps/files/configs/repository/components/lib/ directory.

  4. 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.
  5. 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 and CLUSTERING.

  6. 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 and USERSTORE_DB

  7. Create the bps_config database as follows:

    1. Create a backup copy of the config.sql file, which is in the <PRIVATE_PAAS_HOME>/resources/dbscripts/ directory.

    2. Replace CONFIG_DB_SCHEMA with bps_config in the config.sql file. Note that there are two instances where CONFIG_DB_SCHEMA appears.

    3. Run the config.sql DB script.

    4. Delete the updated config.sql file and rename the backup file as config.sql.

Configuring WSO2 Application Server (AS)

  1. Download WSO2 AS 5.2.1.

  2. Copy the wso2as-5.2.1.zip ZIP file to the /etc/puppet/modules/appserver/files/ directory.

  3. Copy the MySQL connector JAR to the /etc/puppet/modules/appserver/files/configs/repository/components/lib/ directory.

  4. 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.
  5. 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 and CLUSTERING.

  6. 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 and USERSTORE_DB

  7. Configure SSO in Application Server as follows:

    1. If you want to enable SSO in Application Server change the SSO_DISABLED property to false in the authenticators.xml.erb file, which is in the /etc/puppet/modules/appserver/templates/conf/security/ directory.

    2. Change the value of the IDP_URL parameter accordingly in the authenticators.xml.erb file, which is in the /etc/puppet/modules/appserver/templates/conf/security/ directory.

  8. Create the as_config database as follows:

    1. Create a backup copy of the config.sql file, which is in the <PRIVATE_PAAS_HOME>/resources/dbscripts/ directory.

    2. Replace CONFIG_DB_SCHEMA with as_config in the config.sql file. Note that there are two instances where CONFIG_DB_SCHEMA appears.

    3. Run the config.sql DB script.

    4. Delete the updated config.sql file and rename the backup file as config.sql.

Configuring WSO2 API Manager (AM)

  1. Download WSO2 AM 1.7.0.

  2. Copy the wso2am-1.7.0.zip ZIP file to the /etc/puppet/modules/apimanager/files/ directory.

  3. Copy the MySQL connector JAR to the /etc/puppet/modules/apimanager/files/configs/repository/components/lib/ directory.

  4. 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.
  5. 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 and KEYMANAGER_CONFIG_PATH

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

  7. Create the apim_db database as follows:

    1. Change the value of the APIM_DB_SCHEMA property to apim_db, in the apim.sql file, which is the <PRIVATE_PAAS_HOME>/resources/dbscripts/ directory.

    2. Run the apim.sql DB script.

  8. Create the apim_store_config database as follows:

    1. Create a backup copy of the config.sql file, which is in the <PRIVATE_PAAS_HOME>/resources/dbscripts/ directory.

    2. Replace CONFIG_DB_SCHEMA with api_store_config in the config.sql file. Note that there are two instances where CONFIG_DB_SCHEMA appears.

    3. Run the config.sql DB script.

    4. Delete the updated config.sql file and rename the backup file as config.sql.

  9. Create the apim_gateway_config database as follows:

    1. Create a backup copy of the config.sql file, which is in the <PRIVATE_PAAS_HOME>/resources/dbscripts/ directory.

    2. Replace CONFIG_DB_SCHEMA with apim_gateway_config in the config.sql file. Note that there are two instances where CONFIG_DB_SCHEMA appears.

    3. Run the config.sql DB script.

    4. Delete the updated config.sql file and rename the backup file as config.sql.

  10. Create the apim_keymanager_config database as follows:

    1. Create a backup copy of the config.sql file, which is in the <PRIVATE_PAAS_HOME>/resources/dbscripts/ directory.

    2. Replace CONFIG_DB_SCHEMA with apim_keymanager_config in the config.sql file. Note that there are two instances where CONFIG_DB_SCHEMA appears.

    3. Run the config.sql DB script.

    4. Delete the updated config.sql file and rename the backup file as config.sql.

  • No labels