user2225571
user2225571

Reputation: 1

WSO2 Changing ServerRole for Governance Registry Projects

I wanted to deploy a car file which has Governance Registry project. As per WSO2 documentation, I need to edit carbon.xml (add role Governance registry under ).

The carbon server 4.6.0 by default has EnterpriseServiceBus So by default my carbon server acts as ESB.

Is it a good practice to convert my governance registry project into ESB project and deploy the car file ? OR Add Role Governance Registry under carbon.xml and deploy car having governance registry project?

Thanks!

Upvotes: 0

Views: 439

Answers (3)

Michael Rudd
Michael Rudd

Reputation: 13

We are building our CARs in a Continuous Delivery mode (with CruiseControl), and we wanted to be able to deploy the same CAR into ESB container with an imbedded Registry for DEV testing, as well as into the ESB with Remote GReg for PROD environment. With that in mind, the method of changing the Server Role of the C-App registry resource artifact in CAR to match Carbon Server would not work for us. We ended up adding the Governance Registry role to the ESB in DEV environment (the one with the imbedded Registry) and it works.

Upvotes: 0

Harshana Martin
Harshana Martin

Reputation: 857

First of all, you do not need to modify carbon.xml and add G-Reg Server role to ESB server to deploy a Registry Resource you created with Developer Studio.

All you have to do is, change the Server Role of the C-App registry resource artifact to match your Carbon Server which in this case, ESB.

In order to change the Server role of your Registry Resource Artifact follow the steps given below.

  1. Open the pom.xml file of the C-App project with "Carbon Application Pom Editor" (If you haven't installed Eclipse M2E in your Eclipse, pom.xml will open by default with that editor. Otherwise use "Open With" option and select the "Carbon Application Pom Editor".

  2. You will see the set of C-App artifacts in your workspace in this editor and you will see the Server Role field in the editor.

  3. Expand the name of the Registry Resource Editor and click on the drop down list in Server Role and select EnterpriseServiceBus from the list.

  4. Save the Editor and Export the C-App and generate the CAR file.

Answering to your queries:

Q. Is it a good practice to convert my governance registry project into ESB project and deploy the car file ?

Ans: You are cannot convert your Registry Resource project in to an ESB config project because you cannot create Registry Resources in your ESB Project.

Q. Add Role Governance Registry under carbon.xml and deploy car having governance registry project?

Ans: You don't have to change the Server role of the Carbon Server using carbon.xml as I explained previously, you can change the Server Role of the C-App artifact.

However changing the Server Role of the C-App artifact to your Servers' Server Role is only recommended for Registry Resources because each and every Carbon Server has a Registry where you can deploy your Registry Resources.

/Harshana

Upvotes: 1

Shelan Perera
Shelan Perera

Reputation: 1753

You can change it at the carbon application it self. In the Carbon Application open its pom and you can see properties define something like this.

<com.example.reg-resource-proj.resource:exception_msg:1.0.0>capp/EnterpriseServiceBus</com.example.reg-resource-proj.resource:exception_msg:1.0.0>

So change capp/GovernanceRegistry to capp/EnterpriseBus.

Or open the same pom with Carbon Application Pom editor and change the server role of the artifact listed under dependencies. So that artifact will be deployed to the ESB since its server role is Enterprise service Bus.

You do not have to change the Server role of the server.

Upvotes: 0

Related Questions