Git Product home page Git Product logo

Comments (17)

cf-gitbot avatar cf-gitbot commented on June 30, 2024

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/120812677

The labels on this github issue will be updated when the story is started.

from bosh-bootloader.

robdimsdale avatar robdimsdale commented on June 30, 2024

Putting on my engineering hat and thinking about implementation, I've done this in the PivNet CLI - it wasn't that challenging; it just requires models for the presentation layer.

from bosh-bootloader.

ryanmoran avatar ryanmoran commented on June 30, 2024

I also just ran into this and wished for something better here. Writing a bash chainsaw like, bbl --state-dir ~/.bbl | grep "Concourse LB:" | awk '{print $4}' | tr -d "[]" made me feel 😿 .

from bosh-bootloader.

Amit-PivotalLabs avatar Amit-PivotalLabs commented on June 30, 2024

Thanks @robdimsdale @ryanmoran

Currently lbs is the only command I can think of that is a read operation and doesn't provide output in a scriptable format, e.g. the output of director-address is fine. So we can scope this conversation to lbs. Now, looking at its output, it gives you something like this:

CF Router LB: SomeAWSResourceName [aws-elb-blah.aws.amazon.ec2.com]
CF SSH Proxy LB: AnotherAWSResourceName [foo.bar.ec2.elb.amazon]

Is the AWS resource name even useful? I wonder if the logical name and the URL would be sufficient. Something like:

CF Router LB: aws-elb-blah.aws.amazon.ec2.com
CF SSH Proxy LB: foo.bar.ec2.elb.amazon

Then you'd get:

$ bbl lbs | grep "Router" | cut -f2 -d: | tr -d ' '

vs

$ bbl lbs --output-format=json | jq -r '."CF Router LB"'

At that point, I'm not sure I see a massive amount of value in the output format flag. I could see it being something for future consideration.

from bosh-bootloader.

zankich avatar zankich commented on June 30, 2024

I was talking with @ryanmoran and he suggested that lbs could optionally accept the lb type and only return that value. So it would be something like

$ bbl lbs --type CFRouter
router.elb.com

And then the lbs command with no argument would exhibit it's current behavior.

from bosh-bootloader.

ryanmoran avatar ryanmoran commented on June 30, 2024

@Amit-PivotalLabs the resource name is useful when you want to setup an A record with an alias target.

from bosh-bootloader.

ryanmoran avatar ryanmoran commented on June 30, 2024

@Amit-PivotalLabs in order to get an alias target we would also need the hosted zone id of the ELB.

from bosh-bootloader.

ryanmoran avatar ryanmoran commented on June 30, 2024

@Amit-PivotalLabs the reason this matters is that sometimes you might need an A record, and without something like an alias target, you can only setup a CNAME record.

from bosh-bootloader.

Amit-PivotalLabs avatar Amit-PivotalLabs commented on June 30, 2024

@ryanmoran when do you want an A record instead of a CNAME?

from bosh-bootloader.

ryanmoran avatar ryanmoran commented on June 30, 2024

@Amit-PivotalLabs you can't create a CNAME that points to the top-level domain. So, you wouldn't be able to have a CNAME for pivotal.io. You would need an A Record. But you can make a CNAME for pretty much anything else. I don't have this problem, but its worth knowing that you can run into it.

from bosh-bootloader.

ryanmoran avatar ryanmoran commented on June 30, 2024

@Amit-PivotalLabs we actually ran into this CNAME vs A record issue today. If I have a hosted zone called banana.fruit.example.com and I have setup a hosted zone for banana.fruit.example.com which handles the redirected DNS lookup from some other NS, like fruit.example.com. I can't use a CNAME to set the apex record for the banana.fruit.example.com record. Instead, I need to specify an A record with an alias target that point at the ELB. And even more, I need to know the HostedZoneID that the ELB is in.

So, I propose that bbl include the ELBs HostedZoneID in addition to the other fields that it already includes.

from bosh-bootloader.

Amit-PivotalLabs avatar Amit-PivotalLabs commented on June 30, 2024

@ryanmoran @robdimsdale @zankich How about:

$ bbl lbs
CF Router LB:
  Domain Name: some.elb.com
  AWS Resource Name: SomeAWSResourceName
  AWS Hosted Zone ID: XYZ
CF SSH Proxy LB:
  Domain Name: another.elb.com
  AWS Resource Name: AnotherAWSResourceName
  AWS Hosted Zone ID: ABC

$ bbl lbs --json
{
  "CF Router LB": {
    "Domain Name": "some.elb.com",
    "AWS Resource Name": "SomeAWSResourceName",
    "AWS Hosted Zone ID": "XYZ"
  }, 
  "CF SSH Proxy LB": {
    "Domain Name": "another.elb.com",
    "AWS Resource Name": "AnotherAWSResourceName",
    "AWS Hosted Zone ID": "ABC"
  }
}

Of course, this is very AWS-specific, but we can figure out something similar when we get to our next IaaS.

One question @ryanmoran what is HostedZoneID, and is it different from what I'm calling AWSResourceName?

from bosh-bootloader.

ryanmoran avatar ryanmoran commented on June 30, 2024

@Amit-PivotalLabs HostedZoneID is a property of the ELB. If you look at the load balancer description page in the EC2 dashboard, you will see something like Z123ABC. We will need that value to setup an A record with an alias target.

from bosh-bootloader.

robdimsdale avatar robdimsdale commented on June 30, 2024

I think that the proposed solution above would meet all of the needs I have discovered so far, thanks

from bosh-bootloader.

Amit-PivotalLabs avatar Amit-PivotalLabs commented on June 30, 2024

Story created: https://www.pivotaltracker.com/story/show/126362385

from bosh-bootloader.

zankich avatar zankich commented on June 30, 2024

It would be great if this work was prioritized, we still have to do commands like this to use the output of the lbs command

bbl lbs | grep "CF TCP Router LB" | cut -d " " -f5

from bosh-bootloader.

evanfarrar avatar evanfarrar commented on June 30, 2024

Why do you get the IP of the CF TCP Router LB? i.e. What do you do with it after you get it?

from bosh-bootloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.