Faiez Zalila
email: faiez.zalila@cetic.be

Fabian Korte

Johannes Erbel

Stéphanie Challita
email: stephanie.challita@irisa.fr

Jens Grabowski

Philippe Merle
email: philippe.merle@inria.fr

MoDMaCAO: a model-driven framework for the design, validation and configuration management of cloud applications based on OCCI

Keywords: Cloud Computing, Open Cloud Computing Interface, OCCI, Models@run.time

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

INTRODUCTION

With the broad proliferation of cloud computing in the industry and academia, many different cloud service providers have emerged, that offer different service levels and interfaces to the customer. This heterogeneity of cloud provider interfaces makes it hard to migrate applications between different cloud providers or combine different offerings. To tackle this problem, two different strategies can be identified in the literature: 1) the use of code libraries that provide a common software development kit for different cloud providers, e.g., Apache jclouds 1,2 or fog 3 , or, 2) the resort to common standards, e.g., the Topology and Orchestration Specification for Cloud Applications (TOSCA) 4 , and Open Cloud Computing Interface (OCCI) [START_REF] Nyrén | Open Cloud Computing Interface -Core[END_REF] integrated with modeldriven techniques to decouple the cloud applications from the technical peculiarities of the different target platforms. In this context, multiple IDEs have emerged such as OC-CIware [START_REF] Parpaillon | Occiware-a formal and tooled framework for managing everything as a service[END_REF], Cloudify 5 and Alien4Cloud 6 . In this paper, we focus on OCCI, which is developed by the Open Grid Forum (OGF) and aims to standardize an interface for the management of any kind of cloud resources. The OCCI standard comprises several parts, including the OCCI Core model and model extensions for the infrastructure and platform layer managing Infrastructure-as-a-Service (IaaS) and Platformas-a-Service (PaaS) resources respectively. Several implementations and use cases for the infrastructure extension already exist, which demonstrate its feasibility. However, implementations and use cases for the platform extension are rare. This might be due to the fact that it only provides a very rough definition of cloud applications and their components, that does not include how these cloud applications can be configured and managed. Furthermore, it does not define how application components are connected to the hosting infrastructure, such as, which component gets deployed on which virtual machine. This kind of situation forces cloud developers to manually find the appropriate deployment plan for their applications which is a tedious task when the application has a considerable size and multiple components. To close these gaps, we introduced improvements to the OCCI platform extension to allow the deployment and management of modeled platform elements, e.g., application and components, on top of IaaS resources. We implemented and validated these extensions with the Model-Driven Configuration Management of Cloud Applications with OCCI (MoDMaCAO) framework [START_REF] Korte | Modeldriven configuration management of cloud applications with occi[END_REF]. The initial version of MoDMaCAO provides several improvements to the OCCI platform extension to complete its lifecycle model and allow the use of configuration management tools for managing cloud applications at runtime. In this paper, we provide an overview of the MoDMaCAO framework and extend its features in the following ways:

1. We provide visualization and design capabilities for cloud application topologies based on OCCI. 2. We integrate the definition of constraints on cloud resource types to allow for the verification of defined cloud application topologies at design time. 3. We introduce capabilities to generate configuration management artifact skeletons from the defined cloud application topologies to reduce the effort for implementing its lifecycle operations.

The remainder of this paper is structured as follows. We introduce OCCI and the OCCIware tool chain as a basis for our work in Section 2. Afterwards, in Section 3, we identify the problems we want to address and the contributions introduced in the paper. Subsequently, in Section 4, we give an overview of the MoDMaCAO framework and its extended features. Furthermore, we demonstrate how MoDMaCAO can be used to model the popular LAMP stack and a Mon-goDB cluster and how it integrates with configuration management tools in Section 5. Thereafter, in Section 6, we discuss our results and observations. Finally, we present related work in Section 7, and we conclude this paper and provide an overview on future work in Section 8.

BACKGROUND

In the following, we provide a brief overview of the OCCI standard, the extensions we made to the OCCI Platform extension and the general features of MoDMaCAO, our modeldriven tool chain to the design, validation, and configuration management of cloud applications.

Open Cloud Computing Interface

The OCCI Core model [START_REF] Nyrén | Open Cloud Computing Interface -Core[END_REF] is composed of eight elements (grey boxes in Fig. 1). Category is the base type for all other classes and provides the necessary identification mechanisms.

Categories can be uniquely identified by associated Uniform Resource Identifiers (URIs). They have Attributes that are used to define the properties of a certain class, e.g., the IP address of a virtual machine. Three classes are derived from Category: Kind, Action, and Mixin. A Kind defines the type of a cloud entity, e.g., a compute resource, and Mixins define how an entity can be extended at runtime. Both have Actions that define which behaviours can be executed on an entity. The cloud entities themselves are modeled by the class Entity, which provides the base class for cloud Resources, e.g., virtual machines, and Links that define how the resources are connected. In the remainder of this article we use the terms OCCIware Extension and OCCIware Configuration instead of OCCI extension and OCCI Configuration to refer to the extension and the configuration based on OCCIware metamodel. The OCCI Core model is accompanied with several extensions. The OCCI Platform extension [START_REF] Metsch | Open Cloud Computing Interface -Platform[END_REF] defines the two specialized kinds of Resource: Application and Component and a new Link kind ComponentLink (see Fig. 2). The Appli cation thereby represents the user accessible part of the overall cloud application. The Application itself is composed of several Components, that implement its functionality, e.g., through microservices. Components can be linked with help of ComponentLinks to establish a connections between them. An Application or Component can be in the state Active, Inactive or Error. A transition from the Inactive to the Active state can be triggered by calling the start action on the specific Application or Component, and a transition from Active to Inactive can be triggered by calling the stop action. The Error state can be reached at any time, in case an error occurs in the Application or Component.

OCCIware Tool Chain

