Giter VIP home page Giter VIP logo

carbon-deployment's Introduction

Carbon Deployment


Branch Build Status
master Build Status
release-4.2.x Build Status

Carbon 5.x artifact deployment framework - This is an extensible framework where Carbon developers get to incorporate and write their own artifact deployers to deploy its artifacts into a Carbon 5 based product.

This provides following interfaces -

  • DeploymentService -

User level API for consuming DeploymentEngine functionality. An implementation of this is registered as an OSGI service which can be used by developers to deploy/undeploy/redeploy their artifacts.

  • Deployer -

This interface is used to provide the deployment mechanism in carbon for custom artifacts, where you can write your own Deployer to process a particular ArtifactType. Developers need to develop implementations based on this interface, and register it as an OSGi service (using the Deployer as the interface) for the DeploymentEngine to find.

  • LifecycleListener -

This interface can be used to write your own lifecycle listeners to listen on artifact deployment events. The implementation should be registered as an OSGi service with LifecycleListener as the interface. This interface receives following events.

BEFORE_START_EVENT
AFTER_START_EVENT
BEFORE_STOP_EVENT
AFTER_STOP_EVENT

Download

Use Maven snippet:

<dependency>
    <groupId>org.wso2.carbon.deployment</groupId>
    <artifactId>org.wso2.carbon.deployment.engine</artifactId>
    <version>${carbon.deployment.version}</version>
</dependency>

<dependency>
    <groupId>org.wso2.carbon.deployment</groupId>
    <artifactId>org.wso2.carbon.deployment.notifier</artifactId>
    <version>${carbon.deployment.version}</version>
</dependency>

Snapshot Releases

Use following Maven repository for snapshot versions of Carbon Deployment.

<repository>
    <id>wso2.snapshots</id>
    <name>WSO2 Snapshot Repository</name>
    <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
    <snapshots>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
    </snapshots>
    <releases>
        <enabled>false</enabled>
    </releases>
</repository>

Released Versions

Use following Maven repository for released stable versions of Carbon Deployment.

<repository>
    <id>wso2.releases</id>
    <name>WSO2 Releases Repository</name>
    <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
    <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>ignore</checksumPolicy>
    </releases>
</repository>

Building From Source

Clone this repository first (git clone https://github.com/wso2/carbon-deployment.git) and use Apache Maven to build mvn clean install.

How to Contribute

License

Carbon Deployment is available under the Apache 2 License.

Contact us

WSO2 Carbon developers can be contacted via the mailing lists:

Copyright

Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.

carbon-deployment's People

Contributors

arunasujith avatar callkalpa avatar cnapagoda avatar dakshika avatar daneshk avatar geethkokila avatar janithcmw avatar jsdjayanga avatar kabanawso2 avatar kasunbg avatar kdchamil avatar kishanthan avatar lasanthas avatar lmanohara avatar maheshika avatar manoj-kristhombu avatar manuranga avatar manuri avatar neelakishok avatar nipuni avatar niranjan-k avatar pubudu08 avatar ruks avatar sameerajayasoma avatar shashikap avatar supunmalinga avatar tharindu-b-hewage avatar this avatar thusithathilina avatar wso2-jenkins-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

carbon-deployment's Issues

NPE thrown by CXF transport for invalid authorization headers

For the following invalid authorization header values CXF returns Java exceptions along with stack trace to the client side.

  1. multiple empty spaces after "Basic" string with/without client credentials (this is a valid case according to the specification) [1]
  2. Using client credentials with spaces in between
  3. Using invalid encoded JSON data as client credentials

[1] curl -k -d "grant_type=password&username=Username&password=Password" -H "Authorization: Basic something" http://localhost:8280/token

Update carbon-kernel and carbon-feature-plugin

Need to update carbon-kernel version to 5.2.0-m3 and carbon-feature-plugin version to 3.0.0 with the changes introduced in the directory structure, osgi tests and the global configuration model.

Upgrade vulnerabilities in CXF feature

Description:

The following jars need to be upgraded.

cxf-xjc-dv-3.0.2.jar
httpasyncclient-4.0-beta3.jar
httpclient-4.2.5.jar
spring-core-3.0.7.RELEASE.jar

Suggested Labels:

Suggested Assignees:

Affected Product Version:
APIM 2.1.0
OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

Create a deployment folder in products using this feature

When building MB-4 in the EI 7 profile the following error was thrown:

ERROR {org.wso2.carbon.deployment.engine.internal.DeploymentEngineListenerComponent} - Could not initialize carbon deployment engine org.wso2.carbon.deployment.engine.exception.DeploymentEngineException: Cannot find repository : /home/riyafa/Documents/Workspace/product-mb/product/target/wso2mb-4.0.0-SNAPSHOT/deployment
    at org.wso2.carbon.deployment.engine.internal.DeploymentEngine.start(DeploymentEngine.java:103)
    at org.wso2.carbon.deployment.engine.internal.DeploymentEngineListenerComponent.onAllRequiredCapabilitiesAvailable(DeploymentEngineListenerComponent.java:212)
    at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.lambda$notifySatisfiableComponents$51(StartupComponentManager.java:238)
    at java.util.ArrayList.forEach(ArrayList.java:1249)
    at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.notifySatisfiableComponents(StartupComponentManager.java:224)
    at org.wso2.carbon.kernel.internal.startupresolver.StartupOrderResolver$1.run(StartupOrderResolver.java:204)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)

