Amazon Web Services (AWS) is a cloud computing software platform, which users primarily deploy as an infrastructure as a service (IaaS) solution.
Follow the instructions below to install Private PaaS with Amazon EC2, using a virtual machine (VM) setup:
...
Ensure that all the following prerequisites have been met based on your environment and IaaS.
Excerpt | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Setup Puppet Master.
Puppet is an open source configuration management utility. In Private PaaS, Puppet has been used as the orchestration layer.
Info |
---|
Puppet is an open source configuration management utility. In Private PaaS, Puppet has been used as the orchestration layer. |
Create an EC2 cartridge base image.
...
title | Click here for instructions |
---|
...
Navigate to the <wso2ppaas-4.1.0-SNAPSHOT>/repository/conf/mock-iaas.xml
file and disable the Mock IaaS. By default, the Mock IaaS will be enabled.
Code Block |
---|
<mock-iaas enabled="false"> |
...
Navigate to the <wso2ppaas-4.1.0-SNAPSHOT>/repository/deployment/server/webapps
directory and delete the mock-iaas.war
file.
When Private PaaS is run the mock-iaas.wa
r extracts the mock-iaas
folder. Therefore if you have run Private PaaS previously, delete the mock-iaas
folder too.
...
Configure the Cloud Controller.
Tip |
---|
Prior to carrying out the following steps, make sure to unzip the Private PaaS binary distribution ( |
Follow the instructions below to update the Cloud Controller (CC) configurations:
Configure the IaaS provider details in the
<wso2ppaas-4.1.0-SNAPSHOT>/repository/conf/
file and comment the IaaS provider details that are not being used.cloud-controller.xml
Update the
identity
,credential
,owner-id
,availabilityZone
,securityGroups
,keyPair
name of the Amazon EC2 IaaS provider.Code Block <cloudController> ... <iaasProvider type="ec2" name="Amazon EC2"> <className>org.apache.stratos.cloud.controller.iaases.ec2.EC2Iaas</className> <provider>aws-ec2</provider> <identity svns:secretAlias="cloud.controller.ec2.identity">identity</identity> <credential svns:secretAlias="cloud.controller.ec2.credential">credential</credential> <property name="jclouds.ec2.ami-query" value="owner-id=owner-id;state=available;image-type=machine"/> <property name="availabilityZone" value="ap-southeast-1b"/> <property name="securityGroups" value="security-group"/> <property name="autoAssignIp" value="true" /> <property name="keyPair" value="keypair-name"/> </iaasProvider> ... </cloudController>
Update the values of the
message-broker-ip
andmessage-broker-port
in themqtttopic.properties
file, which is in the<wso2ppaas-4.1.0-SNAPSHOT>/repository/conf
directory. The default values aremessage-broker-ip=localhost
andmessage-broker-port=
1883.Code Block mqtturl=tcp://[MB_IP]:[MB_MQTT_PORT] clientID=stratos tempfilelocation=/tmp
...
Update the values of the MB_IP
and MB_PORT
in the jndi.properties
file, which is in the <wso2ppaas-4.1.0-SNAPSHOT>/repository/conf
directory.
Info |
---|
The values are as follows:
MB_PORT: The port used by ActiveMQ. The default value of the message-broker-port= 61616. |
Code Block |
---|
connectionfactoryName=TopicConnectionFactory
java.naming.provider.url=tcp://[MB_IP]:[MB_Port]
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory |
...
Update the values of the PUPPET_IP
and PUPPET_HOST_NAME
in the cartridge-config.properties
file, which is in the <wso2ppaas-4.1.0-SNAPSHOT>/repository/conf
directory.
Info |
---|
The values are as follows:
PUPPET_HOST_NAME :The host name of the running Puppet instance. |
Code Block |
---|
autoscaler.service.url=https://localhost:9443/services/AutoscalerService/
cloud.controller.service.url=https://localhost:9443/services/CloudControllerService/
stratos.manager.service.url=https://localhost:9443/services/StratosManagerService/
puppet.ip=[PUPPET_IP]
puppet.hostname=[PUPPET_HOST_NAME]
puppet.dns.available=false
puppet.environment=stratos |
...
Update the value of the MB_IP
in the JMSOutputAdaptor
file, which is in the <wso2ppaas-4.1.0-SNAPSHOT>/r
epository/deployment/server/outputeventadaptors
directory.
Info |
---|
MB_IP |
Code Block |
---|
<outputEventAdaptor name="JMSOutputAdaptor" statistics="disable"
trace="enable" type="jms" xmlns="http://wso2.org/carbon/eventadaptormanager">
<!--property name="java.naming.provider.url">CEP_HOME/repository/conf/jndi.properties</property-->
<property name="java.naming.provider.url">tcp://[MB_IP]:61616</property>
<property name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</property>
<property name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</property>
<property name="transport.jms.DestinationType">topic</property>
</outputEventAdaptor> |
...
Navigate to the <wso2ppaas-4.1.0-SNAPSHOT>/bin
directory, which is in the unzipped Private PaaS distribution.
Code Block |
---|
cd wso2ppaas-4.1.0-SNAPSHOT/bin/ |
Start Private PaaS.
...
Follow the steps given below to deploy Private Paas with AWS:
To deploy Private PaaS with AWS, you will require the two Amazon Machine Images (AMI) given below:
- Puppet AMI
The Puppet AMI will contain a Puppet Master and Puppet Agent, which is pre-configured.
Private PaaS AMI
The Private PaaS AMI will contain Private PaaS pre configured with MySQL, ActiveMQ and the WSO2 products as shown in the below diagram.Panel bgColor #F5F5F5 titleBGColor #D3D3D3 title Points to note The Config registry database of WSO2 Private PaaS will include the config registries for the following WSO2 products:
- WSO2 API Manager
- WSO2 Application Server
- WSO2 Identity Server
- WSO2 Data Analytics Server
- You will need to define the following IPs, before running the samples.
- Puppet Master IP
- Private PaaS Host IP
- Database IP