OCCI has been proposed as a generic model and an interface for managing any kind of cloud computing resources. However, OCCI suffers from the lack of a precise definition of its concepts and a modeling framework to model, verify, validate, document, deploy and manage OCCI artifacts. To resolve the first issue, a metamodel from OCCI, named OC-CIWARE METAMODEL (see Fig. 1), has been proposed in [START_REF] Merle | A Precise Metamodel for Open Cloud Computing Interface[END_REF] and enhanced in [START_REF] Zalila | A Model-Driven Tool Chain for OCCI[END_REF]. It defines a precise semantics of OCCI concepts and introduces, among others, two key concepts: Extension and Configuration. An OCCI Extension represents a specific application domain, e.g., inter-cloud networking extension [START_REF] Medhioub | OCNI -Open Cloud Networking Interface[END_REF], infrastructure extension [START_REF] Metsch | Open Cloud Computing Interface -Infrastructure[END_REF], platform extension [START_REF] Yangui | CloudServ: PaaS resources provisioning for service-based applications[END_REF][START_REF]An OCCI Compliant Model for PaaS Resources Description and Provisioning[END_REF][START_REF] Metsch | Open Cloud Computing Interface -Platform[END_REF], application extension [START_REF]An OCCI Compliant Model for PaaS Resources Description and Provisioning[END_REF], etc. An OCCI Configuration defines a running system. It represents an instantiation of one or several OCCI extensions. In addition, the OCCIWARE METAMODEL introduces the Constraint notion allowing the cloud architect to express business constraints related to each cloud computing domain. The constraints can be expressed on OCCI kinds and mixins. In addition, the OCCIWARE METAMODEL integrates the Finite State Machine (FSM) model. This mechanism allows to describe the behavior of each OCCI kind/mixin. Finally, AnnotatedElement and Annotation allow to design non-OCCI information to deal with non-functional needs such as visualization and documentation.

To resolve the second issue, a model-driven tool chain for OCCI, named OCCIWARE STUDIO, has been proposed [START_REF] Zalila | A Model-Driven Tool Chain for OCCI[END_REF]. It is built based on the OCCIWARE METAMODEL and proposed as a set of plugins for the Eclipse IDE. OCCI-WARE STUDIO allows both cloud architects and users to encode OCCI extensions and configurations, respectively, graphically via the OCCI Designer tool, and textually via the OCCI Editor tool. They can also automatically verify the consistency of these extensions and configurations via the OCCI Validator tool. In addition, OCCIWARE STUDIO provides a tool, named Connector Generator, that generates the Java code associated to an OCCI extension. This connector code must be completed by cloud developers to implement concretely how OCCI CRUD operations and actions must be executed on a real cloud infrastructure. Later on, this generated connector is deployed on the OCCIware Runtime 7 .

PROBLEM STATEMENT

As stated above, there are several use cases and implementations of the OCCI Infrastructure extension available, while the OCCI Platform extension has not reached a widespread adoption yet. We identify the following reasons for this situation:

-No precise modeling framework for OCCI (P1): The current version of OCCI lacks of formality and concepts for the design of cloud applications. Subsequently, no tooling is available that allows to graphically design cloud applications, their lifecycles, and their underlying infrastructure based on OCCI models. One issue is that no connection between infrastructure and platform models is defined. In fact, the OGF provides two separate OCCI extensions for the infrastructure and platform layers, but it misses to define the connection between them. According to the specification it is hence not possible to connect a Component or Application to a Compute resource of the OCCI Infrastructure extension. In addition, a generic interface is currently missing from the standard that allows to couple state of the art configuration management tools with OCCI. Moreover, the lifecycle for the Component and Application resources as defined in the OCCI specification is incomplete. Components can either be inactive or active, but the specification does not allow to model information about the installation or configuration states. This incomplete lifecycle information inhibits cloud developers to finely observe the execution of their cloud resource. -Lack of verification for designed cloud applications (P2): Currently, the only manner to be sure that a cloud application will run correctly is to provision and deploy it in the cloud. Thus, when errors occur, a correction is made and the deployment task must be repeated several times before the application becomes operational. This process is cumbersome and supporting tooling is necessary to spot errors as early as possible. -Lack of IDEs for Infrastructure as Code (P3): With cloud orchestration and configuration management tools it is possible to encode the configuration of whole datacenters inside reusable artifacts. Thereby, lightweight and human readable serialization formats based on YAML or JSON are commonly used. However, there is a lack of supportive tooling to create and edit these artifacts.

To overcome P1, we proposed the MoDMaCAO framework [START_REF] Korte | Modeldriven configuration management of cloud applications with occi[END_REF]. The MoDMaCAO framework is based on an improved version of the OCCI Platform extension which provides an extended lifecyle model. Furthermore, we introduced a connection between both OCCI Infrastructure and Platform extensions and offered an integration mechanism for configuration management tools. By using a generic interface, several configuration management tools can be coupled with the MoDMaCAO framework. Hereby, we make use of model-driven techniques to support the development and runtime management of cloud applications. For example, configuration management script skeletons and variable files that reflect information about the runtime state of the cloud can be generated. To further improve our solution for P1 and provide solutions for P2 and P3, we extend the MoDMaCAO framework in the following way: MoDMaCAO defines an integration mechanism for configuration management tools. We extend this approach by supporting the generation of configuration management artifact skeletons from the modeled cloud resource types which can then be further manually extended to implement the management of the resources at runtime. Thereby, we reduce the effort necessary to edit these artifacts. The generation process is integrated as part of the MoDMaCAO modeling framework and thus provides a step towards an IDE for Infrastructure as Code (cf. P3).

MODMACAO

In the following, we will introduce the building blocks of the MoDMaCAO framework [START_REF] Korte | Modeldriven configuration management of cloud applications with occi[END_REF] and how it addresses the shortcomings of the OCCI platform extension.

Overall Architecture

The overall architecture of the proposed MoDMaCAO framework and its contributions are depicted in Fig. 3. The features, we discuss in this paper are numbered. Our first contribution 1a , initially presented in [START_REF] Korte | Modeldriven configuration management of cloud applications with occi[END_REF], is to address P1 by enhancing the OCCI Platform extension via additional lifecycle states and actions, introducing a new OCCI Link kind to be able to connect Components of the OCCI Platform extension to Compute resources of the OCCI Infrastructure extension, and defining a new OCCI extension to be able to model application components that are managed with help of a configuration management tool. For this, we form a configuration management interface that is based on the introduced extensions lifecycle actions. This interface allows to plug-in state of the art implementations of current configuration management tools like Ansible with minmal effort. In this improved version of MoDMaCAO framework, we introduce the following features: At first, we propose an approach to ease the visualization of MoDMaCAO configurations. It consists in annotating the MoDMaCAO extensions with visualization annotations (for example, show a resource inside another, hide an attribute information, etc.). Then, we extended the Designer Generator of the OCCIware Studio 1b to support these annotations and generate pre-customized graphical designers. Furthermore, we introduce a verification mechanism based on the Object Constraint Language (OCL) 8 to assess the wellformedness of application configurations 2 . This feature allows to define domain-specific invariants related to a particular MoDMaCAO domain and to verify whether conforming configurations respect these invariants (addressing P2). Finally, we demonstrate the feasibility of the defined extension by modeling two different distributed cloud applications with MoDMaCAO and provide a framework for implementing model-driven configuration management with different configuration management tools 3 , thereby addressing P3.

