Conversation
There's really no difference between the root and elastic users, so let's just use the elastic user to keep things simpler.
This only waits for Elasticsearch and Kibana to both be ready, but it's something.
It's not a reader anymore!
The logic that was being used for some Add functions that had to check if a resource existed before creating it wasn't working properly.
You can now call the Wait function immediately after starting your infra deployment.
They're called overrides, so let's call them overrides. Using attributes in this context is confusing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
At a high level, this PR replaces the venerable
add-team.shscript with some Dynamicbeat subcommands. However, it also does a lot more than just that.First, Dynamicbeat is now used to configure Kibana and Elasticsearch. The deployments will only set up the cluster's PKI, configure initial passwords, and add the plugin to Kibana. Everything else is done by Dynamicbeat. Separate credentials must be provided in the configuration file for the purposes of setup.
Second, Dynamicbeat is used to load checks from files and add them into Elasticsearch. As a result, the bash-variable-esque templating of team names and numbers has been replaced with proper golang templating. Also, support has been added for configuring attribute overrides on a per-team basis. This means you can use templates within attribute values, and define the values that get inserted separately for each team. Also, you can define attributes at the team level that will override attributes defined in a check file.
This brings me to check files. Instead of creating a folder with the check's base ID (i.e. without the team name), and then creating up to three files within that folder (
check.json,admin-attribs.json,user-attribs.json), checks are now configured in a single file that combines the contents of the oldcheck.jsonfile with any attributes that are defined. This file is named with the check's base ID. For example, a check with an ID ofhttp-kibana-team01would be configured via a file namedhttp-kibana.json. Also, theidandgroupfields are no longer necessary, and should not be specified. Dynamicbeat will populate these fields based on the filename and the names of the teams that are configured.Lastly, teams are no longer defined on the command-line. With the
add-team.shscript, you had to pass the name of each team as an argument to the script. That is no longer necessary - now you can configure the number of teams, their team names, and optionally override theTeamNumvariable within the Dynamicbeat configuration file. Like all settings used by thesetupcommand, these settings don't have to be specified when executing theruncommand.Oh, and the actual last thing - all example check definitions have been updated to only use attributes when appropriate. User attributes are defined for passwords (or other things teams should be able to modify), and admin attributes are defined for things that teams should be able to see the values of, but not modify.
Fixes #273
Merge Checklist
dev, unless it's a PR for a release