-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get a public IP #72
Comments
Is your subnet is configured to auto allocate a public IP ?
|
No .. Can I still get a public IP ? |
I think there is an option, yes
|
associate_public_ip: true |
I seem to be having an issue as well with an instance being created without a public IP address using 0.8.0. I had to enable the subnet's auto-assign public IP address to use the EC2 driver.
|
I'm having the same problem. I've specified the subnet_id although ours are not set to create public IP be default so I also set associate_public_ip: true. It does not associate a public IP. |
I can confirm that |
+1 would be really nice if "associate_public_ip" would work as expected |
+1 |
I'm having the same problem at edge version (abc4115)... |
+1 Same problem here... |
+1 - running into this as well. thanks. |
+1 same issue |
oh - if your corporate security policy does allow it, the AWS subnet config item "Enable Auto-assign Public IP " will give you a workaround for now (tested): http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-ip-addressing.html#subnet-public-ip |
+1 I also cannot get kitchen-ec2 to create a public IP. |
Agree with @pushent. I think this is not an issue. I had the same kind of problem before, so in addition to associate_public_ip: true .kitchen.yml parameter - make sure your EC2 Subnet network config has Auto-assign Public IP:yes. |
@dsavinkov I'm not sure the point of the feature then? Is it only to prevent an IP address from being assigned when auto-assign is on? It's perfectly normal to assign a public IP to a subnet where the auto-assign is off. I imagine that in subnets the auto-assign is generally off but it's useful to override that for a test environment when being able to connect to the instance directly and debug is useful. |
@dsavinkov It is always an issue when something is not working as intended. The |
@squirvoid I believe all kitchen attributes should be "atomic" in terms of utilizing AWS API. By doing several things with one parameter configuration in general is getting blurred. On the other side I would agree with @dtoubelis that it might be better to reimplement/introduce parameter to control these kind of situations. AWS cli should be golden source of truth :) |
In the latest release of kitchen-ec2 (0.9.0) I updated to use the latest AWS SDK. As part of this, if you specify |
@tyler-ball that's great! I will try it out. |
Environment:
in .kitchen.yml subnet_id: subnet-XXXXXXXX # auto-assign public IP = false
associate_public_ip_address: true During converging I get the following:
@tyler-ball |
While reading through this discussion I would like to know if the |
I get the same as @dsavinkov when using associate_public_ip_address. When using the actual CLI to make an instance in a VPC, to get a public IP address a network interface needs to be defined and the subnet id that interface is created in defined as a part of that interface. You then must not specify the subnet id when creating the ec2 instance as the associated interface is used as well. The same is the case when using a CloudFormation template. In terms of the code I would make it always define an interface if a subnet id is specified and let the associate_public_ip_address option decide if it should get an internet IP or not (the interface accepts this as true/false) @litjoco I think this must be a typo in the help as associate_public_ip didn't seem to do anything. I would guess associate_public_ip_address is the correct entry. |
Oops! I introduced a regression when I changed it from I'm also looking into what happens if a subnet has auto assign public ip disabled and the user specifies |
@tyler-ball
|
…ecify subnet_id at the top level, it must be specified on the network_interface. Fixes #72
…ecify subnet_id at the top level, it must be specified on the network_interface. Fixes #72
…ecify subnet_id at the top level, it must be specified on the network_interface. Fixes #72
@dsavinkov can you try my branch from #125 and see if it fixes your issue? It worked locally for me with a subnet that had public IP assignment disabled. I also fixed the config key name change that I accidently introduced. |
@tyler-ball Dmitry-mbp:test ds$ chef gem list kitchen-ec2
*** LOCAL GEMS ***
kitchen-ec2 (0.10.0.dev.0)
...
subnet_id: subnet-XXXXXXXX # auto-assign IP = false OR even auto-assign IP = true
associate_public_ip: true
... Output:
2.With just subnet-id parameter: ...
subnet_id: subnet-XXXXXXXX # auto-assign IP = true
... I am running into connection timeout issue:
I must be doing smth wrong. Let's wait for feedback from other folks.. |
@dsavinkov Can you gist the output of your :placement => { :availability_zone => "eu-west-1a" },
:instance_type => "micro",
...,
:network_interfaces => [{
:device_index => 0,
:associate_public_ip_address => true,
:subnet_id => "s-456"
}] Specifically, |
…ecify subnet_id at the top level, it must be specified on the network_interface. Fixes #72
I'm starting the instance while mentioning a subnet_id in my kitchen.yml file.
on AWS management console I see that the instance was initialized using the proper subnet, but it didn't received an external IP.
the driver is trying to login on the internal IP ( this can be considered as a bug? )
.......... (server ready)
Waiting for 10.0.0.64:22...
Waiting for 10.0.0.64:22...
Waiting for 10.0.0.64:22...
Waiting for 10.0.0.64:22...
Am I'm missing something?
The text was updated successfully, but these errors were encountered: