2

I'm attempting to use Service Fabric Mesh to deploy a container based app. I'm new to Mesh, but I did get the sample 'Hello App' working. Now I'm trying to deploy an app based on a container I have stored in Azure. I used the following command to deploy this:

az mesh deployment create --resource-group MikeMesh --template-file test.json

The command says 'Deploying . . .' for about 10 minutes, and then says:

Unable to edit or replace deployment 'test': previous deployment from '8/20/2018 9:55:28 PM' is still active (expiration time is '8/27/2018 9:55:27 PM'). Please see https://aka.ms/arm-deploy for usage details.

Note this is a brand new resource group, and I've never deployed anything here before. Also note I can deploy this same container using normal Service Fabric and it works fine.

The link in the error message doesn't contain anything helpful. If I go to the 'Deployments' tab, the status says 'Deploying' but it seems stuck (it's been nearly two hours). If I click on 'Related events', I get 3 events but all of them say 'Succeeded' or 'Accepted'. Under 'Quick Insights' if I click 'Failed deployments', I see a 'Validate deployment' operation that failed 2 hours ago, but I'm not clear if this has anything to do with this deployment. The error message for that is the same as what I saw on the command line.

The test.json is as follows (with some sensitive information removed):

{
  "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "apiVersion": "2018-07-01-preview",
      "name": "LimeadeMeshNetwork",
      "type": "Microsoft.ServiceFabricMesh/networks",
      "location": "eastus",
      "dependsOn": [],
      "properties": {
        "addressPrefix": "10.0.0.4/22",
        "ingressConfig": {
          "layer4": [
            {
              "publicPort": "80",
              "applicationName": "LimeadeApp",
              "serviceName": "WebsiteService",
              "endpointName": "WebsiteListener"
            }
          ]
        }
      }
    },
    {
      "apiVersion": "2018-07-01-preview",
      "name": "LimeadeApp",
      "type": "Microsoft.ServiceFabricMesh/applications",
      "location": "eastus",
      "dependsOn": [
        "Microsoft.ServiceFabricMesh/networks/LimeadeMeshNetwork"
      ],
      "properties": {
        "description": "Limeade Mesh Application",
        "services": [
          {
            "type": "Microsoft.ServiceFabricMesh/services",
            "location": "eastus",
            "name": "WebsiteService",
            "properties": {
              "description": "Limeade Website Service",
              "osType": "windows",
              "codePackages": [
                {
                  "name": "WebsiteCode",
                  "image": "web:20180720103109",
                  "imageRegistryCredential": {
                    "server": "<container>.azurecr.io",
                    "username": "<username>",
                    "password": "<password>"
                  },
                  "endpoints": [
                    {
                      "name": "WebsiteListener",
                      "port": "80"
                    }
                  ],
                  "resources": {
                    "requests": {
                      "cpu": "1",
                      "memoryInGB": "1"
                    }
                  }
                }
              ],
              "replicaCount": "1",
              "networkRefs": [
                {
                  "name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'LimeadeMeshNetwork')]"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}
Mike Christensen
  • 88,082
  • 50
  • 208
  • 326

0 Answers0