Skip to content

Cristal32/model-driven-ci-cd-devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MDEploy

Overview

To test the forms, you can get inspired by test input data in .json files inside the assets/ folder. (project.json and terraform-spec.json)

Table of content

Requirements

Metamodels

Initial project configuration metamodel

Gitlab metamodel

Terraform metamodel

Transformations

T2M transformation

  • T2M (Text-to-Model) transformation allows generating a structured model from unstructured or semi-structured textual data. It is often used in scenarios where textual specifications or configurations need to be translated into formal models for further processing.
  • The script JsontToModel.java parses JSON data and converts it to an initConfig model of XMI format.
  • We used 2 java scripts to read from input JSON files which would be sent from the client (frontend), one for parsing initConfig-related data, and the other for Terraform.

M2M transformation

  • M2M (Model-to-Model) transformation refers to the process of converting one model into another.
  • Eclipse Epsilon ETL Transformation rules to transform from initial configuration to gitlab model, by mapping some of their associated attributes and classes.
  • In our project, we implemented an M2M transformation from InitConfig to Gitlab.

M2T transformation

  • On the other hand, M2T transformation allpows generating textual artifacts from models. This is often used to produce source code, documentation, or configuration files from structured models.
  • In our case, to generate the Gitlab YAML and Terraform .tf files.

Web API

To automate these different transformations, we can integrate our MDE files with a Spring RESTful API. By importing the necesseray EMF library into the SpringBoot project, we can exploit models. For more detail, check out backend/README.

Architecture

Use case diagram

Validating generated files

gitlab-ci.yml

After testing the generated gitlab-ci.yml file on Gitlab, we can find it conforms to the yml syntax:

main.tf

We can also test the main.tf file on ValidIaC, we can find that the syntax is correct:

Contributors

About

MDE project for automating Deployment and CI/CD pipelines

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages