Unknown macro: {gliffy}
GlassFish Platform as a Service Functional SpecificationContributors: Introduction(slides) The goal of this document is to provide high level understanding of GlassFish Platform as a Service (PaaS) feature design. This feature will provide a Java EE centric solution to cloud computing that enables a user to deploy a Java EE application to the cloud, with the system allocating and provisioning virtual machines within the cloud to run the application, run the services required by the application, provide load balancing, and dynamically scale the application deployment as needed. This document is a master plan that includes descriptions of features that may not be included in the first release of this feature. This document is specific to the GlassFish application server; It is not a goal to provide a extensible facility to any type of cloud enabled application server. It is also not a goal to provide extensible management of the cloud infrastructure, it's basically allowing GlassFish to be plugged into an existing virtualization infrastructure (the feature will support many) and offer a Java EE centric way of deploying and managing applications without deep understanding of cloud infrastructure. PaaS Feature ArchitectureThe PaaS feature is set of services that will be available within a single process or as a set or processes running on different machines or virtual machines communicating with a well defined set of interfaces. At the core, the PaaS can be seen as an extended DAS where virtualization functions and features are added. The feature set for the PaaS feature includes:
In each case, the user is obviated of the need to manage the system at the infrastructure (machines, networking, software, storage) level. The Java EE platform is presented as a service, allowing the user to be concerned with running a Java EE application rather than provisioning nodes, clusters, instances, resources, services, etc. The Java EE application is the primary concern of the user, making these other concerns secondary. The feature must support:
This list of which IaaS providers and which services are supported in a particular release will be part of the release plan. The architecture must be independent of which specific ones are selected. Considering that many of the tasks above are already implemented by the DAS, the PaaS architecture is implemented on top of DAS with the following added functionalities.
DefinitionsNode = Operating system instance running on either a virtual image or on bare metal. Architectural ComponentsThe PaaS feature consists of the architectural components described in this section. These components are services that reside within an instance of GlassFish server, but depending on the configured topology, they may or may not be within the same server. To provide this flexibility, the architecture needs a way to define a module that can be accessed either locally or remotely without significantly changing the client software. There are several technologies available in GlassFish to do this, including RMI, MBeans/JMX, AdminCommands/__asadmin via HTTP and SSH where necessary, and REST. There are several advantages to using AdminCommands as the mechanism for this feature: they are the foundation for building the GlassFish clustering feature, the command replication framework provides the ability to run an asadmin command using the same API whether the command is local or remote, and the framework has the ability to support secure communication via SSL client certificates. The implementer of the function just has to extend AdminCommand, while the user of the function just has use one of the classes in the RemoteAdminCommand hierarchy to run the command. For this feature, we could implement a class that provides better support for running a command independently from where it is located (either local or remote). We might also need to enhance the security layer to deal with multiple certificates, for the case where the DAS from multiple domains is communicating with a centralized IaaS management service. This design makes the unit of development (the module) for the feature AdminCommand. There will be lower level commands (possibly hidden) for creating VMs, provisioning services, etc. and higher level commands such as "deploy" would ultimately be running these lower level commands. Any PaaS feature interface that potentially spans JVM boundaries would be expressed as an AdminCommand. The diagram at the end of this sections shows how these components fit together. OrchestratorThe orchestrator is the top-level services that provides the ability to deploy an application to the cloud. It is responsible for:
The orchestrator uses a set of service plugins to allow applications to be deployed with various services such as a database, JMS, etc. Elasticity ManagerThe elasticity manager is responsible for providing elasticity to the deployed application. It is responsible for:
IaaS Management Service (IMS)The Infrastructure as a Service (IaaS) management service provides an abstraction of the IaaS cloud to the GlassFish software. This abstraction encapsulates various APIs that are available for managing cloulds. The IaaS management service is responsible for carrying out the decisions made by the elasticity manager and the orchestrator. If the IaaS provides VM-level monitoring services, then the IaaS management service communicates information about IaaS decisions (such as moving a VM) to the elasticity manager, which then includes that information into its elasticity algorithms. It is capable of allocating and de-allocating virtual machines across all groups defined in its configuration. Virtual machines are allocated across groups (virtualization management decision tbd) but the IaaS management service is responsible for deciding on which bare metal hardware such virtual machines should run. GroupsMachines are divided into groups. Groups can be geographically determined, or can be based on network boundaries. Such groups are composed of physical machines and share the same virtualization technology (libvirt, jclouds..). It is unclear how well such groups will map to public clouds offerings (at worst I suppose you have a single group). The group will be managed by an IaaS management service which has the following APIs.
The IaaS management service will not duplicate the DAS responsibilities of maintaining a list of clusters or list of deployed applications. It's main responsibility is to provide bare metal and run VMs on it. I consider the IaaS management service stateless artifacts. The IaaS management service for libvirt should be implemented on top of GlassFish nucleus distribution. Domains ManagerThe Domains Manager is responsible for automating the process of creating a domain within the cloud. The domains manager may be a simple command line interface that is used by the PaaS admin to create a domain on behalf of a GlassFish user, or it could provide a GUI console that would provide a single landing point for users to create a domain (or domains), and it could even provide a simplified interface for application deployment. The domains manager is an optional part of the architecture, as the PaaS admin could manually allocate a VM from the cloud, create a GlassFish domain on it, and configure that domain to use the IMS. The domains manager could have the following functions: For GlassFish Users:
For the PaaS Administrator
The domains manager acts as an interface point for users of the PaaS. It has the ability to create a VM for a DAS. But it doesn't analyze applications, create VMs for clustered instances, create VMs for other services. It doesn't have a pluggable interface for service providers. The domains manager runs on a GlassFish DAS. The domains manager lifecycle begins with a manual installation of GlassFish with the PaaS feature. A separate GlassFish domain is needed to run the domains manager itself, i.e., separate from the domains that are being managed by users of the domains manager. If this GlassFish domain is to be run within the cloud itself, a VM for the domain would need to be manually created using tools from the cloud infrastructure. Domains Manager Data StoreThe domains manager stores the following information
PaaS Feature OperationThe description of PaaS operation will refer to a set of services: Orchestrator, Elasticity Manager, IaaS Management and a Domains Manager. Let's have a look on how these services fit together. In the diagram below, the boxes do not represent process boundaries but service boundaries.
Unknown macro: {gliffy}
DAS CreationHow the GlassFish cloud environment bootstraps itself depends on the deployment environment.
DeploymentThe most important difference with the PaaS Feature versus 3.1 is the deployment use case. In 3.1 the users were most of the time performing the following tasks when deploying an application to a multi-instance environments :
As you can see, the physical layout of the deployment is set before the deployment itself and the elasticity of the cluster can be achieved though manually adding instances to an existing cluster. With the PaaS feature, the dynamics will be reversed where the hardware is mapped to a deployment request and the elasticity is entirely managed by the PaaS architecture (of course manual modification could still be possible, tbd).The following steps is how the system could handle a cloud deployment request.
It is still unclear at this point where the virtual machines templates will reside. It is entirely possible that we choose to associate template management at the IaaS management service level as it is usually a primary function of the same IT department (the IaaS admin responsibilities).
Unknown macro: {gliffy}
ElasticityElasticity will be mostly managed by the PaaS architecture within the DAS where instances can be provisioned or decommissioned following events, monitoring triggers. Let's have a look at the work the PaaS architecture will have to do to add a new GlassFish instance to a deployment environment.
Removing an instance is nothing more than removing a node from the cluster.
Unknown macro: {gliffy}
Role of ClusterMore than one application can be deployed to a set of virtual machines as they have dependencies on each other (or form a complete feature set). The current notion of cluster guarantees that all applications deployed to it will be mapped to the same GlassFish instances (deployment environment) and adding the elasticity characteristics to cluster will provide the ability to grow or shrink set of applications. By default, application deployed without a cluster will be provided one (naming tbd). The life-cycle of the cluster will be entirely managed though the life-cycle of an application space. When the last application of a cluster is undeployed, the DAS through the orchestrator will release all the virtual machines. High level steps of application space destruction :
There are two cases that require special processing:
UpgradeThere are several aspects of upgrade and update related to this architecture. For upgrade from a previous release of GlassFish that doesn't support this feature, users would not automatically be able to make use of any of the PaaS support features for applications that are already deployed to a domain. Rather, the various services that are part of this feature would need to be configured in either a new system or an upgraded system, and then an application would need to be deployed again into the new cloud-based infrastructure. For update from one release of GlassFish to another where both support the Paas Support feature, an in-place update would be supported in the same way for a non-cloud-enabled system. However, an improvement in the way that updates to GlassFish instances are accomplished is recommended, i.e., make it possible to update the GlassFish software on an instance from the DAS console. An upgrade of a Java EE application that is deployed to this infrastructure is handled by the Orchestrator component. The upgrade cannot just be an undeploy followed by a deploy, because this would result in the loss of service data in provisioned services. The Orchestrator component will provide special handling for the application redeploy case. Divide the Responsibilities/WorldAs we need to offer an Open Source implementation of the PaaS feature, there is a need to define at least one plugin implementation (probably based on libvirt for private, on ? for public clouds). There is also a need to define a segmentation and representation of the physical assets (machines) so that a successful mapping between the (to be determined by Java EE spec) metadata is properly mapped to hardware boxes. RolesThe following roles are important in the cloud space: The IaaS AdministratorThe IaaS admin is responsible for configuring bare metal and configure the machines that are managed by the IaaS management service. He will most likely be providing the virtual machines templates used to create GlassFish instances. Finally, he manages the access control on both the IaaS management service as well as the virtual machines. It is assumed that only the IaaS admin will have access to the target machines used to run the virtual machines. None of the other roles members will be able to connect to the bare metal or install software on it. The admin tools used by the IaaS admin must support
The PaaS AdministratorThe PaaS admin will configure GlassFish and the domains manager following the allocations of the IaaS from the IaaS admin. His main responsibilities are :
The GlassFish UserThe GlassFish user is the administrator as we know it today in 3.1. He has complete access to domain configuration and can obviously deploy/undeploy applications. In addition, if there is a Domains Manager console, a GlassFish user can create, list, and delete a domain from the Domains Manager, and depending on the capabilities of that console, may be able to deploy an application directly from that console. VM Creation
TBD, do we need more sophisticated settings like number of disks attached to the template, size of disks, etc... ? Topology examples |