MoDMaCAO Modeling Framework

Experimenting with the OCCI Platform extension in real use cases shows several hidden lacks. The OCCI Platform extension provides only inactive, active, and error states with two actions: start and stop. This design assumes that a component is already installed and configured which might not be the case. For instance, an application component, e.g., a software component, like a database or an application server, will first be installed ("deployed"), and configured, prior to managing it (start/stop etc.). Therefore, we argue that the lifecycle of the Component and Application kinds is not expressive enough and does not define all possible states of a resource (compare P1). To resolve this issue, we propose an enhancement of the OCCI Platform extension as shown in Fig. 2.

The different improvements are colored in blue. We propose to add two additional states in the Status enumeration type: undeployed and deployed. In addition, we define three new actions for each kind: configure, deploy, and undeploy. Finally, we enhance the FSMs of both kinds by integrating the new provided states and actions, and adding eleven new transitions. Fig. 4 shows the enhanced FSM for Component and Application kinds. Therefore, a Component or Application resource is initially undeployed. Once the deploy action is triggered, the resource is deployed. By triggering the configure action, the resource is configured. We treat this configuration as a rather intermediate state which directly transfers to the inactive state originally defined by the standard. As a result, a distinct configured state is not covered in the FSM. Finally, a Component or Application can reach the active state by triggering the start action.

Fig. 5 depicts the definition of a new link kind named PlacementLink addressing the missing connection between the OCCI Platform extension and the OCCI Infrastructure extension. As a specialization of the generic Link kind, the PlacementLink provides the user with an additional constraint to restrict the selection of the source and target resources. Now, thanks to the PlacementLink, we can connect a Component resource (from the Platform extension) as its source, to a Compute resource (from the Infrastructure extension) as its target, and hence allows us to model the placement of an application component on a virtual machine. In addition, the PlacementLink type allows us to easily query the model, using the uniform and standardized OCCI interface, based on the link type instead of deducing it from the type of source and target resources.

The MoDMaCAO modeling framework is based on the OCCIware tool chain presented in Section 2.2 and allows cloud architects to:

1. design abstract types modeling cloud applications and their components, 2. model configured instances of cloud applications, and, 3. check the validity of instances of cloud applications.

Firstly, as shown in Fig. 6, the MoDMaCAO modeling framework defines the following set of abstract types:

-The Application mixin type abstracts the notion of a cloud application. This mixin applies to OCCI Platform Application resources. A cloud application is composed of one or more cloud application components as enforced by the OneOrMoreComponents constraint. Then, modeling specific cloud applications requires to design new mixin types inheriting from Application, e.g., Cluster and ClientServer types. These new types could define their own attributes and constraints. For instance, a client-server application has only one server component (i.e., OnlyOneServer constraint) and some client components (i.e., OneOrMoreClients constraint). -The InstallationDependency mixin type abstracts an installation dependency, i.e., the deploy action can only be successfully executed on the source component when the target component is already in the deployed state. -The ExecutionDependency mixin type abstracts an execution dependency, i.e., the source component can only be started when the target component is already in the active state. For instance, the ServerDependency type abstracts the execution dependency from a client and a server component, i.e., the client component can not start until the server component is active.

Secondly, the MoDMaCAO modeling framework allows architects to model configured instances of cloud applications and their components. As illustration, Fig. 7 shows the model of a client-server application composed of three client components (client1 to client3) and one server component (server) deployed on four virtual machines (vm1 to vm4). OCCI resources and links are represented by boxes in yellow and orange color, respectively. The application resource is connected to the four component resources via componentlinks. Each client component is connected to the server component via a componentlink associated with a serverdependency mixin. The network port of the server component is set to 8080. Each component is placed on one virtual machine via a placementlink. Finally, the architecture, the number of cores, the host name, and the memory of each virtual machine are configured.

MoDMaCAO Verification

Thanks to the OCCIware metamodel, we can now define business constraints related to a cloud domain. These constraints are defined in the OCCIware extension and must be later respected by the conforming configurations. For the MoDMaCAO approach, we have defined a set of generic OCL constraints in the MoDMaCAO extension. Listing 1

shows the different implemented OCL constraints for the MoDMACAO framework. These constraints can be extended with additional ones that are specific to a MoDMaCAO use case. MoDMaCAO checks the validity of cloud application configurations by evaluating the constraints defined by used abstract types. For the client-server application, MoDMaCAO evaluates that the Application resource is connected to some Component resources (OneOrMoreComponents constraint), some client components (OneOrMoreClients), and only one server component (OnlyOneServer), all Component resources are placed on only one Compute resource (OnlyOne PlacementLink), each client is connected to one server (OneServerDependency), the value of the network port of the server component is in the valid range (0 to 65535), each componentlink must connect two Component resources (SourceMustBeComponent and TargetMustBeComponent), and each componentlink associated with serverdependency mixin must connect a client to a server component (SourceMustBeClient and TargetMustBeServer).

As long as a constraint is false, the architect must correct its cloud application configuration. When all the constraints are fulfilled, the cloud application can be deployed by the MoDMaCAO implementation framework.

MoDMaCAO Designers

