DevOps and Model Driven Engineering (MDE) provide differently skilled IT stakeholders with methodologies and tools for organizing and automating continuous software engineering activities and using models as key engineering artifacts.
JSON is a popular data format, and JSON Schema provides a general-purpose schema language for JSON.
This paper presents our work in progress on blended modeling and scenario simulation of continuous delivery pipelines as executable JSON-based models. For this purpose, we show a case study based on Keptn, an open-source tool for DevOps automation of cloud-native applications, and its language, Shipyard, a JSON-based process language for continuous delivery pipeline specification.
1. Towards Blended Modeling and
Simulation of DevOps Processes:
The Keptn Case Study
Alessandro Colantoni, Luca Berardinelli, Antonio Garmendia
Institute for Business Informatics – Software Engineering Johannes Kepler University, Linz, Austria
Johannes Bräuer
Dynatrace GmbH, Linz
MODELS 2022, DevOps@MODELS Workshop, Oct 24th, 2022, Montreal, Canada
Presenter: Alessandro Colantoni – alessandro.colantoni@jku.at
Funding projects: BUMBLE
2. Context: Automation of DevOps Processes
Problem(s):
• Supporting Continuous-Software Engineering (CSE) requires
[1,2]
◦ Modeling DevOps engineering processes
◦ Choosing the right set of DevOps tools and their
integration into frameworks for supporting activities of an
engineering process.
[1] Garcia, J., & Cabot, J. (2018, March). Stepwise adoption of continuous delivery in model-driven engineering. In International workshop on software engineering aspects of continuous development and new paradigms of software
production and deployment (pp. 19-32). Springer, Cham.
[2] Bordeleau, F., Cabot, J., Dingel, J., Rabil, B. S., & Renaud, P. (2019, May). Towards modeling framework for devops: Requirements derived from industry use case. In International Workshop on Software Engineering Aspects of
Continuous Development and New Paradigms of Software Production and Deployment (pp. 139-151). Springer, Cham.
[3] A. Colantoni, A. Garmendia, L. Berardinelli, M. Wimmer and J. Bräuer, "Leveraging Model-Driven Technologies for JSON Artefacts: The Shipyard Case Study," 2021 ACM/IEEE 24th International Conference on Model Driven
Engineering Languages and Systems (MODELS), 2021, pp. 250-260, doi: 10.1109/MODELS50736.2021.00033.
2
Solution:
• Adoption of Model-Driven Engineering (MDE) techniques for:
◦ Managing DevOps artifacts as models [3]
◦ Improving UI/UX with Blended Modeling
◦ Validating Continuous Delivery (CD) pipeline by Simulation
“
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J.
Figure from https://digital.ai/periodic-table-of-devops-tools
3. Background: Keptn for Continuous Delivery Support
• Keptn: Open-source DevOps tool for
cloud-native application lifecycle
orchestration.
• Shipyard spec: Multi-stage delivery
workflow.
• Service Level Indicator (SLI) / Service
Level Objective (SLO) specs: service
quality criteria to decide whether the CD
can move to the next stage.
• Language specs are JSON schemas
https://github.com/keptn/spec
3
Integrated tools:
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J.
donated by
Declarative Multi-Stage Delivery | keptn | Cloud-native application life-cycle orchestration
Figures from
4. Background: JSONware and JSONSchemaDSL
[1] A. Colantoni, A. Garmendia, L. Berardinelli, M. Wimmer
and J. Bräuer, "Leveraging Model-Driven
Technologies for JSON Artefacts: The Shipyard
Case Study," 2021 ACM/IEEE 24th International
Conference on Model Driven Engineering Languages
and Systems (MODELS), 2021, pp. 250-260, doi:
10.1109/MODELS50736.2021.00033.
4
{
"apiVersion": "spec.keptn.sh/0.2.0",
"kind": "Shipyard",
"metadata": {
"name": "shipyard-sockshop"
},
"spec": {
"stages": [
{
"name": "dev",
"sequences": [
{"name": "delivery",
"tasks": [
{"name": "deployment",
"properties": {"deploymentstrategy": "direct"}
},
{"name": "test",
"properties": {"teststrategy": "functional"}
},
{"name": "evaluation"},
{"name": "release"}
]
}
]
},
.json
“name” : “value” pairs [array]
{object}
schema instance
schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Shipyard",
"definitions": {
"Stage": {
"required": ["name","sequences"],
"properties": {
"name": {"type": "string"},
"sequences": {"items": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Sequence"},
"type": "array"}},
"additionalProperties": false,"type": "object"
},
"Sequence": {"required": ["name"],
"properties": {
"name": {"type": "string"},
"tasks": {"items": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Task"},
"type": "array"
}
},
"additionalProperties": false,
"type": "object"
},
"Task": {"required": ["name"],
"properties": {
"name": {"type": "string"},
"properties": {
"type": "object",
"additionalProperties": true
}
},
"additionalProperties": false,
"type": "object"
},
}
}
.json
Reference to JSON Schema draft standard
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://json-schema.org/draft-07/schema#",
"title": "Core schema meta-schema",
…
} .json metaschema instance
metaschema
Defined by itself
M3
M2
M1
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J.
«c2»
«c2»
«c2»
5. Background: JSONware and JSONSchemaDSL
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J. 5
metaschema
JSONware
c2
Ecore
metalanguage
c2
metaschema
metamodel
Modelware (via EMF)
c2
Xtext
metagrammar
c2
metaschema
grammar
1
2
M3
M1 document
(schema instance)
c2
schema
c2
schema
schema
metamodel
schema
grammar
document
model
schema
model
c2
c2
4
5
6
7
8
3
c2
schema
schema
model
c2
4
3
schema
metamodel
schema
grammar
5
6
7
8
domain-independent
+ OCL
+ OCL
document
model
document
(schema instance)
domain-specific
Language Engineer(ing) Perspective
-
Hidden to Domain Expert
Domain Expert
Textual editing (i.e., modeling) and validation of
Shipyard a continuous delivery pipeline using the
native JSON textual concrete syntax via Xtext-based
editor (automatically generated)
JSON document
(JSON native concrete syntax)
6. Background: JSONware and JSONSchemaDSL
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J. 6
metaschema
JSONware
c2
Ecore
metalanguage
c2
metaschema
metamodel
Modelware (via EMF)
c2
Xtext
metagrammar
c2
metaschema
grammar
1
2
M3
M2
M1 document
(schema instance)
c2
schema
c2
schema
schema
metamodel
schema
grammar
document
model
schema
model
c2
c2
4
5
6
7
8
3
c2
schema
schema
model
c2
4
3
schema
metamodel
schema
grammar
5
6
7
8
domain-independent
+ OCL
+ OCL
+ OCL
document
model
document
(schema instance)
For each schema
EMF-based in-memory representation of JSON
documents. JSON documents can be
manipulated as EMF-based artifacts. Validation
routines can be implemented/generated in OCL.
Tool Provider
Language Engineer
JSON document
(JSON native concrete syntax)
JSON document
(in-memory)
7. Background: JSONware and JSONSchemaDSL
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J. 7
metaschema
JSONware
c2
Ecore
metalanguage
c2
metaschema
metamodel
Modelware (via EMF)
c2
Xtext
metagrammar
c2
metaschema
grammar
1
2
M3
M2
M1 document
(schema instance)
c2
schema
c2
schema
schema
metamodel
schema
grammar
document
model
schema
model
c2
c2
4
5
6
7
8
3
c2
schema
schema
model
c2
4
3
schema
metamodel
schema
grammar
5
6
7
8
domain-independent
+ OCL
+ OCL
+ OCL
document
model
document
(schema instance)
For each schema
EMF-based in-memory representation of JSON
documents. JSON documents can be
manipulated as EMF-based artifacts. Validation
routines can be implemented/generated in OCL.
Tool Provider
Language Engineer
JSON document
(JSON native concrete syntax)
JSON document
(in-memory)
8. Background: Blended Modeling
1. Single abstract syntax
2. Mix of two or more textual or graphical concrete syntaxes
3. Changes propagation ( )
4. Ability to cope with temporary inconsistencies across notations
[1] F. Ciccozzi, M. Tichy, H. Vangheluwe, and D. Weyns, “Blended Modelling - What, Why and How,” in 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion (MODELS-C),
Munich, Germany, Sep. 2019, pp. 425–430. doi: 10.1109/MODELS-C.2019.00068.
8
Abstract syntax
...
“abc": 1,2
var a += 1
if (…) {
[ ,< ];
{"type": "string”}
}
...
a textual concrete notation a graphical concrete notation
M2
M1
«c2» «c2»
"Blended modeling is the activity of interacting seamlessly
with a single model through multiple notations, allowing a
certain degree of temporary inconsistencies.“ [1]
Textual editor Graphical editor
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J.
9. Background: Operational Semantics for DSL
• The execution semantics of a DSL defines how to run
models conforming to a given abstract syntax.
• Operational Semantics: it defines the possible
runtime states of a model under execution and how the
runtime state changes over time to run the models
directly. It is performed by an interpreter.
Brambilla, M., Cabot, J., & Wimmer, M. (2017). Model-driven software
engineering in practice. 2nd Edition, Morgan & Claypool..
9
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J.
10. Solution: Keptn + MDE Support (MDE for DevOps)
«extend»
Domain Expert
Tool Support
Tool Provider
Continuous
Delivery
Language Engineer
DSL
Specification [1]
Textual
Modeling [1]
Execution
«include»
Operational
Semantics Spec
«extend»
«include»
Abstract Syntax Spec [1]
Graphical
Modeling
«extend»
Textual Concrete
Syntax Spec [1]
Graphical Concrete
Syntax Spec
«extend»
Editing
«include»
«extend»
Blended Modeling
«include»
Scenario-based Simulation
Blended Modeling
Scenario-based Simulation
«include»
Viewing
Scenario
Definition
«include»
Consistency
Checking [2]
«include»
[1] A. Colantoni, A. Garmendia, L. Berardinelli, M. Wimmer and J. Bräuer, "Leveraging Model-
Driven Technologies for JSON Artefacts: The Shipyard Case Study," 2021 ACM/IEEE
24th International Conference on Model Driven Engineering Languages and Systems
(MODELS), 2021, pp. 250-260, doi: 10.1109/MODELS50736.2021.00033.
[2] A. Colantoni, B. Horváth, Á. Horváth, L. Berardinelli and M. Wimmer, "Towards Continuous
Consistency Checking of DevOps Artefacts," 2021 ACM/IEEE International Conference on
Model Driven Engineering Languages and Systems Companion (MODELS-C), 2021, pp.
449-453, doi: 10.1109/MODELS-C53483.2021.00069.
New Contributions:
• Blended Modeling. Textual and
graphical modeling of a Shipyard
continuous delivery workflows.
• Scenario-based Simulation. Executable
operational semantics (i.e., interpreter)
for Shipyard continuous delivery
workflows based on predefined Scenario
models.
Previous Contributions:
• JSONSchemaDSL: JSON artifacts as models [1].
• Consistency Checking of JSON artifacts [2]
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J. 10
11. Contribution: Blended Modeling and Simulation
11
A. Colantoni, A. Garmendia, L. Berardinelli, M. Wimmer and J. Bräuer, "Leveraging Model-Driven Technologies for JSON Artefacts: The Shipyard Case Study," 2021 ACM/IEEE 24th International Conference on Model Driven Engineering
Languages and Systems (MODELS), 2021, pp. 250-260, doi: 10.1109/MODELS50736.2021.00033.
• We integrated the outcomes of the JSONSchemaDSL approach applied to Shipyard spec
(Ecore metamodel, Xtext grammar and editor) and used them as input to the GEMOC
Studio.
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J.
«comp»
JSONSchemaDSL [1] (@DevOps2021)
«artifact»
JSON schema
«artifact»
JSON metaschema
«c2»
«artifact»
JSON instance
«c2»
«comp»
GEMOC Studio
«comp»
OCL
«comp»
VIATRA
«comp»
Sirius
«comp»
EMF
«artifact»
JSON document
«artifact»
JSON schema metamodel
«artifact»
JSON schema grammar
«comp»
Xtend
«comp»
Kermeta 3
1 2 «generates
»
«uses»
3 «uses»
«comp»
JSON schema
operational semantics
«generates
»
«executed by»
«comp»
JSON instance
graphical editor
For each
JSON schema
5
«edited by»
«comp»
Eclipse
Blended Modeling
Scenario
Simulation
«comp»
Xtext
4
«comp»
JSON instance
EMF tree editor
«edited by»
«edited by»
«comp»
JSON instance
textual editor
JSONware
12. Contribution: Blended Modeling and Simulation
«c2»
• Simulation: The Shipyard
Operational Semantics is
implemented in Xtend with Kermeta3.
• The scenario execution is driven by
SequenceEvents and TaskEvents.
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J. 12
12
13. Contribution: Blended Modeling and Simulation
13
• We integrated the outcomes of the JSONSchemaDSL approach applied to Shipyard spec
(Ecore metamodel, Xtext grammar and editor) and used them as input to the GEMOC Studio.
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J.
14. Conclusions and Future Work
Conclusions:
• Automating DevOps routines is a complex task due to the accidental complexity of DevOps
tools.
• Keptn provides a declarative, JSON-based approach to orchestrate DevOps processes of
cloud-native applications, but it is MDE-agnostic.
• We leveraged and integrated JSONSchemaDSL and GEMOC to enable the blended
modeling and scenario-based simulation of Shipyard CD pipelines while being transparent to
MDE-agnostic Keptn users.
Future Work:
• Extending Blended Modeling by introducing editing capabilities of Shipyard graphical editor.
• Enhancing Simulation capabilities by introducing TDL-based scenario specifications toward
model-based testing of Shipyard CDs [1].
[1] Khorram, F., Bousse, E., Mottu, JM. et al. Advanced testing and debugging support for reactive executable DSLs. Softw Syst Model (2022). https://doi.org/10.1007/s10270-022-01025-w
14
Colantoni A., Berardinelli L., Garmendia A., and Bräuer J.
15. Towards Blended Modeling and
Simulation of DevOps Processes:
The Keptn Case Study
Alessandro Colantoni, Luca Berardinelli, Antonio Garmendia
Institute for Business Informatics – Software Engineering Johannes Kepler University, Linz, Austria
Johannes Bräuer
Dynatrace GmbH, Linz
MODELS 2022, DevOps@MODELS Workshop, Oct 24th, 2022, Montreal, Canada
Presenter: Alessandro Colantoni – alessandro.colantoni@jku.at
Funding projects: BUMBLE
Thanks for your attention
Question Time