Azure / service-fabric-mesh-preview

Service Fabric Mesh is the Service Fabric's serverless offering to enable developers to deploy containerized applications without managing infrastructure. Service Fabric Mesh , aka project “SeaBreeze” is currently available in private preview. This repository will be used for tracking bugs/feature requests as GitHub issues and for maintaining the latest documentation.
MIT License
82 stars 11 forks source link

Voting and ToDoList Samples are Invalid: Templates apiVersion has been changed but didn't reflect the schema differences #311

Closed guibirow closed 5 years ago

guibirow commented 5 years ago

While trying to deploy the the templates from the samples located in here and here gives the following error:

Deployment failed. Correlation ID: fdc0de05-48b8-41de-918e-2cda0a0a0723. {
  "status": "Failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource operation completed with terminal provisioning state 'Failed'.",
    "details": [
      {
        "code": "BadRequestWithReason",
        "message": "Request is invalid. Reason 'votingapp-linux.votingdata': Endpoint 'votingdata-listener' not referenced in networkRefs..",
        "details": []
      }
    ]
  }
}

Looking to the template file is possible to note that the apiVersion has changed but the template still uses the schema from previous version.

Networks are defined like this:

"resources": [
    {
      "apiVersion": "2018-09-01-preview",
      "name": "votingapp-network-linux",
      "type": "Microsoft.ServiceFabricMesh/networks",
      "location": "[parameters('location')]",
      "dependsOn": [],
      "properties": {
        "description": "Voting app for Linux network",
        "addressPrefix": "10.0.0.0/22",
        "ingressConfig": {
          "layer4": [
            {
              "name": "votingweb-ingress",
              "publicPort": "80",
              "applicationName": "votingapp-linux",
              "serviceName": "votingweb",
              "endpointName": "votingweb-listener"
            }
          ]
        }
      }
    },

Where the correct should be like this:

"resources": [
    {
      "apiVersion": "2018-09-01-preview",
      "name": "counterNetwork",
      "type": "Microsoft.ServiceFabricMesh/networks",
      "location": "[parameters('location')]",
      "dependsOn": [],
      "properties": {
        "kind": "Local",
        "description": "Azure Service Fabric Mesh Counter Application network.",
        "networkAddressPrefix": "10.0.0.0/24"
      }
    },

Application defines Network dependencies like this:

"networkRefs": [
{
  "name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'votingapp-network-linux')]"
}

Where the schema should be defined like this:

"networkRefs": [
{
  "name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'counterNetwork')]",
  "endpointRefs": [
    {
      "name": "counterServiceListener"
    }
  ]
}

The templates also miss the gateway to provide access to the app.

raunakpandya commented 5 years ago

Thanks for reporting. This is now fixed.