我试图从docker-compose文件中配置Visual Studio Team Services中的CI / CD到Service Fabric群集,但是在发布定义的最后一步中,使用“Service Fabric Compose Deploy”步骤,错误:##[error]The ServiceDnsName for DefaultService 'myapp' is invalid.。我正在使用的guide的部分内容为:



我当前的docker-compose文件是:

version: '3'

services:
  myapp:
    image: myapp
    build:
      context: .\myapp
      dockerfile: Dockerfile

在VSTS定义中,“应用程序名称”设置为fabric:/myapp

我该如何解决?理想情况下,我希望可以通过yourendpointhere.eastus.cloudapp.azure.com/myapp访问我的应用。这可能吗?

这是释放步骤失败的日志条目:
2018-02-14T18:30:00.8056376Z ##[section]Starting: Deploy docker-compose application to a Service Fabric cluster
2018-02-14T18:30:00.8060539Z ==============================================================================
2018-02-14T18:30:00.8060913Z Task         : Service Fabric Compose Deploy
2018-02-14T18:30:00.8061507Z Description  : Deploy a docker-compose application to a Service Fabric cluster.
2018-02-14T18:30:00.8061986Z Version      : 0.2.3
2018-02-14T18:30:00.8062279Z Author       : Microsoft Corporation
2018-02-14T18:30:00.8063154Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=847030)
2018-02-14T18:30:00.8063536Z ==============================================================================
2018-02-14T18:30:07.8698092Z Searching for path: D:\a\r1\a\**\docker-compose.yml
2018-02-14T18:30:07.8725249Z Found path: D:\a\r1\a\Drop\docker-compose\docker-compose.yml
2018-02-14T18:30:07.9023293Z Checking compose file
2018-02-14T18:30:16.8571892Z ##[warning]The Docker compose file contains the following 'keys' which are not supported. They will be ignored.
'build'
2018-02-14T18:30:17.1220353Z Imported cluster client certificate with thumbprint 'THUMBPRINT_REDACTED'.
2018-02-14T18:30:17.1899791Z
2018-02-14T18:30:17.1907044Z Thumbprint                                Subject
2018-02-14T18:30:17.1908148Z ----------                                -------
2018-02-14T18:30:17.1909375Z THUMBPRINT_REDACTED                       CN=eastus.cloudapp.azure.com
2018-02-14T18:30:23.8293246Z Successfully connected to cluster.
2018-02-14T18:30:23.8391402Z Encrypting the password with the Server Certificate.
2018-02-14T18:30:25.1024103Z ##[warning]The cluster's server certificate with thumbprint '********' is required in order to encrypt text but the certificate could not be found on the agent machine in the 'CurrentUser\My' certificate store location.
2018-02-14T18:30:25.7091733Z Creating application
2018-02-14T18:30:29.7025507Z ##[error]The ServiceDnsName for DefaultService 'myapp' is invalid.
FileName: D:\SvcFab\IB\131631066259308291\2fve3lf5.5tp\ApplicationManifest.xml
2018-02-14T18:30:29.9330549Z ##[section]Finishing: Deploy docker-compose application to a Service Fabric cluster

最佳答案

在Microsoft支持的帮助下,我能够解决此问题。

应用程序名称就是问题所在。如果删除应用程序名称的“fabric:/”部分,它将对我有用。

这是一个文档错误。 Microsoft支持将更新文档

至少现在,VSTS步骤可以工作,并已部署到Service Fabric。
我现在在Service Fabric本身中遇到了一些错误,但这是另一个问题。

关于azure - 部署到Service Fabric时如何在docker-compose文件中设置有效的ServiceDnsName?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48794898/

10-16 22:43