Skip to main content

WSO2 App Factory - Life Cycle of an application

This post will try to explain the general life-cycle of an application in WSO2 AppFactory. WSO2 AppFactory is a place where multiple project teams can collaboratively create run and manage enterprise applications[1]. With WSO2 AppFactory users can create an complex application and push it to production within a matter of couple of hours.

Figure 1 - App Cloud Create Application Page

If you go to WSO2 AppFactory and create an application it will do several operations that generates the resources needed for your application such as
  • Create Repository
  • Generate Sample Code for the Application
  • Create Build Job
  • Create Issue Tracker Project
  • Deploy initial artifact in to PAAS artifact repository
  • etc..
When you hit create application it will create an instance of the application RXT installed in WSO2 AppFactory and then will call a bpel which is hosted in the BPS. Any one can edit this bpel to add their workflow in to it. Currently this will just trigger the AF service to trigger on creation event of Application Event Handlers. There are set of Application Event Handlers registered in AF. You can develop a new Application Event Handler class and add it to an OSGI bundle and copy to following location and start AF and that new handler will get invoked.

$APPFACTORY_HOME/repository/components/dropins 

And you can configure the order of the handlers by setting the priority of the handler by setting priority in the AppFactory configuration placed in following location.

$APPFACTORY_HOME/repository/conf/appfactory/appfactoy.xml 

I will explain this in detail in my next post [2].

These handlers will be responsible for the operations mentioned above. Figure 2 is about the flow of this Application Creation process. 


Figure 2 : Create Application Flow

When the application is created trunk version will get created in the repository. Next step would be to create a new version from the trunk version to promote it to next stages.

Figure 3 : Repositories and Builds page

When you click the create branch it will trigger same kind of flow and will create the new version and new build jobs.

Figure 4 : Flow of creating a new version in an Application

Once you create a new version then you can promote this version to next stages (Development -> Testing -> Production). When you promote it will deploy the artifacts to next stages.

[1] http://wso2.com/cloud/app-factory/
[2] http://wdfdo1986.blogspot.com/2015/07/wso2-app-factory-developing-new.html

Comments

Popular posts from this blog

Generate JWT access tokens from WSO2 Identity Server

In Identity Server 5.2.0 we have created an interface to generate access tokens. Using that we have developed a sample to generate JWT tokens. You can find that sample under msf4j samples[1][2]. If you are build it as it is you will need to use Java 8 to build since msf4j is developed on Java 8. So you will need to run Identity Server on Java 8 as well. After building the project[2] please copy the jar inside target directory to $IS_HOME/repository/components/dropins/ directory. And then please add the following configuration to Identity.xml which is placed under $IS_HOME/repository/conf/identity/ folder inside tag OAuth . <IdentityOAuthTokenGenerator>com.wso2.jwt.token.builder.JWTAccessTokenBuilder</IdentityOAuthTokenGenerator> Then go to the database you used to store oauth tokens (This is the database pointed from the datasource you mentioned in the $IS_HOME/repository/conf/identity/identity.xml) and then alter the size of the column ACCESS_TOKEN of the tab

Oauth custom basic authenticator with WSO2 IS 5.1.0

WSO2 Identity Server supports Oauth2 authorization code grant type with basic authentication OOTB. But basic authentication is done only with WSO2 user store. So there could be use cases that basic authentication has to be done against some other system. In this case you follow below steps to achieve your requirement. First you need to create an class which extends AbstractApplicationAuthenticator and implements LocalApplicationAuthenticator. Because this class is going to act as your application authenticator so it needs to be an implementation of application authenticator interface and to achieve this it needs to be a local authenticator as well. [2] public class CustomBasicAuthenticator extends AbstractApplicationAuthenticator implements LocalApplicationAuthenticator {   Then you need to override the initiateAuthenticationRequest method so you can redirect to the page to enter user and password. In my sample I redirected to the page that is used by our default basic au

Installing gluster in AWS EKS

This article is a continuance of [1] . Purpose of this article is to document the steps, issues and solutions to those issues we have to face when installing gluster in EKS (Elastic Kubernetes Service). For gluster we need a disk to be attached with the K8s node. In EKS easiest way of implementing this is, adding it to the node configuration. So every time a node comes up, it comes up with a disk attached to the defined path. You can use this path in the topology.josn as mentioned in [1] . Next step is to install gluster using the gk-deploy script. The challenge comes here after. To use gluster in pods, you need to define a storage class. The heketi url mentioned in the storage class definition, should be accessible from master node. But the given heketi url is a cluster IP type k8s service. But in EKS deployments masters are managed by AWS and master don't have access to cluster IPs. So how we can solve this? Actually I tried to contact AWS support on this and I didn't got