Is there any documentation on how this works form the scripter's point of view? Specifically:
- For the old events (i.e. the non-toplogy events hooked via the /extensions directory), is the new code backwards compatible with scripts using the /extensions mechanism? - Specifically, (I'm not familiar with the JavaProcessBuilder), can you confirm if environment variables set before the JVM is invoked will still be visible to the shell scripts? Thanks, Shaheed -----Original Message----- From: Akila Ravihansa Perera [mailto:raviha...@wso2.com] Sent: 07 May 2014 05:24 To: dev@stratos.incubator.apache.org Cc: Sajith Kariyawasam; Reka Thirunavukkarasu Subject: Re: Cartridge Agent Extension Points Pl note that patch is against the master branch (as of yesterday). Following are the list of event listeners that it will subscribe to 1. MemberActivatedEventListener 2. MemberTerminatedEvent 3. MemberSuspendedEventListener 4. CompleteTopologyEventListener 5. SubscriptionDomainsAddedEventListener 6. SubscriptionDomainsRemovedEventListener 7. CompleteTenantEvent 8. ArtifactUpdateEventListener (only locally) 9. InstanceCleanupMemberEventListener (only locally) 10. InstanceCleanupClusterEventListener (only locally) 11. Instance Started Event (only locally) 12. Start Servers event (only locally) 13. Instance Activated Event (only locally) These event handlers are called through an interface (ExtensionHandler). Therefore someone else can easily implement this interface and customize extensions from code level. The main purpose is however to extend the cartridge agent through shell scripts without changing the code. PS - Is there an on-going development effort to develop the cartridge agent in Python or Google GO? If so I would like to get involved :) Thanks. On Wed, May 7, 2014 at 9:44 AM, Akila Ravihansa Perera <raviha...@wso2.com> wrote: > Hi, > > I've developed cartridge agent extension points feature for Stratos > cartridge agent. This will work by listening to event messages > published by CC, ADC and agents running on instances. > > Once an event is received it will execute a shell script (system > command) with parameters passed to it as environment variables through > Java ProcessBuilder class. These environment variables are visible > only to that process so there is no risk of dirty read/write. > > These script names can be set from stratos.sh and these are not > hard-coded. Puppet templates can be used to set script names for each > event type. This can be useful when dealing with different platforms > (For eg - Linux, Windows, OS X etc) > > I had to make some changes to the core messaging component to get > LBClusterID from Member Activated event. This is because it is > necessary for LBs to identify which members belong to their LB cluster > when they receive a member activated event. If someone can tell a > workaround, please do share. > > I have attached the patch in [1] as a JIRA issue. > > Thanks. > > [1] - https://issues.apache.org/jira/browse/STRATOS-642 > > > -- > Akila Ravihansa Perera > Software Engineer > WSO2 Inc. > http://wso2.com > > Phone: +94 77 64 154 38 > Blog: http://ravihansa3000.blogspot.com -- Akila Ravihansa Perera Software Engineer WSO2 Inc. http://wso2.com Phone: +94 77 64 154 38 Blog: http://ravihansa3000.blogspot.com