Currently MB-4 uses carbon-deployment feature and the reason for the issue is because the deployment folder is not present in the product. Manual fix is to create a folder named deployment in the product.
This issue has been noticed to occur in other products using this feature. The fix would be to create the deployment folder when the product is built rather than having to create it manually.

Referring to CarbonUtils.getCarbonConfigDir and Retrieve carbon.config.dir.path if set

Enterprise Integrator 6.0 requires a change in directory structure. Hence current "$CARBON_HOME/repository/conf" moves in to "$CARBON_HOME/conf". This is fixed with carbon-kernel 4.4.12 within CarbonUtils to read the System parameter.

Within carbon-deployment there are certain places which refers to older format with coded parameters. These needs to be fixed in order to use the current CarbonConfigDir.

Cannot override manager implementation in Tomcat Webapps Deployer

Description:
It is not possible to change the session manager used by updating the configs in context.xml as the manager is always dynamically set to an instance of CarbonTomcatSessionManager in the deployer.

if (manager instanceof CarbonTomcatSessionManager) {
((CarbonTomcatSessionManager) manager).setOwnerTenantId(tenantId);
} else if (manager instanceof CarbonTomcatSessionPersistentManager){
((CarbonTomcatSessionPersistentManager) manager).setOwnerTenantId(tenantId);
log.debug(((CarbonTomcatSessionPersistentManager) manager).getName() +
" enabled Tomcat HTTP Session Persistent mode using " +
((CarbonTomcatSessionPersistentManager) manager).getStore());
} else {
context.setManager(new CarbonTomcatSessionManager(tenantId));
}

For WSO2 Identity Server, there are no use cases which require webapps to be accessed in the same tenant context which deployed the app. Webapps should be accessible across tenants.

In the current implementation shown above, the CarbonTomcatSessionManager is explicitly set for webapps in the Super Tenant realm during deployment. Therefore, those webapps become accessible only from within Super Tenant context.

Build fails occasionally at test phase due to surefire issue

Throwing below error,
Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project osgi-tests: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /build/jenkins-home/workspace/platform-builds/carbon-deployment/tests/osgi-tests && /build/jenkins-home/software/java/jdk1.8.0_45/jre/bin/java '-javaagent:/build/jenkins-home/workspace/platform-builds/carbon-deployment/.repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946-runtime.jar=destfile=/build/jenkins-home/workspace/platform-builds/carbon-deployment/tests/osgi-tests/target/jacoco.exec,includes=org.wso2.carbon*' -jar /build/jenkins-home/workspace/platform-builds/carbon-deployment/tests/osgi-tests/target/surefire/surefirebooter5152829544684532020.jar /build/jenkins-home/workspace/platform-builds/carbon-deployment/tests/osgi-tests/target/surefire/surefire8592043572268409080tmp /build/jenkins-home/workspace/platform-builds/carbon-deployment/tests/osgi-tests/target/surefire/surefire_24347295732707164145tmp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.