The approach of MoDMaCAO aims to ease the design of cloud applications using the OCCIware toolchain. It allows to design multiple types of cloud applications and to instantiate them inside configurations which represent the running applications. Currently, the design of these running applications is done inside the generic OCCIware Designer as shown for example in Fig. 7. The elements shown in this kind of configurations are the instances of OCCI Resource and Link concepts. Therefore, the graphical representation does not reflect the concrete running system in the cloud. So, it is necessary to have a designer which (1) allows to instantiate the extension concepts and (2) can be customized to be as near as possible to the visual aspect of the designed application. To deal with this issue, the Designer Generator of the OCCIware toolchain allows us to generate a graphical designer for each OCCIware extension. However, the generated designer must be customized. To deal with this issue, we proceeded as following. At first, we have referred to the Annotation mechanism defined in the extended version of the OCCIware metamodel [START_REF] Zalila | Model-driven cloud resource management with occiware[END_REF]. This feature allows us to design non-functional information such as visualization and documentation. The Annotation mechanism consists of key-value pairs. Several information can be modeled using this mechanism, such as the containment between resources, the ability to show/hide an attribute and highlight an edge. Then, we have extended the Designer Generator in order to support the defined annotations and generate a pre-configured designer implementing the specified annotations. For example, in the ComponentLink kind of the platform extension, we can associate a Containment annotation claiming that an "Application contains Component" (see Fig. 8). Based on this annotation, the generated designer will allow the architect to draw a Component resource inside an Application resource.

Originally, the Designer Generator of OCCIware Studio allows us to automatically obtain multiple graphical designers, and each one is specific to the domain of the application to design. The drawback of these generated graphical designers is they allow to create flat diagrams, i.e., an application is linked to a component, a component is linked to a compute, etc. Thanks to our annotation mechanism proposed in the MoDMaCAO framework, we can now, for each cloud domain, generate multiple graphical designers, and each one shows the system from a different point of view with a hierarchically manner. For example, we can visualize a system from a "Compute-viewpoint" where we show the different components deployed in a Compute resource. Or, we can visualize the system from an "Application-viewpoint" where the different components are shown inside the constituting Application.

The MoDMaCAO Implementation Framework

The MoDMaCAO implementation framework achieves the whole provisioning -i.e., installation, configuration then execution -of model-based cloud application instances on top of diverse configuration management tools such as Ansible, Saltstack and Puppet by using model interpretation. As illustrated in Fig. 9, this framework is split into two main parts: a generic part independent of any configuration management tool and a plugin part specific to each supported configuration management tool.

For the generic part, we used OCCIware Studio to automatically generate the skeleton of the framework from our three proposed OCCI extensions -enhanced OCCI Platform, Placement, and MoDMaCAO -and only implemented the five lifecycle actionsdeploy, undeploy, configure, start, and stop -of both Application and Component kinds respecting their finite state machine. The following paragraphs describe the key behaviour we implemented.

The implementation of Application orchestrates the provisioning of all the components linked to an application. When the state of an application is undeployed, the implementation of deploy computes the order in which all the application components must be deployed according to their dependency links. Components connected by Installation Dependency links will be deployed sequentially, otherwise, components will be deployed in parallel. For instance, the four components of the client-server application shown in Fig. 7 are deployed in parallel because they have no installation dependencies. When the state is deployed, the implementation of configure consists of configuring all the application components in parallel. When the state is inactive, the implementation of start computes the order on which all the application components must be started according to their ExecutionDependency links. For instance in the client-server application, the server component is started before the three client components can be started in parallel. When the state is active, the implementation of stop consists of stopping all the application components in the reverse order of their starting. For instance, client components are stopped before the server component is stopped. When the state is inactive, the implementation of undeploy consists of uninstalling all the application components in the reverse order of their deployment.

The implementation of Component implements the FSM of the Component kind and checks that the Compute resource where the component is placed, is already started before orchestrating the provisioning of the component.

Finally, the generic part delegates the calls to the plugin part specific to the used configuration management tool. Each plugin must implement the ConfigurationManagerTool interface shown in Fig. 9. For instance, the implementation of start(Application) called by the generic part must finalize the starting of a given application after all its components have been started. This implementation is specific to the used configuration management tool.

To provision the infrastructure resources to be configured by MoDMaCAO, a connector is required to translate incoming OCCI infrastructure requests to the interface of the cloud provider. While this translation can be done for arbitrary infrastructures, we implemented a connector 9 for a private Openstack cloud to perform our case studies. In the following, we briefly discuss the implementation for the configuration management tool, Ansible, with help of the MoDMaCAO implementation framework. We also discuss how MoDMaCAO can be used to generate skeletons for Ansible artifacts.

We implemented an Ansible-specific plugin that implements the ConfigurationManagementTool interface. For each of the defined Mixins, an Ansible role 10 is created. It bundles the steps and files that are necessary to manage the corresponding software component on a specific machine. MoDMaCAO can assist with developing these roles by the generation of role skeletons from OCCI Extensions. For the prototypical implementation, we assume that these roles are already accessible from the OCCIware Runtime. When ex- ecuting an action, the corresponding Ansible-tasks are executed on the machine. The latter is target of the PlacementLink of the corresponding Component instance. The AttributeStates defined in the Components and from all connected Components are used to generate Ansible variable files, that can be consumed by the Ansible roles to make their values available to the configuration management at runtime. Furthermore, we defined an additional OCCI Extension that allows to tag specific instances of the OCCI NetworkInterface as endpoints to be used by Ansible. The Extension is depicted in Fig. 10. It proved to be useful in environments where virtual machines are connected to several networks. Based on the Mixins defined with help of the MoDMaCAO modeling framework, we can generate skeletons for configuration management scripts that can be later on extended and executed with Ansible. Listing 2 shows an excerpt from an Ansible playbook generated for the general Component Kind. For each of the Actions defined for the lifecycle of the Component Kind, a code block is generated that can be subsequently executed at runtime. This skeleton must be manually refined to actually implement the desired behavior. Furthermore, to pass the model information at runtime to the configuration management tool, files that contain the information as variables can be generated. We provide examples for generated and extended artifacts in Section 5.

Currently, we have started to extend our approach by supporting the Saltstack11 configuration management tool.

In the future, we plan to extend our approach by supporting an additional tools such as Puppet 12 .

USE CASES

