Lately, low-code tools have gained popularity in academia and the software industry by allowing developers to focus on business tasks, reducing development complexity. Low-code tools not only accelerate application development, but also support processes throughout most of the software lifecycle, such as testing, deployment, monitoring and adaptation.
However, low-code tools often offer little support for deployment aspects (beyond a standard deployment architecture offered by the platform itself, mostly via a transparent model interpretation strategy deploying the system in a vendor lock-in approach on top o fthe specific cloud provider cluster).
Indeed, aspects such as deployment architecture, infrastructure, virtualization technology, and hybrid or multi-cloud deployments, which use multiple vendors for different application components are not covered by current tools. And, even worse, this types of architectural aspects cannot be even modeled with them.
Today, we release a new extension for BESSER (our low-code platform available on GitHub ) to cover these final phases of the software development lifecycle. This extension:
- enables the specification of the deployment architecture of the target software and ç
- automates the packaging, provisioning, and deployment of the system according to that deployment model.
This work is detailed in our paper Extending a low-code tool with multi-cloud deployment capabilities and will be presented at the upcoming ECSA’24. Meanwhile, you can read the full paper or the extended summary below.
BESSER to support application deployment
To provide deployment support from BESSER, we have introduced a new metamodel and grammar to specify and parse a deployment model in textual form, and a code generator to generate an Infrastructure as Code definition that can be directly run to provision and deploy applications on the cloud.
Figure 1 shows the overview of extended BESSER platform. There are two input models provided by the developer:
- A structural model that contains information about the application itself and
- A Deployment model that contains information about the target cloud-based deployment architecture.
Both types of models are defined using a textual notation that conforms to their respective grammars. The BESSER platform parses these models and creates their respective B-UML (the modeling language of BESSER) models. Code generators interpret these B-UML models to produce various software artifacts, including the scripts for configuring and deploying the application on the multi-cloud environment, which is accessible by users.
Let’s dive into how to create the deployment model and use the code generators to deploy your application. For details on the design of the structural model, check out the BESSER documentation.
Modeling the deployment architecture
Figure 2 shows the metamodel we have introduced for modeling deployment architecture of cloud infrastructure.
The metamodel contains a root DeploymentModel metaclass, which is the main construct of the model. It comprises all the information about the cloud infrastructure. A DeploymentModel can have one or multiple Clusters. Each Cluster can be a PublicCluster or an onPremise one. The architecture definition also includes the specification of Regions, Networks, Nodes, Deployments (containing the software containers and applications), and Services.
Our grammar was developed using ANTLR, a widely used language recognition tool. You can access the complete grammar in the project repository.
As an example, we are going to define the deployment model for an application (developed using BESSER) representing the Digital Product Passport (DPP) domain. An excerpt for the deployment model is showed below, but you can access the complete example here. In this example, the dpp_app application is defined (lines 3-5) and packaged in the Docker image “dpp/app:latest”. This image is created using the structural model, which defines the DPP domain, and is automatically uploaded to DockerHub by the backend generator. The application runs in the dpp_container (lines 8-11), with 2 replicas deployed as defined in dpp_deployment (lines 14-16). Finally, two public clusters (for GCP and AWS) are defined (lines 19-28) to deploy the application.
Code generation from the architectural models
The code generation for this BESSER extension primarily involves two generators implemented as M2T transformations using the Jinja template-based engine: one for the backend application and one for the Terraform code.
For more details on the backend code generator, check out our previous post. In this update, we have enhanced it to package the backend as a container image and upload it to a hub for easy deployment.
On the other hand, the Terraform generator creates infrastructure as code (IaC) for provisioning and deploying the application generated using the backend generator. This code encompasses infrastructure configuration such as clusters, networks, subnets, and load balancers, as well as the deployment of software containers using Kubernetes management services like EKS and GKE.
The next figure shows the generated Terraform code for the DDP example. A set of files containing the provisioning and deployment configurations is generated for each cloud provider. The deployment process is initiated by executing the setup.bat file. For a detailed walkthrough and application execution, you can watch the video demo.
Summary
With this new BESSER release, you can easily set up and deploy your application in multi-cloud environments. We have provided a grammar for specifying clusters, services, zones, containers, and other deployment components. Then, using BESSER code generators, you can package your application and deploy it to different clusters by running the generated Terraform code. Currently, the Terraform code generator supports AWS and GCP, but we plan to add more cloud providers soon.
Recent Comments