{"id":7798,"date":"2024-04-22T09:00:07","date_gmt":"2024-04-22T16:00:07","guid":{"rendered":"https:\/\/www.microsoft.com\/insidetrack\/blog\/?p=7798"},"modified":"2024-04-22T13:58:24","modified_gmt":"2024-04-22T20:58:24","slug":"how-microsoft-is-delivering-smart-building-experiences-with-ci-cd-for-azure-digital-twins","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/insidetrack\/blog\/how-microsoft-is-delivering-smart-building-experiences-with-ci-cd-for-azure-digital-twins\/","title":{"rendered":"How Microsoft is delivering smart building experiences with CI\/CD for Azure Digital Twins"},"content":{"rendered":"

\"MicrosoftMicrosoft empowers employees and guests with user experience scenarios, like pathfinding and hotdesking, to make life easier. To quickly facilitate impactful smart building features at scale, Microsoft Digital\u2019s engineers rely on a structured approach that combines templates and pipelines for continuous integration and continuous delivery (CI\/CD) to accelerate implementation without compromising quality. With CI\/CD for Microsoft Azure Digital Twins, Microsoft is able to iteratively build, update, test, and deploy the elements that ultimately create smart building experiences.<\/p>\n

\u201cThe cool stuff, the end user stuff, you can get it in one space, but it\u2019s a lot harder to evolve and build it out at scale,\u201d says Kyle Getty, a senior developer with Microsoft Digital, the organization that powers, protects, and transforms the company. \u201cYou need a smart platform, a way to do more, faster, and easier, to replicate those experiences in 600 buildings.\u201d<\/p>\n

What\u2019s the bare-bones minimum way to connect to Azure Digital Twins? We want to simplify and consolidate declaratively in the build, then let the different teams handle the deployment.<\/p>\n

\u2014Kyle Getty, senior developer, Microsoft Digital<\/p>\n<\/blockquote>\n

To get to these smart building scenarios, Microsoft Digital needs to bring several pieces together. That\u2019s where CI\/CD comes in. CI\/CD utilizes pipelines\u2014automated processes and tools for build and release steps\u2014which enables teams to build services and packages with greater speed and efficiency.<\/p>\n

When used with templates, which combine the content of multiple files into a single pipeline, CI\/CD can quickly support incremental changes to deliverables without introducing errors.<\/p>\n

[<\/em>Discover how Microsoft is creating the digital workplace.<\/em><\/a> Learn how Microsoft uses Azure Digital Twins and IoT to modernize its buildings.<\/em><\/a>]<\/em><\/p>\n

A better way to deliver experiences at scale<\/h2>\n

Microsoft Azure Digital Twins, which serves as a virtual model of a physical space or object, is pivotal to Microsoft\u2019s strategy for engineering real-world experiences. When a new model or change comes in, the faster it\u2019s available, the faster an experience can be built.<\/p>\n

\u201cWhat\u2019s the bare-bones minimum way to connect to Azure Digital Twins?\u201d Getty says. \u201cWe want to simplify and consolidate declaratively in the build, then let the different teams handle the deployment.\u201d<\/p>\n

By using CI\/CD for Microsoft Azure Digital Twins, Microsoft Digital reduces the number of repetitive and manual tasks required to build and deploy features. Not only does this structured approach accelerate iterative deployment, it introduces extensibility, allowing the organization to create new ways of interacting with smart building features.<\/p>\n

This saves Microsoft significant time and avoids a few key obstacles.<\/p>\n

\"Split-frame
Senior developer Kyle Getty (left) and senior software engineer Michael Bir (right) utilize CI\/CD for Microsoft Azure Digital Twins as part of a structured approach to delivering smart building experiences at Microsoft. (Photos by Kyle Getty and Michael Bir)<\/figcaption><\/figure>\n

\u201cA lot of teams are trying to go from monolith to microservices,\u201d says Michael Bir, a senior software engineer with Microsoft Digital, speaking of the architectural shift from a large system to several smaller ones to improve scalability and developer productivity. \u201cThese modular setups create a lot of repositories that comprise the whole application. That also introduces repetition across the repositories.\u201d<\/p>\n

While necessary for extensibility and scalability, using linked microservices can be challenging to manage.<\/p>\n

Developers often copy existing configurations to tie into these libraries and repositories, regularly taking the last release and mining it for relevant settings before getting to work on the new release. In addition to being tedious, this process can result in subtle changes that might introduce incompatibilities over time.<\/p>\n

Using Microsoft Azure DevOps allows Microsoft Digital to merge pipelines (a series of steps needed for delivery) into templates for rapid development, with all the tedious foundational code and testing requirements already in place.<\/p>\n

This is core to CI\/CD for Microsoft Azure Digital Twins. Once in the hands of developers, these templates can evolve into new projects. Commonalities can be used to build out core services, packages, and downstream microservices needed for Microsoft Azure Digital Twins experiences.<\/p>\n

Iterative by nature<\/h2>\n

CI\/CD does more than enable rapid development.<\/p>\n

\u201cOur templates allow you to have a global model or to use ring deployments,\u201d Bir says. \u201cWe don\u2019t need separate templates to maintain an iterative development environment.\u201d<\/p>\n

With CI\/CD for Microsoft Azure Digital Twins, developers can work on features independently, testing and deploying them in stages to introduce gradual improvements.<\/p>\n

Microsoft Digital can deploy directly into a testing ring where the package or service is automatically inspected for bugs before being elevated into the next ring, a production environment. This ensures a level of quality and consistency across every deployment, but also removes manual testing from the equation. Now, developers can quickly and easily check that a deployment is fully integrated with models before being released.<\/p>\n

It also allows the templates to be used in specific environments, like development and production regions where smart buildings might have different needs or requirements, all while enabling extensibility.<\/p>\n

With so many different repositories, testing for incompatibilities can become difficult. Fortunately, the team\u2019s structured approach addressed that. By utilizing a single project, or common pipeline, Microsoft Digital can maintain templates for common CI\/CD scenarios used by all repositories.<\/p>\n

\u201cThe common pipeline uses itself to run tests,\u201d Bir says. \u201cWe then use Azure DevOps to tag that for iterative deployment by consuming repositories.\u201d<\/p>\n

To maintain a healthy and productive iterative development environment, Microsoft Digital auto-deploys to a testing environment. As the test is defined, it establishes requirements to move and elevate the build into production. This gate prevents incompatibilities from reaching a smart building experience.<\/p>\n

We had some templates for static code analysis, but we took it to the next level. Before this, we would have to go back to a previous repository that we thought was good, copy and paste it, change the variables for it to make sense, and then tweak some optional things. Now it\u2019s all handled by the template. It\u2019s very flexible.<\/p>\n

\u2014Michael Bir, senior software engineer, Microsoft Digital<\/p>\n<\/blockquote>\n

The iterative agility of CI\/CD means that if Microsoft Digital does need to introduce a change, say to adjust for compliance, the organization can orchestrate everything from Microsoft Azure DevOps and then push it out to all repositories. The next time a project deploys, it grabs the updated template.<\/p>\n

In centralizing the way projects are updated and published, Microsoft Digital no longer needs to retest and rebuild features for different repositories.<\/p>\n

A smart<\/strong> way to build experiences<\/strong><\/h2>\n

Teams across Microsoft can now deploy stable and extensible Microsoft Azure Digital Twins experiences at scale.<\/p>\n

\u201cWe had some templates for static code analysis, but we took it to the next level,\u201d Bir says. \u201cBefore this, we would have to go back to a previous repository that we thought was good, copy and paste it, change the variables for it to make sense, and then tweak some optional things. Now it\u2019s all handled by the template. It\u2019s very flexible.\u201d<\/p>\n

The structured approach also makes it easy to add members to the team. Instead of pointing users to old releases, the team only has to share the template. It\u2019s already the latest version, and the new user only has to plug in a few variables.<\/p>\n

CI\/CD for Microsoft Azure Digital Twins has simplified the way Microsoft Digital can approach a build, eliminating lengthy coding and testing tasks while empowering extensible solutions to flourish at scale. Common pipelines and templates can be used to manage and accelerate the features needed to supercharge Microsoft Azure Digital Twins and the models needed to power smart building experiences.<\/p>\n

Microsoft Digital will continue to find ways to add value, giving developers certain resources and permissions to test, similar to how Microsoft Azure uses Azure Resource Management templates. As more common pipelines are built into the template, developers will be able to do more faster, without having to take on additional management responsibilities.<\/p>\n

\u201cI want a smart building UI,\u201d Getty says. \u201cI don\u2019t want to worry about building code and running tests or which instance to talk to. I want to run code efficiently for how an Azure Digital Twins model has been set up. Now we have something to tie it all together and pass on that value so others can focus on what they need to.\u201d<\/p>\n

\"Key<\/p>\n