In the following, we present two use cases to demonstrate the capabilities of the MoDMaCAO framework: a distributed MongoDB database 13 and the popular LAMP Web application stack 14 . While complementary work exists that allows to deploy OCCI configurations using several cloud providers [START_REF] Paraiso | Model-Driven Management of Docker Containers[END_REF], we performed our case studies on a private Openstack cloud. For this we used an OCCI deployment engine [START_REF] Erbel | Comparison and runtime adaptation of cloud application topologies based on occi[END_REF] which compares the desired cloud deployment model with the cloud runtime state to derive and send OCCI requests to adapt the cloud. As the OCCI interface, to which the requests of the engine are send, an OCCIWare runtime server instance is used. This server serves as a middleware that translates the incoming OCCI infrastructure request to the interface of the Openstack cloud. To manage the lifecycle of modeled components we use the configuration management capabilities provided by MoDMaCAO, focusing on the ansible implementation. After the presentation of both use cases, we provide a discussion about the capabilities provided by the enhanced OCCI platform extension and the use of the MoDMaCAO framework for application design, verification and deployment.

MongoDB

MongoDB is a NoSQL database that can be highly scaled and is often used in cloud environments. To achieve scalability, it supports the concept of sharding, i.e., the decomposition and distributed storage of a data collection to several machines. Furthermore, replication sets can be used, to provide redundancy and high availability in case a machine experiences a failure. -The MongoDBComponent mixin type is the base type for all other MongoDB-specific Component mixin types. It defines the mongodb.bindip and mongodb.port attributes that specify the IP address and port on which the MongoDB service should be listening.

Design

12 https://puppet.com 13 https://www.mongodb.com/ 14 https://help.ubuntu.com/community/ApacheMySQLPHP A model for a MongoDB cluster with three shards and no replication is depicted in Fig. 12. For the sake of brevity, we omit the depiction of Attributes. The MongoDB cluster consists of the components router, configserver, and the three shards, shard1 to shard3. The router and shard1 to shard3 have an execution dependency to the configserver. Moreover, the router has an execution dependency to each shard. The components are placed on five different virtual machines, vm1 to vm5, using PlacementLinks, which are connected to a network using NetworkInterfaces.

Fig. 12 shows a MongoDB cluster designed with the MongoDB designer, generated using the Designer Gener- ator. As we can see, the designed configuration follows the containment annotation defined in Section 4.4. So, different components are shown inside the MongoDB cluster application.

Verification

To ensure the well-formedness of MongoDB configurations, MoDMaCAO approach allows to extend the generic OCL constraints by ones specific to the business of the application to design. Listing 3 shows the different implemented constraints for the MongoDB use case. So, a MongoDB application must have at least one router (OneOrMoreRouters), one shard (OneOrMoreShards), and one configuration server (OneOrMoreConfigServers).

Configuration Management Artifact Generation

The MongoDB OCCI extension defined above can be used as a basis for the generation of configuration management artifact skeletons. Thereby, for each of the Mixin types that can be applied to Resources of Kind Component, a skeleton for a configuration management script is generated. Listing 4 shows a configuration management skeleton generated (the blue parts) and extended for the MongoDB Router Mixin of the MongoDB extension. Hereby, the block including its name, e.g., Deploy Router, as well as when the block should be executed, task == "DEPLOY", is generated. The individual modules describing the logic of what to deploy, e.g., apt, has to be manually set by the user which in this case deploys a router component of a MongoDB.

- Listing 4 shows a variables file that is generated at runtime and can be consumed by Ansible when configuring the software component router of the defined MongoDB cluster. From this variable file, the IP address of the configuration server can be read by Ansible for the configuration of the router.

id: b6fc880a-0571-46ba-86db-a206c0d13675 kind: component ipaddresses:

-10.0.0.31 mixins:

-name: Router . . . attributes: occi . core . id: b6fc880a-0571-46ba-86db-a206c0d13675 occi . core . t i t l e : router occi . core .summary: MongoDB cluster router occi .component. state: undeployed links:

-id: 4b9a6567-7cc8-4643-98a6-533068062b55 kind: componentlink target: id: b6fc880a-0571-46ba-86db-a206c0d13679 kind: component mixins:

-name: ConfigServer . . . ipaddresses:

-10.0.0.24

Listing 5 Excerpt from Ansible variables file generated for MongoDB router at runtime.

Once the Ansible artifacts have been generated, they are later executed on our Openstack cloud. A demonstration, available here 15 , shows the deployment process of the Mon-goDB cluster.

LAMP

This second use case addresses LAMP, which is an open source Web development platform that uses Linux as the operating system, Apache as the Web server, MySQL as the relational database management system and PHP, Perl or Python as the object-oriented scripting language.

Design

The LAMP Web application can be modeled with help of the following mixins: 15 https://github.com/occiware/MoDMaCAO/blob/master/ videos/MongoDB-Cluster Fig. 14 shows a LAMP stack designed with the LAMP designer, generated using the Designer Generator. As we can see, the designed configuration follows the containment annotation defined in Section 4.4. So, different components are shown inside the LAMP application.

Verification

Before the deployment of the LAMP stack, it is necessary to verify the defined configuration. The approach of MoD-MaCAO allows to extend the generic OCL constraints by ones specific to the business of the application to design. Listing 6 shows the different implemented constraints for the LAMP use case. For example, a LAMP application must have exactly one Apache server (OnlyOneApacheServer), one MySQL database (OnlyOneMySQL) and at least one Tomcat server (OneOrMoreTomcats). Listing 6 OCL constraints of LAMP use case

Configuration Management Artifact Generation

The capabilities of MoDMaCAO to generate Ansible playbook skeletons are used for the defined LAMP extension.

Listing 7 shows the generated Ansible playbook (the blue parts) extended with a block from the deploy operation of the Tomcat mixin. The unarchive and copy mechanisms within the script (black parts) are manually filled by the developer.

-name: Deploy Tomcat block:

-yum: name=java -1. Once the Ansible artifacts have been generated, they are later executed on our Openstack cloud. A demonstration, available here 16 , shows the deployment process of the LAMP stack.

Discussion

In this section, we discuss the applicability of the proposed approach and how it contributes to the OCCI standard, as well as the model driven cloud domain. Similarly to the problem statements, the contributions can be separated to the creation and extension of a precise modeling framework for OCCI (P1), the benefits of verifying cloud application models at design time (P2), and the combination of infrastructure as code tools and model-driven engineering (P3).

