Machine: Azure驱动程序-资源管理器版本

创建于 2016-01-05  ·  69评论  ·  资料来源: docker/machine

我想说的没错,Azure上对docker-machine的当前支持使用经典部署模型。 同样也将支持Resource Manager模型(因为MS建议新部署使用该模型)。

driveazure kinenhancement

所有69条评论

:+1:

+1

+1

有计划移动docker-machine Azure提供程序以使用Azure Resource Manager-请参阅#496

@lizrice目前,我自己正在积极

那真是个好消息@ahmetalpbalkan :-)

+1

这将非常有帮助! 感谢您的积极努力。

绝对需要这个。 还需要避免使用证书进行身份验证,除非使用Azure Active Directory服务主体。 @ahmetalpbalkan有什么进展吗?

干杯,
特雷弗·沙利文(Trevor Sullivan)

@ pcgeek86我们不会做服务主体废话。 身份验证过程看起来与Azure跨平台CLI身份验证完全相同( "azure login"命令)。 每隔2周,它将提示您打开一个浏览器窗口,然后单击一个按钮以授权该应用程序。

@ahmetalpbalkan太好了,所以您也将有--username参数,例如azure-clil?

@ pcgeek86 ,不。 Azure CLI不需要username参数。 它在那里是为了向后兼容。

@ahmetalpbalkan我没有说需要。 使用--username参数可以指定Azure Active Directory(AAD)用户名。 这种“向后兼容性”如何? 您对最终实施有何建议?

基于Azure服务管理(ASM)证书的身份验证是“向后兼容性”。

@ pcgeek86嗯,我从未意识到它用于AAD用户名。 当您转到https://aka.ms/devicelogin时,是否可以在其中指定AAD用户名? 如果可以在没有azure login (没有--username )完成相同的任务,那么我打算保持这种状态。

@ahmetalpbalkan您可能需要处于ARM模式( azure config arm )才能对ARM使用AAD身份验证。 我并不是经常使用ASM“模式”。

是的,您可以将AAD用户名与https://aka.ms/devicelogin一起使用。 但是,我宁愿避免使用浏览器,而应使用--username指定用户名。 在纯文本方案中效果更好。 :)

如果可以在没有azure登录(没有--username)的情况下完成相同的任务,我打算保持这种方式。

因此,为了确保我理解正确,您是否打算要求用户使用Web浏览器来完成身份验证,而不是在命令行中键入密码?

使用需要2fa的帐户,您将必须以任何方式进行身份验证。 我不清楚这是否是2fa情况的优化。

@squillace对于多因素身份验证用户,请确保。 但是,为什么只迎合一组用户呢? 我的猜测是,大多数人还是不会使用MFA。

到那时,这只会使每个人都更加困难,难道您不通过强迫人们使用网络浏览器来验证命令行工具来惹恼他们吗?

实际上,为什么不更进一步,以某种方式从命令行支持MFA?

您不应在正常的AAD登录屏幕之外收集用户名和密码。 这是不安全且不明智的做法。 另外,从技术上讲,要使它真正起作用,有太多的场景需要覆盖。 如果不打开浏览器(例如,Prem ADFS,安全密钥卡,智能卡身份验证等),则无法使用2FA。

我不想只招待一个团体,而是基本情况必须涵盖所有团体。

从Outlook Mo发送

在2016年2月25日,星期四,上午8:00上午10:11,“ Trevor Sullivan” < [email protected] [email protected] >写道:

@squil lacehttps://github.com/squillace对于多因素身份验证用户,请确保。 但是,为什么只迎合一组用户呢? 我的猜测是,大多数人还是不会使用MFA。

直接回复此电子邮件或在Gi tHub上查看它

@LoungeFlyZ那么,您是说azure xPlat CLI应该删除其--username参数吗? 那将是一个重大的突破性变化,但可能是可能的。

可能是的。 我很惊讶他们仍然拥有它...但是我知道为什么。

@LoungeFlyZ命令行用户呢? 您认为这会对他们造成破坏吗?

@ pcgeek86当然可以。 据我了解,这种方式不太方便。 但是让任何工具收集用户名和密码都是一场灾难,等待发生。

