Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

when using the azure driver, --azure-name parameter is not used #419

Closed
chanezon opened this issue Jan 28, 2015 · 7 comments
Closed

when using the azure driver, --azure-name parameter is not used #419

chanezon opened this issue Jan 28, 2015 · 7 comments

Comments

@chanezon
Copy link
Contributor

Details below.
Maybe this has to do with issue #219
The cloud service and vm names are the same generated name. It's fine, but then the --azure-name option should be removed.

machine create -d azure \
> --azure-subscription-id="9b5910a1-d954-4b45-85e8-8e79d5ea2841" \
> --azure-subscription-cert="/Users/pat/.azure/9b5910a1-d954-4b45-85e8-8e79d5ea2841.pem" \
> --azure-location="West US" \
> --azure-name="pat-docker-10" \
> --azure-username="pat" \
> pat-2
INFO[0000] Creating Azure machine...                    
INFO[0050] Waiting for SSH...                           
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6715  100  6715    0     0  15326      0 --:--:-- --:--:-- --:--:-- 15296
modprobe: FATAL: Module aufs not found.
+ sudo -E sh -c sleep 3; apt-get update
+ sudo -E sh -c sleep 3; apt-get install -y -q linux-image-extra-3.13.0-36-generic
E: Unable to correct problems, you have held broken packages.
modprobe: FATAL: Module aufs not found.
Warning: tried to install linux-image-extra-3.13.0-36-generic (for AUFS)
 but we still have no AUFS.  Docker may not work. Proceeding anyways!
+ sleep 10
+ [ https://get.docker.com/ = https://get.docker.com/ ]
+ sudo -E sh -c apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
gpg: requesting key A88D21E9 from hkp server keyserver.ubuntu.com
gpg: key A88D21E9: public key "Docker Release Tool (releasedocker) <docker@dotcloud.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
+ sudo -E sh -c echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c sleep 3; apt-get update; apt-get install -y -q lxc-docker

+ sudo -E sh -c docker version
INFO[0383] "pat-2" has been created and is now the active machine 
INFO[0383] To connect: docker $(machine config pat-2) ps 

cat ~/.docker/machines/pat-2/config.json 
{"DriverName":"azure","Driver":{"MachineName":"pat-2-20150128000710","SubscriptionID":"9b5910a1-d954-4b45-85e8-8e79d5ea2841","SubscriptionCert":"/Users/pat/.azure/9b5910a1-d954-4b45-85e8-8e79d5ea2841.pem","PublishSettingsFilePath":"","Name":"","Location":"West US","Size":"Small","UserName":"pat","UserPassword":"","Image":"b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20140927-en-us-30GB","SSHPort":22,"DockerPort":2376,"CaCertPath":"","PrivateKeyPath":""},"CaCertPath":"","ServerCertPath":"","ServerKeyPath":"","PrivateKeyPath":"","ClientCertPath":""}
@ehazlett
Copy link
Contributor

Thanks for reporting. Fixed in #427.

@ahmetb
Copy link
Contributor

ahmetb commented Jan 28, 2015

@ehazlett so is it going to be in a format like given_name-YYYYMMDDHHMMSS.cloudapp.net from now on?

@ehazlett
Copy link
Contributor

The reason for this is Azure names all instances on the "cloudapp.net"
domain. Therefore, if you have "test" there is a very good chance it will
collide with other instances.

The name is only used for the Azure cloud service and DNS.

On Wed, Jan 28, 2015 at 1:48 PM, Ahmet Alp Balkan notifications@github.com
wrote:

@ehazlett https://github.com/ehazlett so is it going to be in a format
like given_name-YYYYMMDDHHMMSS.cloudapp.net from now on?


Reply to this email directly or view it on GitHub
#419 (comment).

@ahmetb
Copy link
Contributor

ahmetb commented Jan 29, 2015

I see. But I was wondering if the user should have full control on the dns name or not. For some people dns name means a big deal. (e.g. This code disallows me from creating ahmetsblog.cloudapp.net for my blog using docker machine). Instead, the code can just fail and say "cloud service name xxx.cloudapp.net is already taken".

I haven't seen the discussion about this but this would be my comment. I think users should still have control on the dns name. For me, managing ahmet-docker-1, ahmet-docker-2,... is easier than managing ahmetdocker-20150127152433, ahmetdocker-20250127152750 and so on.

@ehazlett
Copy link
Contributor

That's a great point. Would you mind opening a separate issue for custom
DNS on azure and we can discuss? Thanks!

On Wed, Jan 28, 2015 at 7:14 PM, Ahmet Alp Balkan notifications@github.com
wrote:

I see. But I was wondering if the user should have full control on the dns
name or not. For some people dns name means a big deal. (e.g. This code
disallows me from creating ahmetsblog.cloudapp.net for my blog using
docker machine). Instead, the code can just fail and say "cloud service
name xxx.cloudapp.net is already taken".

I haven't seen the discussion about this but this would be my comment. I
think users should still have control on the dns name. For me, managing
ahmet-docker-1, ahmet-docker-2,... is easier than managing
ahmetdocker-20150127152433, ahmetdocker-20250127152750 and so on.


Reply to this email directly or view it on GitHub
#419 (comment).

@chanezon
Copy link
Contributor Author

Another point to consider: https://github.com/chanezon/azure-linux/blob/master/docker/machine.md
"One word of caution: MachineName is the name of the cloud service that will be created in Azure. A cloud service name must be between 3 and 25 characters. machine adds a 16 character timestamp postfix to the name you provide on the command line. This means you want to use a machine name that is shorter than 9 characters. Else machine will throw an error message."

I got burned by this when testing machine initially.

The error message says 3-25 chars, when the name you entered is 10 chars. It took me a while to figure out that docker was not using the name I provided for the cloud service name.

@ahmetb
Copy link
Contributor

ahmetb commented Jan 29, 2015

@chanezon totally. it just creates confusion for an azure user. I think the argument should be allowed at least as optional.
@ehazlett I opened #433 to discuss.

tomeon pushed a commit to tomeon/machine that referenced this issue May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants