Execute carbon deployment manually - wso2

When you deploy manually a .car inside WSO2 (ESB), wso2 deploys the file and it's done.
I would like to trigger manually this action.
My purpose is to send a .car file inside my ./carbonapps/ and deploy it.
I'm looking for a request in Java (executed by sh) or a web request.
Do you know how to do that ?
Thank you for you time :)

Related

WSO2 identity server SMS OTP Authentication folder not deploying when changed to different environment

I'm using identity server v5.10.0, I'm changing only the UI of smsotp.jsp and mobile.jsp and whenever I run the jenkins job and switch it to a different environment, the sms OTP authentication gets deployed with the default war file and existing folder with the UI changes is not deployed. if I zip and paste in a different env the entire folder UI changes are present but whenever I take it through jenkins the SMS OTP folder gets deployed from the default war file. Can anyone from WSO2 team help here and let me know how to proceed further
Any help here is much Appreciated.

How to deploy Car and bar file programatically in wso2

In wso2 how to deploy .car file in case of ESB and .bar in case of BPMN programatically. Is there any way of using remote deployment option programmatically(using JAVA).
You can use the admin services which are exposed as SOAP services to achieve the requirement. For example, you can use bellow endpoint to deploy Carbon Application(car file).
https://{esb-host-name}:{esb-management-console-port}/services/CarbonAppUploader
Also for BPMN(bar file), you can use bellow endpoint.
https://{bps-host-name}:{bps-management-console-port}/services/BPMNUploaderService
The blog post [1] will help to understand the flow.

WSO2 ESB How to upload app config xml files

I need to work around a weird behaviour of WSO2 ESB. Whenever the ESB is started, all carbon files are redeployed. This means to reset all changes made in files after last deploy(restart), such us, configuration xml files (endpoints, custom config files...) .
So I guess the only way to avoid modifing this configuration files during the start up is to take them out from the carbon file. Thus, I would upload app files as carbon app, and app config files (EP, custom config files...) using an alternative way.
So, in this situation, how could I upload these config files in and easy and automatic way?
Regards
I presume you are using a CApp (Carbon Application) to deploy the esb artifacts like endpoints. The number rule for this procedure is that you need to do all the modifications you need to do via the WSO2 Developer Studio, build a CApp, and re-deploy it in WSO2 ESB. You should try to avoid using management console to perform esb artifact (proxy services, endpoints, sequences, templates etc.) modifications. You can of course use the management console for other administrative tasks like configuring data-sources, BAM mediation data publishing etc.
If you are using the Management console to modify artifacts, then you can do that too, but avoid using CApps as the method of deploying esb artifacts. You should probably copy all the config xml files to relevant folders at $ESB_HOME/repository/deployment/server/synapse-configs/default/. And then go ahead with your modifications via mgt console.

WSO2 UES service registering method

I am getting my hands on WSO2 UES server. I wrote an jaggery dashboard app and working fine. When porting the jaggery app to another UES server i have to manually register for the SAML sso. After manually configuring i am able to access. Is there any way to automate this?
Yes, you can configure to automate this. Go to /repository/conf/ and in the file sso-idp-config.xml add following configuration.
<ServiceProvider>
<Issuer>MyApp</Issuer>
<AssertionConsumerService>http://x.x.x.x:9763/MyApp/sso.jag</AssertionConsumerService>
<CustomLoginPage>ssoApp/login_processor.jag</CustomLoginPage>
</ServiceProvider>
But this is not recommended at all.

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.