Deploying Private PaaS Locally with Mock IaaS
The Mock IaaS feature in Private PaaS simulates the basic features that it requires from an IaaS. Thereby, providing a cost effective way of trying out Private PaaS. The WSO2 Private PaaS can be installed with the Mock IaaS either on a single Java virtual machine (JVM) or in a distributed setup using multiple JVMs.
The Mock IaaS is started in a distributed setup only when testing Private PaaS products in a clustering setup.
- Install Private PaaS with the Mock IaaS in a single JVM setup
- Install Private PaaS with the Mock IaaS in a distributed setup
Install Private PaaS with the Mock IaaS in a single JVM setup
Follow the instructions below to install Private PaaS with the Mock IaaS in a single JVM setup:
Ensure that all the following prerequisites have been met based on your environment and IaaS.
You only need to install Maven, JDK, Git and Apache ActiveMQ when working on a Mock IaaS.
Install the required applications and set the Maven environment variable.
Download the Private PaaS binary distribution (
wso2ppaas-x.x.x.zip
wherex.x.x
is the version of the product) and unzip it.You can access the binary distribution by using any of the following methods:
Method 1 - Download the Private PaaS binary distribution from here and unzip it.
This method is recommend.
Methods 2 - Build the Private PaaS source to obtain the binary distribution and unzip it.
Start ActiveMQ.
Follow the steps given below to start ActiveMQ:
Download and unzip ActiveMQ.
Navigate to the
<ACTIVEMQ_HOME>/bin
directory, which is in the unzipped ActiveMQ distribution.Run the following command to start ActiveMQ.
./activemq start
Navigate to the
<PRIVATE_PAAS_HOME>/bin
directory, which is in the unzipped Private PaaS distribution.cd <PRIVATE_PAAS_HOME>/bin/
Start the Private PaaS Server.
./wso2server.sh
Install Private PaaS with the Mock IaaS in a distributed setup
The Mock IaaS is started in a distributed setup only when it is needed to test clustering. When Mock IaaS is started in a distributed setup, Private PaaS Manager (SM), Cloud Controller (CC), Auto-scaler (AS) and the Mock IaaS are started on separate servers. Follow the instructions below to install Private PaaS with the Mock IaaS in a distributed setup, which utilizes multiple Java virtual machines (JVMs):
Ensure that all the following prerequisites have been met based on your environment and IaaS.
You only need to install Maven, JDK, Git and Apache ActiveMQ when working on a Mock IaaS.
For more information on the prerequisites, see Prerequisites.
Configure and start the Mock IaaS.
Follow the instructions below to configure and start the Mock IaaS:
Configure the Cloud Controller (CC).
Update the Private PaaS host and port of the Mock iaaS API endpoint in the
<PRIVATE_PAAS_HOME>/repository/conf/cloud-controller.xml
file, and comment the IaaS provider details that are not being used.<iaasProvider type="mock" name="Mock"> <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className> <provider>mock</provider> <identity svns:secretAlias="cloud.controller.mock.identity">identity</identity> <credential svns:secretAlias="cloud.controller.mock.credential">credential</credential> <property name="api.endpoint" value="https://localhost:9443/mock-iaas/api" /> </iaasProvider> </iaasProviders>
The default Private PaaS host is localhost and the port is 9443. However, when the CC port offset is 1, the Private PaaS port should be changed to 9444.
Navigate to the
<PRIVATE_PAAS_HOME>
/bin
directory, which is in the unzipped Private PaaS distribution.cd <PRIVATE_PAAS_HOME>/bin/
Start the Private PaaS distribution with the
mock-iaas
server profile../wso2server.sh -Dprofile=mock-iaas
Install Private PaaS Manager, Cloud Controller and Auto-scaler on separate Java virtual machines. For more information, see Installing Private PaaS in a Distributed Setup Using the Installer.