WSO2 App Factory uses a collection of products such as WSO2 ELB, WSO2 API Manager, WSO2 Application Server, WSO2 Storage Server, GitBlit, Jenkins etc. To make it easier for you to set up all of these products and configure them to collaborate, we provide a set of puppet scripts. Puppet is an IT automation software that helps system administrators to manage infrastructure throughout its lifecycle.
We configure a Puppet Master, which is a server that collaborates with a set of puppet agents where different products are set up. The number of puppet agents you want in your environment depends on infrastructure.
Be sure to use Puppet Master version 3.7 or above.
The following topics explain how to configure the environment:
Setting up the Puppet Master
The steps below explain how to set up the Puppet Master.
- Log in to the server where you intend to set up the Puppet Master as root user.
Get the checkout from this Git repository to /home/<user>/puppetsource/.
Download Puppet Master version 3.7. or above from https://puppetlabs.com.
- Install the Puppet Master packages with command
apt-get install puppetmaster. If you want to stop the Puppet Master, the command is
Change the following configuration files in Puppet Master installation.
File Configuration /etc/default/puppetmaster /etc/puppet/puppet.conf
Set the server's host name to puppet.wso2.example.com and add the host to
/etc/hostnamefile as follows:
hostname > /etc/hostname
Starting the Puppet Master with the following command:
- Install apache file server using the following command:
apt-get install apache2
We need this file server to manage the distribution packs of all products involved in an App Factory deployment, such as WSO2 App Factory, API Manager, ELB, application Server etc.
- Create a folder named
softwareinside the apache document root (/var/www) and download the following distribution packs to the
If you prefer to have the
software folder in a different location other than the apache document root, change the
<DocumentRoot> element as
You have now completely set up the Puppet Master. Next, let's set up Puppet Agents in separate servers.
Customizing the puppet scripts
Please note that you have to do the following configurations on the nodes.pp file(which is located on <puppet_source>/appfactory/manifests/ directory).
- Configure the following in the 'basenode' section.
Configure package repository URL. Puppet will use this repository URL to download all the packs it requires. This location should contain the following packs.
Local package directory. This is where the packs will be copied in the agent node.
Domain name. This will be the domain name used in the setup.
Host entries. These are the host entries of the servers. Please note that you have to configure them before the setup.
- Configure the following in the 'confignode' section.
MySQL connection details. Please note that we have used 2 MySQL server domains for config and governance registry databases. In this deployment, we point both of these to a single MySQL server.
Default user name and password.
WSO2 Private PaaS configurations. These are the configurations of the cartridge base image and the OpenStack endpoints and credentials. These information will be used when spawning new AppServer instances for artifact deployment.
Change the node name regular expressions to match the host name of the servers. For example change the "/appfactory/" in the following configuration to match the host name of the target server.
If you are using a different OpenStack environment for Private PaaS cartridges please do these additional configurations
Change the "s2gitblit_server" parameter of the AppFactory node configuration section. Please note that the public IP of the s2gitblit server is passed from this parameter.
Change the "server_ip" parameter of the s2gitblit node configuration section. Please note that the public IP of s2gitblit server is passed from this parameter.