diff --git a/tests/doml/CaseStudies/SIMPA_Validation_v2.doml b/tests/doml/CaseStudies/SIMPA_Validation_v2.doml new file mode 100644 index 0000000000000000000000000000000000000000..e86d7679d5bc6842826f49acf8ac79ddd83bcb7f --- /dev/null +++ b/tests/doml/CaseStudies/SIMPA_Validation_v2.doml @@ -0,0 +1,84 @@ +doml nio3_test_exec_env + +application app { + // To be discussed + software_component potainer { + source r1 { + + } + } + + software_component nio3_git { + source r1 { + entry "ansible/provision.yml" + backend "ansible" + properties { + nexus_docker_registry_user = "***"; + nexus_docker_registry_password = "***"; + } + } + } + +} + +infrastructure infra { + + container co1 { + host vm1 + } + + vm vm1 { + os "CentOS-7-2111" + cpu_count 2 + mem_mb 8192.0 + iface i1 { + address "10.0.0.1" + belongs_to net1 + } + } + + net net1 { + // cidr "/24" -> WRONG + // cidr "[10.0.0.1, 10.0.0.5]" -> WRONG + cidr "10.0.0.0/29" // -> 2^3 ips, 10.0.0.1-10.0.0.6 + protocol "tcp/ip" + } + + sto disk0 { + label "disk0" + size_gb 40 + } +} + +deployment conf { + potainer -> co1, + co1 -> vm1 +} + +active deployment conf + +concretizations { + concrete_infrastructure con_infra { + provider openstack { + properties {} + + vm concrete_vm { + properties { + vm_flavor = "small-centos"; + } + maps vm1 + } + + net concrete_net { + preexisting true + properties {} + maps net1 + } + + storage concrete_disk { + maps disk0 + } + } + } + active con_infra +} diff --git a/tests/doml/CaseStudies/SIMPA_Validation_v2.domlx b/tests/doml/CaseStudies/SIMPA_Validation_v2.domlx new file mode 100644 index 0000000000000000000000000000000000000000..4b96701c3f7b1f25c613a1a7e241c727fb849841 --- /dev/null +++ b/tests/doml/CaseStudies/SIMPA_Validation_v2.domlx @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="ASCII"?> +<commons:DOMLModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:app="http://www.piacere-project.eu/doml/application" xmlns:commons="http://www.piacere-project.eu/doml/commons" xmlns:infra="http://www.piacere-project.eu/doml/infrastructure" name="nio3_test_exec_env" activeConfiguration="//@configurations.0" activeInfrastructure="//@concretizations.0"> + <application name="app"> + <components xsi:type="app:SoftwareComponent" name="potainer"> + <src name="r1"/> + </components> + <components xsi:type="app:SoftwareComponent" name="nio3_git"> + <src name="r1" entry="ansible/provision.yml" backend="ansible"> + <annotations xsi:type="commons:SProperty" key="nexus_docker_registry_user" value="***"/> + <annotations xsi:type="commons:SProperty" key="nexus_docker_registry_password" value="***"/> + </src> + </components> + </application> + <infrastructure name="infra"> + <nodes xsi:type="infra:Container" name="co1"> + <configs host="//@infrastructure/@nodes.1"/> + </nodes> + <nodes xsi:type="infra:VirtualMachine" name="vm1" os="CentOS-7-2111" memory_mb="8192.0" cpu_count="2"> + <ifaces name="i1" endPoint="10.0.0.1" belongsTo="//@infrastructure/@networks.0"/> + </nodes> + <storages name="disk0" label="disk0" size_gb="40"/> + <networks name="net1" protocol="tcp/ip" addressRange="10.0.0.0/29" connectedIfaces="//@infrastructure/@nodes.1/@ifaces.0"/> + </infrastructure> + <concretizations name="con_infra"> + <providers name="openstack"> + <vms name="concrete_vm" maps="//@infrastructure/@nodes.1"> + <annotations xsi:type="commons:SProperty" key="vm_flavor" value="small-centos"/> + </vms> + <networks name="concrete_net" preexisting="true" maps="//@infrastructure/@networks.0"/> + <storages name="concrete_disk" maps="//@infrastructure/@storages.0"/> + </providers> + </concretizations> + <configurations name="conf"> + <deployments component="//@application/@components.0" node="//@infrastructure/@nodes.0"/> + <deployments component="//@infrastructure/@nodes.0" node="//@infrastructure/@nodes.1"/> + </configurations> +</commons:DOMLModel> diff --git a/tests/doml/CaseStudies/nio3_test_exec_env.doml b/tests/doml/CaseStudies/nio3_test_exec_env.doml new file mode 100644 index 0000000000000000000000000000000000000000..6c7bf3716a8435d31ad37dc3b375be0e00459cee --- /dev/null +++ b/tests/doml/CaseStudies/nio3_test_exec_env.doml @@ -0,0 +1,144 @@ +doml nio3_test_exec_env + +application app { + + software_component nio3 { + properties {} + } +} + +infrastructure infra { + + net net1 { + cidr "/24" + protocol "tcp/ip" + gateway g1 { + address "10.83.18.65" + } + } + + user_pass ssh_pass { + user "root" + pass "pa$$w0rd" + } + + key_pair ssh_key { + keyfile "/home/rmandal/.ssh/id_rsa.pub" + } + + vm_image img { + generates vm1, vm2 + } + + vm vm1 { + os "centos7_64Guest" + cpu_count 2 + mem_mb 1024.0 + iface i1 { + address "10.83.18.92" + belongs_to net1 + } + credentials ssh_pass + } + + vm vm2 { + os "centos7_64Guest" + cpu_count 2 + mem_mb 1024.0 + iface i1 { + address "10.83.18.88" + belongs_to net1 + } + credentials ssh_pass + } + + sto disk0 { + label "disk0" + size_gb 100 + } +} + +deployment conf { + nio3 -> vm1, nio3 -> vm2 +} + +active deployment conf + +concretizations { + concrete_infrastructure con_infra { + provider vsphere { + properties { + username = "vc_username"; + password = "vc_password"; + vsphere_server = "psvc10000002.cd.sigov.si"; + allow_unverified_ssl = true; + } + + generic_resource dc { + preexisting true + type 'vsphere_datacenter' + gname 'MB' + } + + generic_resource cl { + preexisting true + refs_to dc + type 'vsphere_compute_cluster' + gname 'MB-PIAC-NIC-1' + } + + generic_resource pool { + preexisting true + refs_to dc + type 'vsphere_resource_pool' + gname 'PIAC' + } + + vm_image template { + preexisting true + refs_to dc + properties { + vsphere_virtual_machine_name = "Centos7_PIAC"; + } + maps img + } + + storage datastore { + preexisting true + refs_to dc + properties { + vsphere_datastore_name = 'VNX01-0200-NIC-TA-PIAC-DRO-VMW-P'; + } + maps disk0 + } + + net network { + preexisting true + refs_to dc + properties { + vsphere_network_name = "DRO-MB-P-BG001-2098"; + } + maps net1 + } + + vm con_vm1 { + refs_to pool, datastore + properties { + host_name = "piac-0"; + domain = "ad.sigov.si"; + } + maps vm1 + } + + vm con_vm2 { + refs_to pool, datastore + properties { + host_name = "piac-1"; + domain = "ad.sigov.si"; + } + maps vm2 + } + } + } + active con_infra +} diff --git a/tests/doml/CaseStudies/nio3_test_exec_env.domlx b/tests/doml/CaseStudies/nio3_test_exec_env.domlx new file mode 100644 index 0000000000000000000000000000000000000000..99050ef905dfb1bb4bfe4d7daa55ca1c6e66e910 --- /dev/null +++ b/tests/doml/CaseStudies/nio3_test_exec_env.domlx @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="ASCII"?> +<commons:DOMLModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:app="http://www.piacere-project.eu/doml/application" xmlns:commons="http://www.piacere-project.eu/doml/commons" xmlns:infra="http://www.piacere-project.eu/doml/infrastructure" name="nio3_test_exec_env" activeConfiguration="//@configurations.0" activeInfrastructure="//@concretizations.0"> + <application name="app"> + <components xsi:type="app:SoftwareComponent" name="nio3"/> + </application> + <infrastructure name="infra"> + <nodes xsi:type="infra:VirtualMachine" name="vm1" os="centos7_64Guest" memory_mb="1024.0" cpu_count="2" credentials="//@infrastructure/@credentials.0" generatedFrom="//@infrastructure/@generators.0"> + <ifaces name="i1" endPoint="10.83.18.92" belongsTo="//@infrastructure/@networks.0"/> + </nodes> + <nodes xsi:type="infra:VirtualMachine" name="vm2" os="centos7_64Guest" memory_mb="1024.0" cpu_count="2" credentials="//@infrastructure/@credentials.0" generatedFrom="//@infrastructure/@generators.0"> + <ifaces name="i1" endPoint="10.83.18.88" belongsTo="//@infrastructure/@networks.0"/> + </nodes> + <generators xsi:type="infra:VMImage" name="img" generatedVMs="//@infrastructure/@nodes.0 //@infrastructure/@nodes.1"/> + <storages name="disk0" label="disk0" size_gb="100"/> + <credentials xsi:type="commons:UserPass" name="ssh_pass" username="root" password="pa$$w0rd"/> + <credentials xsi:type="commons:KeyPair" name="ssh_key" keyfile="/home/rmandal/.ssh/id_rsa.pub"/> + <networks name="net1" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@nodes.0/@ifaces.0 //@infrastructure/@nodes.1/@ifaces.0"> + <gateways name="g1" address="10.83.18.65"/> + </networks> + </infrastructure> + <concretizations name="con_infra"> + <providers name="vsphere"> + <annotations xsi:type="commons:SProperty" key="username" value="vc_username"/> + <annotations xsi:type="commons:SProperty" key="password" value="vc_password"/> + <annotations xsi:type="commons:SProperty" key="vsphere_server" value="psvc10000002.cd.sigov.si"/> + <annotations xsi:type="commons:BProperty" key="allow_unverified_ssl" value="true"/> + <resources name="dc" preexisting="true" type="vsphere_datacenter" gname="MB"/> + <resources name="cl" preexisting="true" refs="//@concretizations.0/@providers.0/@resources.0" type="vsphere_compute_cluster" gname="MB-PIAC-NIC-1"/> + <resources name="pool" preexisting="true" refs="//@concretizations.0/@providers.0/@resources.0" type="vsphere_resource_pool" gname="PIAC"/> + <vms name="con_vm1" refs="//@concretizations.0/@providers.0/@resources.2 //@concretizations.0/@providers.0/@storages.0" maps="//@infrastructure/@nodes.0"> + <annotations xsi:type="commons:SProperty" key="host_name" value="piac-0"/> + <annotations xsi:type="commons:SProperty" key="domain" value="ad.sigov.si"/> + </vms> + <vms name="con_vm2" refs="//@concretizations.0/@providers.0/@resources.2 //@concretizations.0/@providers.0/@storages.0" maps="//@infrastructure/@nodes.1"> + <annotations xsi:type="commons:SProperty" key="host_name" value="piac-1"/> + <annotations xsi:type="commons:SProperty" key="domain" value="ad.sigov.si"/> + </vms> + <vmImages name="template" preexisting="true" refs="//@concretizations.0/@providers.0/@resources.0" maps="//@infrastructure/@generators.0"> + <annotations xsi:type="commons:SProperty" key="vsphere_virtual_machine_name" value="Centos7_PIAC"/> + </vmImages> + <networks name="network" preexisting="true" refs="//@concretizations.0/@providers.0/@resources.0" maps="//@infrastructure/@networks.0"> + <annotations xsi:type="commons:SProperty" key="vsphere_network_name" value="DRO-MB-P-BG001-2098"/> + </networks> + <storages name="datastore" preexisting="true" refs="//@concretizations.0/@providers.0/@resources.0" maps="//@infrastructure/@storages.0"> + <annotations xsi:type="commons:SProperty" key="vsphere_datastore_name" value="VNX01-0200-NIC-TA-PIAC-DRO-VMW-P"/> + </storages> + </providers> + </concretizations> + <configurations name="conf"> + <deployments component="//@application/@components.0" node="//@infrastructure/@nodes.0"/> + <deployments component="//@application/@components.0" node="//@infrastructure/@nodes.1"/> + </configurations> +</commons:DOMLModel> diff --git a/tests/doml/CaseStudies/posidonia.doml b/tests/doml/CaseStudies/posidonia.doml new file mode 100644 index 0000000000000000000000000000000000000000..82ba8c453ec2914d198850e91922055af4b68a65 --- /dev/null +++ b/tests/doml/CaseStudies/posidonia.doml @@ -0,0 +1,258 @@ +doml posidonia +properties { + entorno="pre"; + proyecto="baleares"; +} + +// Application Definition +application posidonia { + software_component Gestaut { + provides { http https } + consumes { dbAccess, search } + } + software_component ElasticSearch { + provides { search } + consumes { dbAccess } + } + software_component Edi { + provides { edi } + consumes { dbAccess } + } + dbms Database { + provides { + dbAccess + } + } +} + +infrastructure abstractInfra { + // Networks + net vpc { + cidr "/16" + protocol "tcp/ip" + subnet subnet1 { + cidr "/24" + protocol "tcp/ip" + } + subnet subnet2 { + cidr "/24" + protocol "tcp/ip" + } + subnet subnet3 { + cidr "/24" + protocol "tcp/ip" + } + } + // Credentials + // TODO: key file? + key_pair GestautKeyName { + algorithm "RSA" + bits 4096 + } + key_pair ESKeyName { + algorithm "RSA" + bits 4096 + } + key_pair EdiKeyName { + algorithm "RSA" + bits 4096 + } + user_pass dbCredentials { + user "***" + pass "***" + } + + // Nodes + vm OracleDB { + iface db1 { + belongs_to subnet1 + } + iface db2 { + belongs_to subnet2 + } + iface db3 { + belongs_to subnet3 + } + sto "20" + credentials dbCredentials + } + + vm_image posidonia_image { + generates gestaut_vm, elasticsearch_vm, edi_vm + image "ami-02a6bfdcf8224bd77" + } + + autoscale_group gestaut_asg { + // TODO: Shouldn't vm live outside the group leaving a reference here? vm might also be referenced by other components. + // It also applies to the following vms in other groups. + vm gestaut_vm { + credentials GestautKeyName + } + min 1 + max 1 // Using AutoScaleGroup as a way to automatically reboot a machine in case of error + } + + autoscale_group elasticsearch_asg { + // TODO + vm elasticsearch_vm { + credentials ESKeyName + } + min 1 + max 1 // Using AutoScaleGroup as a way to automatically reboot a machine in case of error + } + + autoscale_group edi_asg { + // TODO + vm edi_vm { + credentials EdiKeyName + } + min 1 + max 1 // Using AutoScaleGroup as a way to automatically reboot a machine in case of error + } + + security_group sg { + // TODO: the following vms should have the associated interfaces (ifaces) in the security group? + //nodes gestaut_vm, elasticsearch_vm, edi_vm + egress salida { + protocol "-1" + from_port 0 + to_port 0 + cidr ["0.0.0.0/0"] + } + ingress lb { + protocol "tcp" + from_port 80 + to_port 80 + cidr ["10.100.1.0/24", "10.100.2.0/24", "10.100.3.0/24"] + } + ingress es { + protocol "tcp" + from_port 9200 + to_port 9200 + cidr ["10.100.1.0/24", "10.100.2.0/24", "10.100.3.0/24"] + } + ingress monitor { + protocol "tcp" + from_port 6556 + to_port 6556 + cidr ["54.217.119.81/32"] + } + + // TODO: ftp (20/21) or ssh (22)? + ingress ftp { + protocol "tcp" + from_port 22 + to_port 22 + cidr ["213.96.27.139/32", "37.187.173.88/32", "51.89.40.59/32", "195.53.242.200/32"] + } + } + + security_group dbsg { + // TODO: the associated vms and ifaces? + egress salida { + protocol "-1" + from_port 0 + to_port 0 + cidr ["0.0.0.0/0"] + } + ingress ora { + protocol "tcp" + from_port 1521 + to_port 1521 + cidr ["10.100.1.0/24", "10.100.2.0/24", "10.100.3.0/24", "84.124.78.66/32"] + } + } + + security_group elbsg { + // TODO: the associated vms and ifaces? + egress salida { + protocol "-1" + from_port 0 + to_port 0 + cidr ["0.0.0.0/0"] + } + ingress http { + protocol "tcp" + from_port 80 + to_port 80 + cidr ["0.0.0.0/0", "::/0"] + } + ingress https { + protocol "tcp" + from_port 443 + to_port 443 + cidr ["0.0.0.0/0", "::/0"] + } + ingress es { + protocol "tcp" + from_port 9200 + to_port 9200 + cidr ["10.100.1.0/24", "10.100.2.0/24", "10.100.3.0/24"] + } + } + + security_group checkmk { + // TODO: the associated vms and ifaces? + egress salida { + protocol "-1" + from_port 0 + to_port 0 + cidr ["0.0.0.0/0"] + } + ingress http { + protocol "tcp" + from_port 80 + to_port 80 + cidr ["84.124.78.66/32"] + } + ingress https { + protocol "tcp" + from_port 443 + to_port 443 + cidr ["84.124.78.66/32"] + } + + // TODO: ftp (20/21) or ssh (22)? + ingress ftp { + protocol "tcp" + from_port 22 + to_port 22 + cidr ["84.124.78.66/32"] + } + } + +} +deployment dep { + Gestaut -> gestaut_vm, + ElasticSearch -> elasticsearch_vm, + Edi -> edi_vm, + Database -> OracleDB + +} +active deployment dep + +// Concretization to AWS +concretizations { + concrete_infrastructure dev { + provider aws { + autoscale_group asg1 { + maps elasticsearch_asg + } + autoscale_group asg2 { + maps edi_asg + } + autoscale_group asg3 { + maps gestaut_asg + } + } + } + +// concrete_infrastructure pro { +// provider aws { +// +// } +// } + + active dev +} + diff --git a/tests/doml/CaseStudies/posidonia.domlx b/tests/doml/CaseStudies/posidonia.domlx new file mode 100644 index 0000000000000000000000000000000000000000..151646f5ebddfe27c508f59e55a7879ad0b9b1f5 --- /dev/null +++ b/tests/doml/CaseStudies/posidonia.domlx @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="ASCII"?> +<commons:DOMLModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:app="http://www.piacere-project.eu/doml/application" xmlns:commons="http://www.piacere-project.eu/doml/commons" xmlns:infra="http://www.piacere-project.eu/doml/infrastructure" name="posidonia" activeConfiguration="//@configurations.0" activeInfrastructure="//@concretizations.0"> + <annotations xsi:type="commons:SProperty" key="entorno" value="pre"/> + <annotations xsi:type="commons:SProperty" key="proyecto" value="baleares"/> + <application name="posidonia"> + <components xsi:type="app:SoftwareComponent" name="Gestaut" consumedInterfaces="//@application/@components.3/@exposedInterfaces.0 //@application/@components.1/@exposedInterfaces.0"> + <exposedInterfaces name="http"/> + <exposedInterfaces name="https"/> + </components> + <components xsi:type="app:SoftwareComponent" name="ElasticSearch" consumedInterfaces="//@application/@components.3/@exposedInterfaces.0"> + <exposedInterfaces name="search"/> + </components> + <components xsi:type="app:SoftwareComponent" name="Edi" consumedInterfaces="//@application/@components.3/@exposedInterfaces.0"> + <exposedInterfaces name="edi"/> + </components> + <components xsi:type="app:DBMS" name="Database"> + <exposedInterfaces name="dbAccess"/> + </components> + </application> + <infrastructure name="abstractInfra"> + <nodes xsi:type="infra:VirtualMachine" name="OracleDB" storage="20" credentials="//@infrastructure/@credentials.3"> + <ifaces name="db1" belongsTo="//@infrastructure/@networks.0/@subnets.0"/> + <ifaces name="db2" belongsTo="//@infrastructure/@networks.0/@subnets.1"/> + <ifaces name="db3" belongsTo="//@infrastructure/@networks.0/@subnets.2"/> + </nodes> + <generators xsi:type="infra:VMImage" name="posidonia_image" uri="ami-02a6bfdcf8224bd77" kind="IMAGE" generatedVMs="//@infrastructure/@groups.0/@machineDefinition //@infrastructure/@groups.1/@machineDefinition //@infrastructure/@groups.2/@machineDefinition"/> + <credentials xsi:type="commons:KeyPair" name="GestautKeyName" algorithm="RSA" bits="4096"/> + <credentials xsi:type="commons:KeyPair" name="ESKeyName" algorithm="RSA" bits="4096"/> + <credentials xsi:type="commons:KeyPair" name="EdiKeyName" algorithm="RSA" bits="4096"/> + <credentials xsi:type="commons:UserPass" name="dbCredentials" username="***" password="***"/> + <groups xsi:type="infra:AutoScalingGroup" name="gestaut_asg"> + <machineDefinition name="gestaut_vm" credentials="//@infrastructure/@credentials.0" generatedFrom="//@infrastructure/@generators.0"/> + </groups> + <groups xsi:type="infra:AutoScalingGroup" name="elasticsearch_asg"> + <machineDefinition name="elasticsearch_vm" credentials="//@infrastructure/@credentials.1" generatedFrom="//@infrastructure/@generators.0"/> + </groups> + <groups xsi:type="infra:AutoScalingGroup" name="edi_asg"> + <machineDefinition name="edi_vm" credentials="//@infrastructure/@credentials.2" generatedFrom="//@infrastructure/@generators.0"/> + </groups> + <securityGroups name="sg"> + <rules name="salida" protocol="-1" fromPort="0" toPort="0"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="lb" kind="INGRESS" protocol="tcp" fromPort="80" toPort="80"> + <cidr>10.100.1.0/24</cidr> + <cidr>10.100.2.0/24</cidr> + <cidr>10.100.3.0/24</cidr> + </rules> + <rules name="es" kind="INGRESS" protocol="tcp" fromPort="9200" toPort="9200"> + <cidr>10.100.1.0/24</cidr> + <cidr>10.100.2.0/24</cidr> + <cidr>10.100.3.0/24</cidr> + </rules> + <rules name="monitor" kind="INGRESS" protocol="tcp" fromPort="6556" toPort="6556"> + <cidr>54.217.119.81/32</cidr> + </rules> + <rules name="ftp" kind="INGRESS" protocol="tcp" fromPort="22" toPort="22"> + <cidr>213.96.27.139/32</cidr> + <cidr>37.187.173.88/32</cidr> + <cidr>51.89.40.59/32</cidr> + <cidr>195.53.242.200/32</cidr> + </rules> + </securityGroups> + <securityGroups name="dbsg"> + <rules name="salida" protocol="-1" fromPort="0" toPort="0"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="ora" kind="INGRESS" protocol="tcp" fromPort="1521" toPort="1521"> + <cidr>10.100.1.0/24</cidr> + <cidr>10.100.2.0/24</cidr> + <cidr>10.100.3.0/24</cidr> + <cidr>84.124.78.66/32</cidr> + </rules> + </securityGroups> + <securityGroups name="elbsg"> + <rules name="salida" protocol="-1" fromPort="0" toPort="0"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="http" kind="INGRESS" protocol="tcp" fromPort="80" toPort="80"> + <cidr>0.0.0.0/0</cidr> + <cidr>::/0</cidr> + </rules> + <rules name="https" kind="INGRESS" protocol="tcp" fromPort="443" toPort="443"> + <cidr>0.0.0.0/0</cidr> + <cidr>::/0</cidr> + </rules> + <rules name="es" kind="INGRESS" protocol="tcp" fromPort="9200" toPort="9200"> + <cidr>10.100.1.0/24</cidr> + <cidr>10.100.2.0/24</cidr> + <cidr>10.100.3.0/24</cidr> + </rules> + </securityGroups> + <securityGroups name="checkmk"> + <rules name="salida" protocol="-1" fromPort="0" toPort="0"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="http" kind="INGRESS" protocol="tcp" fromPort="80" toPort="80"> + <cidr>84.124.78.66/32</cidr> + </rules> + <rules name="https" kind="INGRESS" protocol="tcp" fromPort="443" toPort="443"> + <cidr>84.124.78.66/32</cidr> + </rules> + <rules name="ftp" kind="INGRESS" protocol="tcp" fromPort="22" toPort="22"> + <cidr>84.124.78.66/32</cidr> + </rules> + </securityGroups> + <networks name="vpc" protocol="tcp/ip" addressRange="/16"> + <subnets name="subnet1" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@nodes.0/@ifaces.0"/> + <subnets name="subnet2" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@nodes.0/@ifaces.1"/> + <subnets name="subnet3" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@nodes.0/@ifaces.2"/> + </networks> + </infrastructure> + <concretizations name="dev"> + <providers name="aws"> + <group name="asg1" maps="//@infrastructure/@groups.1"/> + <group name="asg2" maps="//@infrastructure/@groups.2"/> + <group name="asg3" maps="//@infrastructure/@groups.0"/> + </providers> + </concretizations> + <configurations name="dep"> + <deployments component="//@application/@components.0" node="//@infrastructure/@groups.0/@machineDefinition"/> + <deployments component="//@application/@components.1" node="//@infrastructure/@groups.1/@machineDefinition"/> + <deployments component="//@application/@components.2" node="//@infrastructure/@groups.2/@machineDefinition"/> + <deployments component="//@application/@components.3" node="//@infrastructure/@nodes.0"/> + </configurations> +</commons:DOMLModel> diff --git a/tests/doml/CaseStudies/posidonia_IOP.doml b/tests/doml/CaseStudies/posidonia_IOP.doml new file mode 100644 index 0000000000000000000000000000000000000000..e441982f154cd863612c9ba5b01c174d95498c3c --- /dev/null +++ b/tests/doml/CaseStudies/posidonia_IOP.doml @@ -0,0 +1,307 @@ +doml posidonia +properties { + entorno="pre"; + proyecto="baleares"; +} + +// Application Definition +application posidonia { + software_component Gestaut { + // Interfaces should be separated by commas, but the IDE needs to be fixed + provides { http https } + consumes { dbAccess, search } + } + software_component ElasticSearch { + provides { search } + consumes { dbAccess } + } + software_component Edi { + provides { edi } + consumes { dbAccess } + } + dbms Database { + provides { + dbAccess + } + } +} + +infrastructure abstractInfra { + // Networks + net vpc { + // In DOML 2.1, you can specify an address before the length of the subnet mask + // Actually it should also work in DOML 2.2 for ICG + cidr "/16" + protocol "TCP/IP" + subnet subnet1 { + // We have to check whether this address (which was copy-pasted from the + // security group rules cidr) actually was the one intended for the subnet + cidr "10.100.1.0/24" + protocol "TCP/IP" + } + subnet subnet2 { + cidr "/24" + protocol "TCP/IP" + } + subnet subnet3 { + cidr "/24" + protocol "TCP/IP" + } + } + // Credentials + // TODO: key file? + key_pair GestautKeyName { + // We're here specifying the key through the keyfile attribute instead of using it for specifying the keyfile path. + user "..." + keyfile "not the path, but currently the key itself" + algorithm "RSA" + bits 4096 + } + key_pair ESKeyName { + user "..." + keyfile "not the path, but currently the key itself" + algorithm "RSA" + bits 4096 + } + key_pair EdiKeyName { + user "..." + keyfile "not the path, but currently the key itself" + algorithm "RSA" + bits 4096 + } + user_pass dbCredentials { + user "***" + pass "***" + } + + // Nodes + vm OracleDB { + // It can be updated by specifying the VM characteristics through the usage of attributes + iface db1 { + belongs_to subnet1 + // We can define the security group associated to the interface either by using the + // security attribute here or specifying the name of the interface in the + // ifaces attribute of the security group itself + security dbsg + } + iface db2 { + belongs_to subnet2 + } + iface db3 { + belongs_to subnet3 + } + // We have to specify GB or ... + sto "20" + credentials dbCredentials + } + + /* + * We currently don't use images, but specify properties through VM attributes definition + vm_image posidonia_image { + generates gestaut_vm, elasticsearch_vm, edi_vm + image "ami-02a6bfdcf8224bd77" + } + */ + + + autoscale_group gestaut_asg { + // TODO: Shouldn't vm live outside the group leaving a reference here? vm might also be referenced by other components. + // It also applies to the following vms in other groups. + vm gestaut_vm { + credentials GestautKeyName + } + min 1 + max 1 // Using AutoScaleGroup as a way to automatically reboot a machine in case of error + + /* + * In order to specify the sg for the three VMs defined for the AGs, we can + * use the security attribute of the autoscale_group class. + * We have to define a new security group inside the autoscale_group + * when using such attribute. + */ + } + + autoscale_group elasticsearch_asg { + // TODO + vm elasticsearch_vm { + credentials ESKeyName + } + min 1 + max 1 // Using AutoScaleGroup as a way to automatically reboot a machine in case of error + } + + autoscale_group edi_asg { + // TODO + vm edi_vm { + credentials EdiKeyName + } + min 1 + max 1 // Using AutoScaleGroup as a way to automatically reboot a machine in case of error + } + + security_group sg { + // TODO: the following vms should have the associated interfaces (ifaces) in the security group? + //nodes gestaut_vm, elasticsearch_vm, edi_vm + egress salida { + protocol "-1" + from_port 0 + to_port 0 + cidr ["0.0.0.0/0"] + } + ingress lb { + protocol "TCP" + from_port 80 + to_port 80 + cidr ["10.100.1.0/24", "10.100.2.0/24", "10.100.3.0/24"] + } + ingress es { + protocol "TCP" + from_port 9200 + to_port 9200 + cidr ["10.100.1.0/24", "10.100.2.0/24", "10.100.3.0/24"] + } + ingress monitor { + protocol "TCP" + from_port 6556 + to_port 6556 + cidr ["54.217.119.81/32"] + } + + // TODO: ftp (20/21) or ssh (22)? + ingress ftp { + protocol "TCP" + from_port 22 + to_port 22 + cidr ["213.96.27.139/32", "37.187.173.88/32", "51.89.40.59/32", "195.53.242.200/32"] + } + } + + /* + * TODO: We have to define interfaces or check which interfaces/AGs belong to each sg + */ + security_group dbsg { + egress salida { + protocol "-1" + from_port 0 + to_port 0 + cidr ["0.0.0.0/0"] + } + ingress ora { + protocol "TCP" + from_port 1521 + to_port 1521 + cidr ["10.100.1.0/24", "10.100.2.0/24", "10.100.3.0/24", "84.124.78.66/32"] + } + + // As discussed above, here is provided the other way to specify the sg + // associated to interfaces + ifaces db1, db2, db3 + } + + security_group elbsg { + egress salida { + protocol "-1" + from_port 0 + to_port 0 + cidr ["0.0.0.0/0"] + } + ingress http { + protocol "TCP" + from_port 80 + to_port 80 + cidr ["0.0.0.0/0", "::/0"] + } + ingress https { + protocol "TCP" + from_port 443 + to_port 443 + cidr ["0.0.0.0/0", "::/0"] + } + ingress es { + protocol "TCP" + from_port 9200 + to_port 9200 + cidr ["10.100.1.0/24", "10.100.2.0/24", "10.100.3.0/24"] + } + } + + security_group checkmk { + egress salida { + protocol "-1" + from_port 0 + to_port 0 + cidr ["0.0.0.0/0"] + } + ingress http { + protocol "TCP" + from_port 80 + to_port 80 + cidr ["84.124.78.66/32"] + } + ingress https { + protocol "TCP" + from_port 443 + to_port 443 + cidr ["84.124.78.66/32"] + } + + // TODO: ftp (20/21) or ssh (22)? + ingress ftp { + protocol "TCP" + from_port 22 + to_port 22 + cidr ["84.124.78.66/32"] + } + } + +} +deployment dep { + Gestaut -> gestaut_vm, + ElasticSearch -> elasticsearch_vm, + Edi -> edi_vm, + Database -> OracleDB + +} +active deployment dep + +// Concretization to AWS +concretizations { + concrete_infrastructure dev { + provider aws { + net concrete_vpc { + maps vpc + } + vm concrete_oracleDB { + maps OracleDB + } + autoscale_group asg1 { + maps elasticsearch_asg + } + autoscale_group asg2 { + maps edi_asg + } + autoscale_group asg3 { + maps gestaut_asg + } + } + } + +// concrete_infrastructure pro { +// provider aws { +// +// } +// } + + active dev +} + +optimization opt { + objectives { + "cost" => min + "availability" => max + } + nonfunctional_requirements { + req1 "Cost <= 70.0" max 70.0 => "cost"; + req2 "Availability >= 66.5%" min 66.5 => "availability"; + } +} diff --git a/tests/doml/CaseStudies/posidonia_IOP.domlx b/tests/doml/CaseStudies/posidonia_IOP.domlx new file mode 100644 index 0000000000000000000000000000000000000000..e1bd8a0d55a7915a9f9f4a2deff579127894e452 --- /dev/null +++ b/tests/doml/CaseStudies/posidonia_IOP.domlx @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="ASCII"?> +<commons:DOMLModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:app="http://www.piacere-project.eu/doml/application" xmlns:commons="http://www.piacere-project.eu/doml/commons" xmlns:infra="http://www.piacere-project.eu/doml/infrastructure" xmlns:optimization="http://www.piacere-project.eu/doml/optimization" name="posidonia" activeConfiguration="//@configurations.0" activeInfrastructure="//@concretizations.0"> + <annotations xsi:type="commons:SProperty" key="entorno" value="pre"/> + <annotations xsi:type="commons:SProperty" key="proyecto" value="baleares"/> + <application name="posidonia"> + <components xsi:type="app:SoftwareComponent" name="Gestaut" consumedInterfaces="//@application/@components.3/@exposedInterfaces.0 //@application/@components.1/@exposedInterfaces.0"> + <exposedInterfaces name="http"/> + <exposedInterfaces name="https"/> + </components> + <components xsi:type="app:SoftwareComponent" name="ElasticSearch" consumedInterfaces="//@application/@components.3/@exposedInterfaces.0"> + <exposedInterfaces name="search"/> + </components> + <components xsi:type="app:SoftwareComponent" name="Edi" consumedInterfaces="//@application/@components.3/@exposedInterfaces.0"> + <exposedInterfaces name="edi"/> + </components> + <components xsi:type="app:DBMS" name="Database"> + <exposedInterfaces name="dbAccess"/> + </components> + </application> + <infrastructure name="abstractInfra"> + <nodes xsi:type="infra:VirtualMachine" name="OracleDB" storage="20" credentials="//@infrastructure/@credentials.3"> + <ifaces name="db1" belongsTo="//@infrastructure/@networks.0/@subnets.0"/> + <ifaces name="db2" belongsTo="//@infrastructure/@networks.0/@subnets.1"/> + <ifaces name="db3" belongsTo="//@infrastructure/@networks.0/@subnets.2"/> + </nodes> + <generators xsi:type="infra:VMImage" name="posidonia_image" uri="ami-02a6bfdcf8224bd77" kind="IMAGE" generatedVMs="//@infrastructure/@groups.0/@machineDefinition //@infrastructure/@groups.1/@machineDefinition //@infrastructure/@groups.2/@machineDefinition"/> + <credentials xsi:type="commons:KeyPair" name="GestautKeyName" algorithm="RSA" bits="4096"/> + <credentials xsi:type="commons:KeyPair" name="ESKeyName" algorithm="RSA" bits="4096"/> + <credentials xsi:type="commons:KeyPair" name="EdiKeyName" algorithm="RSA" bits="4096"/> + <credentials xsi:type="commons:UserPass" name="dbCredentials" username="***" password="***"/> + <groups xsi:type="infra:AutoScalingGroup" name="gestaut_asg"> + <machineDefinition name="gestaut_vm" credentials="//@infrastructure/@credentials.0" generatedFrom="//@infrastructure/@generators.0"/> + </groups> + <groups xsi:type="infra:AutoScalingGroup" name="elasticsearch_asg"> + <machineDefinition name="elasticsearch_vm" credentials="//@infrastructure/@credentials.1" generatedFrom="//@infrastructure/@generators.0"/> + </groups> + <groups xsi:type="infra:AutoScalingGroup" name="edi_asg"> + <machineDefinition name="edi_vm" credentials="//@infrastructure/@credentials.2" generatedFrom="//@infrastructure/@generators.0"/> + </groups> + <securityGroups name="sg"> + <rules name="salida" protocol="-1" fromPort="0" toPort="0"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="lb" kind="INGRESS" protocol="tcp" fromPort="80" toPort="80"> + <cidr>10.100.1.0/24</cidr> + <cidr>10.100.2.0/24</cidr> + <cidr>10.100.3.0/24</cidr> + </rules> + <rules name="es" kind="INGRESS" protocol="tcp" fromPort="9200" toPort="9200"> + <cidr>10.100.1.0/24</cidr> + <cidr>10.100.2.0/24</cidr> + <cidr>10.100.3.0/24</cidr> + </rules> + <rules name="monitor" kind="INGRESS" protocol="tcp" fromPort="6556" toPort="6556"> + <cidr>54.217.119.81/32</cidr> + </rules> + <rules name="ftp" kind="INGRESS" protocol="tcp" fromPort="22" toPort="22"> + <cidr>213.96.27.139/32</cidr> + <cidr>37.187.173.88/32</cidr> + <cidr>51.89.40.59/32</cidr> + <cidr>195.53.242.200/32</cidr> + </rules> + </securityGroups> + <securityGroups name="dbsg"> + <rules name="salida" protocol="-1" fromPort="0" toPort="0"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="ora" kind="INGRESS" protocol="tcp" fromPort="1521" toPort="1521"> + <cidr>10.100.1.0/24</cidr> + <cidr>10.100.2.0/24</cidr> + <cidr>10.100.3.0/24</cidr> + <cidr>84.124.78.66/32</cidr> + </rules> + </securityGroups> + <securityGroups name="elbsg"> + <rules name="salida" protocol="-1" fromPort="0" toPort="0"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="http" kind="INGRESS" protocol="tcp" fromPort="80" toPort="80"> + <cidr>0.0.0.0/0</cidr> + <cidr>::/0</cidr> + </rules> + <rules name="https" kind="INGRESS" protocol="tcp" fromPort="443" toPort="443"> + <cidr>0.0.0.0/0</cidr> + <cidr>::/0</cidr> + </rules> + <rules name="es" kind="INGRESS" protocol="tcp" fromPort="9200" toPort="9200"> + <cidr>10.100.1.0/24</cidr> + <cidr>10.100.2.0/24</cidr> + <cidr>10.100.3.0/24</cidr> + </rules> + </securityGroups> + <securityGroups name="checkmk"> + <rules name="salida" protocol="-1" fromPort="0" toPort="0"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="http" kind="INGRESS" protocol="tcp" fromPort="80" toPort="80"> + <cidr>84.124.78.66/32</cidr> + </rules> + <rules name="https" kind="INGRESS" protocol="tcp" fromPort="443" toPort="443"> + <cidr>84.124.78.66/32</cidr> + </rules> + <rules name="ftp" kind="INGRESS" protocol="tcp" fromPort="22" toPort="22"> + <cidr>84.124.78.66/32</cidr> + </rules> + </securityGroups> + <networks name="vpc" protocol="tcp/ip" addressRange="/16"> + <subnets name="subnet1" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@nodes.0/@ifaces.0"/> + <subnets name="subnet2" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@nodes.0/@ifaces.1"/> + <subnets name="subnet3" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@nodes.0/@ifaces.2"/> + </networks> + </infrastructure> + <concretizations name="dev"> + <providers name="aws"> + <group name="asg1" maps="//@infrastructure/@groups.1"/> + <group name="asg2" maps="//@infrastructure/@groups.2"/> + <group name="asg3" maps="//@infrastructure/@groups.0"/> + </providers> + </concretizations> + <optimization name="opt"> + <objectives xsi:type="optimization:MeasurableObjective" kind="min" property="cost"/> + <objectives xsi:type="optimization:MeasurableObjective" kind="max" property="availability"/> + <nonfunctionalRequirements xsi:type="commons:RangedRequirement" name="req1" description="Cost <= 70.0" property="cost" max="70.0"/> + <nonfunctionalRequirements xsi:type="commons:RangedRequirement" name="req2" description="Availability >= 66.5%" property="availability" min="66.5"/> + </optimization> + <configurations name="dep"> + <deployments component="//@application/@components.0" node="//@infrastructure/@groups.0/@machineDefinition"/> + <deployments component="//@application/@components.1" node="//@infrastructure/@groups.1/@machineDefinition"/> + <deployments component="//@application/@components.2" node="//@infrastructure/@groups.2/@machineDefinition"/> + <deployments component="//@application/@components.3" node="//@infrastructure/@nodes.0"/> + </configurations> +</commons:DOMLModel> diff --git a/tests/doml/CaseStudies/uc3-openstack_v2.doml b/tests/doml/CaseStudies/uc3-openstack_v2.doml new file mode 100644 index 0000000000000000000000000000000000000000..f4feede7555e3fa203cb8269391481cc23ec39bb --- /dev/null +++ b/tests/doml/CaseStudies/uc3-openstack_v2.doml @@ -0,0 +1,246 @@ +doml uc3_openstack + +application app { + +// need to define all sw components of the project this is a placeholder +// need to understand what is really needed in this spec +// need to specify all provides/consumes + software_component iwg { + provides { net_info } + } + software_component osint { + provides { osint_info } + consumes { net_info, get_twitter, ewcf_rest_interface } + } + software_component ewcf { + provides { ewcf_rest_interface } + // ??? consumes { get_firebase } + } + saas external_twitter { + provides { get_twitter @ "https://twitter_api/get" } + } + +} + + +infrastructure infra { + + vm_image v_img1 { + generates osint_vm + } + + container c { + host osint_vm { + container_port 80 + vm_port 8080 + iface osint_igw_port + properties { + env_var1 = "value1"; + } + } + } + + cont_image c_img { + generates c + image "web-app:0.1.0" // needs to be replaced and other containers added + } + + + vm_image v_img2 { + generates igw_vm + } + + vm_image v_img3 { + generates ewcf_vm + } + + net net1 { + cidr "/24" + protocol "tcp/ip" + } + net net2 { + cidr "/24" + protocol "tcp/ip" + } + net net3 { + cidr "/24" + protocol "tcp/ip" + } + net oam { + cidr "/24" + protocol "tcp/ip" + } + + +// security group is left as originally defined needs to be updated + security_group sg { + egress icmp { + from_port -1 + to_port -1 + protocol "icmp" + cidr ["0.0.0.0/0"] + } + ingress http { + from_port 80 + to_port 80 + protocol "tcp" + cidr ["0.0.0.0/0"] + } + ingress https { + from_port 443 + to_port 443 + protocol "tcp" + cidr ["0.0.0.0/0"] + } + ingress ssh { + from_port 22 + to_port 22 + protocol "tcp" + cidr ["0.0.0.0/0"] + } + } + + key_pair ssh_key { + user "ubuntu" + keyfile "/home/user1/.ssh/openstack.key" + algorithm "RSA" + bits 4096 + } + autoscale_group osint_ag { + vm osint_vm { + os "ubuntu-20.04.3" + credentials ssh_key + iface osint_vm_net1 { + belongs_to net1 + } + iface osint_vm_oam { + belongs_to oam + } + + iface osint_igw_port{ + belongs_to net1 + } + } + } + + autoscale_group igw_ag { + vm igw_vm { + os "ubuntu-20.04.3" + credentials ssh_key + iface igw_vm_net2 { + belongs_to net2 + } + iface igw_vm_oam { + belongs_to oam + } + } + } + autoscale_group ewcf_ag { + vm ewcf_vm { + os "ubuntu-20.04.3" + credentials ssh_key + iface ewcf_vm_net3 { + belongs_to net3 + } + iface ewcf_vm_oam { + belongs_to oam + } + } + } +} + +deployment conf { + osint -> osint_vm, + iwg -> igw_vm, + ewcf -> ewcf_vm +} + +active deployment conf + +concretizations { + concrete_infrastructure con_infra { + provider openstack { + vm concrete_osint_vm { + properties { + vm_name = "osint"; + vm_flavor = "small"; + vm_key_name = "user1"; + } + maps osint_vm + } + vm concrete_igw_vm { + properties { + vm_name = "igw"; + vm_flavor = "small"; + vm_key_name = "user1"; + } + maps igw_vm + } + vm concrete_ewcf_vm { + properties { + vm_name = "ewcf"; + vm_flavor = "small"; + vm_key_name = "user1"; + } + maps ewcf_vm + } + + vm_image concrete_vm_image1 { + properties { + name = "ubuntu-20.04.3"; + } + maps v_img1 + } + + vm_image concrete_vm_image2{ + properties { + name = "ubuntu-20.04.3"; + } + maps v_img2 + } + + vm_image concrete_vm_image3 { + properties { + name = "ubuntu-20.04.3"; + } + maps v_img3 + } + + net concrete_net1 { + properties { + name = "uc3_net1"; + } + maps net1 + } + net concrete_net2 { + properties { + name = "uc3_net2"; + } + maps net2 + } + net concrete_net3 { + properties { + name = "uc3_net3"; + } + maps net3 + } + net concrete_net4 { + properties { + name = "uc3_net4"; + } + maps oam + } + } + } + active con_infra +} + +optimization opt { + objectives { + "cost" => min + } + nonfunctional_requirements { + req1 "Cost <= 200" max 200.0 => "cost"; + req2 "Provider" values "AMAZ" => "provider"; + } +} diff --git a/tests/doml/CaseStudies/uc3-openstack_v2.domlx b/tests/doml/CaseStudies/uc3-openstack_v2.domlx new file mode 100644 index 0000000000000000000000000000000000000000..c5c4b51099d8b6e1cfb883b9ceba253c58ddbae7 --- /dev/null +++ b/tests/doml/CaseStudies/uc3-openstack_v2.domlx @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="ASCII"?> +<commons:DOMLModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:app="http://www.piacere-project.eu/doml/application" xmlns:commons="http://www.piacere-project.eu/doml/commons" xmlns:infra="http://www.piacere-project.eu/doml/infrastructure" xmlns:optimization="http://www.piacere-project.eu/doml/optimization" name="uc3_openstack" activeConfiguration="//@configurations.0" activeInfrastructure="//@concretizations.0"> + <application name="app"> + <components xsi:type="app:SoftwareComponent" name="iwg"> + <exposedInterfaces name="net_info"/> + </components> + <components xsi:type="app:SoftwareComponent" name="osint" consumedInterfaces="//@application/@components.0/@exposedInterfaces.0 //@application/@components.3/@exposedInterfaces.0 //@application/@components.2/@exposedInterfaces.0"> + <exposedInterfaces name="osint_info"/> + </components> + <components xsi:type="app:SoftwareComponent" name="ewcf"> + <exposedInterfaces name="ewcf_rest_interface"/> + </components> + <components xsi:type="app:SaaS" name="external_twitter"> + <exposedInterfaces name="get_twitter" endPoint="https://twitter_api/get"/> + </components> + </application> + <infrastructure name="infra"> + <nodes xsi:type="infra:Container" name="c" generatedFrom="//@infrastructure/@generators.1"> + <configs container_port="80" vm_port="8080" host="//@infrastructure/@groups.0/@machineDefinition" iface="//@infrastructure/@groups.0/@machineDefinition/@ifaces.2"> + <annotations xsi:type="commons:SProperty" key="env_var1" value="value1"/> + </configs> + </nodes> + <generators xsi:type="infra:VMImage" name="v_img1" generatedVMs="//@infrastructure/@groups.0/@machineDefinition"/> + <generators xsi:type="infra:ContainerImage" name="c_img" uri="web-app:0.1.0" kind="IMAGE" generatedContainers="//@infrastructure/@nodes.0"/> + <generators xsi:type="infra:VMImage" name="v_img2" generatedVMs="//@infrastructure/@groups.1/@machineDefinition"/> + <generators xsi:type="infra:VMImage" name="v_img3" generatedVMs="//@infrastructure/@groups.2/@machineDefinition"/> + <credentials xsi:type="commons:KeyPair" name="ssh_key" user="ubuntu" keyfile="/home/user1/.ssh/openstack.key" algorithm="RSA" bits="4096"/> + <groups xsi:type="infra:AutoScalingGroup" name="osint_ag"> + <machineDefinition name="osint_vm" os="ubuntu-20.04.3" credentials="//@infrastructure/@credentials.0" generatedFrom="//@infrastructure/@generators.0"> + <ifaces name="osint_vm_net1" belongsTo="//@infrastructure/@networks.0"/> + <ifaces name="osint_vm_oam" belongsTo="//@infrastructure/@networks.3"/> + <ifaces name="osint_igw_port" belongsTo="//@infrastructure/@networks.0"/> + </machineDefinition> + </groups> + <groups xsi:type="infra:AutoScalingGroup" name="igw_ag"> + <machineDefinition name="igw_vm" os="ubuntu-20.04.3" credentials="//@infrastructure/@credentials.0" generatedFrom="//@infrastructure/@generators.2"> + <ifaces name="igw_vm_net2" belongsTo="//@infrastructure/@networks.1"/> + <ifaces name="igw_vm_oam" belongsTo="//@infrastructure/@networks.3"/> + </machineDefinition> + </groups> + <groups xsi:type="infra:AutoScalingGroup" name="ewcf_ag"> + <machineDefinition name="ewcf_vm" os="ubuntu-20.04.3" credentials="//@infrastructure/@credentials.0" generatedFrom="//@infrastructure/@generators.3"> + <ifaces name="ewcf_vm_net3" belongsTo="//@infrastructure/@networks.2"/> + <ifaces name="ewcf_vm_oam" belongsTo="//@infrastructure/@networks.3"/> + </machineDefinition> + </groups> + <securityGroups name="sg"> + <rules name="icmp" protocol="icmp" fromPort="-1" toPort="-1"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="http" kind="INGRESS" protocol="tcp" fromPort="80" toPort="80"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="https" kind="INGRESS" protocol="tcp" fromPort="443" toPort="443"> + <cidr>0.0.0.0/0</cidr> + </rules> + <rules name="ssh" kind="INGRESS" protocol="tcp" fromPort="22" toPort="22"> + <cidr>0.0.0.0/0</cidr> + </rules> + </securityGroups> + <networks name="net1" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@groups.0/@machineDefinition/@ifaces.0 //@infrastructure/@groups.0/@machineDefinition/@ifaces.2"/> + <networks name="net2" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@groups.1/@machineDefinition/@ifaces.0"/> + <networks name="net3" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@groups.2/@machineDefinition/@ifaces.0"/> + <networks name="oam" protocol="tcp/ip" addressRange="/24" connectedIfaces="//@infrastructure/@groups.0/@machineDefinition/@ifaces.1 //@infrastructure/@groups.1/@machineDefinition/@ifaces.1 //@infrastructure/@groups.2/@machineDefinition/@ifaces.1"/> + </infrastructure> + <concretizations name="con_infra"> + <providers name="openstack"> + <vms name="concrete_osint_vm" maps="//@infrastructure/@groups.0/@machineDefinition"> + <annotations xsi:type="commons:SProperty" key="vm_name" value="osint"/> + <annotations xsi:type="commons:SProperty" key="vm_flavor" value="small"/> + <annotations xsi:type="commons:SProperty" key="vm_key_name" value="user1"/> + </vms> + <vms name="concrete_igw_vm" maps="//@infrastructure/@groups.1/@machineDefinition"> + <annotations xsi:type="commons:SProperty" key="vm_name" value="igw"/> + <annotations xsi:type="commons:SProperty" key="vm_flavor" value="small"/> + <annotations xsi:type="commons:SProperty" key="vm_key_name" value="user1"/> + </vms> + <vms name="concrete_ewcf_vm" maps="//@infrastructure/@groups.2/@machineDefinition"> + <annotations xsi:type="commons:SProperty" key="vm_name" value="ewcf"/> + <annotations xsi:type="commons:SProperty" key="vm_flavor" value="small"/> + <annotations xsi:type="commons:SProperty" key="vm_key_name" value="user1"/> + </vms> + <vmImages name="concrete_vm_image1" maps="//@infrastructure/@generators.0"> + <annotations xsi:type="commons:SProperty" key="name" value="ubuntu-20.04.3"/> + </vmImages> + <vmImages name="concrete_vm_image2" maps="//@infrastructure/@generators.2"> + <annotations xsi:type="commons:SProperty" key="name" value="ubuntu-20.04.3"/> + </vmImages> + <vmImages name="concrete_vm_image3" maps="//@infrastructure/@generators.3"> + <annotations xsi:type="commons:SProperty" key="name" value="ubuntu-20.04.3"/> + </vmImages> + <networks name="concrete_net1" maps="//@infrastructure/@networks.0"> + <annotations xsi:type="commons:SProperty" key="name" value="uc3_net1"/> + </networks> + <networks name="concrete_net2" maps="//@infrastructure/@networks.1"> + <annotations xsi:type="commons:SProperty" key="name" value="uc3_net2"/> + </networks> + <networks name="concrete_net3" maps="//@infrastructure/@networks.2"> + <annotations xsi:type="commons:SProperty" key="name" value="uc3_net3"/> + </networks> + <networks name="concrete_net4" maps="//@infrastructure/@networks.3"> + <annotations xsi:type="commons:SProperty" key="name" value="uc3_net4"/> + </networks> + </providers> + </concretizations> + <optimization name="opt"> + <objectives xsi:type="optimization:MeasurableObjective" kind="min" property="cost"/> + <nonfunctionalRequirements xsi:type="commons:RangedRequirement" name="req1" description="Cost <= 200" property="cost" max="200.0"/> + <nonfunctionalRequirements xsi:type="commons:EnumeratedRequirement" name="req2" description="Provider" property="provider"> + <values>AMAZ</values> + </nonfunctionalRequirements> + </optimization> + <configurations name="conf"> + <deployments component="//@application/@components.1" node="//@infrastructure/@groups.0/@machineDefinition"/> + <deployments component="//@application/@components.0" node="//@infrastructure/@groups.1/@machineDefinition"/> + <deployments component="//@application/@components.2" node="//@infrastructure/@groups.2/@machineDefinition"/> + </configurations> +</commons:DOMLModel>