Skip to content

Example

Miguel Alexandre edited this page Jul 5, 2017 · 3 revisions

The following example is based on a real world application running with .NET 4.5 on IIS, with sensitive data removed and names changed.

The application is a micro-service API for handling orders in an online store. It runs only on Windows, needs MongoDB, needs RabbitMQ and has a dependency on the Users API.

Developer Configuration in dependencies.json:

{
  "infrastructure_dependencies": [
    {
      "os_name": "Windows",
      "type": "OperatingSystem",
      "min_version": "WindowsServer2008R2",
      "max_version": "*"
    },
    {
      "type": "MongoDb",
      "min_version": "2.6",
      "max_version": "3.2",
      "connection_string": {
        "locator": "ConnectionStrings",
        "key": "Orders.Repository"
      }
    },
    {
      "type": "RabbitMq",
      "name": "rabbitmq",
      "min_version": "3.0.0",
      "max_version": "3.6.5",
      "connection_string": {
        "locator": "ConnectionStrings",
        "key": "RabbitMQ.Internal"
      }
    }
  ],
  "service_dependencies": [
    {
      "name": "Users Store API",
      "min_version": "3.3.0",
      "max_version": "*",
      "connection_string": {
        "locator": "AppSettings",
        "key": "UsersService-BaseUri"
      }
    }
  ]
}

Generated Manifest in /manifest

{
  "nameVersion": "1.0.0",
  "name": "Store.Orders.API",
  "version": "1.3.0",
  "infrastructure_dependencies": [
    {
      "name": "Windows",
      "version": "6.3.9600",
      "min_version": "6.1.0",
      "max_version": "*"
    },
    {
      "name": "MongoDb",
      "version": "3.0.0",
      "min_version": "2.6.0",
      "max_version": "3.2.0",
      "value": "mongodb://mongo.internal:27017/StoreOrders?w=1"
    },
    {
      "name": "rabbitmq",
      "version": "3.6.5",
      "min_version": "3.0.0",
      "max_version": "3.6.5",
      "value": "amqp://app_orders:[email protected]:5672/"
    }
  ],
  "service_dependencies": [
    {
      "name": "Users Store API",
      "version": "3.4.1",
      "min_version": "3.3.0",
      "max_version": "*",
      "infrastructure_dependencies": [
        {
          "name": "Windows",
          "version": "6.3.9600",
          "min_version": "6.1.0",
          "max_version": "*"
        },
        {
          "name": "MongoDb",
          "version": "3.0.0",
          "min_version": "2.4.0",
          "max_version": "3.0.0",
          "value": "mongodb://mongo.internal:27017/StoreUsers"
        }
      ],
      "service_dependencies": [],
      "value": "http://store.internal/users"
    }
  ]
}

Notice the recursive nature of NAME, where it found that the Users Store API has a NAME endpoint and brought that app's manifest along with that app's validation. This allows for a deep-dive into the infrastructure and dependencies trees, for a wide view of the status of all your apps' ecosystem.

Generated Table in /manifest/ui

Example table from /manifest/ui