@LoungeFlyZ我也同意。 从安全性和可用性的角度来看,我们似乎处于冲突点。 想尽办法,对于上面提到的安全性和可用性问题,理想的解决方案是什么?

@ pcgeek86我正在向您的电子邮件发送二进制滴,如果不切实际,请尝试使用

大家好,我们终于可以拥有一个全新的Azure驱动程序。 我们正在完善一些内容,我将很快提交拉取请求。 同时,您可以在新版本发布之前对其进行试用并提供反馈。 请在下面下载:

现在尝试达尔文..干净。 真好

Ahmet,非常非常干净。

〜/ workspace / ahmet-machine ‹ruby-2.2.1› $ ld create -d azure \ 1↵
--azure-subscription-id\
--azure-ssh-user ops \
--azure-resource-group ahmetsmachine \
--azure-location eastus \
自动抄写器
运行预创建检查...
(ahmetsmachine)Microsoft Azure:要登录,请使用Web浏览器打开页面https://aka.ms/devicelogin。 输入验证码进行身份验证。
(ahmetsmachine)完成的机器预创建检查。
正在建立机器...
(ahmetsmachine)查询现有资源组... name =“ ahmetsmachine”
(ahmetsmachine)正在创建资源组... location =“ eastus” name =“ ahmetsmachine”
(ahmetsmachine)创建可用性集... name =“ docker-machine”
(ahmetsmachine)正在创建网络安全组... name =“ ahmetsmachine-firewall” location =“ eastus”
(ahmetsmachine)查询虚拟网络是否已经存在... name =“ docker-machine-vnet” location =“ eastus”
(ahmetsmachine)创建子网... cidr =“” name =“ docker-machine” vnet =“ docker-machine-vnet”
(ahmetsmachine)创建公共IP地址... name =“ ahmetsmachine-ip”
(ahmetsmachine)创建网络接口... name =“ ahmetsmachine-nic”
(ahmetsmachine)在eastus中创建存储帐户“”
(ahmetsmachine)正在创建虚拟机... name =“ ahmetsmachine” location =“ eastus” size =“ Standard_A2” username =“ ops” osImage =“ canonical:UbuntuServer :14.04.3- LTS:latest
等待机器运行,这可能需要几分钟的时间...
正在检测创建的​​实例的操作系统...
等待SSH可用...
正在检测供应商...
用ubuntu(upstart)进行配置...
安装Docker ...
将证书复制到本地计算机目录...
将证书复制到远程计算机...
在远程守护程序上设置Docker配置...
正在检查与Docker的连接...
Docker已启动并正在运行!
要查看如何将Docker客户端连接到在此虚拟机上运行的Docker引擎,请运行:docker-machine-Darwin-x86_64 env ahmetsmachine

我现在将尝试Windows和Linux版本。 真好信息来了。 我也非常喜欢您的基本网络环境和端口选择。 谢谢!

Windows上当前存在一个问题,它不进行身份验证。 我建议暂时尝试使用其他平台。 谢谢@squillace!

好,我去做debian家庭。

是的,Windows上的错误与将令牌复制到令牌缓存有关。 今晚早些时候将详细信息发送到

干杯,
特雷弗·沙利文(Trevor Sullivan)

完美适用于薄荷17.3。

@ pcgeek86,请尝试在Windows下使用此新版本: http : //cl.ly/3k2d0g2B3j0o/docker_machine_azure_rc2.zip现在应该解决此问题。 它只是为我工作。 (尽管它仍然不稳定,但我们将尽快修复Azure SDK中的问题,并将其导入此处。我将继续在此处提供构建。)

如果有,请尝试使用各种奇怪的帐户类型(Microsoft帐户,AAD ...)进行身份验证。 这种身份验证方法仅适用于我的多因素AD帐户以及我的个人帐户。 感谢您提出的宝贵意见,我觉得我们可以在第一次尝试时就解决这个问题! :微笑:

我没有亲自尝试过; 我现在就做。

我只是在OS X的这个问题上尝试过使用二进制文件,并且得到了:

docker-machine-azure create -d azure --azure-location "North Europe"  --azure-resource-group "career-planner" --azure-subscription-id {ID} azure
Running pre-create checks...
(azure) Microsoft Azure: To sign in, use a web browser to open the page https://aka.ms/devicelogin. Enter the code DRHSTFLSD to authenticate.
(azure) Completed machine pre-create checks.
Creating machine...
(azure) Querying existing resource group...  name="career-planner"
(azure) Resource group "career-planner" already exists.
(azure) Creating availability set...  name="docker-machine"
(azure) Creating network security group...  name="azure-firewall" location="North Europe"
(azure) Querying if virtual network already exists...  name="docker-machine-vnet" location="North Europe"
(azure) Creating subnet...  name="docker-machine" vnet="docker-machine-vnet" cidr="192.168.0.0/16"
(azure) Creating public IP address...  name="azure-ip"
(azure) Creating network interface...  name="azure-nic"
(azure) Creating storage account "vhdsxfxg6xxswwqjih00e7co" in North Europe
(azure) Creating Virtual Machine...  name="azure" location="North Europe" size="Standard_A2" username="ubuntu" osImage="canonical:UbuntuServer:14.04.3-LTS:latest"
Waiting for machine to be running, this may take a few minutes...
Error creating machine: Error waiting for machine to be running: Maximum number of retries (60) exceeded

尽管我认为这样做确实创造了所有资源。

@buckett谢谢您,这是我们要在azure go sdk中解决的最后一个问题。 当前,我们不会等到已创建的资源正确完成之前。

在将拉取请求发送到此存储库之前,我计划创建约1,000台计算机,以查看其可靠性。 我们在功能测试上已经很环保了,但是正如我前面提到的那样,有些脆弱。

@buckett是一个带有大量修复程序的新版本。 我目前正在开始测试它,而且看起来似乎还不错(到目前为止,我遇到的所有失败都与天蓝色无关,也没有回购问题)。

这是支持的平台的二进制包:链接http://cl.ly/fKvS

我希望将PR发送到该版本的计算机。

我下载了新版本,然后尝试查看我拥有的计算机:

$ docker-machine-azure ls
(azure) Obtained access_token or refresh_token is stale. Please reauthenticate.
(azure) Microsoft Azure: To sign in, use a web browser to open the page https://aka.ms/devicelogin. Enter the code {removed} to authenticate.
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
azure              azure        Timeout                                                 
default   *        virtualbox   Running   tcp://192.168.99.101:2376           v1.10.0   

但是,当我尝试删除过时的Azure实例时,系统要求我再次登录:

$ docker-machine-azure rm azure
About to remove azure
Are you sure? (y/n): y
(azure) NOTICE: Please check Azure portal/CLI to make sure you have no leftover resources to avoid unexpected charges.
(azure) Microsoft Azure: To sign in, use a web browser to open the page https://aka.ms/devicelogin. Enter the code {removed} to authenticate.
(azure) Virtual Machine does not exist. Skipping.  name="azure"
(azure) Network Interface does not exist. Skipping.  name="azure-nic"
(azure) Public IP does not exist. Skipping.  name="azure-ip"
(azure) Network Security Group does not exist. Skipping.  name="azure-firewall"
(azure) Attempting to clean up Availability Set resource...  name="docker-machine"
(azure) Attempting to clean up Subnet resource...  name="docker-machine"
(azure) Attempting to clean up Virtual Network resource...  name="docker-machine-vnet"
Successfully removed azure

然后,当我创建一个新的Azure实例时,它工作到一定程度,然后崩溃了:

