Skip to content
Snippets Groups Projects
Select Git revision
  • 133b8463d7af98da6f31a946c089a2ad504075e6
  • main default
  • y3
  • y1
4 results

saas.domlx

Blame
  • saas.domlx 4.47 KiB
    <?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="iot_simple_app" activeConfiguration="//@configurations.0" activeInfrastructure="//@concretizations.0">
      <application name="iot_simple_app">
        <components xsi:type="app:DBMS" name="oracle">
          <exposedInterfaces name="sql_interface"/>
        </components>
        <components xsi:type="app:SoftwareComponent" name="web_server" consumedInterfaces="//@application/@components.0/@exposedInterfaces.0 //@application/@components.3/@exposedInterfaces.0">
          <exposedInterfaces name="sensor_info"/>
        </components>
        <components xsi:type="app:SoftwareComponent" name="iot_provider" consumedInterfaces="//@application/@components.1/@exposedInterfaces.0"/>
        <components xsi:type="app:SaaS" name="external_meteo">
          <exposedInterfaces name="get_weather" endPoint="https://api.mymeteo.com/get"/>
        </components>
      </application>
      <infrastructure name="infra">
        <nodes xsi:type="infra:VirtualMachine" name="vm1">
          <ifaces name="i1" endPoint="10.0.0.2" belongsTo="//@infrastructure/@networks.0" associated="//@infrastructure/@securityGroups.0"/>
        </nodes>
        <nodes xsi:type="infra:VirtualMachine" name="vm2">
          <ifaces name="i1" endPoint="10.0.0.3" belongsTo="//@infrastructure/@networks.0" associated="//@infrastructure/@securityGroups.0"/>
        </nodes>
        <nodes xsi:type="infra:PhysicalComputingNode" name="iot_device1">
          <ifaces name="i1" endPoint="10.0.0.4" belongsTo="//@infrastructure/@networks.0" associated="//@infrastructure/@securityGroups.0"/>
        </nodes>
        <nodes xsi:type="infra:PhysicalComputingNode" name="iot_device2">
          <ifaces name="i1" endPoint="10.0.0.5" belongsTo="//@infrastructure/@networks.0" associated="//@infrastructure/@securityGroups.0"/>
        </nodes>
        <credentials xsi:type="infra:KeyPair" name="ssh_key" user="ubuntu" keyfile="/home/user1/.ssh/openstack.key" algorithm="RSA" bits="4096"/>
        <securityGroups name="sg1" ifaces="//@infrastructure/@nodes.0/@ifaces.0 //@infrastructure/@nodes.1/@ifaces.0 //@infrastructure/@nodes.2/@ifaces.0 //@infrastructure/@nodes.3/@ifaces.0">
          <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="10.0.0.0/24" connectedIfaces="//@infrastructure/@nodes.0/@ifaces.0 //@infrastructure/@nodes.1/@ifaces.0 //@infrastructure/@nodes.2/@ifaces.0 //@infrastructure/@nodes.3/@ifaces.0"/>
      </infrastructure>
      <concretizations name="con_infra1">
        <providers name="aws">
          <vms name="concrete_vm1" maps="//@infrastructure/@nodes.0">
            <annotations xsi:type="commons:SProperty" key="instance_type" value="t2.micro"/>
          </vms>
          <vms name="concrete_vm2" maps="//@infrastructure/@nodes.1"/>
          <networks name="concrete_net1" maps="//@infrastructure/@networks.0"/>
        </providers>
      </concretizations>
      <optimization name="opt">
        <objectives xsi:type="optimization:MeasurableObjective" kind="min" property="cost"/>
        <nonfunctionalRequirements xsi:type="commons:RangedRequirement" name="req1" description="Cost &lt;= 200" property="cost" max="200.0"/>
        <nonfunctionalRequirements xsi:type="commons:EnumeratedRequirement" name="req2" description="Provider" property="provider">
          <values>AMAZ</values>
        </nonfunctionalRequirements>
      </optimization>
      <configurations name="config1">
        <deployments component="//@application/@components.0" node="//@infrastructure/@nodes.0"/>
        <deployments component="//@application/@components.1" node="//@infrastructure/@nodes.1"/>
        <deployments component="//@application/@components.2" node="//@infrastructure/@nodes.2"/>
        <deployments component="//@application/@components.2" node="//@infrastructure/@nodes.3"/>
      </configurations>
    </commons:DOMLModel>