Thursday, December 20, 2012

WSO2 App Factory M8 Released!

We shipped out App Factory M8 yesterday! You can download M8 from here.

It was an amazing effort from the whole team and today we are going on Christmas holidays.

New Features of M8 are,

  • Create applications with Git
  • Tagging builds with a name
  • Improved deployment model
  • Moving the servers to standard ports 80/443
  • Ability to work with a Jenkins farm
  • Log download feature
  • Approval UI and human tasks
  • Human task enabled user creation process
  • Search Application Gadget
  • Event Stream View
  • Resource dependency Management UI

We were hoping to ship GitBlit too but couldn't do due to a last minute issue. GitBlit would enable us to talk to any Git repository with AppFactory credentials. The last minute issue was that GitBlit server started throwing unknown host exception even when we set the with the correct host.

We are happy to be able to deliver all of the features we promised except one!

If you want to know more about App Factory you can watch the webinar.

Tuesday, November 13, 2012

App Factory - Consuming APIs in API Manager

This blog shows how your apps can consume APIs hosted in WSO2 API Manager.

Step 1 : Create a API that gives Washington whether details in sandbox and London whether details in the production environment. Lets call this Weather API. Internally it calls the API of

Step 2 : Create an application in AppFactory. Lets call it Customer Portal - cportal application. When you create an application in App Factory it will be automatically created in API-M.

Step 3 : Subscribe the application to the Weather API as follows.

Step 4 : Generate keys by clicking on the create dependencies.

Step 5 : Write your application to get keys by calling the CarbonContext and Registry APIs. The correct sandbox and production keys will be used depending on where the application is deployed. Here is the code to do that.

        CarbonContext cCtx = CarbonContext.getCurrentContext();
        Registry registry = (Registry)       cCtx.getRegistry(RegistryType.SYSTEM_GOVERNANCE);
        Resource resource = registry.get("Key");
        if(resource.getContent() instanceof String){
            key = (String) resource.getContent();
            key = new String((byte[]) resource.getContent());
Step 6 : Deploy the application to "Development" environment and view results

Step 7 : Promote the application to "Production" environment and view results.

The results of Development environment  differs from Production environment because the keys that is used by the two environments are different. The programmer is unaware about the sandbox and production keys, and everything is handled underneath.

Thursday, November 8, 2012

WSO2 App Factory M7 is released

We finally got M7 out!

You can download the VM from here

Here are the new features of M7.
  • Integrating with Redmine
  • CIO/CEO dashbords
  • BPEL Security
  • Role based security
  • Change the username to email address
  • Dependency Management - API sandboxing
  • Build Status Recording and Gadget
  • Login to Controller to get Logs
  • G-Reg check list items
From this point onwards we are going to try continuous development and deployment of App Factory - at least internally and see how it goes.

Thursday, November 1, 2012

The making of WSO2 App Factory - Storing Artifacts

These days I am thinking a lot about scalability of our deployment setup. Our pre-alpha milestone behavior is to store everything in the file system. So there are two things that should change in the future.

  1. What artifact should we store? How do we identify which artifacts to be stored?
  2. How and where we should we store the artifacts

The ideal answer to the second question is we should store them in the Continuous Integration system itself. Now that is easy!

Now answer to the first question. How to identify which artifacts to store. We are considering many apps with several versions being build many times a day. Simple answer this should be configurable. Some possibilities,

  1. Store the latest build
  2. Store a fixed number of builds 
  3. Store builds for a fixed period
  4. Store the latest builds and the ones that are marked explicitly by the devops/develoeprs

Well ...... there are many many options. But a combination of the 4th and 2nd option would be really interesting.

Thursday, July 12, 2012

App Factory M2 Released!

We've been working hard on M2 release. It can be downloaded from here. These are the main features about this App Factory release.
  1. Using App Factory M2, it is possible to develop an application with a data-source and move it across different life-cycle stages seamlessly
  2. We have defined a set of interfaces that would enable us to plug different SDLC tooling and it has a better modular architecture that leverage the power of OSGi
  3. Our VM packs a dehydrated version of WSO2 carbon servers with a P2 repo. And the setup script hydrates the servers using the P2 repo during the startup
  4. M2 has a generic BPEL process that would deploy to different stages. This would enable us to have the power of configurable set of stages

The modular architecture introduced into App Factory M2 can be shown as below. 

The interfaces defined for SDLC tools are as follows.
  • BuildDriver Interface - Enables to plugin different build mechanism. Talks to the build farm
  • BuildDriverListener Interface - Listens to the events of the BuildDriver. This enables asynchronous architecture
  • RevisionControlDriver Interface - Implementations of this interface are responsible to talk to different source code management systems.
  • RevisionControlListener Interface - Listens to the events of the RevisionControlDriver
  • ArtifactStorage Interface - This is where the built artifacts are stored. M2 ships with FileArtifactStorage
  • ContinuousIntegrationSystemDriver - Implementations of these will talk to Jenkins and Bamboo
The services
  • ArtifactCreator - This service is responsible for taking the source code check out and creating the artifact and once done it will call the BPEL back
  • ApplicationDeployer - This service will deploy the artifact to the configured servers
That is all folks for M2. We'll do  more wonderful things for M3 !

Wednesday, July 11, 2012

App Factory

Recently I've been working on this new product called App Factory. This is how we envision it.