Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Updated Splunk Quick Start #44

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open

Conversation

billbartlett
Copy link
Contributor

Issue #, if available:

Description of changes: There are a multitude of changes, and the primary driver for updating is to include Splunk's SmartStore functionality.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Bill Bartlett and others added 30 commits August 14, 2019 15:37
initial commit of user_data.sh -- testing viability of using external shell scripts for user data instead of doing everything in-line with the template.
missed updating the creationpolicy timeout on the previous commit.  fixing that, and lowering the timeout to 10 minutes instead of 15.
10 minutes was not enough for the CM to boot before timeout.  changed back to 15.
changed systemctl commands to use splunk binary
moved variables up in user data
removed the cloud init files for splunk ansible before ansible is ran
without something in the functions, bash will error out on a syntax error.  added echo statements as placeholders.
Prior to this change, when the script was ran without any arguments, it would still try to execute the base install of Splunk.  This change was made so that if someone executes the script to see usage, it won't try to execute the install before showing the usage.
previously, it wrote to /etc/splunk/splunk.license and then the user_data script moved it.  that seems unnecessary, so I'm having cloudformation write directly to the appropriate directory.
the minimum number of indexers in an AZ must be at least as large as the replication factor.  since we're using RF = 2, and a default minimum of 2 AZ, there must be at least 4 indexers in total - 2 in each AZ.
added sleep in the deployer after restart.  this allows for splunk to be fully restarted before issuing splunk cli commands that would fail because the REST endpoint wasn't yet responding.
converted the JSON templates to YAML, which is now required for the quickstart repo.
unfinished docs, but commiting so that they may be shared.
@billbartlett
Copy link
Contributor Author

@sshvans - the .metadata file has been added and PR updated.

@sshvans
Copy link
Contributor

sshvans commented May 19, 2022

/do-e2e-tests

@aws-ia-ci
Copy link

aws-ia-ci bot commented May 19, 2022

I'm creating a backend CI pipeline for this project. This is a one-time procedure but will add a delay of approximately 5 minutes.

@tbulding
Copy link

/do-e2e-tests

@sshvans
Copy link
Contributor

sshvans commented May 20, 2022

@billbartlett Seems like there are still merge conflicts.

@sshvans
Copy link
Contributor

sshvans commented Aug 27, 2022

/do-e2e-tests

@sshvans sshvans mentioned this pull request Aug 27, 2022
.taskcat.yml Outdated Show resolved Hide resolved
.taskcat.yml Outdated
WebClientLocation: 72.21.196.66/32
AvailabilityZones: us-west-2a,us-west-2b
KeyName: [your-aws-keypair]
QSS3BucketName: [quickstart-bucket-name]
Copy link
Contributor

Choose a reason for hiding this comment

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

USe $[taskcat_autobucket]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the QSS3BucketName will need to be a bucket that contains the quickstart code. isn't $[taskcat_autobucket] used for random bucket names?

Copy link
Contributor

Choose a reason for hiding this comment

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

For testing, $[taskcat_autobucket] is used by CI to create a temp bucket, upload the repo content and test from that bucket. In the template, the parameter default value needs to be quickstart bucket name, as thats where the templates are staged for customers to deploy.

.taskcat.yml Outdated Show resolved Hide resolved
.taskcat.yml Outdated Show resolved Hide resolved
Comment on lines +27 to +28
SplunkLicenseBucket: [splunk-license-bucket-name]
SplunkLicensePath: [splunk-license-file]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need splunk license file for the testing? If yes, can you provide a test file via email, for our CI, so that our CI platform can test the QS automatically?

templates/splunk-enterprise.template.yaml Outdated Show resolved Hide resolved
templates/splunk-enterprise.template.yaml Outdated Show resolved Hide resolved
templates/splunk-enterprise.template.yaml Show resolved Hide resolved
@sshvans
Copy link
Contributor

sshvans commented Sep 8, 2022

@billbartlett Let me know when you have resolved the comments above and I'll give it a test run.

Comment on lines +498 to +503
S3AccessCreds:
type: S3
accessKeyId: !Ref 'CfnKeys'
secretKey: !GetAtt 'CfnKeys.SecretAccessKey'
buckets:
- !Ref 'QSS3BucketName'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use IAM role? Instead of creating user and using secret access key? That way you don't need to worry about rotating keys. Its much secure.

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.

4 participants