SugarCRM Database Deployment Variants DB in separate Service Template DB external to Service Template Objective • Consider scenarios when components or services required by a deployment may be: – 1) Shared across deployments – 2) Already existing/provided by a 3rd party not part of any existing Service Template (i.e. under the control of a separate and autonomous administrative entity) 2 Fully Specified Service Template AppDependsOnPhpRuntime SugarCrmApp R5 [SugarCrmApplication] R2 C5 PhpModule C6 MySqlDbConnection Operations: connectTo SugarCrmDb [SugarCrmDb] R3 HostedOnType [PhpModule] R4 C2 C4 PluginHostedOnContainer Operations: hostOn R6 MySqlDbHostedOnMySql Operations: hostOn C3 ApacheWebServer MySql [ApacheWebServer] [MySql] R1 R1 HostedOn R1: ContainerRequirement C1: ContainerCapability R2: WebAppContainerRequirement C2: WebAppContainerCapability R3: MySqlDbContainerRequirement C3: MySqlDbContainerCapability R4: PluginContainerRequirement C4: PluginContainerCapability R5: PhpRuntimeRequirement C5: PhpRuntimeCapability R6: MySqlDatabaseRequirement C6: MySqlDatabaseCapability DBMS capable of hosting the DB HostedOn C1 C1 VmApache ComputeNodeMySql [VirtualMachine] [ComputeNode] . . . . . . IaaS or PaaS cloud hosted DBMS 3 Minimally Specified Service Template SugarCrmApp [SugarCrmApplication] RC CC MySqlDbConnection RH SugarCrmDb [SugarCrmDb] RH DB has DA to initialize in DBMS • We must decide: – Which components will be hosted in the deployment versus outside the deployment • Outside the deployment cases: – 1) Part of another deployment (i.e. specified in another service template) – 2) Hosted in some existing server we don’t control 4 but are allowed to connect to it and possibly Splitting Across Multiple Deployments Valid client operations :load/extract contents to/from artifact AppDependsOnPhpRuntime SugarCrmApp R5 [SugarCrmApplication] R6 R2 C5 PhpModule C6 MySqlDbConnection Operations: connectTo SugarCrmDb [SugarCrmDb] R3 HostedOnType [PhpModule] R4 MySqlDbHostedOnMySql Operations: hostOn C2 C4 PluginHostedOnContainer Operations: hostOn C3 ApacheWebServer MySql [ApacheWebServer] [MySql] R1 R1 HostedOn HostedOn C1 C1 VmApache VmMySql [VirtualMachine] [VirtualMachine] PHP App Service Template DB Service Template Deployments have decoupled lifecycles 5 When To Split? • DB has a different lifecycle than the PHP App – E.g. DB is really shared across multiple client apps • DB service is offered by a different Administrative Entity (AE) – DB AE controls lifecycle of the DB. PHP AP AE consumes DB on DB AE’s terms – AE for App and DB both use TOSCA gaining the benefit of awareness of each other’s models • Lifecycle awareness • Federation 6 Using an “External” DB • Single Service Template specifies: – PHP App fully specified as part of deployment as a complete tier – DB is partially specified • DB is hostedOn a DBMS (R3) • DBMS instance is specified (C3) – Address and port – DBMS type not necessarily relevant (leave abstract if possible) • DBMS container/tier is out of scope • TOSCA engine must resolve lifecycle states of DBMS 7 TOSCA Engine Resolves DB AppDependsOnPhpRuntime SugarCrmApp R5 [SugarCrmApplication] R2 C5 PhpModule C6 MySqlDbConnection Operations: connectTo SugarCrmDb [SugarCrmDb] R3 HostedOnType [PhpModule] R4 DbHostedOnDBMS C2 C4 PluginHostedOnContainer Operations: hostOn R6 ApacheWebServer [ApacheWebServer] ? R1 HostedOn C1 VmApache [VirtualMachine] R3 allows TOSCA Engine to find DBMS which can host the DB Lifecycle operations of DBMS is out of scope 8 External DB Service Template provided by the environment AppDependsOnPhpRuntime SugarCrmApp R5 [SugarCrmApplication] R6 R2 C5 PhpModule C6 SugarCrmDb [SugarCrmDb] R3 HostedOnType [PhpModule] Environment Provided DB Service DbHostedOnDBMS C3 R4 C2 C4 PluginHostedOnContainer Operations: hostOn MySqlDbConnection Operations: connectTo DBMS ApacheWebServer [DBMS] [ApacheWebServer] R1 R1 HostedOn HostedOn C1 C1 VmApache [VirtualMachine] AnyComputeNode [ComputeNode] C3 contains information (e.g. host/port) required to connect to a specific DBMS DBMS lifecycle still out of scope 9 External DB Service Template NOT provided by the environment AppDependsOnPhpRuntime SugarCrmApp R5 [SugarCrmApplication] R2 C5 PhpModule C6 MySqlDbConnection Operations: connectTo SugarCrmDb [SugarCrmDb] R3 HostedOnType [PhpModule] R4 C2 C4 PluginHostedOnContainer Operations: hostOn R6 DbHostedOnDBMS IP Address, Port, DB, credentials etc. C3 ApacheWebServer DBMS [ApacheWebServer] [DBMS] ? R1 HostedOn DBMS Node exists to hold C3 C1 VmApache [VirtualMachine] C3 contains information (e.g. host/port) required to connect to a specific DBMS DBMS lifecycle still out of scope 10
© Copyright 2026 Paperzz