Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Carbon applications (C-App) deployer is a specific feature of WSO2 CEP, which deploys WSO2 CEP-specific deployable artifacts using a single CAR file.


C-App deployable artifacts and types

You can deploy all deployable artifacts, and also the stream definitions using Carbon apps (C-Apps). Given below is a list of deployable artifacts and the associated types.

ArtifactType
event receiversevent/receiver
event publishersevent/publisher
execution plansevent/execution-plan
event streamevent/stream

Specific UI restrictions

If the above mentioned artifacts are being deployed using a C-App, you are restricted on editing or deleting them. Therefore, if you need to edit the C-App, you need to re-pack and re-deploy it.

Creating a C-App

Follow the steps below to create a C-App with the following structure.

├──artifacts.xml
├──WSO2EventReceiver_1.0.0
│       ├──artifact.xml
│       └──WSO2EventReceiver-1.0.0.xml
└──HighFrequentTweetsLogger_1.0.0
        ├──artifact.xml
        └──HighFrequentTweetsLogger-1.0.0.xml
  1. Create the top level artifacts.xml file of the C-App which defines the set of folders included in it as shown below. 

    <artifacts>
        <artifact name="SampleC-App" version="1.0.0" type="carbon/application">
            <dependency artifact="WSO2EventReceiver" version="1.0.0" include="true" serverRole="ComplexEventProcessor"/>
    	<dependency artifact="HighFrequentTweetsLogger" version="1.0.0" include="true" serverRole="ComplexEventProcessor"/>
        </artifact>
    </artifacts>
  2. Create separate directories in the top level of the C-App for the two dependencies (WSO2EventReceiver_1.0.0 and HighFrequentTweetsLogger_1.0.0) defined in the artifacts.xml file. 

    You can have multiple dependencies as required with a directory for each of them in the same level as the artifacts.xml file in the C-App. Include the name and the version of the artifact in the name of the directory.

    Each dependency directory should contain an artifact.xml file. 

  3.   Create an  artifact.xml file inside  all dependency directories. For example, the artifact.xml  file of the WSO2EventReceiver_1.0.0  dependency directory is as follows.

    <artifact name="WSO2EventReceiver" version="1.0.0" type="event/receiver" serverRole="ComplexEventProcessor">
        <file>WSO2EventReceiver-1.0.0.xml</file>
    </artifact>
  4. Create the WSO2EventReceiver-1.0.0.xml file, which is the actual event receiver file that you deploy in WSO2 CEP  inside the WSO2EventReceiver_1.0.0 directory

  5. Create the HighFrequentTweetsLogger-1.0.0.xml file, which is the actual event publisher file that you deploy in WSO2 CEP  inside the HighFrequentTweetsLogger_1.0.0 directory.

You can also create a C-App using the WSO2 Developer Studio. For more information, see Creating an Analytics Project.

Deploying a C-App

Follow the steps below to deploy a C-App.

  1. Log in to WSO2 CEP management console using admin/admin credentials.
  2. Click Main, and then click Add in the Carbon Applications menu.
  3. Click Choose File as shown below.
    add Carbon application
  4. Select the CAR file you need to upload as shown below.
    select CAR file
  5. Click Upload.
  6. Click  Main , and then click  List  in the  Carbon Applications  menu. You see the file added to the list of deployed CAR files as shown below.

    If there is a deployment failure, the faulty Carbon applications and the deployment error will be displayed in the UI.

    Carbon applications list

Undeploying a C-App

Follow the steps below to undeploy a C-App.

  1. Log in to WSO2 CEP management console using admin/admin credentials.
  2. Click  Main , and then click  List  in the  Carbon Applications  menu. 
  3. Click the corresponding Delete link of the relevant Carbon application, which you want to delete as shown below.
    delete Carbon application
  • No labels