Difference between revisions of "Virtual Platform"

From Gcube Wiki
Jump to: navigation, search
(Instantiating)
(Instantiating)
Line 36: Line 36:
 
=== Instantiating ===
 
=== Instantiating ===
  
A virtual platform can be created starting from its configuration object. The configuration objects available on the node can be obtained by invoking the <em>listAvailablePlatforms()</em> method on the Platforms class. Starting from a given folder, the method reads and loads all the platform [[Virtual_Platform#Configuration|configuration files]].
+
A virtual platform can be instantiated starting from its configuration object. The list of configuration objects available on the node can be obtained by invoking the <em>listAvailablePlatforms()</em> method on the Platforms class. Starting from a given folder, the method reads and loads all the platform [[Virtual_Platform#Configuration|configuration files]].
  
 
<source lang="java">
 
<source lang="java">
Line 51: Line 51:
 
}
 
}
 
</source>
 
</source>
 +
 +
=== Checking ===
 +
 +
=== Managing Packages ===
 +
 +
==== Deployment ====
 +
 +
==== Activation ====
 +
 +
==== Deactivation ====
 +
 +
==== Undeployment ====

Revision as of 17:04, 18 July 2011

Role

The Virtual Platform is a model to be extended for transparently interfacing a potentially unlimited number of hosting environments. This library has been designed and implemented to bridge and manage the lifecycle of execution units running on a different platform than gCore.

The gCube enabling technology is capable of dynamically instantiating platforms (along with their resources) compliant to such a model. When new software designed to run on a specific platform is uploaded in the software repository and then requested for deployment, a virtual image of the target platform is created to manage such software.

Design

The library has been designed having in mind its two-fold role:

  • to model the basic behavior of a virtual platform (package org.gcube.vremanagement.virtualplatform.model)
  • to offer a platform-independent way to instantiate and interact with a concrete virtual platform implementation (package org.gcube.vremanagement.virtualplatform.image)


Creating a new virtual platform

Configuration

A platform configuration consists of a properties file with the following syntax:

Name=
Version=
PlatformClass=
Resources=
ResourceFolder=
DedicatedClassLoader=
BaseURL=
User=
Password=


Managing platforms

Instantiating

A virtual platform can be instantiated starting from its configuration object. The list of configuration objects available on the node can be obtained by invoking the listAvailablePlatforms() method on the Platforms class. Starting from a given folder, the method reads and loads all the platform configuration files.

import org.gcube.vremanagement.virtualplatform.image.PlatformConfiguration;
import org.gcube.vremanagement.virtualplatform.image.VirtualPlatform;
import org.gcube.vremanagement.virtualplatform.image.Platforms;
 
 
 
List<PlatformConfiguration> configurations = Platforms.listAvailablePlatforms(new File(GHNContext.getContext().getVirtualPlatformsLocation()));
for (PlatformConfiguration config : configurations){
   VirtualPlatform vp = new VirtualPlatform(config)
   //plays with the platform
}

Checking

Managing Packages

Deployment

Activation

Deactivation

Undeployment