-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Improve ftr license agreement #199
Improve ftr license agreement #199
Conversation
@Joshua-Snapp you may want to add |
ftr stands for first time run. Running splunk ftr doesn't start the splunk service. It just allows for accepting the license agreement. Then we can let the splunk service resource handle whether or not the state of the service should actually change.
ftr stands for first time run. The ftr file is an improved trigger for determining when to run the license_splunkforwarder exec resource. The ftr file always exists following an install of splunk. The install could be a first time install or an upgrade. The ftr file is removed when the license agreement has been accepted. Triggering the exec resource based on the presence of the etc/auth/server.pem prevents the exec resource from being called after splunk has been upgraded, unless we're willing to delete the server.pem file.
887ff95
to
e9cca9c
Compare
@igalic I appreciate you catching my email address. I just corrected it in both commits. |
user => $splunk_user, | ||
creates => '/opt/splunkforwarder/etc/auth/server.pem', | ||
onlyif => "/usr/bin/test -f ${splunk::params::forwarder_dir}/ftr", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use creates => "/usr/bin/test -f ${splunk::params::forwarder_dir}/ftr"
here?
We can't use You can see the behavior of the With this code change, I've been able to install forwarder 6.2.5 and upgrade to 6.6.8 and again to 7.1.2 by simply changing Take the following code and install 6.6.8. Then comment out 6.6.8 version and build and uncomment 7.1.2 version and build. Run puppet again and watch forwarder get updated and license accepted. $_splunk_options = {
version => '6.6.8',
build => '6c27a8439c1e',
#version => '7.1.2',
#build => 'a0c72a66db66',
}
# Tell the module to get packages directly from Splunk.
class { '::splunk::params':
version => $_splunk_options['version'],
build => $_splunk_options['build'],
src_root => 'https://download.splunk.com',
}
# Specify version and build of package to be installed.
class { '::splunk::forwarder':
package_ensure => ($enable_forwarder_param) ? {
true => "$_splunk_options['version']-$_splunk_options['build']",
false => absent,
}
} |
Thanks for the explanation! |
No problem. I'd actually like to see something like the last sentence and code example in my last comment added to the README. I think it would make the upgrade path a lot more clear. Where I work, we've struggled to provide a way to easily upgrade the forwarder on hundreds of machines. Having just figured this out, we're going to add an extra exec resource to our Splunk profile to run the |
ah lol, I wanted to merge it this morning but got distracted. Now that you mentioned it, could you add the example to the README.md? |
I just added an extra commit. It's not the README yet. I'll do that with whatever content is appropriate based on a conversation about this most recent commit. The recent commit changes the # Tell the module to get packages directly from Splunk.
class { '::splunk::params':
version => '7.1.2',
build => 'a0c72a66db66',
src_root => 'https://download.splunk.com',
}
include ::splunk::forwarder Let me know what you think. I understand it might be argued that it's out of scope with the other work. But it also could be considered a good time to get this in since the goal of this PR is to make this module capable of upgrading the Splunk packages. |
02df5ed
to
36233c5
Compare
36233c5
to
47bc08c
Compare
@bastelfreak Sorry for the confusion and delay in finishing the work here. Please ignore my last comment and the work I described. The short story is that a system admin only needs to set Let me know if this makes sense or if you have any questions. |
@bastelfreak |
ftr stands for "first time run"
Current
Triggering the exec resource based on the presence of the etc/auth/server.pem prevents the exec resource from being called after splunk has been upgraded, unless we're willing to delete the server.pem file.
Suggested
The ftr file is an improved trigger for determining when to run the license_splunkforwarder exec resource. The ftr file always exists immediately following an install of splunk or splunkforwarder. The install could be a first time install or an upgrade. Once the license agreement has been accepted the ftr file is removed.
This Pull Request (PR) fixes the following issues
Upgrades don't trigger license_splunkforwarder exec resource #198