To address the problem of a missing precise modeling framework (P1), we extended the OCCI platform extension and built a framework around it. We introduced capabilities to the standard that allows to deploy components on IaaS resources that can be managed at runtime. In MoDMaCAO, we enhanced the OCCI Application and Component definition by adding three additional lifecycle operations. Our use cases confirmed that these extensions are able to reflect the requirements for the deployment of the selected applications. Furthermore, by providing the notion of a PlacementLink, we are able to establish a connection between the OCCI Platform extension and the OCCI Infrastructure extension. The PlacementLink is used in the implementations to derive the IP address of the hosting virtual machines to be able to connect to them for the configuration management. To extend the modeling capabilities of MoDMaCAO, we demonstrated how customized designers can be created for defined cloud resource types. We have shown that the utilization of simple annotation mechanisms allows to greatly improve the automated generation of graphical editors, especially when viewpoints for different hierarchies are required.

To verify designed cloud applications prior to a live deployment (P2), we annotated OCCI cloud resource types with OCL constraints. For the basic platform elements in MoDMaCAO, we introduced generic constraints to check whether basic structures of the standard are adhered to. This comprises, e.g., constraints to check whether an Application has OneOrMoreComponents. In our use cases we demonstrated how the MoDMaCAO framework can be easily extended for customized resource and component types allowing designers to incorporate their own OCL well-formedness rules. Throughout the creation of the case studies the validation reduced the overall development time as errors within the structure of the modeled application are directly detected. Still, only constraints regarding the structure or attribute configuration within the OCCI configuration can be checked.

Finally, to address the lack of IDEs for Infrastructure as Code (P3), we coupled model-driven engineering tech-niques with configuration management. We separated the configuration management tool-specific logic from the generic provisioning order. In this way, only a minimal set of toolspecific code needs to be provided for each configuration management tool. While we tested the integration of Salt-Stack and simple Bash scripts with MoDMaCAO, our case studies focused on the integration of the Ansible configuration management tool into the OCCI ecosystem. The combination of configuration management tools with a modeldriven approach supported not only the design time, but also the runtime management of the modeled components. At design time, the generation of the artifact skeletons allowed to immediately start with directives to describe the deployment of newly modeled component types. At runtime, variable files accompanying the script can be generated which provides these directives access to the current state of the cloud application. Moreover, the direct connection of component lifecycle actions to individual blocks in the script allowed for smaller iterations when refining the configuration management scripts which greatly supported the development process.

In comparison to the original OCCI platform extension, the cloud developer would have created manually coded deployment artifacts for each application to deploy. This activity is very hard, increases drastically defects in final code and decreases the productivity of developers. In addition, the developer needs to check all functional constraints such as the necessity to have a link between a compute resource and a component one. Furthermore, the cloud developer needs to perform all previously listed tasks without any visual support such as a graphical editor. This situation affects the understandability of the designed systems and complicates its reusability, maintenance and evolution. All these enhancements provided in MoDMACAO avoid users manually creating infrastructure codes and deploying applications without any guarantee of a successful execution.

The case studies presented in this paper only cover a small subset of application possibilities for MoDMaCAO. The original work additionally covers the modeling of a distributed Apache Cassandra database and an Apache Spark cluster [START_REF] Korte | Modeldriven configuration management of cloud applications with occi[END_REF]. In addition, MoDMaCAO has already been successfully applied in scope of resource deployment for scientific workflows in the cloud [START_REF] Johannes | Scheduling architectures for scientific workflows in the cloud[END_REF] and for adaptive sensor management [START_REF] Erbel | OCCI-compliant, fully causal-connected architecture runtime models supporting sensor management[END_REF].

RELATED WORK

As already mentioned in Section 1 and as explained in [START_REF] Challita | Towards Formal-based Semantic Interoperability in Multi-clouds: The fclouds Framework[END_REF], there are two strategies to address the heterogeneity between cloud offerings. Since the first strategy, which is multi-cloud libraries, is only focused on the infrastructure interoperability, we detail in the following the state-of-the-art of the sec-ond remaining strategy, especially the solutions that tackle the management of applications.

1) MDE for the cloud: Nowadays, model-based solutions are becoming increasingly popular in cloud computing. Some of them are commercial application provisioning solutions enabling developers and administrators to specify deployment artifacts and dependencies. Notable examples include Ubuntu juju 17 that targets the modeling of applications and their hybrid deployment. In the same vein of this commercial graphical interface, several research projects are providing domain-specific modeling languages and frameworks that enable architects to describe and manage cloud platforms. Among these model-based solutions, we identify OCCIware [START_REF] Parpaillon | Occiware-a formal and tooled framework for managing everything as a service[END_REF] [6], which our work is an extension of. OC-CIware has been successfully applied for the management of resources from different domains, including the management of Docker containers [START_REF] Paraiso | Model-Driven Management of Docker Containers[END_REF], and the management of mobile robots [START_REF] Merle | Mobile Cloud Robotics as a Service with OCCIware[END_REF]. COAPS [START_REF] Sellami | PaaSindependent Provisioning and management of applications in the cloud[END_REF] is a PaaS interface for managing cloud applications. It extends the OCCI Core model, i.e., the Resource and Link concepts, without extending the OCCI platform extension. Moreover, COAPS complies to the previous, non-enhanced version of the OCCI standard, hence it lacks of the resource state management and the conformance verification provided by the OCCIware tool chain and MoDMaCAO. SALOON [START_REF] Quinton | SALOON: A Platform for Selecting and Configuring Cloud Environments[END_REF] is a model-driven multicloud configurator. It uses feature models to represent infrastructure and platform variability, as well as ontologies to describe the cloud applications requirements. SALOON targets four PaaS providers and the authors claim it can be extensible by adding new provider models that conform to the metamodel they define. However, this can be difficult and error-prone since this framework is not based on a standard, nor on some formal specification. TUNe [START_REF] Chebaro | Self-TUNe-ing of a J2EE Clustered Application[END_REF] is a management system that is based on the Fractal component model for describing the software encapsulation and on two UML profiles, one for the deployment of legacy distributed applications and one for their reconfiguration using state diagrams. TUNe was applied for the administration of J2EE applications. Like most of the available model-driven configuration management approaches, TUNe allows changes only at design-time. This means that the deployment process may be repeated several times, which is costly and timeconsuming.

