machine icon indicating copy to clipboard operation
machine copied to clipboard

Additional Azure VM configuration options

Open j4fm opened this issue 11 years ago • 7 comments

Hello

I believe we are missing some Azure VM configuration options that are needed.

  1. Each VM is created with its own Cloud Service. If I need multiple VMs to be able to communicate with each other using the internal IP which is assigned to the local interface then I need them to be in the same Cloud Service. There are other scenarios where I would want multiple VMs in the same or manually pre-configured Cloud Service too. Therefore, I would like the option of being able to specify an existing cloud service to create the VM against. The Azure Management Portal also allows this option.
  2. The option of specifying the Region/Affinity Group/Azure Virtual Network along with Virtual network Subnets to connect to the created VM. The Azure Management Portal allows this option when creating a VM also. If I want to do this with a VM created using Docker Machine, I have to delete the VM while keeping the VHD and recreate it manually.
  3. The option of specifying additional endpoint/ports to open when creating the Virtual Machine. For example, I might want 8500 open for Consul service discovery, especially common now using Docker 1.9 overlay networking functionality. Unless I use the internal IP which I cannot because the VMs are in separate Cloud Services. The Azure Management Portal also allows configuration of endpoints/port forwards when creating a VM.
  4. The option of specifying an Availability Set. The Azure Management Portal also allows configuration of this during VM creation.

In principal, I need to be able to set the same configuration options for VMs as I can when using the Azure Management Portal to manually create VMs.

Thanks

James

j4fm avatar Nov 25 '15 10:11 j4fm

The most urgent item for my needs is #2. The other two would be a nice to have but not a priority right now.

Without #2, the docker default multi-host overlay networking functionality in 1.9 will not work with multiple azure VMs.

Thanks : )

j4fm avatar Nov 25 '15 18:11 j4fm

#496

bitsofinfo avatar Jan 06 '16 14:01 bitsofinfo

Agree with @jamesmeen : would be great to have this feature.

jensbruggeman avatar Jan 10 '16 09:01 jensbruggeman

@jamesmeen I am in progress of rewriting the Azure driver using Azure Resource Manager APIs and this is great feedback. I am already planning to implement points 1,2 and 4 you described above; however I'm not sure how '3' should be implemented.

As far as I can tell the default behavior for docker-machine on cloud providers is to disable all ports (except :2376) on the firewall and let the user configure it later on using cloud provider's management console/CLI etc.

For the new Azure driver I am planning to open all ports by default, but I can easily imagine this may have a surprise factor for many users and thus pose a security risk and I believe it's inconsistent with existing docker-machine drivers of other cloud providers. If you could provide an use case it'll help us understand the requirements better.

I think if we want to have something like --open-port 80 --open-port 443, this probably should be done at docker-machine level (because it'll be pretty much generic to all drivers). I will let maintainers comment on this.

ahmetb avatar Jan 20 '16 04:01 ahmetb

@ahmetalpbalkan, this is great to hear!

wrt point #2...

I recommend to not change the default behaviour of leaving all firewall ports disabled except those needed for Docker itself, i.e. 2376, swarm, ssh, etc.

The issue I have currently is I cannot configure the port for kv store automatically via docker-machine, so docker networking will not work without manually opening that port.

But this is going via the public IP/firewall and if points #1 and #3 are implemented, then instead of opening a public port for kv store, we'd instead want to be able to identify the local IP address of the kv store machine and specify that instead. So the machines talk to each other via their local network or vpn subnet instead of via public IP/firewall. So the kv store public port wouldn't be needed in that case. So it may be a non-issue unless there are other ports needed for Docker itself now.

Whether or not we want to be able to specify --open-port for our intended container applications, that would be really nice but not essential in my case. It could be more complex than just that too, as I'd want to be able to specify additional options related to the port e.g. locking the port down to a source IP address, UDP vs TCP, etc.

Thanks!

James

j4fm avatar Jan 20 '16 15:01 j4fm

@jamesmeen thanks a lot for responses. Indeed I am adding --azure-vnet/--azure-subnet flags. I am wondering your use case for Availability Sets in Azure case. I am going to implement it anyways but I wondered how is it going to be used.

ahmetb avatar Jan 22 '16 20:01 ahmetb

@ahmetalpbalkan, it would be to ensure redundancy of machines created can be maintained and also support separating tiers of our multi-machine deployment into separate availability sets within Azure. This is also needed to take advantage of Azure SLA guarantees.

j4fm avatar Jan 26 '16 14:01 j4fm