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 12 forks source link

Unable to deploy Service Fabric Mesh template #364

Open gabrieltalavera opened 5 years ago

gabrieltalavera commented 5 years ago

I'm having the following error when trying to deploy a Service Fabric Mesh template:

gabriel@Azure:~$ az mesh deployment create --resource-group meshtest1 --template-uri https://sfmeshsamples.blob.core.windows.net/templates/fireworks/mesh_rp.linux.base.json
Deploying . . .
You can get the state of the deployment with the cmd
az group deployment show --name mesh_rp.linux.base --resource-group meshtest1
Deployment failed. Correlation ID: 079ace94-3e12-406b-8046-b5457389e1e9. {
  "error": {
    "code": "UnsupportedProperty",
    "message": "Property: .properties.services[].location is not supported.",
    "details": [
      {
        "code": "Exception",
        "message": "Microsoft.ServiceFabric.Rp.Errors.WrpException: Property: .properties.services[].location is not supported.\r\n   at Microsoft.ServiceFabric.Rp.Model.Public.ExternalApiEntityValidator.Validate(String schema, IEnumerable`1 additionalPropertiesPaths, IEnumerable`1 apiVersions)\r\n   at Microsoft.ServiceFabric.Rp.Common.WrpJsonFormatter.<>c__DisplayClass8_0.<ReadFromStreamAsync>b__0()\r\n   at System.Threading.Tasks.Task`1.InnerInvoke()\r\n   at System.Threading.Tasks.Task.Execute()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Net.Http.HttpContentExtensions.<ReadAsAsyncCore>d__17`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.ModelBinding.FormatterParameterBinding.<ExecuteBindingAsyncCore>d__18.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.HttpActionBinding.<ExecuteBindingAsyncCore>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
      }
    ]
  }
}
gabriel@Azure:~$

This template seems to be the only one that doesn't work, although I cannot find out why is it. Is there any restriction when using Linux based docker containers in Service Fabric Mesh?

andreujuanc commented 5 years ago

I think you template is invalid. In this case is telling you that you are setting the location twice, one in the resource and one in the service, which is incorrect, you should set it only at resource level.

Follow this:

https://docs.microsoft.com/en-us/azure/templates/microsoft.servicefabricmesh/2018-09-01-preview/applications

And btw, there is a new API version for Mesh templates.

Cheers

crystalbyte commented 4 years ago

I do have the exact same issue, unfortunately there is no location property present anywhere within the service model.

 "properties": {
                "description": "Service Fabric Mesh Translate Application!",
                "services": [
                    {
                        "type": "Microsoft.ServiceFabricMesh/services",
                        "name": "TranslateService",
                        "properties": {
                            "description": "Service Fabric Mesh TranslateService Application!",
                            "osType": "linux",
                            "codePackages": [
                                {
                                    "name": "TranslateServiceCode",
                                    "image": "TranslateServiceImage",
                                    "endpoints": [
                                        {
                                            "name": "TranslateServiceListener",
                                            "port": "443"
                                        }
                                    ],
                                    "resources": {
                                        "requests": {
                                            "cpu": "1",
                                            "memoryInGB": "1"
                                        }
                                    }
                                }
                            ],
                            "replicaCount": "1",
                            "networkRefs": [
                                {
                                    "name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'TranslateNetwork')]"
                                }
                            ]
                        }
                    }
                ]
            }

Any thoughts?