Regarding runtime support, a strong analogy can be made between our approach and DeployWare [START_REF] Flissi | Deploying on the Grid with DeployWare[END_REF], while the former is applied on cloud APIs and the latter on grid infrastructures. In fact, DeployWare provides a modeling language to deploy applications on Grid'5000 18 and a graphical interface to manage them at runtime. CloudML [START_REF] Ferry | Towards Bridging the Gap Between Scalability and Elasticity[END_REF] is a cloud modeling language that helps to provision cloud infrastructure and platform resources by a semi-automatic matching between the defined application requirements and the cloud offerings. CloudML is exploited both at design-time to describe the application provisioning of cloud resources after performing the necessary orchestration, and at runtime to manage the deployed applications. Furthermore, its corresponding management framework CloudMF [START_REF] Ferry | Cloudmf: Model-driven management of multi-cloud applications[END_REF] presents follows a model driven approach to maintain multi-cloud applications. Another language to model cloud application is Cloud Application Modelling and Execution Language (CAMEL) [START_REF] Achilleos | The cloud application modelling and execution language[END_REF] also utilizing the benefits of a models at runtime approach. In the CAMEL approach the Cloudiator toolkit [START_REF] Baur | A provider-agnostic approach to multi-cloud orchestration using a constraint language[END_REF] is used which provides a deployment engine building upon self-contained components described via executable artifacts and life-cycle actions.

Unlike our work, CloudML and CAMEL are not based on standards and requires the user to learn a new DSL. In addition, the different extensions of CloudML DSL are required to address different needs (monitoring, QoS, etc.) [START_REF] Bergmayr | The Evolution of CloudML and its Manifestations[END_REF]. However, in OCCI, and thus OCCIware, this aspect is simplified by providing a single, simple and concise core DSL to capture the different concepts that could emerge to represent everything-as-a-service.

2) Cloud standards: Our work is also a standard-based approach since it adopts the OCCI standard metamodel. Besides OCCI, several cloud computing standards for managing cloud applications exist. The Organization for the Advancement of Structured Information Standards (OASIS)'s Cloud Application Management for Platforms (CAMP) 19 standard targets the deployment of cloud applications on top of PaaS resources. The OASIS's TOSCA standard defines a language to describe and package cloud application artifacts and deploy them on IaaS and PaaS resources. The Eclipse Winery 20 project provides an open source Eclipsebased graphical modeling tool for TOSCA when the Open-TOSCA project provides an open source container for deploying TOSCA-based applications [START_REF] Binz | OpenTOSCA-a runtime for TOSCA-based cloud applications[END_REF]. Cloudify 21 is an open source orchestration and management framework for cloud applications lifecycle. It is also based on TOSCA and provides a commercial Web Interface that enables the developer to create deployments and execute workflows.

. For the deployment aspects, OpenTOSCA chose to use management plans implemented as BPEL and/or BPMN workflows to deploy applications and adaptation plans to update a deployment based on the given situation at runtime. In the OCCI based adaptation process utilized in our use cases similar plans are generated with MoDMaCAO providing the capability to plug our models into the management configuration tools such as Ansible. The declarative aspect of the latter and its idempotency allows it to only affect the runtime part concerned by the update in the modeling level. In ad- 19 https://www.oasis-open.org/committees/camp/ 20 https://www.eclipse.org/proposals/soa.winery/ 21 http://cloudify.co/ dition, CAMP and TOSCA can use OCCI-based IaaS/PaaS resources, so these standards are complementary. This standards "marriage" will be a main pillar of our future work, as discussed in Section 8.

CONCLUSION

This article presents our approach, named MoDMaCAO, for model-driven configuration management of cloud applications at runtime by using an enhanced version of OCCI standard. MoDMaCAO has the following features: i) a modeling framework to design cloud applications based on OCCI standard, ii) the visualization facilities to seamlessly create cloud applications, iii) a verification mechanism to ensure the correctness of the designed applications, and finally iv) a generative approach to automatically produce configuration management artifacts. We used the OCCIware tool chain to model the proposed enhancements and used its capabilities to generate prototypical implementations for different configuration management tools. Furthermore, we showed how the proposed framework can be used to model, deploy and manage two different distributed cloud applications, a Mon-goDB cluster and a LAMP stack.

As future work, we will investigate how the proposed framework can be extended to support multiple configuration management tools to be used side-by-side for managing a single cloud application. We also want to incorporate concepts that support the reuse of defined Component mixins in other applications. Second, we plan to reduce the manual written parts of scripts. For that, we need to define the semantics of a configuration management tool in order to finely capture the behavior of each operation. Then, we can extend the Deployment artifacts generator to generate scripts based on the chosen configuration management tool. In addition, we intend to explore in depth the behavior definition of OCCIware resources. One possible improvement consists to incorporate an assertion based on the dependency mixin in the finite state machine of the related kind. Our long-term goal is to extend the provided approach and tooling with the support of additional cloud standards, including TOSCA and CAMP. We already defined a preliminary mapping between TOSCA and OCCI [START_REF] Glaser | Model Driven Cloud Orchestration by Combining TOSCA and OCCI[END_REF]. We will further refine this mapping as a basis for providing an integrated solution for model-driven cloud orchestration utilizing both standards.

Fig. 1 A

 1 Fig. 1 A subset of OCCIWARE METAMODEL.

Fig. 2

 2 Fig. 2 Enhanced OCCI Platform kinds.

-

  Deployment model visualization and design (C1): We extend the MoDMaCAO modeling framework by adding facilities to generate customized graphical designers for defined cloud resource types. In addition, we revisit the different runtime elements (actions, states, and state machines) by completing the missing ones and propose a complete lifecycle for each cloud resource type (cf. P1). -Deployment model verification (C2): The custom cloud resource types can be annotated with constraints at design time. When designing configurations based on the defined resource types, the MoDMaCAO framework can subsequently be used to check if the defined constraints are fulfilled. This helps to already spot errors during the design process and thus addresses P2. -Configuration management artifact generation (C3):

Fig. 3

 3 Fig. 3 Overall Architecture.

Fig. 4

 4 Fig. 4 Enhanced OCCI Platform FSMs.

Fig. 5

 5 Fig. 5 New OCCI Placement Extension.

Fig. 6

 6 Fig.6The MoDMaCAO Modeling Framework.

