com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Configuring PPaaS

Follow the instructions below to configure PPaaS:

Some steps are marked as optional as they are not applicable to all IaaS.
Therefore, only execute the instructions that correspond to the IaaS being used!

Step 1 - Install Prerequisites

Ensure that the following prerequisites have been met based on your environment and IaaS.

  1. Install the prerequisites listed below.

    • Oracle Java SE Development Kit (JDK)

    • Apache ActiveMQ

    For more information on the prerequisites, see Prerequisites.

  2. Download the Private PaaS binary distribution from the PPaaS product page and unzip it.

 

Step 2 - Setup a Kubernetes Cluster (Optional)

This step is only mandatory if you are using Kubernetes.

You can setup a Kubernetes cluster using one of the following approaches:

 Click here to instructions...

Step 3 - Setup Puppet Master (Optional)

This step is only mandatory if you are deploying PPaaS on a Virtual Machine (e.g., EC2, OpenStack, GCE).

Puppet is an open source configuration management utility. In Private PaaS, Puppet has been used as the orchestration layer. Private PaaS does not have any templates, configurations in puppet, it consists only of the product distributions. Puppet acts as a file server while the Configurator does the configuration in runtime.

Follow the instructions below to setup the Puppet Master.

Step 1 - Configure Puppet Master

 Click here to instructions...

Follow steps given below to install Puppet Master on Ubuntu:

  1.  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
  2. Install the downloaded distribution package.

    sudo dpkg -i puppetlabs-release-<CODE_NAME>.deb  
  3. Install Puppet Master.

    sudo apt-get update
    sudo apt-get install puppetmaster
  4. Install Passenger with Apache.

    For more information, see Install Apache and Passenger.

  5. Change the Ubuntu hostname. Please follow the steps given below to change the Ubuntu hostname:
    1. Update the /etc/hosts file.

      sudo echo "127.0.0.1 puppet.test.org" >> /etc/hosts
    2. Change the value of the hostname.

      sudo hostname puppet.test.org
  6. Add the following entry to the /etc/puppet/autosign.conf file:

     

    *.test.org
  7.  Add the server=puppet.test.org line to the puppet.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
  8. Restart the Puppet Master.

    /etc/init.d/puppetmaster restart
  9. Download the VM Tools by navigating to the following path via the PPaaS product page.

    Cartridges > common > wso2ppaas-vm-tools-4.1.1

  10. Copy and replace the content in the Puppet Master's /etc/puppet folder with the content in the <VM_TOOLS>/Puppet directory.

  11. Configure the mandatory modules.

Mandatory modules

It is mandatory to configure the following modules when configuring Puppet Master for PPaaS:


Python Cartridge Agent Module
  1. Download the Cartridge Agent via the PPaaS product page.

  2. Copy the downloaded apache-stratos-python-cartridge-agent-4.1.4.zip  to the /etc/puppet/modules/python_agent/files directory.

  3. Change the file permission value, of the apache-stratos-python-cartridge-agent-4.1.4.zip file, to 0755.

    chmod 755 apache-stratos-python-cartridge-agent-4.1.4.zip
  4. 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 the PUPPET_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 the base.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
  1. Copy the downloaded jdk-7u72-linux-x64.tar.gz file to the files folder, which is in the /etc/puppet/modules/java directory. 

    You can download jdk-7u72-linux-x64.tar.gz from here.

  2. Change file permission value, of the jdk-7u72-linux-x64.tar.gz file, to 0755.

    chmod 755 jdk-7u72-linux-x64.tar.gz
  3. 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
  1. Download the Configurator by navigating to the following path via the PPaaS product page.

    Cartridges > common > wso2ppaas-configurator-4.1.1

  2. Copy the Configurator (ppaas-configurator-4.1.1.zip) to the /etc/puppet/modules/configurator/files directory.
  3. Change the file permission value, of the ppaas-configurator-4.1.1.zip file, to 0755.

    chmod 755 ppaas-configurator-4.1.1.zip
  4.  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'


 

 

Step 2 - Update the cartridge-config.properties file

Update the values of the following parameters in the cartridge-config.properties file, which is in the <PRIVATE_PAAS_HOME>/repository/conf directory.

The values are as follows:

  • [PUPPET_IP] - The IP address of the running Puppet instance.

  • [PUPPET_HOST_NAME] - The host name of the running Puppet instance.

 

Step 4 - Create a cartridge base image (Optional)

This step is only mandatory if you are deploying PPaaS on a Virtual Machine (e.g., EC2, OpenStack, GCE).

 

Step 5 - Disable the mock IaaS

Mock IaaS is enabled by default. Therefore, if you are running PPaaS on another IaaS, you need to disable the Mock IaaS.

Follow the instructions below to disable the Mock IaaS:

  1. Navigate to the <PRIVATE_PAAS_HOME>/repository/conf/mock-iaas.xml file and disable the Mock IaaS.

    <mock-iaas enabled="false">
  2. Navigate to the <PRIVATE_PAAS_HOME>/repository/deployment/server/webapps directory and delete the mock-iaas.war file. 

    When Private PaaS is run the mock-iaas.war is extracted and the mock-iaas folder is created. Therefore, if you have run PPaaS previously, delete the  mock-iaas folder as well.

 

Step 6 - Carryout additional IaaS configurations (Optional)

This step is only applicable if you are using GCE.

When working on GCE carryout the following instructions:

  1. Create a service group.
  2. Add a firewall rule.

Step 7 - Configure the Cloud Controller (Optional)

This step is only mandatory if you are deploying PPaaS on a Virtual Machine (e.g., EC2, OpenStack, GCE).

 Click here to instructions...

Follow the instructions given below to configure the Cloud Controller (CC):

  1. Configure the IaaS provider details based on the IaaS.
    You need to configure details in the  <PRIVATE_PAAS_HOME>/repository/conf/cloud-controller.xml file and comment out the IaaS provider details that are not being used.  

  2. Update the values of the MB_IP and MB_PORT in the jndi.properties file, which is in the <PRIVATE_PAAS_HOME>/repository/conf directory. 

    The default value of the message-broker-port= 61616.

    The values are as follows:

    • MB_IP: The IP address used by ActiveMQ.

    • MB_PORT: The port used by ActiveMQ.
    connectionfactoryName=TopicConnectionFactory
    java.naming.provider.url=tcp://[MB_IP]:[MB_Port]
    java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

 

Step 8 - Define the Message Broker IP (Optional)

This step is only mandatory if you have setup the Message Broker (MB), in this case ActiveMQ, in a separate host.

If you have setup ActiveMQ, which is the PPaaS Message Broker, in a separate host you need to define the Message Broker IP, so that the MB can communicate with PPaaS.

 Click here to instructions...

Update the value of the  MB_IP  in the  JMSOutputAdaptor  file, which is in the  <PRIVATE_PAAS_HOME>/repository/deployment/server/outputeventadaptors  directory.

 

[MB_IP]: The IP address used by ActiveMQ.
<property name="java.naming.provider.url">tcp://[MB_IP]:61616</property>
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.