Re: [Architecture] [App Factory] Jira Integration for WSO2 App Factory

2015-03-31 Thread Mahesh Chinthaka
Hi Fathima,
What did you mean by user's name ? Is it App owner ? If so +1

Just one clarification. Suppose there are 2 tenants A and B. Both have
created applications named 'app1'. So will it be shown in jira as two
projects with same name ? Or is it visible only within tenant's scope.
What if we append tenant domain to application name and put it as project
name. WDYT ?

Thanks.

On Tue, Mar 31, 2015 at 12:40 PM, Fathima Dilhasha dilha...@wso2.com
wrote:

 Hi,

 I have been successful in creating a project in a Jira instance via a SOAP
 client included in the issue tracking component in App Factory.

 Now, I have few clarifications regarding this project creation.

 When we create a Jira project for a specific Application in Appfactory, we
 have to specify a project name, and a project lead for that project.

 My suggestion is to use the application name as the project name and add a
 jira user with that user's name to our Jira instance.

 WDYT? Is there any better way we can do this?

 Thanks.
 Regards,
 Dilhasha


 *M.N.F. Dilhasha*
 Software Engineering Intern | *WSO2 Lanka*

 email   :
 *dilha...@wso2.com dilha...@wso2.com*mobile : +94 77 8449321

 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] Jaggery - Ability to intercept request/response

2015-03-19 Thread Mahesh Chinthaka
Hi all,

This was accomplished successfully by,

Sandboxing render method of jagg.jag + routing all ajax calls to block
layer via router.jag by means of a url mapping.

Lot of thanks to SameeraM  Ruchira.

On Wed, Mar 18, 2015 at 2:13 AM, Ruchira Wageesha ruch...@wso2.com wrote:



 On Tue, Mar 17, 2015 at 6:23 PM, Mahesh Chinthaka mahe...@wso2.com
 wrote:

 Hi all,

 This is what I have tried up to now,

 I tried with Method 1 explained by Ruchira, which is to add a router.jag
 and intercept incoming requests and route them after doing tenant/context
 initialization stuff.
 Problem with that was : all the files other than .jag files(ex: .css ,
 font files .jpeg etc) are coming to this and when trying to include those
 it gives a compilation error.

 You need to include only *.jag files, content of the other files can be
 piped to the client. Issue with that is, you might need to send proper
 caching headers etc. from your end.





-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] Jaggery - Ability to intercept request/response

2015-03-17 Thread Mahesh Chinthaka
Hi all,

This is what I have tried up to now,

I tried with Method 1 explained by Ruchira, which is to add a router.jag
and intercept incoming requests and route them after doing tenant/context
initialization stuff.
Problem with that was : all the files other than .jag files(ex: .css , font
files .jpeg etc) are coming to this and when trying to include those it
gives a compilation error.

Then tried with sandboxing (starting and ending tenant flow) the module
method of jagg.jag file. Failed!
Then tried with sandboing the block method of jagg.jag file. Failed!
same problem occurred in both scenarios.
Problem with above was :  by the time code executes at module layer ,
tenant flow has already been started and ended as well. So at that time
context tenant is carbon.super.


