X

Geertjan's Blog

  • December 17, 2014

Integrating Cloud Providers into NetBeans IDE (Part 1)

Geertjan Wielenga
Product Manager

Many cloud providers exist (see here for some of them)
and several have integration points via Java APIs. Some of these are
Oracle Cloud, Jelastic, Amazon Beanstalk, Red Hat OpenShift, and Pivotal Cloud Foundry.
And some of those are already integrated into NetBeans IDE, so that you can login, view the resources that have been deployed, and deploy new resources, together with the reverse activities, e.g., undeploying and unregistering. Others not (yet)
and so let's give potential integrators a leg up by showing how to get
started integrating their cloud offerings into NetBeans IDE.

Here's the applicable NetBeans API:

http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-server/overview-summary.html


Now let's get a 'hello world' scenario up and running, for an imaginary Foo Cloud.

Here's the source code:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0.2/cloud/part1

When you download and run that module, you'll be able to right-click on the Cloud node and choose Add Cloud...

...and then, in addition to the Amazon Beanstalk, which NetBeans provides by default, you'll see Foo:

When you click Next, above, you'll be able to enter a name:

When you click Finish, above, the name you entered will be the name of a new node that will appear automatically under the Cloud node:

When you close the IDE, after registering a Cloud provider like the above, and restart the IDE, you'll see the Cloud providers you registered automatically being displayed again under the Cloud node.

The file structure of the NetBeans module, shown in the first screenshot above, is as simple as it can be as a basic starting point for integrating your own Cloud provider. To understand the code, the starting point is to take a look at the layer.xml file, where you'll see that FooServerInstanceProvider and FooServerWizardProvider are registered.

In subsequent blog entries, we'll extend this example to provide less generic and more specific features for integrating various Cloud providers.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.