## 4 Variable Deployment Models
### Variable Deployment Metamodel
* The set of _Typed Element Types_\(ET_{vdm}:=CT_{vdm}\cup RT_{vdm}\) is the union of component and relation types in \(vdm\). Considering our motivating scenario, the component type \"Nodejs14 App\" and relation type \"hostedOn\", for example, belong to this set. * \(type_{vdm}:E_{vdm}\to ET_{vdm}\) is the mapping function that assigns all components and relations in \(vdm\) their respective component or relation type and, therefore, provides the semantics of typed elements. Considering our motivating scenario, the component \"Web Component\", for example, is of type \"Nodejs14 App\". * \(P_{vdm}\subseteq\Sigma^{+}\times\Sigma^{+}\) is the set of _Properties_ in \(vdm\). Each \(p_{i}=(key,value)\in P_{vdm}\) describes a property of a component (type) or relation (type). Considering our motivating scenario, such properties are, for example, database credentials such as a username and password. However, properties are not shown in the figures for brevity. * \(properties_{vdm}:E_{vdm}\cup ET_{vdm}\rightarrow\wp(P_{vdm})\) is the mapping function that assigns each typed element \(e_{i}\in E_{vdm}\) and typed element type \(et_{i}\in ET_{vdm}\) its properties \(ps_{i}\in\wp(P_{vdm})\) in \(vdm\). Considering our motivating scenario, the database connection between the \"Web Component\" and \"Prod Database\", for example, is assigned its respective properties, such as a username and password. However, properties are not shown in the figures for brevity. At this point, the described classes represent a deployment model according to EDMM. In the following, we introduce new classes required for variability modeling as described in our concept presented above. Thus, these new classes together with the already listed EDMM classes form the VDMM. * \(VI_{vdm}\) is the set of _Variability Inputs_ in \(vdm\). Each \(vi_{i}\in VI_{vdm}\) is used inside Variability Conditions. Considering our motivating scenario, a Variability Input \"mode\", for example, states if the desired deployment is for development or for production. Other Variability Inputs could ask for enabled features such as elasticity or for the legal location to select a compliant hosting offering. * \(CON_{vdm}\) is the set of _Variability Conditions_ in \(vdm\). Each \(con_{i}\in CON_{vdm}\) describes a Variability Condition under which a component, relation, or group is present in the deployment variant. Considering our motivating scenario, a Variability Condition \"Dev\", for example, is assigned to the component \"Dev Runtime\" which evaluates that the Variability Input \"mode\" has the value \"dev\". Other Variability Conditions could consider cloud offering prices. * \(inputs_{vdm}:CON_{vdm}\rightarrow\wp(VI_{vdm})\) is the mapping function that assigns each Variability Condition \(con_{i}\in CON_{vdm}\) the required set of Variability Inputs \(vis_{i}\in\wp(VI_{vdm})\) in \(vdm\) that are required to evaluate \(con_{i}\). Considering our motivating scenario, the Variability Input \"mode\", for example, is assigned to the Variability Condition \"Dev\". * \(G_{vdm}\subseteq\wp(E_{vdm})\) is the set of all _Groups_ in \(vdm\). Hereby, a \(g_{i}\in G_{vdm}\) is a group that consists of components and relations in \(vdm\) that are grouped to associate one or more Variability Conditions to all elements contained in this group. Considering our motivating scenario, the components \"Dev Runtime\", \"Dev Database\", and \"Private VM\", for example, along with their relations could have been added to the same group to manage all conditional elements which are present during the development variant. * \(conditions_{vdm}:E_{vdm}\cup G_{vdm}\rightarrow\wp(CON_{vdm})\) is a mapping function in \(vdm\) that assigns each component \(c_{i}\in C_{vdm}\subseteq E_{vdm}\), relation \(r_{j}\in R_{vdm}\subseteq E_{vdm}\), and group \(g_{k}\in G_{vdm}\) the Variability Conditions \(cons_{l}\in\wp(CON_{vdm})\) under which it is present in the deployment variant. If a component, relation, or group have no Variability Conditions, the mapping function assigns them the empty set.