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 parsing of client configuration from the commandline #191

Merged
merged 4 commits into from
Oct 2, 2015

Conversation

dadgar
Copy link
Contributor

@dadgar dadgar commented Oct 1, 2015

Allows configuring a nomad client agent from the command line. Solves #187

flags.StringVar(&cmdConfig.Client.NodeClass, "node-class", "", "")

var servers string
flags.StringVar(&servers, "servers", "", "")
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... I see why you did this, as we already have a -server arg. It would be nice if we could think of a reasonable name for a flag that you could specify multiple times, but for my lack of creativity this should suffice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I couldn't think of anything else either.

if config.DataDir == "" {
// Check for valid modes.
if config.Server.Enabled && config.Client.Enabled {
c.Ui.Error("To run both as a server and client, use -dev mode.")
Copy link
Member

Choose a reason for hiding this comment

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

Do these need to be mutually exclusive? I've used this mode a few times before to see how the client behaves and persists data in a bare minimum set-up. If there's a reason we should actually enforce this then this looks good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess that is true. If you wanted to "dev" mode with persistence you could enable both. I will update.

@ryanuber
Copy link
Member

ryanuber commented Oct 2, 2015

Looks good! Just a few comments but I see you're already taking care of them. 👍

@dadgar
Copy link
Contributor Author

dadgar commented Oct 2, 2015

Thanks for the review 👍

dadgar added a commit that referenced this pull request Oct 2, 2015
Add parsing of client configuration from the commandline
@dadgar dadgar merged commit b56ac05 into master Oct 2, 2015
@dadgar dadgar deleted the f-client-agent-cmdline branch October 2, 2015 00:29
@github-actions
Copy link

github-actions bot commented May 9, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants