WSO2 API Manager 2.6.0 Puppet 5 Modules

This repository contains puppet modules for each profile relates to API Manager.

Quick Start Guide

  1. Download and copy the wso2am-linux-installer-x64-2.6.0.deb or/and wso2am-linux-installer-x64-2.6.0.rpm to the files directories in /etc/puppet/code/environments/dev/modules/__profile__/files in the Puppetmaster.
    Profile refers to each profile in API Manager.
    eg: /etc/puppet/code/environments/dev/modules/apim/files
    Dev refers to the sample environment that you can try these modules.

  2. Run necessary profile on puppet agent. More details on this are available in the following section.

Running API Manager Profiles in Puppet Agent

This section describes how to run each profile in a puppet agent. To find out more details about each profile refer API Manager Documentation - Product Profiles.

Default profile

export FACTER_profile=apim
puppet agent -vt

Gateway worker profile

export FACTER_profile=apim_gateway
puppet agent -vt

Key manager profile

export FACTER_profile=apim_km
puppet agent -vt

Traffice manager profile

export FACTER_profile=apim_tm
puppet agent -vt

API publisher profile

export FACTER_profile=apim_publisher
puppet agent -vt

API store profile

export FACTER_profile=apim_store
puppet agent -vt

Understanding the Project Structure

In this project each profle of API Manager is mapped to a module in puppet. By having this structure each puppet module is considered as a standalone profile so each module can be configured individually without harming any other module.

puppet-apim
├── manifests
│   └── site.pp
└── modules
    ├── apim
    │   ├── files
    │   │   └── ...
    │   ├── manifests
    │   │   ├── init.pp
    │   │   ├── custom.pp
    │   │   ├── params.pp
    │   │   └── startserver.pp
    │   └── templates
    │       └── ...
    ├── apim_gateway
    │   ├── files
    │   │   └── ...
    │   ├── manifests
    │   │   ├── init.pp
    │   │   ├── custom.pp
    │   │   ├── params.pp
    │   │   └── startserver.pp
    │   └── templates
    │       └── ...
    ├── apim_km
    │   ├── files
    │   │   └── ...
    │   ├── manifests
    │   │   ├── init.pp
    │   │   ├── custom.pp
    │   │   ├── params.pp
    │   │   └── startserver.pp
    │   └── templates
    │       └── ...
    ├── apim_publisher
    │   ├── files
    │   │   └── ...
    │   ├── manifests
    │   │   ├── init.pp
    │   │   ├── custom.pp
    │   │   ├── params.pp
    │   │   └── startserver.pp
    │   └── templates
    │       └── ...
    ├── apim_store
    │   ├── files
    │   │   └── ...
    │   ├── manifests
    │   │   ├── init.pp
    │   │   ├── custom.pp
    │   │   ├── params.pp
    │   │   └── startserver.pp
    │   └── templates
    │       └── ...
    └── apim_tm
        ├── files
        │   └── ...
        ├── manifests
        │   ├── init.pp
        │   ├── custom.pp
        │   ├── params.pp
        │   └── startserver.pp
        └── templates
            └── ...

Manifests in a module

Each puppet module contains following pp files

  • init.pp
    This contains the main script of the module.
  • custom.pp
    This is used to add custom user code to the profile.
  • params.pp
    This contains all the necessary parameters for main configurations and template rendering.
  • startserver.pp
    This runs finally and starts the server as a service.