Bit about products and terms
Alfresco is the open source alternative for Enterprise Content Management (ECM), providing Document Management, Collaboration, Records Management, Knowledge Management, Web Content Management, and Imaging. If you need more information on alfresco go to to their home page by clicking this link.WSO2 Stratos is the most complete, enterprise-grade, open PaaS, with support for more core services than any other available PaaS today.Developers can simply click to add users and services, develop new applications, and manage their own setup. New services automatically participate in and benefit from governance policies already in place. In addition, new service versions can be deployed and tested side-by-side with versions in production, allowing traffic to be carefully diverted to newer versions
http://wso2.com/cloud/stratos/
With WSO2 Stratos Application Server you can serve both sets of users and easily share logic, management, monitoring, and more. The WSO2 Stratos Application Server brings together the best of breed in open source technologies for Web Applications with Apache Tomcat, and Web Services with Apache Axis2.The WSO2 Application Server, supporting the development, deployment, and management of Web Services and Web applications, delivered as a multi-tenant, elastically scaling, metered platform.
To try ApplicationServer in cloud environment fell free to visit this link
How to edit war file
We can deploy alfresco on WSO2 ApplicationServer4.1.0 and Stratos Application server1.5.1 both. In my previous post i have described how to deploy alfresco on WSO2 Application Server. Here i will explain additional details to deploy it on stratos. Here in this example we will see how to deploy alfresco on local stratos setup and later we will see how we can do it on stratosLive. First we have to create alfresco-wso2.war file by following the guidelines provided. Those steps are same for this deployment as well.please refer that post regarding those instructions here i will briefly list out them.01. First unpack war file
02. Then we have to remove Catalina jar file
03. add mysql connector jar to the lib folder(alfresco/alfresco/WEB-INF/lib)
04. Add database configuration entries to alfresco/WEB-INF/classes/alfresco/repository.properties
Database creation
How to use WSO2 Stratos Data Services Server(DSS) for database
When we use stratos application server for databases we can use WSO2 Data Services Server for manage databases. It provides simplified user interface for users.The WSO2 Data Services Server, a platform for hosting of data services, with service hosting, service testing, and message tracing features is delivered as a multi-tenant, elastically scaling, metered platform. Data as a Service exposes the data stored in a database. Database level operations can be done using the interface provided by Data as a Service.We will see how to create database using StratosLive DSS
First goto data base and create database
Then you will see database name and database url in user interface. Next goto manage
Then create privileged group.
Next add user and set privilage group. Now we have all necessary propertites for database connection.
Now we can use those permissions to database connection.See the following configurations
# Database configuration
db.schema.update=true
db.driver=com.mysql.jdbc.Driver
db.name=alfresco_sanjeewa_info
db.url=jdbc:mysql://rss4.crik244zrfxc.us-east-1.rds.amazonaws.com/alfresco_sanjeewa_info
db.username=sanj_92jp9Pdo
db.password=mypassword
db.pool.initial=10
db.pool.max=20
Deploy on Stratos
Now we have fix few issues due to security related restrictions on stratos. Though you can deploy above created war file on Application server you canot deploy it on stratos application server due to security constrains. you will see some error messages if you try to do it.For this problem we have 2 solutions.01. Then you jave to sign those jar files with server security key file. Use following command to do it.
wso2stratos-as-1.5.1$ jarsigner -keystore repository/resources/security/wso2carbon.jks -storepass wso2carbon location_of_jarfile wso2carbon
02. We can disable security from Stratos Application server by removing following 2 entries from wso2server.sh file located at wso2stratos-as-1.5.1/bin folder.
# -Djava.security.manager=java.lang.SecurityManager \
# -Djava.security.policy=$CARBON_HOME/repository/conf/sec.policy \
Now we can deploy war file without having any issues.Go to webservices refresh window. then you will see Alsresco service. see following figures.
Why tenants cant deploy it on stratosLive.
Alfresco uses wso2stratos-as-1.5.1/alf_data for keep alfresco related data. Each alfresco deployment we need seperate folder.If one tenant deploy it next tenat will not be able to deploy it because that olso tries to access same folder and database. according to stratos design multiple tenats can deploy same war file without having any issues. but when this comes to alfresco installation it fails due to the way alfresco deploy on server. By its design we can run only one alfresco instance on one tomcat server.So the best way to deploy alfresco on public stratos deployment is first super tenat deploy it on Applicationserver and allow other users(Tenants) to use it.