Then tried with sandboxing the render method of jagg.jag.
Above problem was vanished and another problem occurred,
That is : we found that other than the requests for pages , there are some
ajax calls directly coming to block layer, since theres no rendering
happenning, no tenant flow has been started as well.
Then what we did was we added a router.jagg and and a url mapping for
/site/blocks/* in jaggerry.conf and inside the router.jag we included the
file.
Now everything is working fine except for a NPE while publishing messages
to the wall.

Will work with Manu tomorrow morning and update further.

@Ruchira,
Do we need to create a redmine item for this one ?


Thanks


On Mon, Mar 16, 2015 at 7:15 PM, Mahesh Chinthaka mahe...@wso2.com wrote:

 Hi Ruchira,

 Actually I tried with Method 1 and I'm getting some errors.
 I talked to SameeraM and UdaraR from jaggeey team. As per the discussion,

 In Appfactory appmgt app, we are using 'block model'.
 Will it be ok if  I sandbox the module method in jagg.jag file ?

 Thanks


 On Fri, Mar 13, 2015 at 3:46 PM, Ruchira Wageesha ruch...@wso2.com
 wrote:

 Hi Mahesh,

 I will not be available in the office for next 2 weeks. But here is the
 method I initially had in my mind.

 i.e. All request are mapped to a single *.jag file. From that *.jag file,
 you check the request URL and find the requested *.jag file path[1]. After
 that you do whatever the tenant initialization stuff and include [1] using
 Jaggery's include method. Later, you can end the tenant flow and complete
 the request flow.

 *Method 1:*

 i.e. at jaggery.conf

 * --- router.jag

 at router.jag
 

 infer tenant and start tenant flow
 try {
 include the requested Jaggery file
 } finally {
 end tenant flow
 }


 *Method 2:* (If method #1 doesn't work for you)

 Implement set of handlers(would have to be specified at jaggery.conf as
 *.jag or *.js files) to intercept incoming and outgoing HTTP requests. For
 this, you might need to improve Jaggery code.

 Anyway, for both the options, please talk either to Manu or Jaggery team.

 /Ruchira

 On Fri, Mar 13, 2015 at 3:17 PM, Mahesh Chinthaka mahe...@wso2.com
 wrote:

 Hi Ruchira,

 Im gonna take this task over and do the implementation.
 Could you please let me know a feasible time for you to have a chat on
 this ?

 Thanks

 On Thu, Jan 29, 2015 at 2:51 PM, Dimuthu Leelarathne dimut...@wso2.com
 wrote:

 Hi,

 In AF we want to define set of actions that  should execute before a
 request and clean it on response. We cannot do it it by tomcat valves
 because one of the actions is start tenant flow and set governance
 artefact navigator. This is not possible right now in a  straight forward
 way.

 Could we get an extension in Jaggery to do this?

 thanks,
 dimuthu


 --
 Dimuthu Leelarathne
 Architect  Product Lead of App Factory

 WSO2, Inc. (http://wso2.com)
 email: dimut...@wso2.com
 Mobile : 0773661935

 Lean . Enterprise . Middleware

 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




 --
 *Mahesh Chinthaka Vidanagama* | Software Engineer
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 Mobile: +94 71 63 63 083 | Work: +94 112 145 345
 Email: mahe...@wso2.com | Web: www.wso2.com




 --

 *Ruchira Wageesha**Associate Technical Lead*
 *WSO2 Inc. - lean . enterprise . middleware |  wso2.com http://wso2.com*

 *email: ruch...@wso2.com ruch...@wso2.com,   blog:
 ruchirawageesha.blogspot.com http://ruchirawageesha.blogspot.com,
 mobile: +94 77 5493444 %2B94%2077%205493444*




 --
 *Mahesh Chinthaka Vidanagama* | Software Engineer
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 Mobile: +94 71 63 63 083 | Work: +94 112 145 345
 Email: mahe...@wso2.com | Web: www.wso2.com




-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list

Re: [Architecture] Jaggery - Ability to intercept request/response

2015-03-16 Thread Mahesh Chinthaka
Hi Ruchira,

Actually I tried with Method 1 and I'm getting some errors.
I talked to SameeraM and UdaraR from jaggeey team. As per the discussion,

In Appfactory appmgt app, we are using 'block model'.
Will it be ok if  I sandbox the module method in jagg.jag file ?

Thanks


On Fri, Mar 13, 2015 at 3:46 PM, Ruchira Wageesha ruch...@wso2.com wrote:

 Hi Mahesh,

 I will not be available in the office for next 2 weeks. But here is the
 method I initially had in my mind.

 i.e. All request are mapped to a single *.jag file. From that *.jag file,
 you check the request URL and find the requested *.jag file path[1]. After
 that you do whatever the tenant initialization stuff and include [1] using
 Jaggery's include method. Later, you can end the tenant flow and complete
 the request flow.

 *Method 1:*

 i.e. at jaggery.conf

 * --- router.jag

 at router.jag
 

 infer tenant and start tenant flow
 try {
 include the requested Jaggery file
 } finally {
 end tenant flow
 }


 *Method 2:* (If method #1 doesn't work for you)

 Implement set of handlers(would have to be specified at jaggery.conf as
 *.jag or *.js files) to intercept incoming and outgoing HTTP requests. For
 this, you might need to improve Jaggery code.

 Anyway, for both the options, please talk either to Manu or Jaggery team.

 /Ruchira

 On Fri, Mar 13, 2015 at 3:17 PM, Mahesh Chinthaka mahe...@wso2.com
 wrote:

 Hi Ruchira,

 Im gonna take this task over and do the implementation.
 Could you please let me know a feasible time for you to have a chat on
 this ?

 Thanks

 On Thu, Jan 29, 2015 at 2:51 PM, Dimuthu Leelarathne dimut...@wso2.com
 wrote:

 Hi,

 In AF we want to define set of actions that  should execute before a
 request and clean it on response. We cannot do it it by tomcat valves
 because one of the actions is start tenant flow and set governance
 artefact navigator. This is not possible right now in a  straight forward
 way.

 Could we get an extension in Jaggery to do this?

 thanks,
 dimuthu


 --
 Dimuthu Leelarathne
 Architect  Product Lead of App Factory

 WSO2, Inc. (http://wso2.com)
 email: dimut...@wso2.com
 Mobile : 0773661935

 Lean . Enterprise . Middleware

 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




 --
 *Mahesh Chinthaka Vidanagama* | Software Engineer
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 Mobile: +94 71 63 63 083 | Work: +94 112 145 345
 Email: mahe...@wso2.com | Web: www.wso2.com




 --

 *Ruchira Wageesha**Associate Technical Lead*
 *WSO2 Inc. - lean . enterprise . middleware |  wso2.com http://wso2.com*

 *email: ruch...@wso2.com ruch...@wso2.com,   blog:
 ruchirawageesha.blogspot.com http://ruchirawageesha.blogspot.com,
 mobile: +94 77 5493444 %2B94%2077%205493444*




-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] Jaggery - Ability to intercept request/response

2015-03-13 Thread Mahesh Chinthaka
Hi Ruchira,

Im gonna take this task over and do the implementation.
Could you please let me know a feasible time for you to have a chat on this
?

Thanks

On Thu, Jan 29, 2015 at 2:51 PM, Dimuthu Leelarathne dimut...@wso2.com
wrote:

 Hi,

 In AF we want to define set of actions that  should execute before a
 request and clean it on response. We cannot do it it by tomcat valves
 because one of the actions is start tenant flow and set governance
 artefact navigator. This is not possible right now in a  straight forward
 way.

 Could we get an extension in Jaggery to do this?

 thanks,
 dimuthu


 --
 Dimuthu Leelarathne
 Architect  Product Lead of App Factory

 WSO2, Inc. (http://wso2.com)
 email: dimut...@wso2.com
 Mobile : 0773661935

 Lean . Enterprise . Middleware

 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [AF] [MB] Make Appfactory tenant subscription to stratos environments fault tolerant

2015-01-04 Thread Mahesh Chinthaka
Hi Dimuthu,
Noted.

thanks.

On Mon, Jan 5, 2015 at 10:34 AM, Dimuthu Leelarathne dimut...@wso2.com
wrote:

 Hi Mahesh and all,

 I have another suggestion. We should keep the dev, test, prod subscribers
 in the respective Stratos controllers. This is because it will reduce the
 load on the network.

 The architecture stays the same.

 thanks,
 dimuthu

 On Fri, Dec 19, 2014 at 2:16 PM, Dimuthu Leelarathne dimut...@wso2.com
 wrote:

 Hi Mahesh,

 What is the possibility of removing the second REST call. If we are
 putting an additional moving part we need to justify why. For example we
 could say in this point you can put a LB and horizontally scale (Just one
 of many possible answers). In this case I don't see such a use case unless
 there is no Java API. Does Stratos provide Java API? If so that would be a
 better way, IMO.

 thanks,
 dimuthu





 On Wed, Dec 17, 2014 at 12:42 PM, Manjula Rathnayake manju...@wso2.com
 wrote:

 Hi Mahesh,

 +1 for the current design. I assume you have multiple instances of
 durable subscribers for each subscription made to Stratos cartridges. For
 example, if we have multiple tenant aware cartridges(App Server, UES
 Server, BPS Server etc), the durable subscriber should be able to
 instantiate based on subscription details for each cartridges in all the
 environments.

 Further we can consider unsubscribing from cartridges etc. Based on the
 message received by the topic subscribers, topic subscriber can decide the
 action plan(subscribe to cartridge, unsubscribe,etc).

 In case of failure, lets assume subscription to production app server
 cartridges is failed. Are we going to stop further actions in that
 particular tenant such as avoiding promoting to production? IMO, notifying
 to the tenant administrator and system administrators would be sufficient
 via notification mechanisms(wall,email).

 thank you.


 On Wed, Dec 17, 2014 at 3:16 PM, Mahesh Chinthaka mahe...@wso2.com
 wrote:

 Hi Harsha,
 I see your point.
 If you follow tenant creation bpel you may see initializeBuildManager
 and initializeRepositoryManager happens one after the other in a row.
 If it got failed in any step the process won't continue.
 But in last step of bpel you can see that initializeCloudManager is
 called for all 3 environments at the same time.
 In order to consider tenant creation as successfull we need to have
 all 3 subscriptions successful. I think thats why this fault tolerance
 mechanism is more important in this step than others.
 Anyway I will discuss more with the team and will update this thread.

 On Wed, Dec 17, 2014 at 2:45 PM, Harsha Thirimanna hars...@wso2.com
 wrote:

 Hi Mahesh,

 What about the other failure situation within BPEL, like
 initializeBuildManager and initializeRepositoryManager. Can we do that 
 also
 consuming this topics ? Because that also mandatory for the tenant 
 creation
 flow. WDYT ?

 thanks



 *Harsha Thirimanna*
 Senior Software Engineer; WSO2, Inc.; http://wso2.com
 * http://www.apache.org/*
 *email: **hars...@wso2.com* az...@wso2.com* cell: +94 71 5186770  ,
 +94 *
 *774617784twitter: **http://twitter.com/
 http://twitter.com/afkham_azeez*
 *harshathirimannlinked-in: **http:
 http://lk.linkedin.com/in/afkhamazeez**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122
 http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122*

 *Lean . Enterprise . Middleware*


 On Wed, Dec 17, 2014 at 1:31 PM, Mahesh Chinthaka mahe...@wso2.com
 wrote:

 Hi all,

 Im working on Making the tenants subscription to stratos environments
 fault tolerant [1]

 This has been discussed in mail thread with subject  -
 [Architecture] [AF] Tenant subscribing to stratos environments - making 
 it
 fault tolerant

 *Issue*

 **

 There are some possible failure points in AF, hence in App Cloud. One
 such critical point is making the tenants subscribed to the dev, test and
 prod stratos environments. Due to any reason, if this step fails, then,
 thats the end of story for that tenant.


 Actually in appfactory tenant creation,

 When a tenant creation request is made, appfactory sends  REST calls
 to stratos environments (dev,prod,test) to create tenants. At the moment
 there is no way to overcome a situation where tenant creation fails in 
 one
 or more stratos environments.

 *Proposal*

 *===*

 Here what I'm going to do is, integrate WSO2 Message Broker to take
 tenant creation requests to a durable topic and manipulate the
 process in a fault tolerant manner. The durable topic will keep
 messages around persistently for any suitable consumer to consume them.


 Appfactory will have a publisher who publishes messages in the topic
 inside MB when a tenant creation is requested.


 There will be a subscriber for each stratos environment who is
 listening to above topic(create_teanant). If subscription is
 successfull then subscriber will acknowledge to MB and MB will not send
 that particular request to same subscriber again. If subscription
 got failed subscriber

[Architecture] [AF] [MB] Make Appfactory tenant subscription to stratos environments fault tolerant

2014-12-17 Thread Mahesh Chinthaka
Hi all,

Im working on Making the tenants subscription to stratos environments fault
tolerant [1]

This has been discussed in mail thread with subject  - [Architecture] [AF]
Tenant subscribing to stratos environments - making it fault tolerant

*Issue*

**

There are some possible failure points in AF, hence in App Cloud. One such
critical point is making the tenants subscribed to the dev, test and prod
stratos environments. Due to any reason, if this step fails, then, thats
the end of story for that tenant.


Actually in appfactory tenant creation,

When a tenant creation request is made, appfactory sends  REST calls to
stratos environments (dev,prod,test) to create tenants. At the moment there
is no way to overcome a situation where tenant creation fails in one or
more stratos environments.

*Proposal*

*===*

Here what I'm going to do is, integrate WSO2 Message Broker to take tenant
creation requests to a durable topic and manipulate the process in a fault
tolerant manner. The durable topic will keep messages around persistently
for any suitable consumer to consume them.


Appfactory will have a publisher who publishes messages in the topic inside
MB when a tenant creation is requested.


There will be a subscriber for each stratos environment who is listening to
above topic(create_teanant). If subscription is successfull then subscriber
will acknowledge to MB and MB will not send that particular request to same
subscriber again. If subscription got failed subscriber will not ack. and
MB will take care of sending that request until it becomes successful.


At the moment we have 3 stratos environments therefore we will have 3
subscribers listening to that particular topic(create_teanant) in MB. In a
case of AF having more stratos environments in future, it is possible to
add more subscribers. Durable topic subscribers[2] will be used here since
it will persist the subscription on behalf of the client subscription when
client is not online.


This step is not synchronous therefore  above changes will not effect the
tenant creation flow.


*Architectural diagram *

*=*

Architectural diagram can be found in [3]



​


[1] - https://wso2.org/jira/browse/APPFAC-2436

[2] -
https://docs.wso2.com/display/MB220/Creating+a+Durable+Topic+Subscription

[3] -
https://docs.google.com/a/wso2.com/drawings/d/15CmM3rCTwjUUu4V6lp2WX32nRzufraDXawALNYIoTek/edit

-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [AF] [MB] Make Appfactory tenant subscription to stratos environments fault tolerant

2014-12-17 Thread Mahesh Chinthaka
Hi Harsha,
I see your point.
If you follow tenant creation bpel you may see initializeBuildManager
and initializeRepositoryManager
happens one after the other in a row. If it got failed in any step the
process won't continue.
But in last step of bpel you can see that initializeCloudManager is called
for all 3 environments at the same time.
In order to consider tenant creation as successfull we need to have all 3
subscriptions successful. I think thats why this fault tolerance mechanism
is more important in this step than others.
Anyway I will discuss more with the team and will update this thread.

On Wed, Dec 17, 2014 at 2:45 PM, Harsha Thirimanna hars...@wso2.com wrote:

 Hi Mahesh,

 What about the other failure situation within BPEL, like
 initializeBuildManager and initializeRepositoryManager. Can we do that also
 consuming this topics ? Because that also mandatory for the tenant creation
 flow. WDYT ?

 thanks



 *Harsha Thirimanna*
 Senior Software Engineer; WSO2, Inc.; http://wso2.com
 * http://www.apache.org/*
 *email: **hars...@wso2.com* az...@wso2.com* cell: +94 71 5186770  ,
 +94 *
 *774617784twitter: **http://twitter.com/
 http://twitter.com/afkham_azeez*
 *harshathirimannlinked-in: **http:
 http://lk.linkedin.com/in/afkhamazeez**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122
 http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122*

 *Lean . Enterprise . Middleware*


 On Wed, Dec 17, 2014 at 1:31 PM, Mahesh Chinthaka mahe...@wso2.com
 wrote:

 Hi all,

 Im working on Making the tenants subscription to stratos environments
 fault tolerant [1]

 This has been discussed in mail thread with subject  - [Architecture]
 [AF] Tenant subscribing to stratos environments - making it fault tolerant

 *Issue*

 **

 There are some possible failure points in AF, hence in App Cloud. One
 such critical point is making the tenants subscribed to the dev, test and
 prod stratos environments. Due to any reason, if this step fails, then,
 thats the end of story for that tenant.


 Actually in appfactory tenant creation,

 When a tenant creation request is made, appfactory sends  REST calls to
 stratos environments (dev,prod,test) to create tenants. At the moment there
 is no way to overcome a situation where tenant creation fails in one or
 more stratos environments.

 *Proposal*

 *===*

 Here what I'm going to do is, integrate WSO2 Message Broker to take
 tenant creation requests to a durable topic and manipulate the process
 in a fault tolerant manner. The durable topic will keep messages around
 persistently for any suitable consumer to consume them.


 Appfactory will have a publisher who publishes messages in the topic
 inside MB when a tenant creation is requested.


 There will be a subscriber for each stratos environment who is listening
 to above topic(create_teanant). If subscription is successfull then
 subscriber will acknowledge to MB and MB will not send that particular
 request to same subscriber again. If subscription got failed subscriber
 will not ack. and MB will take care of sending that request until it
 becomes successful.


 At the moment we have 3 stratos environments therefore we will have 3
 subscribers listening to that particular topic(create_teanant) in MB. In a
 case of AF having more stratos environments in future, it is possible to
 add more subscribers. Durable topic subscribers[2] will be used here since
 it will persist the subscription on behalf of the client subscription when
 client is not online.


 This step is not synchronous therefore  above changes will not effect
 the tenant creation flow.


 *Architectural diagram *

 *=*

 Architectural diagram can be found in [3]



 ​


 [1] - https://wso2.org/jira/browse/APPFAC-2436

 [2] -
 https://docs.wso2.com/display/MB220/Creating+a+Durable+Topic+Subscription

 [3] -
 https://docs.google.com/a/wso2.com/drawings/d/15CmM3rCTwjUUu4V6lp2WX32nRzufraDXawALNYIoTek/edit

 --
 *Mahesh Chinthaka Vidanagama* | Software Engineer
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 Mobile: +94 71 63 63 083 | Work: +94 112 145 345
 Email: mahe...@wso2.com | Web: www.wso2.com

 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture



-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] Integrating puppet scripts for AppFactory Development environment setup to OS X

2014-11-14 Thread Mahesh Chinthaka
Hi Rajeevan,

IMHO in your case memory capacity is not a matter to worry. Dont take it as
a constraint or bottleneck.
According to my experience 8GB memory in Mac is capable of doing what you
want here. Something to remind you that it is possible to run Appfactory in
8GB Mac (which requires more than 8GB in non Macs).By the way im not
promoting Macs ;) . But thats the truth. :)

Anyway if you want a more generalized approach (i.e. one solution for all
OSs) then thats fine to go for what you've explained above.

On Fri, Nov 14, 2014 at 1:49 PM, Aiyadurai Rajeevan rajeev...@wso2.com
wrote:

 Hi All,

 We are trying to setup an App Factory development environment using
 puppet, As of now we have puppet script which is supported for linux
 environment, When we run that on OS X its getting failed due to some
 obvious reasons such as, root permissions and the some tools are not
 compliance to OS X. Hence, We are trying to achieve this using Virtual
 Machine, But the bottleneck we found is the memory as Mac has 8 GB max
 memory which is not enough to run puppet agent for our purpose.(In the same
 machine we have to run puppet master too)

 The solution could be for this, Creating a puppet agent in Openstack and
 use that via a VM in OS X environments( as Openstack is supported in Ubuntu
 Env [1])

 Appreciate your views on this approach, The concern could be in this user
 should have a active network connection to listen Openstack instance and we
 should do the IP configuration to access the cartridges such as mysql, etc.

 Is this a recommended approach to do so please?


 [1]
 http://docs.openstack.org/training-guides/content/building-training-cluster.html


 Thanks  Regards,
 S.A.Rajeevan
 Software Engineer WSO2 Inc
 E-Mail: rajeev...@wso2.com | Mobile : +94776411636

 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [APPFAC] - Issue in deploying php applications in M6 release

2014-11-12 Thread Mahesh Chinthaka
+1 for using none instead of empty

On Thu, Nov 13, 2014 at 12:12 AM, Udara Liyanage ud...@wso2.com wrote:

 Hi Roshan,

 I like to suggest the word none instead of empty



 Touched, not typed. Erroneous words are a feature, not a typo.
 On Nov 12, 2014 9:35 AM, Roshan Deniyage rosh...@wso2.com wrote:

 Its breaking not because of * but, code changes in M6 release. I'm
 going to change the * sign because of its misleading users.

 Roshan Deniyage
 Associate Technical Lead
 WSO2, Inc: http://wso2.com

 Mobile:  +94 777636406
 Twitter:  *https://twitter.com/roshku https://twitter.com/roshku*
 LinkedIn :  https://www.linkedin.com/in/roshandeniyage


 On Tue, Nov 11, 2014 at 11:43 PM, Danushka Fernando danush...@wso2.com
 wrote:

 Can you list down the places this is used and where its breaking because
 its *. And with this are you going with any code changes?

 Thanks  Regards
 Danushka Fernando
 Software Engineer
 WSO2 inc. http://wso2.com/
 Mobile : +94716332729

 On Tue, Nov 11, 2014 at 10:59 PM, Roshan Deniyage rosh...@wso2.com
 wrote:

 Hi,

 With the M6 release of the appfactory, it has introduced a new bug for
 PHP application type. Due to this, php application are not deployed after
 build. In apptype.xml files there is a tag called Extension and it is
 to specify the artifact extensions.

 I'm fixing this issue and for current release uses the string value *
 as the value in Extension tag for application types which doesn't have an
 extension like PHP.

 I'm changing the that value from * to (empty) for application types
 which doesn't have any extension. Since, * value may mislead the users.
 * may be interpreted as all extension rather than no extension.

 Any concern on this decision?


 Thanks,
 Roshan Deniyage
 Associate Technical Lead
 WSO2, Inc: http://wso2.com

 Mobile:  +94 777636406
 Twitter:  *https://twitter.com/roshku https://twitter.com/roshku*
 LinkedIn :  https://www.linkedin.com/in/roshandeniyage


 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture



 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture



 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] Deletion of tenant data related to API Manager

2014-09-24 Thread Mahesh Chinthaka
Hi Amila,
Noted with thanks!

On Wed, Sep 24, 2014 at 10:34 AM, Amila Maha Arachchi ami...@wso2.com
wrote:

 +1 with few suggestions.

 Always use meaningful names.

 tenantDataTables - tenantDataDeleter.xml
 deleteTenantTableData - delete ProductSpecificTenantData

 On Wed, Sep 24, 2014 at 12:06 AM, Mahesh Chinthaka mahe...@wso2.com
 wrote:

 Hi All,
 After several offline discussions we concluded following.

 This deletion of tenant related data in tables scenario is pretty much
 common to several other products as well(eg : IS). Therefore we need to
 implement this in a way that the method is commonly accessible for each and
 every product.
 Then not only the API Manager (which is already in cloud) other future
 products which will enter the cloud, will also be able to delete tenant
 related table data. Following will be our approach.

 1. Each product will have *tenantDataTables.xml* file configured with
 table names(according to deletion order) and data source name


 2. New method called *deleteTenantTableData* will be implemented inside
 *TenantMgtutil* class to run *DELETE* queries for a given table name
  and a given tenant id.


 3. Inside *onPredDelete* method of *each product's TenantMgtListener*(eg:
 APIMgtTenantMgtListener)* , *above method will be called with the table
 names grabbed from xml file of that product

 Any thoughts on this will be much appreciated...

 Thanks

 On Thu, Sep 18, 2014 at 11:53 AM, Lakshman Udayakantha 
 lakshm...@wso2.com wrote:

 Hi All,

 We are implementing deletion of tenant data from API Manager. According
 to the offline chat with AmilaD, we have to delete a folder created in
 CARBON_HOME/repository/tenants/$tenantId. After that we have to delete
 database entries from WSO2AM_DB. Here we have to search the tenant data
 from tenant id, and delete them all. But due to some restriction
 constraints(FK,PFK,FAK) data deletion order of tables as we recognised can
 be listed below.


 SP_FEDERATED_IDP
 SP_AUTH_STEP
 SP_CLAIM_MAPPING
 SP_INBOUND_AUTH
 SP_ROLE_MAPPING
 SP_REQ_PATH_AUTHENTICATOR
 SP_PROVISIONING_CONNECTOR
 SP_APP



 IDP_AUTHENTICATOR_PROPERTY
 IDP_AUTHENTICATOR
 IDP_LOCAL_CLAIM
 IDP_CLAIM_MAPPING
 IDP_CLAIM
 IDP_ROLE_MAPPING
 IDP_ROLE
 IDP_PROV_CONFIG_PROPERTY
 IDP_PROVISIONING_ENTITY
 IDP_PROVISIONING_CONFIG
 IDP

















 *AM_APPLICATION_REGISTRATIONAM_APPLICATION_KEY_MAPPINGAM_SUBSCRIPTION_KEY_MAPPINGAM_SUBSCRIPTIONAM_APPLICATIONAM_API_RATINGSAM_API_COMMENTSAM_EXTERNAL_ROLESAM_API_SCOPESIDN_OAUTH2_RESOURCE_SCOPEIDN_OAUTH2_SCOPEAM_API_LC_EVENTAM_APIAM_SUBSCRIBER*









 *IDN_OAUTH2_AUTHORIZATION_CODEIDN_OAUTH1A_REQUEST_TOKENIDN_OAUTH1A_ACCESS_TOKENIDN_OAUTH2_ACCESS_TOKENAM_APP_KEY_DOMAIN_MAPPINGIDN_OAUTH_CONSUMER_APPS*


 Is this approach ok or are there any better approaches to do this? is it
 is ok, please suggest for any improvements.

 Thanks
 Lakshman
 --
 Lakshman Udayakantha
 Software Engineer, WSO2
 Mobile: *0711241005*

 *lakshm...@wso2.com lakshm...@wso2.com*


 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




 --
 *Mahesh Chinthaka Vidanagama* | Software Engineer
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 Mobile: +94 71 63 63 083 | Work: +94 112 145 345
 Email: mahe...@wso2.com ar...@wso2.com | Web: www.wso2.com




 --
 *Amila Maharachchi*
 Senior Technical Lead
 WSO2, Inc.; http://wso2.com

 Blog: http://maharachchi.blogspot.com
 Mobile: +94719371446




-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com ar...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] Deletion of tenant data related to API Manager

2014-09-23 Thread Mahesh Chinthaka
Hi All,
After several offline discussions we concluded following.

This deletion of tenant related data in tables scenario is pretty much
common to several other products as well(eg : IS). Therefore we need to
implement this in a way that the method is commonly accessible for each and
every product.
Then not only the API Manager (which is already in cloud) other future
products which will enter the cloud, will also be able to delete tenant
related table data. Following will be our approach.

1. Each product will have *tenantDataTables.xml* file configured with table
names(according to deletion order) and data source name


2. New method called *deleteTenantTableData* will be implemented inside
*TenantMgtutil* class to run *DELETE* queries for a given table name  and
a given tenant id.


3. Inside *onPredDelete* method of *each product's TenantMgtListener*(eg:
APIMgtTenantMgtListener)* , *above method will be called with the table
names grabbed from xml file of that product

Any thoughts on this will be much appreciated...

Thanks

On Thu, Sep 18, 2014 at 11:53 AM, Lakshman Udayakantha lakshm...@wso2.com
wrote:

 Hi All,

 We are implementing deletion of tenant data from API Manager. According to
 the offline chat with AmilaD, we have to delete a folder created in
 CARBON_HOME/repository/tenants/$tenantId. After that we have to delete
 database entries from WSO2AM_DB. Here we have to search the tenant data
 from tenant id, and delete them all. But due to some restriction
 constraints(FK,PFK,FAK) data deletion order of tables as we recognised can
 be listed below.


 SP_FEDERATED_IDP
 SP_AUTH_STEP
 SP_CLAIM_MAPPING
 SP_INBOUND_AUTH
 SP_ROLE_MAPPING
 SP_REQ_PATH_AUTHENTICATOR
 SP_PROVISIONING_CONNECTOR
 SP_APP



 IDP_AUTHENTICATOR_PROPERTY
 IDP_AUTHENTICATOR
 IDP_LOCAL_CLAIM
 IDP_CLAIM_MAPPING
 IDP_CLAIM
 IDP_ROLE_MAPPING
 IDP_ROLE
 IDP_PROV_CONFIG_PROPERTY
 IDP_PROVISIONING_ENTITY
 IDP_PROVISIONING_CONFIG
 IDP

















 *AM_APPLICATION_REGISTRATIONAM_APPLICATION_KEY_MAPPINGAM_SUBSCRIPTION_KEY_MAPPINGAM_SUBSCRIPTIONAM_APPLICATIONAM_API_RATINGSAM_API_COMMENTSAM_EXTERNAL_ROLESAM_API_SCOPESIDN_OAUTH2_RESOURCE_SCOPEIDN_OAUTH2_SCOPEAM_API_LC_EVENTAM_APIAM_SUBSCRIBER*









 *IDN_OAUTH2_AUTHORIZATION_CODEIDN_OAUTH1A_REQUEST_TOKENIDN_OAUTH1A_ACCESS_TOKENIDN_OAUTH2_ACCESS_TOKENAM_APP_KEY_DOMAIN_MAPPINGIDN_OAUTH_CONSUMER_APPS*


 Is this approach ok or are there any better approaches to do this? is it
 is ok, please suggest for any improvements.

 Thanks
 Lakshman
 --
 Lakshman Udayakantha
 Software Engineer, WSO2
 Mobile: *0711241005*

 *lakshm...@wso2.com lakshm...@wso2.com*


 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com ar...@wso2.com | Web: www.wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [Cloud] Tenant deletion

2014-08-22 Thread Mahesh Chinthaka
Thanks Dimuthu, Danushka  Ajanthan  for your feedback.
We will do this with the approach discussed online+offline.


On Fri, Aug 22, 2014 at 10:59 AM, Danushka Fernando danush...@wso2.com
wrote:

 Hi
 +1 for the OnPreDelete concept. But the thing is we don't have this Pre
 and Post events anywhere in platform. I think that's something we should
 consider about. WDYT?

 Thanks  Regards
 Danushka Fernando
 Software Engineer
 WSO2 inc. http://wso2.com/
 Mobile : +94716332729


 On Fri, Aug 22, 2014 at 9:14 AM, Dimuthu Leelarathne dimut...@wso2.com
 wrote:

 Hi Mahesh all,

 Lets consider Carbon Platform aspect first.

 Before we remove tenant from user core and registry, we have to delete it
 from all other places. So +1 for the interface that would allow different
 product teams to clean up their cleanup process, but here is what I
 recommend,

 We need a method call onPreDelete() on TenantMgtListener. This is to
 allow all product teams to implement it. So the first rule of thumb is, if
 any product is moving to cloud they must implement this method and prove
 that they clean up the tenant before they move to WSO2Cloud.

 So basically, in tenant.core what you have to do is call all OSGi
 registered TenantMgtListener's onPreDelete(), and after that delete from
 registry and finally user.core.

 That would be the most elegant and extensible fix for platform.

 Now we come to AF as a product/solution. We have to implement
 onPreDelete() method. So we as a product team should decide whether we are
 going to implement it from BPEL or not. So as a product in order to be
 WSO2Cloud friendly we have to implement onPreDelete() method. From what I
 feel, I believe the way to do is code + BPEL.

 thanks,
 dimuthu


 On Fri, Aug 22, 2014 at 7:26 AM, Ajanthan Balachandran ajant...@wso2.com
  wrote:




 On Fri, Aug 22, 2014 at 5:48 AM, Danushka Fernando danush...@wso2.com
 wrote:

 Hi Ajanthan
 Problem with OnDelete is it is called after tenant deleted (After
 deleting userstore and registry). But we need to cleanup before that
 otherwise we cannot call admin services since tenant is not there. As per I
 mentioned in the previous thread we need to call this at a OnPreDelete.

 IMO OnDelete method should be called as first step.

 @Mahesh : I think you have missed delete applications step. And delete
 applications step would Issue tracker details as well I guess. @ Ajanthan :
 Correct me if I am wrong.

 Looping through each applications and deleting will not be a salable
 solution.

 Thanks  Regards
 Danushka Fernando
 Software Engineer
 WSO2 inc. http://wso2.com/
 Mobile : +94716332729


 On Thu, Aug 21, 2014 at 8:46 PM, Ajanthan Balachandran 
 ajant...@wso2.com wrote:




 On Thu, Aug 21, 2014 at 8:24 PM, Mahesh Chinthaka mahe...@wso2.com
 wrote:

 Hi Everyone,


 We are working on the Training Project -[Cloud] Tenant deletion
 code/script for cloud - https://redmine.wso2.com/issues/3121. Listed
 below the  workflow of the tenant deletion process in the App Cloud as we
 identified.

 1. Undeploy Jenkins web app from application server

 2. Delete Git repository (use gitblit api to delete repo in Git)

 3. Unsubscribe Stratos using Stratos Rest Services

 4. Check database created by RSSAdmin and delete them

 5. Perform TenantMgtAdminService deleteTenant operation

-

i. Delete Billing data
ii. Delete Tenant Registration Data (Ex. REG_CLUSTER_LOCK,
REG_LOG)
iii. Delete Tenant User management data (Ex. UM_USER_PERMISSION,
UM_USER)
iv. Remove Tenant information from cache
v. Delete UM_TENANT table



 Don't you need to cleanup issue tracker?

 As per the analysis there are two solutions we have identified to
 implement this , such as BPEL and Carbon Component. We thought of going 
 for
 a *carbon component* implementation rather than using a* BPEL* due
 to following reasons.

 1. Plugging a Carbon Component will give more extensibility to
 implement Tenant Deletion operation in future Cloud base products

 2. If we used a BPEL we will have to reconstruct at each time when we
 meet a new requirement (ex: esb cloud integration).


 Proposed Solution

 Why can't you use existing TenantMgtListener and add onDelete
 method.It also has ListenerOrder and every implementation should be
 registered as OSGI service.


 1. Create an abstraction for delete operation

  public interface TenantDeletion{

  public void onDeletion();

 }

 2. Implement TenantDeletion for each operations

 public class JenkinsAppUndeployer implements TenantDeletion{

 public void onDeletion(){

  //Implementation of the JenkinsApp undeploy process

 }

 }

 3. Use a configuration file to maintain the execution order which
 help to dynamically add new requirement

 ExecutionOrder

class name=”org.wso2.cloud.tenant.JenkinsAppUndeployer”/class

class name=”org.wso2.cloud.tenant.GitRepoRemover”/class

class name=”org.wso2.cloud.tenant.XX”/class

 /ExecutionOrder


 We are looking for a feedback

[Architecture] [Cloud] Tenant deletion

2014-08-21 Thread Mahesh Chinthaka
Hi Everyone,


We are working on the Training Project -[Cloud] Tenant deletion code/script
for cloud - https://redmine.wso2.com/issues/3121. Listed below the
 workflow of the tenant deletion process in the App Cloud as we identified.

1. Undeploy Jenkins web app from application server

2. Delete Git repository (use gitblit api to delete repo in Git)

3. Unsubscribe Stratos using Stratos Rest Services

4. Check database created by RSSAdmin and delete them

5. Perform TenantMgtAdminService deleteTenant operation

   -

   i. Delete Billing data
   ii. Delete Tenant Registration Data (Ex. REG_CLUSTER_LOCK, REG_LOG)
   iii. Delete Tenant User management data (Ex. UM_USER_PERMISSION, UM_USER)
   iv. Remove Tenant information from cache
   v. Delete UM_TENANT table



As per the analysis there are two solutions we have identified to implement
this , such as BPEL and Carbon Component. We thought of going for a *carbon
component* implementation rather than using a* BPEL* due to following
reasons.

1. Plugging a Carbon Component will give more extensibility to implement
Tenant Deletion operation in future Cloud base products

2. If we used a BPEL we will have to reconstruct at each time when we meet
a new requirement (ex: esb cloud integration).


Proposed Solution

1. Create an abstraction for delete operation

 public interface TenantDeletion{

 public void onDeletion();

}

2. Implement TenantDeletion for each operations

public class JenkinsAppUndeployer implements TenantDeletion{

public void onDeletion(){

 //Implementation of the JenkinsApp undeploy process

}

}

3. Use a configuration file to maintain the execution order which help to
dynamically add new requirement

ExecutionOrder

   class name=”org.wso2.cloud.tenant.JenkinsAppUndeployer”/class

   class name=”org.wso2.cloud.tenant.GitRepoRemover”/class

   class name=”org.wso2.cloud.tenant.XX”/class

/ExecutionOrder


We are looking for a feedback on this to move forward with selected design.

-- 
Mahesh Chinthaka
Software Engineer , WSO2.

Phone : (+94) 71 63 63 083
Email : mahe...@wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture