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

Add -http-port option to change the HTTP API port #1167

Merged
merged 6 commits into from
Sep 2, 2015

Conversation

railsguru
Copy link

This is useful when pushing consul to PaaS like
Cloud Foundry making the HTTP API easily routable.

This is useful when pushing consul to PaaS like
Cloud Foundry making the HTTP API easily routable.
@@ -849,6 +854,9 @@ func MergeConfig(a, b *Config) *Config {
if b.BindAddr != "" {
result.BindAddr = b.BindAddr
}
if b.HttpPort != 0 {
result.Ports.HTTP = b.HttpPort
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test case to ensure this merging works? There are examples in config_test.go that you can piggyback on.

@ryanuber
Copy link
Member

@railsguru this looks good, sorry for the delay! If we can just add the test case for the option, as well as update the CLI and HTTP documentation I think we can merge this.

@railsguru
Copy link
Author

I got rid of the intermediate HttpPort variable and TestMergeConfig already also provides coverage. If there's any other documentation I should add let me know, thx!

@ryanbreen
Copy link
Contributor

@railsguru, this needs to be documented here: http://www.consul.io/docs/agent/options.html. Can you update docs/agent/options.html.markdown to cover this?

@railsguru
Copy link
Author

Done. I ended up doing some yak shaving and also created a pull request for middleman-hashicorp as the consul/website/Gemfile.lock points to a yanked release.

@ryanbreen
Copy link
Contributor

Thanks! The options doc is alphabetically sorted by config for discoverability. Would you mind moving this config to the appropriate place?

@railsguru
Copy link
Author

@ryanbreen ah missed that cue, done!

@ryanbreen
Copy link
Contributor

Awesome, thanks!

ryanbreen added a commit that referenced this pull request Sep 2, 2015
Add -http-port option to change the HTTP API port
@ryanbreen ryanbreen merged commit 80d26f9 into hashicorp:master Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants