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

Running on a Virtual Machine

Follow the steps given below to run a WSO2 product as a service on Private PaaS, which runs on a Virtual machine:

 

Step 1: Deploying Private PaaS on a preferred IaaS

For more information on deploying Private PaaS, see deploying PPaaS on a preferred IaaS.

 

Step 2: Building the Template Modules

  1. Download the respective product cartridge from the PPaaS product page on the WSO2 website.

  2. Navigate to the Template Module.

    cd <TEMPLATE_MODULE_PATH>

    Example: 

    cd <DAS_CARTRIDGE_HOME>/templates-module
  3. Build the Template Module.

    mvn clean install

 

Step 3: Configuring the Puppet Master

Follow the steps giving below to configure Puppet Master for WSO2 cartridges:

To set up Puppet Master, it is not mandatory to configure the modules mentioned below. The following are required only when configuring the servers that are being used by the respective application.

Example: If the ESB cartridge is the only cartridge that is being used in the application, you are only required to set up the modules related to ESB. 

  1. Copy the respective product pack in the .zip format to the packs folder, which is in the /etc/puppet/modules/wso2installer/files/<SERVER_NAME> directory. 
    Example: When configuring ESB, navigate to the /etc/puppet/modules/wso2installer/files/wso2esb481/packs directory.

    You can download the product pack from the respective products download page.

    Example: Download ESB from here.

  2. Download the respective WSO2 product cartridge via the PPaaS product page and unzip it. The unzipped folder will be referred to as <CARTRIDGE_HOME>.
    For example, to download the ESB cartridge, navigate to the PPaaS product page and click Cartridges > wso2esb-4.8.1-cartridge-4.1.1.

  3. Copy the respective template module ZIP file, which is in the <CARTRIDGE_HOME>/templates-module/target directory to the /etc/puppet/modules/wso2installer/files/<SERVER_NAME>/packs directory.

  4. Change the file permission value, for content in the /etc/puppet/modules/wso2installer/files/<SERVER_NAME>/packs directory, to 0755.

    chmod 755 <server_pack>.zip 
    chmod 755 <template_module>.zip 
  5. Download the Python Cartridge Agent (PCA) plugin, via the PPaaS product page, and copy the downloaded ZIP file to the /etc/puppet/modules/wso2installer/files/<SERVER_NAME>/plugins directory.

  6. Change the file permission of the content in the /etc/puppet/modules/wso2installer/files/<SERVER_NAME>/plugins directory to 0755

    chmod 755 wso2esb-481-startup-handler.py 
    chmod 755 wso2esb-481-startup-handler.yapsy-plugin 
  7. Update the respective entry in nodes.pp file, which is in the /etc/puppet/manifests/nodes/nodes.pp directory with the following server variables.
    Example: If you are updating the ESB server, you can update the file as follows:

    # ESB cartridge node
    node /[0-9]{1,12}.*wso2esb-481/ inherits base {
    
      class { 'java': }
      class { 'python_agent':}
      class { 'configurator': }
      class {'wso2installer':
        server_name       => 'wso2esb-4.8.1',
        module_name       => 'wso2esb481'
      }
    }

 Click here to view the Puppet Master folder structure.
/etc/puppet
|-- auth.conf
|-- autosign.conf
|-- environments
|   `-- example_env
|       |-- manifests
|       |-- modules
|       `-- README.environment
|-- fileserver.conf
|-- manifests
|   |-- nodes
|   |   |-- base.pp
|   |   `-- nodes.pp
|   `-- site.pp
|-- modules
|   |-- configurator
|   |   |-- files
|   |   |   `-- ppaas-configurator-4.1.0.zip
|   |   `-- manifests
|   |       `-- init.pp
|   |-- java
|   |   |-- files
|   |   |   |-- jdk-7u80-linux-x64.tar.gz
|   |   |   `-- README
|   |   |-- manifests
|   |   |   `-- init.pp
|   |   `-- templates
|   |       `-- java_home.sh.erb
|   |-- ppaas_base
|   |   `-- manifests
|   |       `-- init.pp
|   |-- python_agent
|   |   |-- files
|   |   |   |-- apache-stratos-python-cartridge-agent-4.1.3.zip
|   |   |   |-- README.txt
|   |   |   `-- start_agent.sh
|   |   |-- manifests
|   |   |   |-- copy_plugins.pp
|   |   |   |-- initialize.pp
|   |   |   |-- init.pp
|   |   |   |-- push_templates.pp
|   |   |   |-- remove_templates.pp
|   |   |   `-- start.pp
|   |   `-- templates
|   |       |-- agent.conf.erb
|   |       `-- logging.ini.erb
|   `-- wso2installer
|       |-- files
|       |   `-- wso2esb481
|       |       |-- packs
|       |       |   |-- README
|       |       |   |-- wso2esb-4.8.1-template-module-4.1.0.zip
|       |       |   `-- wso2esb-4.8.1.zip
|       |       `-- plugins
|       |           |-- README
|       |           |-- wso2esb-481-startup-handler.py
|       |           `-- wso2esb-481-startup-handler.yapsy-plugin
|       `-- manifests
|           `-- init.pp
|-- puppet.conf
`-- templates

 

Step 4: Creating product specific databases

It is mandatory to create the registry database for all products.

Example:

mysql> create database regdb;
mysql> use regdb;
mysql> source <APIM_HOME>/dbscripts/mysql.sql;
mysql> grant all on regdb.* TO username@localhost identified by "password";

Create the database (or databases depending on the requirement) using the following commands, where <PRODUCT_HOME> is the path to any of the product instances you installed, and specify the username and password.

About using MySQL in different operating systems

For users of Microsoft Windows, when creating the database in MySQL, it is important to specify the character set as latin1. Failure to do this may result in an error (error code: 1709) when starting your cluster. This error occurs in certain versions of MySQL (5.6.x) and is related to the UTF-8 encoding. MySQL originally used the latin1 character set by default, which stored characters in a 2-byte sequence. However, in recent versions, MySQL defaults to UTF-8 to be friendlier to international users. Hence, you must use latin1 as the character set as indicated below in the database creation commands to avoid this problem. Note that this may result in issues with non-latin characters (like Hebrew, Japanese, etc.). The following is how your database creation command should look.

mysql> create database <DATABASE_NAME> character set latin1;

For users of other operating systems, the standard database creation commands will suffice. For these operating systems, the following is how your database creation command should look.

mysql> create database <DATABASE_NAME>;
 Click here to see an example.

You will need to create 3 databases for API Manager as shown below:

mysql> create database apimgtdb;
mysql> use apimgtdb;
mysql> source <APIM_HOME>/dbscripts/apimgt/mysql.sql;
mysql> grant all on apimgtdb.* TO username@localhost identified by "password";
 
 
mysql> create database userdb;
mysql> use userdb;
mysql> source <APIM_HOME>/dbscripts/mysql.sql;
mysql> grant all on userdb.* TO username@localhost identified by "password";
 
 
mysql> create database regdb;
mysql> use regdb;
mysql> source <APIM_HOME>/dbscripts/mysql.sql;
mysql> grant all on regdb.* TO username@localhost identified by "password";

Ensure that MySQL is configured so that all nodes can connect to it.

 

Step 5: Configuring the artifact JSON files

  • Cartridge JSON
    Configure the following parameters in the cartridge JSON file:
    • Ensure that the imageId under the iaasProvider is the same as the Docker image you created, If you are running Private PaaS on Kubernetes. 
    • Update the datasource configurations under properties.

      Update the datasource configurations for all cartridge JSON files that run on all IaaS, except the Mock IaaS.

       Datasource configurations.
      {
        "name": "payload_parameter.CONFIG_PARAM_REGISTRY_DB_URL",
        "value": "jdbc:mysql://192.168.30.7:3306/stratos_reg_db?autoReconnect=true"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_REGISTRY_DB_USER_NAME",
        "value": "<USER_NAME>"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_REGISTRY_DB_PASSWORD",
        "value": "<PASSWORD>"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_CONFIG_DB_URL",
        "value": "jdbc:mysql://192.168.30.7:3306/config_db_esb?autoReconnect=true"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_CONFIG_DB_USER_NAME",
        "value": "<USER_NAME>"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_CONFIG_DB_PASSWORD",
        "value": "<PASSWORD>"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_USER_MGT_DB_URL",
        "value": "jdbc:mysql://192.168.30.7:3306/stratos_user_db?autoReconnect=true"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_USER_MGT_DB_USER_NAME",
        "value": "<USER_NAME>"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_USER_MGT_DB_PASSWORD",
        "value": "<PASSWORD>"
      }

      Example:

      {
        "name": "payload_parameter.CONFIG_PARAM_REGISTRY_DB_URL",
        "value": "jdbc:mysql://192.168.30.7:3306/stratos_reg_db?autoReconnect=true"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_REGISTRY_DB_USER_NAME",
        "value": "root"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_REGISTRY_DB_PASSWORD",
        "value": "root"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_CONFIG_DB_URL",
        "value": "jdbc:mysql://192.168.30.7:3306/config_db_esb?autoReconnect=true"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_CONFIG_DB_USER_NAME",
        "value": "root"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_CONFIG_DB_PASSWORD",
        "value": "root"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_USER_MGT_DB_URL",
        "value": "jdbc:mysql://192.168.30.7:3306/stratos_user_db?autoReconnect=true"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_USER_MGT_DB_USER_NAME",
        "value": "root"
      },
      {
        "name": "payload_parameter.CONFIG_PARAM_USER_MGT_DB_PASSWORD",
        "value": "root"
      }
  • Network Partition JSON
    Configuring the network partition is optional. Define the load balancer port IPs under property.
  • Application JSON
    If the application is a single tenant application, ensure to define the artifact repository details in subscribableInfo, under the artifactRepository section, of the application JSON definition.
    Example:

    "artifactRepository":{  
       "privateRepo":false,
       "repoUrl":"https://github.com/lakwarus/single-cartridge.git",
       "repoUsername":"",
       "repoPassword":""
    }

    By subscribing to an application you can deploy custom application artifacts in Private PaaS .

  • Application Sign Up JSON
    Sign up to the application if the application is a multi-tenant application.

    For more information see, signing up to an application.

 

Step 6: Deploying WSO2 products on Private PaaS

  1. Navigate to the application directory of the preferred WSO2 product.

    cd <CARTRIDGE_HOME>/samples/applications/<SERVER_NAME>-<VERSION>-application/scripts/<IAAS>

    Example:

    cd <DAS3.0.0_CARTRIDGE_HOME>/samples/applications/wso2das-300-application/scripts/mock
  2. Deploy the application.

    ./deploy.sh

What's next?

After you have configured the respective WSO2 products to run on PPaaS, you can access the application instances deployed in PPaaS.

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