$ docker-machine-azure create -d azure ....
[..snipped..]
Error creating machine: Error in driver during machine creation: Panic in the driver: runtime error: invalid memory address or nil pointer dereference
goroutine 52 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/debug/stack.go:24 +0x80
github.com/docker/machine/libmachine/drivers/rpc.(*StandardStack).Stack(0x2299078, 0x0, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:23 +0x29
github.com/docker/machine/libmachine/drivers/rpc.trapPanic(0xc82012ba28)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:129 +0x96
panic(0x11f78e0, 0xc82000a0f0)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:426 +0x4e9
github.com/docker/machine/drivers/azure/azureutil.osDiskStorageContainerURL(0xc820328780, 0xc8202c4468, 0x5, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azureutil/azureutil.go:709 +0x3d
github.com/docker/machine/drivers/azure/azureutil.osDiskStorageBlobURL(0xc820328780, 0xc8202c4468, 0x5, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azureutil/azureutil.go:697 +0x5c
github.com/docker/machine/drivers/azure/azureutil.AzureClient.CreateVirtualMachine(0x16c0590, 0x10, 0x17fb460, 0x20, 0x18ea160, 0x35, 0x17fb4e0, 0x24, 0x17627a0, 0x1d, ...)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azureutil/azureutil.go:446 +0x5f2
github.com/docker/machine/drivers/azure.(*Driver).Create.func10(0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azure.go:322 +0x20f
github.com/docker/machine/drivers/azure.(*Driver).Create(0xc8200c2a00, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azure.go:326 +0x461
github.com/docker/machine/libmachine/drivers/rpc.(*RPCServerDriver).Create(0xc82012d5a0, 0x2299078, 0x2299078, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:140 +0x7c
reflect.Value.call(0x108e980, 0x1518768, 0x13, 0x155ba18, 0x4, 0xc82012bed8, 0x3, 0x3, 0x0, 0x0, ...)
    /usr/local/Cellar/go/1.6/libexec/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x108e980, 0x1518768, 0x13, 0xc82012bed8, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.6/libexec/src/reflect/value.go:303 +0xb1
net/rpc.(*service).call(0xc82016a1c0, 0xc82012e000, 0xc820158fd0, 0xc820087880, 0xc82012dcc0, 0xd7d040, 0x2299078, 0x16, 0xd7d040, 0x2299078, ...)
    /usr/local/Cellar/go/1.6/libexec/src/net/rpc/server.go:383 +0x1c2
created by net/rpc.(*Server).ServeCodec
    /usr/local/Cellar/go/1.6/libexec/src/net/rpc/server.go:477 +0x49d

删除一半设置docker-machine几乎所有工作。 除了虚拟网络和存储帐户,所有内容都已删除(通过检入https://portal.azure.com)。

@buckett argh,http :

@buckett虚拟机应该被删除(如果您可以使用docker-machine --debug rm在干净的资源组上进行复制,那将是很好的选择),但是存储帐户不会被删除。 它是免费的,我们还清理在移除时分配的OS磁盘。

尝试使用新版本:只是删除一台机器,直到我完成了一半:

Error removing host "azure": azure.ServicePrincipalToken:WithAuthorization 0 Failed to refresh Service Principal Token for request to https://management.azure.com/subscriptions/fb56de48-cb6e-4d0b-8626-8faa062ada02/providers/Microsoft.Network/locations/northeurope/operations/33643d7c-82cc-40f4-8724-bd82de215338?api-version=2015-06-15 -- Original Error: Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token.

用于粘贴身份验证令牌的新版本在docker-machine ls上的超时时间太短,因为我无法打开浏览器,将auth令牌复制并粘贴并单击以接受它,然后登录到正确的位置帐户并接受权限。

当我的笔记本电脑没有在计算机创建过程中暂停时,它创建了一个运行docker的新主机(神奇,谢谢,:cake :)。 创建时确实出现错误,但是创建后我可以运行hello-world

Checking connection to Docker...
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "13.69.192.88:2376": tls: DialWithDialer timed out
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

$ eval $(docker-machine-azure env azure)
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
03f4658f8b78: Pull complete 
a3ed95caeb02: Pull complete 
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
Status: Downloaded newer image for hello-world:latest

Hello from Docker.
This message shows that your installation appears to be working correctly.

成功运行hello-world容器后,我也重新生成了证书,并且工作正常。

在一个干净的资源组中,删除最后一个运行docker的机器似乎无法清理网络(尽管可以尝试):

(azure) Attempting to clean up Virtual Network resource...  name="docker-machine-vnet"
(azure) DBG | Azure request  method="GET" request="https://management.azure.com/subscriptions/fb56de48-cb6e-4d0b-8626-8faa062ada02/resourceGroups/test/providers/Microsoft.Network/virtualnetworks/docker-machine-vnet?api-version=2015-06-15"
(azure) DBG | Azure response  status="200 OK" method="GET" request="https://management.azure.com/subscriptions/fb56de48-cb6e-4d0b-8626-8faa062ada02/resourceGroups/test/providers/Microsoft.Network/virtualnetworks/docker-machine-vnet?api-version=2015-06-15" x-ms-request-id="626af1d8-3f4b-4915-9a8a-f7a0d4844c53"
(azure) DBG | Azure response  request="https://management.azure.com/subscriptions/fb56de48-cb6e-4d0b-8626-8faa062ada02/resourceGroups/test/providers/Microsoft.Network/virtualnetworks/docker-machine-vnet?api-version=2015-06-15" x-ms-request-id="626af1d8-3f4b-4915-9a8a-f7a0d4844c53" status="200 OK" method="GET"
(azure) DBG | Virtual Network does not have any attached dependent resource.  name="docker-machine-vnet"
(azure) Removing Virtual Network resource...  name="docker-machine-vnet"
(azure) DBG | Azure request  method="DELETE" request="https://management.azure.com/subscriptions/fb56de48-cb6e-4d0b-8626-8faa062ada02/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/docker-machine-vnet?api-version=2015-06-15"
(azure) DBG | Azure response  status="204 No Content" method="DELETE" request="https://management.azure.com/subscriptions/fb56de48-cb6e-4d0b-8626-8faa062ada02/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/docker-machine-vnet?api-version=2015-06-15" x-ms-request-id="8799a451-211e-4f7d-a9d7-52b2e702c5f5"
(azure) DBG | Azure response  status="204 No Content" method="DELETE" request="https://management.azure.com/subscriptions/fb56de48-cb6e-4d0b-8626-8faa062ada02/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/docker-machine-vnet?api-version=2015-06-15" x-ms-request-id="8799a451-211e-4f7d-a9d7-52b2e702c5f5"

在Mac OS X上一切都开始良好。然后,发生了这种情况:

(azdh) Creating Virtual Machine...  name="azdh" location="westeurope" size="Standard_A2" username="ubuntu" osImage="canonical:UbuntuServer:14.04.3-LTS:latest"
Error creating machine: Error in driver during machine creation: Panic in the driver: runtime error: invalid memory address or nil pointer dereference
goroutine 90 [running]:

这是完整的日志:

Trevors-MBP:bin trevorsullivan$ ./docker-machine-Darwin-x86_64 create --driver azure --azure-location westeurope --azure-subscription-id 1c9fd9f5-a2dc-4cc9-a73c-cab0ee4a95a1 --azure-resource-group CloudAcademyAutomation azdh
Running pre-create checks...
(azdh) Microsoft Azure: To sign in, use a web browser to open the page https://aka.ms/devicelogin. Enter the code EDPKYDZ2X to authenticate.
(azdh) Completed machine pre-create checks.
Creating machine...
(azdh) Querying existing resource group...  name="CloudAcademyAutomation"
(azdh) Resource group "CloudAcademyAutomation" already exists.
(azdh) Creating availability set...  name="docker-machine"
(azdh) Creating network security group...  name="azdh-firewall" location="westeurope"
(azdh) Querying if virtual network already exists...  location="westeurope" name="docker-machine-vnet"
(azdh) Creating subnet...  name="docker-machine" vnet="docker-machine-vnet" cidr="192.168.0.0/16"
(azdh) Creating public IP address...  name="azdh-ip"
(azdh) Creating network interface...  name="azdh-nic"
(azdh) Creating storage account "vhdsxej59xu1xauhx7kaqs2e" in westeurope
(azdh) Creating Virtual Machine...  name="azdh" location="westeurope" size="Standard_A2" username="ubuntu" osImage="canonical:UbuntuServer:14.04.3-LTS:latest"
Error creating machine: Error in driver during machine creation: Panic in the driver: runtime error: invalid memory address or nil pointer dereference
goroutine 90 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/debug/stack.go:24 +0x80
github.com/docker/machine/libmachine/drivers/rpc.(*StandardStack).Stack(0x2299078, 0x0, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:23 +0x29
github.com/docker/machine/libmachine/drivers/rpc.trapPanic(0xc8204a3a38)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:129 +0x96
panic(0x11f78e0, 0xc82000a0b0)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:426 +0x4e9
github.com/docker/machine/drivers/azure/azureutil.osDiskStorageContainerURL(0xc82025db80, 0xc8204d0118, 0x4, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azureutil/azureutil.go:709 +0x3d
github.com/docker/machine/drivers/azure/azureutil.osDiskStorageBlobURL(0xc82025db80, 0xc8204d0118, 0x4, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azureutil/azureutil.go:697 +0x5c
github.com/docker/machine/drivers/azure/azureutil.AzureClient.CreateVirtualMachine(0x16c0590, 0x10, 0x17fb460, 0x20, 0x18ea160, 0x35, 0x17fb4e0, 0x24, 0x17627a0, 0x1d, ...)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azureutil/azureutil.go:446 +0x5f2
github.com/docker/machine/drivers/azure.(*Driver).Create.func10(0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azure.go:322 +0x20f
github.com/docker/machine/drivers/azure.(*Driver).Create(0xc8200d0a00, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/drivers/azure/azure.go:326 +0x461
github.com/docker/machine/libmachine/drivers/rpc.(*RPCServerDriver).Create(0xc82012eec0, 0x2299078, 0x2299078, 0x0, 0x0)
    /Users/alp/workspace/gopath-machine/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:140 +0x7c
reflect.Value.call(0x108e980, 0x1518768, 0x13, 0x155ba18, 0x4, 0xc8204a3ee8, 0x3, 0x3, 0x0, 0x0, ...)
    /usr/local/Cellar/go/1.6/libexec/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x108e980, 0x1518768, 0x13, 0xc8204a3ee8, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.6/libexec/src/reflect/value.go:303 +0xb1
net/rpc.(*service).call(0xc82012d5c0, 0xc820013e00, 0xc820212070, 0xc820091880, 0xc82020e6a0, 0xd7d040, 0x2299078, 0x16, 0xd7d040, 0x2299078, ...)
    /usr/local/Cellar/go/1.6/libexec/src/net/rpc/server.go:383 +0x1c2
created by net/rpc.(*Server).ServeCodec
    /usr/local/Cellar/go/1.6/libexec/src/net/rpc/server.go:477 +0x49d

干杯,
特雷弗·沙利文(Trevor Sullivan)

@ pcgeek86似乎您正在使用我先前发送的rc3二进制文件? 你能试试rc4吗?

@ahmetalpbalkan这次工作,是在Azure中创建Docker主机。 我将尝试向其部署映像。

@buckett,您是对的, ls命令中的授权将是一个问题,因为它在我们提示您进行授权时超时。 我目前没有解决方案,但是我认为这通常不会有什么大不了的,它可以在create / rm 。 我将调试虚拟网络问题。 感谢您的举报。

@ pcgeek86感谢您的尝试。

@buckett ,很有趣的是,查看此docker-machine与Azure CLI的超时时间之间是否存在差异。 我明天见。

@squillace这两个无关。 在ls命令机器中,驱动程序希望驱动程序在10秒钟左右响应,如果您不能在短时间内进行身份验证,它将超时。

很好。 如果您碰到身份验证时刻,那将非常短。

从您的输出中@buckett ,我意识到我们在清理VNet时试图删除VM而不是VNet :)我现在修复了它。 较新的版本不会有此问题。 感谢您的关注和举报!

docker-machine ssh {machine}似乎有一个很长的超时时间,因此,如果auth令牌过期,我只是通过建立ssh连接来对其进行更新,然后将其使用几个小时。

@ahmetalpbalkan取消分配(关闭)Azure VM时,新的docker-machine命令会抱怨。

Trevors-MBP:bin 3 trevorsullivan$ ./docker-mac ls
(azdh) PowerState "deallocated" does not map to a docker-machine state.
(azdh) PowerState "deallocated" does not map to a docker-machine state.
NAME         ACTIVE   DRIVER         STATE     URL                         SWARM   DOCKER    ERRORS
azdh         -        azure                                                        Unknown
dh           -        vmwarefusion   Running   tcp://172.16.217.129:2376           v1.10.2
dockerhost   -        virtualbox     Stopped                                       Unknown

@ pcgeek86不错的收获。 让我让它看起来像已停止。

@buckett这是一个很好的技巧。 顺便说一句,您的凭据不应该在两周前过期(要求您打开浏览器)(除非您删除$ HOME / .docker / machine)。 这听起来不像您的经历吗?

这是一个新版本,应解决PowerState问题和虚拟网络清理问题: http :

@ahmetalpbalkan谢谢,效果更好。 但是,另一个错误是,公用IP地址更改后,在重新启动后,无效凭据将引发异常。

Trevors-MBP:bin 4 trevorsullivan$ ./docker-machine-Darwin-x86_64 ls
NAME         ACTIVE   DRIVER         STATE     URL                         SWARM   DOCKER    ERRORS
azdh         -        azure          Running   tcp://40.118.175.219:2376           Unknown   Unable to query docker version: Get https://40.118.175.219:2376/v1.15/version: x509: certificate is valid for 104.42.125.236, not 40.118.175.219
dh           -        vmwarefusion   Running   tcp://172.16.217.129:2376           v1.10.2
dockerhost   -        virtualbox     Stopped                                       Unknown

@ pcgeek86我看到这是您从Azure门户释放的同一台计算机。 docker-machine通常不会取消分配,它只会停止您的VM,并且当您取消分配时,您将获得一个新的IP地址。

我想这里的问题是:

  1. azure驱动程序是否应该为机器分配静态IP,这会给用户带来更多成本? (可能是一个参数)
  2. 是否应该支持用户在docker-machine外部管理/干预VM的这种情况?

@ahmetalpbalkan是的,那是同一台机器。 我使用azure xplat CLI取消分配了VM,然后在几个小时后将其启动。

在我看来:

  1. Docker仅在使用静态IP进行管理时才有用。 因此,这应该是Azure上的Docker主机的要求。
  2. 否,但是仍然需要静态IP。

@ pcgeek86您可能是正确的。 我的假设是docker-machine每次连接机器时都将使用docker-machine ip <vm>命令获取IP,但显然它依赖于静态IP来生成证书(您可以使用docker-machine regenerate-certs来缓解这种情况) 。

维护者:您认为机器驱动程序默认情况下应该分配静态外部IP(即使它们不是免费的)吗?

@ pcgeek86我刚刚在Google驱动程序中观察到了相同的行为。 默认情况下,它使用临时公共IP地址,并且从门户重新启动Google VM时出现相同的TLS证书错误。 我猜你不应该这样做。 :P

但是我希望以后再添加--azure-static-public-ip布尔值标记,但这不是默认行为,因为静态IP分配会给用户带来隐性成本。

@ahmetalpbalkan在这种情况下是否可以生成再生证书? 我的所有三个VM均正常工作,但随后我将其拆除。 没问题,但是如果regenerate-certs有效。

@squillace是的,这就是它的目的,如果您丢失证书,则可以通过SSH重新生成它们。

@ahmetalpbalkan似乎是

@squillace @ahmetalpbalkan太好了,很高兴知道docker regenerate-certs可以工作。 生产中是否一定需要静态IP? 如果您改用DNS名称怎么办? 这是Docker的选择吗? 这实际上可能有助于解决证书问题。

@ahmetalpbalkan我的凭据似乎持续了几个小时。 无需再次登录就已经过去了一天。 我没有清除主目录中的任何内容。

@buckett这听起来确实像是我们无法复制的错误。 您能否运行docker-machine --debug ssh <vm> (用ip / status替换ssh)并将调试输出发送给我(microsoft com上的ahmetb)(或将其粘贴到要点)何时提示您下次进行身份验证?

编辑:通过电子邮件与他离线进行跟进。

此页面是否有帮助?
0 / 5 - 0 等级