Fig. 7

 7 Fig. 7 Modeling a Client/Server Application with MoDMaCAO.

  context Application inv OneOrMoreComponents : self . entity . oclAsType( occi : : Resource) . links->collect ( l : occi : : Link | l . target )-> select ( rs : occi : : Resource | rs . oclIsTypeOf( platform : : Component) )->size ()>=1 context Component inv OnlyOnePlacementLink : self . entity . oclAsType( occi : : Resource) . links->select ( l : occi : : Link | l . oclIsTypeOf( placement : : PlacementLink) )->size ()=1 context Dependency inv SourceMustBeComponent : self . entity . oclAsType( occi : : Link) . source . oclIsTypeOf( platform : :Component) context Dependency inv TargetMustBeComponent : self . entity . oclAsType( occi : : Link) . target . oclIsTypeOf( platform : :Component) Listing 1 OCL constraints of MoDMaCAO framework

Fig. 8 Fig. 9

 89 Fig. 8 Annotation mechanism.

-Listing 2

 2 name: Deploy Component block:-debug: msg="Operation deploy not implemented." when: task = ="DEPLOY" become: yes -name: Configure Component block:-debug: msg="Operation configure not implemented." when: task = ="CONFIGURE" become: yes . . . Excerpt of Ansible playbook skeleton generated for the Component Mixin.

Fig. 11

 11 Fig. 11 depicts how we specialize the mixin types defined by the MoDMaCAO framework to be able to model MongoDB clusters:

Fig. 11

 11 Fig. 11 Modeling MongoDB with MoDMaCAO.

Fig. 12

 12 Fig. 12 Modeling a MongoDB Cluster with MoDMaCAO.

  context Cluster inv OneOrMoreRouters : self . entity . oclAsType( occi : : Resource) . links->collect ( l : occi : : Link | l . target )->collect (c : occi : : Resource | c . parts )->select (mb: occi : : MixinBase |mb. oclIsTypeOf( mongodb: : Router) )->size ()>=1 inv OneOrMoreShards : self . entity . oclAsType( occi : : Resource) . links->collect ( l : occi : : Link | l . target )->collect (c : occi : : Resource | c . parts )->select (mb: occi : : MixinBase |mb. oclIsTypeOf( mongodb: : Shard) )->size ()>=1 inv OneOrMoreConfigServers : self . entity . oclAsType( occi : : Resource) . links->collect ( l : occi : : Link | l . target )-> collect (c : occi : : Resource | c . parts )->select (mb: occi : : MixinBase |mb. oclIsTypeOf(mongodb: : Configserver ) )-> size ()>=1 Listing 3 OCL constraints of MongoDB use case

Fig. 13

 13 Fig. 13 Modeling LAMP with MoDMaCAO.

Fig. 14

 14 Fig. 14 Modeling a LAMP stack with MoDMaCAO.

  context LAMP inv OnlyOneApacheServer : self . entity . oclAsType( occi : : Resource) . links->collect ( l : occi : : Link | l . target )->collect (c : occi : : Resource | c . parts )->select (mb: occi : : MixinBase |mb. oclIsTypeOf(lamp : : Apacheserver) )->size ()=1 inv OnlyOneMySQL : self . entity . oclAsType( occi : : Resource) . links->collect ( l : occi : : Link | l . target )->collect (c : occi : : Resource | c . parts )->select (mb: occi : : MixinBase |mb. oclIsTypeOf(lamp : : Mysql) )->size ()=1 inv OneOrMoreTomcats : self . entity . oclAsType( occi : : Resource) . links->collect ( l : occi : : Link | l . target )->collect (c : occi : : Resource | c . parts )->select (mb: occi : : MixinBase |mb. oclIsTypeOf(lamp : : Tomcat) )->size ()>=1 context Tomcat inv OnlyOneMySQLDependency : self . entity . oclAsType( occi : : Resource) . links->select ( l : occi : : Link | l . oclIsTypeOf( platform : : Componentlink) )-> collect ( l : occi : : Link | l . parts )->select (mb: occi : : MixinBase |mb. oclIsTypeOf(lamp : : Mysqldependency) )-> size ()>=1 context ApacheServer inv OneOrMoreTomcatDependencies : self . entity . oclAsType( occi : : Resource) . links->select ( l : occi : : Link | l . oclIsTypeOf( platform : : Componentlink) )-> collect ( l : occi : : Link | l . parts )->select (mb: occi : : MixinBase |mb. oclIsTypeOf(lamp : : Tomcatdependency) )-> size ()>=1 context TomcatDependency inv TargetMustBeTomcat : self . entity . oclAsType( occi : : Link) . target . oclAsType( occi : : Resource) . parts->exists (m|m. oclIsTypeOf(lamp : : Tomcat) ) context MySQLDependency inv TargetMustBeMySQL : self . entity . oclAsType( occi : : Link) . target . oclAsType( occi : : Resource) . parts->exists (m|m. oclIsTypeOf(lamp : : Mysql) )

  Ansible task for LAMP Tomcat Deploy operation.

	8.0 -openjdk-devel state=present
	-unarchive:
	src: https: / /www-eu . apache . org / dist / tomcat / tomcat-9/
	v9.0.14/ bin / apache-tomcat-9.0.14. tar . gz
	dest: /tmp
	remote_src: yes
	-f i l e :
	path: / opt / tomcat /
	state: directory
	-shell: cp -r /tmp/ apache-tomcat-9.0.14/* / opt / tomcat /
	when: task == "DEPLOY"
	become: yes
	Listing 7

All URLs have been last retrieved on 6 th January,

2 http://www.jclouds.org 3 http://fog.io 4 https://www.oasis-open.org/committees/tosca/ 5 https://cloudify.co/ 6 https://alien4cloud.github.io

https://github.com/occiware/MartServer

https://www.omg.org/spec/OCL/

https://www.saltstack.com

https://github.com/occiware/MoDMaCAO/tree/master/ videos/LAMP-Stack

http://juju.ubuntu.com/

https://www.grid5000.fr/

ACKNOWLEDGEMENTS

We thank the Simulationswissenschaftliches Zentrum Clausthal-Göttingen (SWZ), the French PIA OCCIware project (www.occiware.org), and the Hauts-de-France Regional Council for supporting this work.

AVAILABILITY

Readers can find the open source code base of MoDMaCAO on https://github.com/occiware/MoDMaCAO.