Skip to content
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

Embed browser_windows in hcl config file #43

Closed
danielehc opened this issue Feb 20, 2020 · 3 comments · Fixed by #60
Closed

Embed browser_windows in hcl config file #43

danielehc opened this issue Feb 20, 2020 · 3 comments · Fixed by #60
Labels
enhancement New feature or request
Projects
Milestone

Comments

@danielehc
Copy link

Current Behavior

Currently it is possible to configure the blueprint by adding a browser_windows section in the .yard file.

browser_windows = [
  "http://localhost:18443",
  "http://localhost:18500",
]

This works fine in cases where the blueprint is created for a complete scenario (aka all applications that need to be exposed are started with the first shipyard run ...).

Extended behavior
I'd like a way to configure the browser_windows behavior inside the ingress object:

  • Example syntax 1
ingress "consul-ui" {
  target = "k8s_cluster.k8s"
  service  = "svc/hashicorp-consul-ui"
  
  # Defines whether to honor the `browser_window` param or not
  headless = true
  # Defines URL to open in browser after ingress is created
  browser_window = "http://localhost:18500"
    
  network  {
    name = "network.local"
  }

  port {
    local  = 80
    remote = 80
    host   = 18500
  }
}
  • Example syntax 2
ingress "consul-ui" {
  target = "k8s_cluster.k8s"
  service  = "svc/hashicorp-consul-ui"
  
  # can be honored globally by `shipyard` config
  # local_env could potentially be expanded for new feature that leverage desktop integration
  local_env  {
    # Defines whether to honor the `browser_window` param or not
    # headless = true # having this too here might be an overkill

    # Defines URL to open in browser after ingress is created
    browser_window = "http://localhost:18500"
  }
  
    
  network  {
    name = "network.local"
  }

  port {
    local  = 80
    remote = 80
    host   = 18500
  }
}
@danielehc
Copy link
Author

Seems also related to #42

@nicholasjackson nicholasjackson added the enhancement New feature or request label Feb 23, 2020
@nicholasjackson nicholasjackson added this to the v0.0.1 milestone Feb 23, 2020
@nicholasjackson nicholasjackson added this to To do in Backlog via automation Feb 23, 2020
@nicholasjackson
Copy link
Contributor

I like this, sometimes you might not want to create a yard file or you might want to do an incremental apply. We added --no-browser to a recent release. I wonder if this satisfies the headless parameter @danielehc ?

@danielehc
Copy link
Author

The --no-browser param is fine for all the use cases I can think, so that would be enough.

@nicholasjackson nicholasjackson moved this from To do to Done in Backlog Apr 3, 2020
@nicholasjackson nicholasjackson moved this from Done to Released in Backlog Apr 3, 2020
@nicholasjackson nicholasjackson linked a pull request Apr 3, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Backlog
  
Released
Development

Successfully merging a pull request may close this issue.

2 participants