How to create a LifeTime Plugin

  
Hi,

In version 8.0 we've introduced LifeTime SDK. This new feature provides a lot of information about your infrastructure that you can use to build your own LifeTime plugins. Pretty much what you can see in your LifeTime today was made available to you through an API.

Plugins are special applications that are seamlessly integrated into LifeTime:



If you want to create a LifeTime plugin, do the following:

1. Access LifeTimeSDK by typing "LifeTimeSDK" in the url of your LifeTime environment
2. Follow the 'click here' link at the end of the page





3. Choose your LifeTime Plugin development Environment
4. Install LifeTime SDK on the environment




5. You should take this opportunity to also export Sample Data to your plugin development environment. This is important because all the data provided by the APIs is located in LifeTime's server (e.g. the Environment List [Development, Quality, Production]), so if you call any API action from a Development server, those calls won't return any data unless, of course, you have exported it to that environment.




6. Now you can start the coding part. You can do this in two different ways, by clicking on the "Start developing you plugin now!" link: 



... or on the new Icon that will appear in Service Studio (when connected to the plugin development environment) by the time SDK installation finishes.



This template already has:
- The bootstrap action to register the plugin in LifeTime
- The WebService to configure if the plugin is visible to the current LifeTime user
- A UI template and styles to make your plugins look like part of LifeTime
- All the APIs ready to use!




7. Check our sample plugin! With the version 8.0 we have made available in the forge a sample plugin called Geo Performance that gives you an idea of how to create a simple plugin that uses all the APIs. It is also an example of how we built some parts of the brand new Performance Monitor, including the data aggregation process!



8. Plug it! Since the plugin was developed in a separate environment from LifeTime you need to integrate it once you finish developing and testing it. For that, simply grab the Solution and publish it in LifeTime Environment's Service Center. 

9. Share it with us! :) 

We hope this post helps you get started in the LifeTime SDK. We also hope that you guys can help us making this product better and better by increasing the forge with lots of LifeTime plugins...  or by sharing great ideas!

Regards,

Hélio Dolores



Outstanding post Hélio.. :)
Here is the answer to the curiosity I had and that shared with you in BarCamp..

Cheers,
Gonçalo M.

Interesting! This fits very well with a forge component I'm in the middle of developing.

Watch this space in the coming weeks for more information...

Cheers,
Richard
Congrats, very useful post.
Best Regards Miguel Grilo
Thank you guys!

I'll be here waiting to see your amazing plugins :)
Very good post Hélio!!!
This is the kind of posts that should be even more frequents.
 
Let's keep the good job =) 
Could you help on detailing the steps to install the LifeTimeSDK in local. It is not exist by default. I have tried changing the url context root as http://localhost/LifeTimeSDK/ which doesn’t help. 
Vasanth wrote:
Could you help on detailing the steps to install the LifeTimeSDK in local. It is not exist by default. I have tried changing the url context root as http://localhost/LifeTimeSDK/ which doesn’t help. 
 Hi Vasanth,

Which edition of the platform are you using (Community, Enterprise)?

LifeTime and its SDK are only available for the Enterprise edition. If that's your case:
  • Go to LifeTime (e.g. http://<your_lifetime_server>/LifeTime) and register your local environment there (Infrastructure tab);
  • Access http://<your_lifetime_server>/LifeTimeSDK and follow the steps on Hélio's post
Cheers,
Paulo Ferreira
Thank you Paul, As local env is community edition, Now I am connecting to remote server which is Enterprise Java(JBOSS) Edition. Does it be included in the Java installation platform by default ? or it requires explicit installation ? I am not able to access it http://<REMOTE SERVER NAME>/LifeTimeSDK
It requires explicit installation, but it is mentioned just like System Components in the Install Checklist:

Note that LifeTime itself should only be installed in one environment (usually Production), so you're either connecting to the wrong server name, or that installation step was skipped.

Just to be sure, the remote server you tested is running 8.0?

Cheers,
Paulo Ferreira
Hi,

I was wondering if it's possible to hook an action on the deploy when deploying applications?

1. select application
2. click deploy
3. before actual deploy do some action based on applicationId, retrieve some data for example
4. actual deployment
5. after-deploy do some action, put data on new environment (data you just have retrieved from 3)



Hi,

I'm sorry but that kind functionality is not available yet.

Regards,
Héliod

Hello, just to add one extra note:

Keep in mind and don't forget, in order to your PluginConfiguration  (callback) WebService work properly you need to set your eSpace Web Service NameSpace  property to: http://LifeTimePlugin/


Hope it helps you!
Best regards.

Daniel Martins.
Hi Daniel,

This 'Web Services Namespace' problem should only happen if you don't follow the complete procedure, because the value should already be set on the plugin template.
Do you have multiple eSpaces on the application?

Thanks for the feedback!

Hi,

As of today, can I develop a LifeTime plugin in a Personal Environment?
In my Personal Environment I do have LifeTime SDK Application installed. I can reference it from Service Studio, but I don't have that icon "New LifeTime Plugin" to give me the bootstrap action to register the plugin in LifeTime and the WebService to configure if the plugin is visible to the current LifeTime user.

So, can I really achieve the development of a LifeTime plugin on my Personal Environment?
I try to install the lifetimeSDK, but it says
"You cannot develop a plugin in *server* because Platform Server version 8.0.0.0 is required."

But we have P9-amsterdam installed?