WSO2 P.PaaS : Accessing the AS and other WSO2 products - wso2

So I have got WSO2 P.PaaS installed and running. I want to deploy .war file to the Application Server. It seems the AS on P.PaaS does not accept .war file; but the stand-alone one does. See here. Also, I want to use the WSO2 products deployed into the PaaS. I am not sure what URL or port I should use. Is there a tutorial that I can use to experiment?
Sorry for the brevity, but, I am new to WSO2.

What PPaaS version you have installed, 4.0.0 or from current master branch which is 4.1.0 milestone 1 version?
Here is the quick start guide Quick start guide .
You can access the management console as https://STRATOS_DOMAIN:9443/console.
Assuming you are using PP 4.0.0 version,
Log into management console
Go to cartridges page. There you can find the available cartridges, you should find Application Server as a cartridge.
Click on AS cartridge in order to subscribe for it. At subscribing process you would be asked a GIT repository URL.
After you subscribe, PP will clone what is in your GIT repository url in to Application server. So if you provide a url which has your web application, those application would be automatically deployed into the Application server. Here is a sample GIT repository , you can include your web apps under "webapps" folder.
There after if you modify your web apps (say web app version 2) and commit the changes to your repository, Stratos/PP automatically update Application server with the new web apps.
Since you have already deployed PP, you can have a loot at this screencast to see how you can deploy a web app

Related

Azure Web Apps directly from Repo and not requiring to setting up the server?

So we can deploy Java apps directly from your GitHub account ? - no need to setup server with Java setup etc - the azure web app will recognize the GitHub repo as a Java app (like springboot) and deploy the code and setup Java + SpringBoot automatically.
Please correct me if my understanding is incorrect. I am only interested in deploying a springboot / django app if I don't need to take care of the actual intricacies of setting up a server.

can wso2ues 1.0 (carbon server) run as a web app?

I'm trying to run WSO2UES (Carbon) as a web application in Apache Tomcat. I've followed the procedure discussed at http://pradeepfernando.blogspot.com/2012/09/running-wso2-carbon-as-web-app-apache.html.
I've added the web application folders into Tomcat webapps folder, configured HTTPS listener of Tomcat. Server logs show that application is successfully deployed and OSGI console is started. When I try to connect to application from https://myIp.com:8443/crbn/carbon, I get a 404 error. There are no exceptions in server logs.
Tomcat error screen contains reference to BridgeServlet: /crbn/carbon, so I know that request is correctly forwarded to BridgeServlet. I guess BridgeServlet can not locate and run the application from OSGI bundles. But I do not have any idea about why and how I can fix it.
How can I diagnose the problem, or is there any available source of information for the correct procedure?
Note: I'm using WSO2UES 1.0, Apache Tomcat 7.0.40. I've tried Java versions 6 and 7.
WSO2 UES 1.0 is based on carbon 4.1.0. AFAIK they are not officially support on web app mode.
can wso2 carbon 4.1 run as a web app (war)?
previous architecture handled using a concept called “Bridge Servlet”, so if you want to run it as previous you have to do some customized work.
here is a article on architecture difference on carbon latest.
http://wso2.com/library/articles/2014/01/understanding-wso2-carbon-architecture/

Unable to add/import WSO2 JAX-RS service into StratosLive Application Server

I have a WSO2 Application Server, version 5.0.1 installed on my local machine.
I created a JAX-RS service and tested it locally.
The WAR file was built and deployed to the local Application Server successfully. When I log in to the local Application server Admin console, I see it displayed under Applications as type JaxWebApp with 'Find Services' listed under the Actions column.
I have a StratosLive subscription and I am trying to ADD/UPLOAD this JAX-RS service as a WAR file to the StratosLive Application Server. The Admin Console for the StratosLive Application Server is different. On the Main tab, It displays Web Applications and Web Services rather than the Applications and Services on the Admin console for the 5.0.1 Application Server I am running locally.
Consequently, I do not see an option to ADD/UPLOAD my JAX-RS service as a WAR file. The only option is to add a Web Application WAR file (I tried this and it does not work properly - thinks it's a web app) or JAX-WS Web Service as a annotated JAR file.
It looks like the StratosLive Application Server I am using may be a different version (earlier maybe) than the 5.0.1 I am using locally.
Has anyone else been able to ADD/UPLOAD a JAX-RS service to a StratosLive Application Server?
Usually it takes small time to upgrade StratosLive version of a product to latest standalone product version. Now StratosLive has been upgraded to latest Application Server version and you should able to run above use case on StratosLive without any issue.

Grails App with Multi Tenant Single DB plugin URL implementation in Cloudfoundry

I am currently creating a web app using Grails implementing Multi Tenant Single DB plugin. The plugin allows me to have multiple tenants on a single db using a tenantID to differentiate between tenants. The plugin detects witch tenant will deal the current request that is made on my app by resolving using different domains/subdomains for each tenant.
For example:
Tenant 1 = companyA.myapp.com
Tenant 2 = companyB.myapp.com
On my local machine running Grails development mode I was able to implement the different hosts by changing my /etc/hosts and each tenant would have their own subdomain.
I am currently interested in using cloud foundry as my cloud platform but when I deploy my app to cloud foundry it is already using my app name as the subdomain for cloud foundry.
For example:
- myapp.cloudfoundry.com
Is it possible to change or control the domain name resolver in
cloud foundry?
Does anybody know how to handle multi-tenant subdomains as explained above in cloud foundry? Probably provide the steps in implementing this using cloud foundry?
What is the best approach to implement this using cloud foundry?
My App is using Grails 2.0.4 and Multi Tenant Single DB plugin 0.8.2.
Thanks
Unfortunately the current beta version CloudFoundry does not allow modification of the cloudfoundry subdomain. The plan is to have the GA towards the end of this year with a private preview of the version of the site available sooner in the fall. At that time you could be able to customize the subdomain.
Therefore you might need to change a little in your TenantResolver to only check the subdomain that varies.
To implement your requirement, did you try installing the grails cf plugin? If not you can start from here.
If you are using cli, installing the plugin just needs command in your project workspace:
grails install-plugin cloud-foundry
When your app is ready for deployment, push it to cloudfoundry:
grails cf-push
Note that you will have to have your cf credentials configured in the grails config file.
After that you can map multiple URLs you want using:
grails cf-map user1.yourapp.cloudfoundry.com
If you have already known about vmc which is the client command line interface for cf, you can see the urls mapped with your app by
vmc apps
If not you can refer to the installation guide to start if you would like to do that.
If you are using STS/eclipse, things will be even easier. First you need to have grails-support extension as well as the cloud foundry integration installed. For detailed docs of the cf integration please refer here.
After your app is deployed, right click the project and choose "Grails Tools" -> "Open Grails Command Prompt". This will enable you to have same grails cf plugin commands as the CLI does.
Hope this can help your move forward in the cloudfoundry world. Let me know if you have more questions.
Thanks,
William

Web Services with Netbeans

After having done a web service with netbeans and having tested it. What is it that I should upload to the server so I can use it? I have been going around tutorials but none (of the ones I've found) say what to upload. They just finish when you deploy the web service =/.
Right, you'll package it as a WAR file and deploy that to the app server. A WAR file is what you need.
How you deploy depends on your situation and your app server. If you're using Tomcat, you can either put the WAR in the /webapps directory or use the admin console to deploy.
If you're using a hosting service, you'll have to ask them how to do it.