Giter VIP home page Giter VIP logo

structurizr.infrastructureascode's Introduction

Structurizr.InfrastructureAsCode

Structurizr.InfrastructureAsCode is a library that uses both Structurizr for .NET and the Azure SDK for .NET to provide an easy to use architecture- and infrastructure-as-code solution. Currently, there is only an implementation for Azure resources available.

How to desribe your architecture and infrastructure

You can find a sample implementation here.

Create the architecture and infrastructure model

  • Create a subclass of SoftwareSystemWithInfrastructure which will describe your software system. For this, you will use Structurizrs Workspace, SoftwareSystem and Container classes. See the sample projects Monkey factory system
  • Create subclasses of ContainerWithInfrastructure which will describe individual containers and their corresponding cloud infrastructure. See the sample projects UI container

Use Structurizr to render the model to architecture diagrams

Since the model you created in the first step uses Structurizrs SDK to describe the architecture of your software system, you can use the Strucurizr API to render / upload that model directly to Structurizr.

Use Structurizr.InfrastructureAsCode to render the model to Azure resources

Before creating any Azure resoures, you will need to

  • Implement a console application similar to the sample
  • create an Azure AD application that will be used by that console application to authenticate against the Azure Resource Manager API (DEPRECATED: it's better to create a service principal using a self signed certificate for authentication, instead. A how to for this will follow)
    • Login to the Azure portal
    • Open your Active Directory
    • Open the App Registrations blade
    • Create a "New application registration"
      • Application type "Native"
      • Create a key in the Apps "Keys" blade and note down its value. You will need this key to authenticate.
      • Open the "Required permissions" of the App and add the folowing permissions (I am not sure if you need all of them):
        • Microsoft.Azure.ActiveDirectory: Read directory data, Access the directory as the signed-in user
        • Microsoft Graph: Read and write Microsoft Intune RBAC settings (preview), Read and write Microsoft Intune apps (preview), Read and write all groups, Read and write directory data, Access directory as the signed in user
        • Windows Azure Service Management API: Access Azure Service Management as organization users (preview)
  • Use the InfrastructureRendererBuilder class in the console app to create an Azure InfrastructureRenderer. See the sample Program.cs. Here you will need to pass in the credentials to access your Azure subscription. These should not be your personal credentials, but the credentials (key) you just created for the Azure AD Application.
  • Use pass your model (the SoftwareSystemWithInfrastructure subclass) to that renderer. This will create the resources defined as the infrastructure elements in your model in your Azure subscription.

Contribute: How to extend Structurizr.InfrastructureAsCode to support additional resource types

TBD

structurizr.infrastructureascode's People

Contributors

christianeder avatar christianeder-z avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.