bosh icon indicating copy to clipboard operation
bosh copied to clipboard

Allow microbosh in AWS VPC to be referenced by static IP

Open drnic opened this issue 12 years ago • 18 comments

Currently "bosh micro deploy" for AWS requires that a elastic IP (vip) is provided in the micro_bosh.yml even if the microbosh is inside a VPC subnet. This doesn't make 100% sense.

https://github.com/cloudfoundry/bosh/blob/master/bosh_cli_plugin_micro/lib/bosh/deployer/instance_manager/aws.rb#L113

There is no logic here to discover the static IP address of a microbosh. It assumes that there is an elastic IP ("public").

Perhaps related to https://github.com/cloudfoundry/bosh/commit/81ef770f2b99dd14ccfbcea54f8cc8ee3312296a#diff-3c21500432f1e9b7e627ac085111a5ad

Looks like a regression from a month ago?

drnic avatar Apr 09 '14 17:04 drnic

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: http://www.pivotaltracker.com/story/show/69198726. This repo is managed by the 'BOSH' team.

cf-gitbot avatar Apr 09 '14 17:04 cf-gitbot

@goehmen, would the BOSH team like to take a look at this?

CF Community Pair (@khwang1 & @chou)

chou avatar Apr 09 '14 22:04 chou

bosh team will respond

goehmen avatar Apr 09 '14 23:04 goehmen

Just to clarify what you are asking: you want micro to be targeted by private ip address (because you do not want to give your micro publicly accessible ip)? I'm assuming you have a jumpbox inside vpc that you are using to deploying a micro.

This sounds reasonable, @goehmen can prioritize this.

Thanks,

  • @cppforlife

cppforlife avatar Apr 10 '14 16:04 cppforlife

Hmmm - this sounds very like my conversation with Martin and Ferdy about a year ago.

https://groups.google.com/a/cloudfoundry.org/forum/#!searchin/bosh-users/inside$20vpc/bosh-users/_wgUVXpzSeA/qKDUUIUIs40J

If so, +1 for this feature - It's not a good assumption that your BOSH Micro is the sole guardian and gateway to your VPC, and all client interactions come from outside.

james-masson avatar Apr 22 '14 10:04 james-masson

@drnic We are closing this issue in favor of #574.

Thanks, CF Community Pair (@adamstegman @mbhave)

adamstegman avatar May 09 '14 17:05 adamstegman

I will put my 5 cents. First of all see impl for :https://github.com/cloudfoundry/bosh/pull/575 There is possibility to request a public IP address for eth0 device in VPC 2.0.

  • if network is manual
  • if elastic IP is not assigned
  • if not overridden by props in deployment manifest

This will make micro_bosh deployment behave exactly as deployment to "default" network. See here: http://docs.aws.amazon.com/sdkfornet1/latest/apidocs/html/P_Amazon_EC2_Model_InstanceNetworkInterfaceSpecification_AssociatePublicIpAddress.htm

akranga avatar May 09 '14 20:05 akranga

A side question. Why micro_bosh needs a public IP in case of VPC deployment? I believe micro_bosh must be reachable by other VMs within VPC. Is there any other limitation?

akranga avatar May 09 '14 20:05 akranga

@akranga It was likely an assumption made at some point that your micro would be targetable from anywhere, rather than only from a jumpbox. We can't find any reason that it would require a publically-accessible IP.

Thanks, CF Community Pair (@adamstegman & @mbhave)

adamstegman avatar May 09 '14 22:05 adamstegman

@adamstegman & @mbhave thanks for commenting.

I understand that EIP is the easiest way to implement to make Bosh available for the user. However my concern is exactly a requirement to use "elastic ip". For our deployments of CF we want to spare as much as possible elastic-ips for the user.

I would suggest to the following:

  • implement what @drnic suggests (this will make: https://www.pivotaltracker.com/s/projects/956238 not to fail),
  • #575 (PR already submitted).
  • or both

If first is preferable then I can create PR shortly.

akranga avatar May 12 '14 08:05 akranga

From my reading, aren't these stories a little different?

I'm asking to be able to deploy microbosh to EC2 CPI without requiring any form of Public IP - and I thought that's what @drnic was after too.

Isn't https://github.com/cloudfoundry/bosh/pull/575 about being able to use 'on-demand' AWS Public IPs through AssociatePublicIpAddress - an alternative to EIP - rather than the CPI allowing you to completely miss out all the Public IP configuration.

Or are you suggesting that https://github.com/cloudfoundry/bosh/pull/575 also fixes what I was requesting?

james-masson avatar May 12 '14 08:05 james-masson

Well, my initial problem have been described #573

You start the deployment but not specify any public IP. Then it will fail in VPC deployment (but work in "default" sub-network, because it allocates public ip). As the outcome there are two choices:

  • make deployment possible without any form of public ip (as @drnic suggest)
  • or make bosh deployment consistent inside or outside of VPC.

Without knowing proper reasoning behind current bosh deployment logic I was assuming 2nd will be less risky change. So, as result #575 will also fix the problem because micro_bosh instance will have a public IP address.

akranga avatar May 12 '14 08:05 akranga

I'm sure your PR works just fine - I'm just not sure it fixes what was requested in this issue.

@adamstegman Can you elaborate more on why this issue has been closed?

james-masson avatar May 12 '14 16:05 james-masson

@james-masson I see the distinction, thank you for pointing it out. I'll reopen this issue so we can prioritize this.

adamstegman avatar May 12 '14 20:05 adamstegman

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/71180904. This repo is managed by the 'BOSH' team.

cf-gitbot avatar May 12 '14 20:05 cf-gitbot

Closing the Pivotal Tracker story that cf-gitbot just created (https://www.pivotaltracker.com/story/show/71180904).
The story that contains progress for the issue is the one originally assigned by gitbot: http://www.pivotaltracker.com/story/show/69198726

stupakov avatar May 12 '14 21:05 stupakov

Experienced this issue again today.

The following snippet of micro_bosh.yml:

network:
  type: manual
  ip: 10.15.212.70
  cloud_properties:
    subnet: subnet-0420752c

causes bosh micro deploy to fail with:

Will deploy due to stemcell changes
  Started deploy micro bosh
  Started deploy micro bosh > Unpacking stemcell. Done (00:00:00)
  Started deploy micro bosh > Uploading stemcell. Done (00:00:08)
  Started deploy micro bosh > Creating VM from ami-03223a6a light. Done (00:01:04)
  Started deploy micro bosh > Waiting for the agent/usr/local/rvm/gems/ruby-1.9.3-p545/gems/bosh_cli_plugin_micro-1.2624.0/lib/bosh/deployer/instance_manager/
aws.rb:124:in `discover_client_services_ip': Failed to discover public ip address (RuntimeError)

drnic avatar Jul 03 '14 17:07 drnic

Please consider PR https://github.com/cloudfoundry/bosh/pull/605

drnic avatar Jul 03 '14 18:07 drnic