260 likes | 331 Views
Andrea Westerinen Software Architect, Server and Tools Division. Service Modeling Language Understanding the Platform. Model-Based Management. Real-World System. SML Runtime. Need: 1. Language for model defn - SML 2. Model defn with constraints – Model Library
E N D
Andrea WesterinenSoftware Architect, Server and Tools Division Service Modeling Language Understanding the Platform
Model-Based Management Real-World System SML Runtime Need: 1. Language for model defn - SML 2. Model defn with constraints – Model Library 3. Infrastructure to make it real – MS Runtime and model library Common Models Model Instances Discovery updates SDM instances Validate Change Request Change User Model Updated Synchronization updates real-world systems
What is the Language? • Service Modeling Language (http://www.serviceml.org) • An XML Schema based language providing constructs for modeling the elements in complex IT services and systems, their relationships and constraints • Profile of XML Schema 1.0 is used for defining structural aspects • Profile of Schematron is used for defining constraints • Schematron is an ISO/IEC standard (http://standards.iso.org/ittf/PubliclyAvailableStandards/c040833_ISO_IEC_19757-3_2006(E).zip) • SML Interchange Format (SML IF) defines an XML serialization format • Defines a container XML document for all definitional and/or instance documents of a model • Designed to facilitate the exchange of SML model data, preserving content and relationship data
What is Added to XML Schema?Inter-Document References and Their Constraints • sml:ref – A complex type with open content model for representing references • SML defines URI and EPR schemes (using an sml:uri element and a wsa:EndpointReference element) • sml:acyclic: A reference cannot result in cycles • Scenario: A reference that represents installation dependencies between software applications • sml:targetType and sml:targetElement: Constrains the reference’s target to a specific type or element • Scenario: The target of a installation dependency reference must be of type ApplType or element Appl • sml:key, sml:unique, and sml:keyref: Extends xs:key, xs:unique, and xs:keyref to inter-document references • Scenario: A data center document has references to documents corresponding to servers in the data center, and the modeler wants to ensure that all servers in a data center have unique names
Schematron is an ISO/IEC standard for defining assertions on a set of XML documents Uses XPath 1.0 as the default query binding but other languages such as XPath2.0, XQuery, XSLT, etc. supported SML augments XPath 1.0 with various extension functions such as deref() and conventions: “Laws of physics” embedded in the xs:appinfo child element of a type definition or global-element definition Other Schematron documents (evaluation-specific, “temporary” rules) in definitional section of SML IF Note that basic XSD facets are still very useful and performant! What is Added to XML Schema?Schematron Rules pattern – ordered set of related rules rule – defines context for a set of asserts and reports assert report
Schematron Example (1 of 2) <xs:complexType name="IPAddressAndPrefixType" tns:version="1.0.0.I20070226" tns:experimental="true"> <xs:annotation> <xs:documentation>Data defining an IP address (either IPv4 or v6).</xs:documentation> <xs:appinfo> <sch:schema> <sch:ns uri="http://schemas.microsoft.com/sdm/modellib/core/2005/09" prefix="core"/> <sch:ns uri="http://schemas.microsoft.com/sdm/functions/2006/02" prefix="sdmfn"/> <sch:pattern id="ValidIPPrefixLength"> <sch:rule context="."> <sch:report test="count(IPv4Address)=1 and IPPrefixLength > 32" sdm:severity="error"> The instance with id <sch:value-of select="string(ancestor::*[sdmfn:isElement(., '*', 'core:BaseType')]/core:ClientInstanceId)"/> has an IPv4 address with a prefix length greater than 32. </sch:report> </sch:rule> <sch:rule context="."> <sch:report test="count(IPv6Address)=1 and IPPrefixLength > 128" sdm:severity="error"> <!– Similar to above --> </sch:report> </sch:rule> </sch:pattern> </sch:schema> </xs:appinfo> </xs:annotation> … …
Schematron Example (2 of 2) <xs:sequence> <xs:choice> <xs:element name="IPv4Address" type="tns:IPv4AddressType" nillable="true"/> <xs:element name="IPv6Address" type="tns:IPv6AddressType" nillable="true"/> </xs:choice> <xs:element name="IPPrefixLength" type="xs:short" nillable="true" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:simpleType name="IPv4AddressType" tns:version="1.0.0.I20070226" tns:experimental="true"> <xs:restriction base="xs:string"> <xs:pattern value="(\d{1,3}\.){3}\d{1,3}"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="IPv6AddressType" tns:version="1.0.0.I20070226" tns:experimental="true"> <xs:restriction base="xs:string"> <xs:pattern value="([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}"/> <xs:pattern value="[0-9A-Fa-f]{1,4}((:|::)[0-9A-Fa-f]{1,4}){0,6}(::|((:|::)[0-9A-Fa-f]{1,4}))"/> <xs:pattern value="[0-9A-Fa-f]{1,4}((:|::)[0-9A-Fa-f]{1,4}){0,5}:(\d{1,3}\.){3}\d{1,3}"/> </xs:restriction> </xs:simpleType>
What is the Model Definition? • A model library or ontology • An abstraction of the entities that (may) exist in the managed environment, their states and their relationships • Defines the rules by which these entities may be combined, used, asserted and queried • Abstraction and rules together dictate how information is shared, reasoned against and used • Address today’s management environment problems • Result of individually designed, product-specific “models” • No need for translation of concepts • Reduction of errors of interpretation and omission
Creation/communication of knowledge and content about hardware, software, data and business processes Designed for IT/business management vs instrumentation definition Consistent semantics for ease of use and reuse of management data and knowledge Management of heterogeneous business environments with the perspectives of time and intent Unification of the management tool technologies within Microsoft Publication and consumption of a single set of semantics, addressing all stages of the development, deployment and operations lifecycle Definition of a middle ground between standard semantics and domain-specific languages Group Policy, Config Mgr Role Mgmt Tool Policy, Desired Config Software/ Functional Roles Visual Studio + Dev Tools ServiceDesk Code/ Implementation Data Business (Licensing, SoftwLibrary) Security Products Ops Mgr + Monitoring Security (Credentials, Permissions, …) Health,Service Level Goals of the Microsoft Model Library Role Mgmt Policy Service Desk Config Mgr … Visual Studio Security Ops Mgr Core Concepts(Hardware, Software,relationships…)
A set of XML types/elements representing what could, does or did exist in the real world and its related data and constraints Patterns/rules by which these elements are defined, used and extended Supporting guidelines and docs Validation tooling Also includes: Establishing knowledgeable communities within Microsoft and across our partner and customer base Standardizing and evangelizing the Model Library Contents of the Model Library Constraint Defns Patterns Schema XML Schema + Schematron Docs Patterns for Use and Extension Guidelines And Docs Tooling English and Instance Docs, Tools Communities, Standards
Model Design Based on Separation of “Aspects” • Basic entity definition • Application/software systems, modules, constraints, … • Computers and their assembly from deployed hardware/software • Security entities (classifications, roles, permissions) • Data and repositories (what and where) • Interfaces, scripts, jobs • Communication entities (endpoints and links) • Settings/knobs, and health and statistics data • Business contracts (software licenses, warranties, SLAs, …) • … • Entities defined as separate types (i.e., independently instantiated and referenced, versus embedded) if: • Instance data applicable to (reused for) multiple entities • Lifetimes or security of entities are different
References and Relationships • Equal focus on reference/relationship semantics as on core elements • Assignment • Functional Dependency and Hosting • Including meta-data related to propagation of health, maintenance, … • Where Hosting has additional lifetime implications • Aggregation and Composition (Parent/Child specializations) • Where Parent/Child references have lifetime implications • … • SML defines references (with cardinalities as min/maxOccurs) • Model Library adds “inverseOfReference” meta-data • Reference-oriented model supports “relationships” via: • Explicit inverseOf meta-data -and/or- • Definition of explicit relationship types where the relationship type contains the individual references (I.E., a UML “association class”)
Example of Multiple “Aspects” – Software Modeling IT and Business Architect, Developer IT Operations Application/Software Systems Software Structure and Implementation Deployable Instances (Planning and Packaging) Deployed Instances (Config and Deployment) Running Instances (Activation, Testing, Mgmt) Technology “Types” Data capture from packaging tools and forensically Data capture from OpsMgr and ConfigMgr Data capture from Visual Studio Increasing # of instances
Model Library Concepts • Business Requirements • Mission and Goals • Function • Capabilities • Business Processes • Roles • Rules • Actions, Flows • Scenarios • Conceptual Data • Entities • Relationships • Rules • Vocabulary • Contracts • SLA’s • Information Flow • Legal Reqmts • Single and Composite Application Development • System Context • Applications, Modules • Endpoints, Connections • Req’ed Resources • Data and Repositories • Settings • Constraints • Health data • Policy • Security • Transactional • Deployment • Operational • SoftwareItem, HardwareItem, ItemCatalog • Components/Manifest (Vendor, Version, …) • Configuration • Scheduling • Deployment Reqmts • Licensing Implications • DeployedSoftware • Hosting System/Software • Configurations • Connectivity • Licensing, Product Key • Activation Data, … • Taking into account • Networks • Physical Servers • Data Center Design • Implementation Details • Test Cases • XSD Schemas • Code • Database Designs • Forms • Configurations • Operation and Monitoring • FunctionalEntities • Events • Health and Performance • SLA’s Dev artifacts of today Scattered over the enterprise Today
Challenges Addressed in the Model Library Design • Flexibility vs patterns • Model complexity • Real world vs instance identity • Multiple facets of an entity • Incremental discovery • Library evolution and versioning • Capturing current, future and historical data • …
Use and Extension of the Model Library • Developers use and extend the model types/elements and define instances + instrumentation • If constructs exist in the Model Library or extension schemas – Use directly • Otherwise, extend in team-specific schema or via extension to Model Library • Also need mapping to/from instrumentation levels such as CIM and SNMP • For example, dev team A can use a DeployedSoftware element declaration “as-is” and extend the SettingDataType to define specific “knobs” • Ops and admins focus on model instances as accessed through tools, scripts and CLI • Read and operate against model instances, define new instances +update values • For example, operator “Joe” reviews health state and stats of an application and updates the values of the “configurable knobs” to tune it • Updates are validated against constraints (Schematron rules) before being put into the “real world”
What is the Infrastructure? WMI Registry File Script .NET assembly SQL IIS metabase Environment variables AD MSI Certificate + … SML Client Application Discovery Sync SML Client API SML Runtime SQL-store session Document Collection Organizes documents in a file-system like hierarchy and provides path-based addressing SQL 2005 Stores SML instances as XML data in SQL Server
SML Client APIs • Enable applications to access, create, and modify documents in a document collection • Add, retrieve, delete/update documents • Execute queries • W3C-style validation of documents • Schematron and SML-specific constraint validation • Test update: Verifies if the pending updates can be successfully applied to the document collection but does not update it • Commit changes: Validates that updates can be applied and then commits them • Based on XLinq • A clean and simple XML API for .NET languages • Part of the Language Integrated Query (LINQ) extensions, available in C# 3.0 and VB 9.0
SQL Session SQL Session SQL Session Cache Cache Cache More Detail on the SQL Store (1 of 2) SML Client Process SML Client Process SQL Session Cache SQL-based SML Store SQL-based SML Store
More Detail on the SQL Store (2 of 2) • Sessions provide mechanism for client to interact with the SML SQL Store • Loosely coupled client-side cache of documents (documents explicitly retrieved, updates not automatic, cache not updated to stay in sync) • Allows the client to query SML store, create new documents, and modify documents • Supports change tracking • Supports on-demand transactional updates to SML store • At any time, the SML client can • Revert the pending updates made to the cache • Submit a test update to verify if the pending updates can be successfully applied to the SML store • Submit an update request to apply the pending updates to the SML Store • Transactional update using optimistic concurrency control
Use of SML in Microsoft Today • Server Manger tool in Windows Server “Longhorn” • SML models of “in the box” server roles are used for installation, configuration, and on-going management of these roles via Document Collection processing • Desired Configuration Monitoring (DCM) feature in SCCM (ConfigMgr) 07 • SML models are used to define and verify the desired configuration of machines via Document Collection processing • Configuration Management Database in Service Desk v1 • Uses the SML-based Microsoft Model Library and the SQL store for defining and storing the past, present, and future planned configuration of IT assets in an enterprise • Much other work in development
Workshop Approach • Introductions and a few words about what you want to get out of this workshop • If you want to remain in contact, just email andreaw@microsoft.com • 3-4 groups to discuss issues in managing and integrating development, deployment, and operations • What are the problems? • What is the necessary data? • What is the ideal world? • (Example on the following slides, feel free to change as you see fit) • Prioritize the lists and discuss how we could address them • More complete analysis will be posted to the AIC blog after the conference
Catalog Awards Cart GolfCatalogAdmin GolfCatalog GolfCatalogDB GolfCatalogService GolfShop GolfStore IIS SQLServer Windows IIS SecureAppServer SQLServer SQLServer Windows PublicWebServer Windows BusinessDataServer Example - Application and Deployed Software Structure Deployable GolfShop Deployable GolfCatalog Service Deployable GolfCatalog DB Deployment: GolfStore USSalesWebHosting SecureAppServer PublicWebServer BusinessDataServer USSalesWebHosting
Example - Logical, Physical and Environmental Structures Cluster 1 is the PublicWebServer Pod Mngt & NW Pod Mngt & NW Loadalancer/Firewall Loadalancer/Firewall Cluster 2 hosts the SecureAppServer and BusinessDataServer Pod Mngt & NW Cluster 2 allocated on demand from Pods Physical pods with servers, network, storage Environment (Power, Cooling, …) SLAs guarantee uptime, availability and repair times for the computers and enclosures from the manufacturer