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 Director profile which waits on Icinga 2 API #104

Closed
dnsmichi opened this issue Nov 20, 2017 · 3 comments
Closed

Add Director profile which waits on Icinga 2 API #104

dnsmichi opened this issue Nov 20, 2017 · 3 comments

Comments

@dnsmichi
Copy link
Contributor

That's missing atm.

@dnsmichi
Copy link
Contributor Author

####################################
# Director
####################################

icingaweb2::module { 'director':
  builtin => false
}
->
exec { 'fix-binary-blog-bug-zend-655':
  path => '/bin:/usr/bin:/sbin:/usr/sbin',
  command => 'sed -i \'s/$value = addcslashes/\/\/$value = addcslashes/\' /usr/share/php/Zend/Db/Adapter/Pdo/Abstract.php'
}
->
# ship box specific director module config
file {'/etc/icingaweb2/modules/director':
  ensure => directory,
  owner  => root,
  group  => icingaweb2,
  mode => '2770',
  require => [ Package['icingaweb2'], File['/etc/icingaweb2/modules'] ]
} ->
file { '/etc/icingaweb2/modules/director/config.ini':
  ensure => file,
  owner => root,
  group => icingaweb2,
  mode => '2770',
  source => 'puppet:////vagrant/files/etc/icingaweb2/modules/director/config.ini', #TODO use hiera and templates
  require => File['/etc/icingaweb2/modules/director']
}->
exec { 'create-mysql-icingaweb2-director-db':
  #TODO: move this to a dedicated subclass
  path        => '/bin:/usr/bin:/sbin:/usr/sbin',
  unless      => 'mysql -udirector -pdirector director',
  command     => 'mysql -uroot -e "CREATE DATABASE director; GRANT ALL ON director.* TO director@localhost IDENTIFIED BY \'director\';"',
  user        => 'root',
  environment => [ "HOME=/root" ],
  require     => Service['mariadb']
}->
exec { 'Icinga Director DB migration':
  path    => '/usr/local/bin:/usr/bin:/bin',
  command => 'icingacli director migration run',
  onlyif  => 'icingacli director migration pending',
  require => Package['icingacli'],
}->
file { '/etc/icingaweb2/modules/director/kickstart.ini':
  ensure => file,
  owner => root,
  group => icingaweb2,
  mode => '2770',
  source => 'puppet:////vagrant/files/etc/icingaweb2/modules/director/kickstart.ini', #TODO use hiera and templates
  require => File['/etc/icingaweb2/modules/director']
}->
exec { 'Icinga Director Kickstart':
  path    => '/usr/local/bin:/usr/bin:/bin',
  command => 'icingacli director kickstart run',
  onlyif  => 'icingacli director kickstart required',
  require => [ Service['icinga2'], Exec['enable-icinga2-api'] ]
}

@dnsmichi
Copy link
Contributor Author

config.ini

[db]
resource = "Director DB"
kickstart.ini

[config]
endpoint = icinga2
host = 127.0.0.1
port = 5665
username = root
password = icinga

@dnsmichi dnsmichi added this to the 1.4.0 milestone Nov 20, 2017
dnsmichi pushed a commit that referenced this issue Nov 28, 2017
e2e1d02a Bump to version 2.3.0
67ad3297 Add support for Filebeat 6 (#141)
f38bb372 Support for hash.random (#142)
9b4a45ed Update archive version_requirement (#138)
6e8ff5b2 Increment version to 2.2.0
c3e32e65 Release tagged builds to the forge automatically
f5446a5f Don't skip installing development packages
b02468bd Don't install rake explicitly the the travis setup
35bf62b2 Install rake in travis directly
6df1a5f3 Explicitly add rake to the bundle
707a26b0 Follow the PDK format for metadata.json
4b1628f4 Follow PDK format for non-test files
81579d16 Rework all tests to match PDK format
c82dfafa Style fixes in ruby files
7e9ee6ed Cleanup lint for better linting
7c0bd56c Add support for pipeline configuration in prospectors (#134)
638dc25e Wrong regex for windows, doesn't accept . in URL (#135)
c0749a24 remove duplicate entry for disable_config_test (#133)
7a9dd2d7 Upgrade to 2.1.0
cae9db2d Fix test's lint
bb392435 Make configuration directory/file ownership configurable
4603793f Add additional tests
f24a6fc1 Processors should be passed as a hash, not array
5f89f717 Chagne beat_name configuration parameter to name (Fixes #126)
367d5339 Fix typo in changelog
85987da0 Release version 2.0.0
d41cde9c Fixes #124 - Use correct url for 32 bit windows (#125)
01e36b74 Update apt dependency (#123)
baf7c7bf Drop support for Puppet 3 and Filebeat <5 (#118)
ee343811 Release 1.0
acf48c80 Fix testing environment variables
59d50468 Add loadbalance for ES in filebeat5.yml.erb (#119)
6683ba5e Fix Logstash SSL template (#121)
970b35a5 Note breaking changes that will follow the next release
f802ff45 Update changelog and note puppet 5 support
ec768ede filebeat 5 ssl support (#117)
54a6fca6 Fix style typo in changelog
d288ea60 Increment version number to 0.12.0
a5e44f8e Update changelog to reflect recent features
3ede14a4 Update puppet dependency to 3.5+
9e5cc2ce Merge pull request #115 from MiamiOH/master
b7e008e5 Typo fix; Also use install_dir in config validate_cmd
5e3f86be Merge pull request #114 from MiamiOH/master
57336544 Some windows install clean up
30d58b2e Merge pull request #113 from MiamiOH/master
2a9ad254 Fix filebeat_spec
a9c86360 Pin apt in fixtures to continue puppet 3 support
17a33d1e Clean up temp file on Windows install
1a286627 Use package_ensure for the same thing on windows and linux
7c1b1fda Fixes #109 - Windows update support
0912b163 install locales on ubuntu-16.04 nodeset (#111)
758656ed add optional repo_priority parameter (#110)
00e0b723 Increment version to 0.11.2
0fc9c46a support kafka codec.format option (#106)
5b6d42d4 Explicitly support newer versions of the puppetlabs/powershell module
c48422cc The `add_locale` processor doesn't require parameters (#104)
5f8adb23 Don't check boolean value of certain config parameters
e818c827 processor: Checking for the drop_event processor instead of the non-existent drop_field (#101)
f4b5699e Properly allow failures for puppet 3.8.7
72cd00d5 Fix yaml syntax
aa883e96 Allow failures when testing puppet 3.x
89e30ef2 Increment version number to 0.11.1
0d1d5a40 Test with a specific version of puppet 3.8
bdd9c981 Restore puppet 3 compatibility (for now)
607c62aa Increment version to v0.11.0
56bfa125 Support for round_robin algo and group_events (#100)
d2a2b524 Update changelog with fix for #63
47a608b5 Check for nil instead of undef in max_procs
da9c06bf Update Changelog
e904898b Conditional pipeline in output.elasticsearch (#98)
ea395267 Update chaining to match latest style guide
f542ee28 Merge branch 'master' of github.com:pcfens/puppet-filebeat
e17b449c Index conditional match in output elasticsearch (#97)
403a6692 Update README and CHANGELOG with breaking change information
c064eac3 Don't verify processor files (they don't have prospectors so they always fail)
3e408402 Move the default registry file
ea30d5b9 Pin version of rubocop gem
19a1ca75 Remove trailing whitespace in spec test
228b9b17 Fix style in spec test
3b81c8a8 Style changes to metadata.json and fixes
696e37b5 Create a method for removing filebeat using puppet
38ffce20 Add proxy server support to download files (Windows) (#90)
1407b090 Reworking the processor implementation. (#85)
8499ee8c Increment version number to v0.10.4
3ae5d968 Add support for output.console
ede4c4a3 Conform to strict_variables
8afca8dd Increment version number to v0.10.3
c44c0df2 Exempt facter confine line from the breaking rubocop test
92d5f513 Revert change to confine in filebeat_version
dd1c3535 Make an attempt at supporting processors in puppet < 4.x
93ef7e1f Allow http links for downloading filebeat for windows (#82)
adc80458 Remove Ruby 1.9.3/Puppet 3.8 travis tests
e858f2da Add a check to see if processors.params is emtpy before using it.
4cb659d0 Increment version to v0.10.2
53254830 add close_older and force_close_files within prospector v5 (#77)
1aa78c0d Update rubocopy to match voxpupuli's latest modulesync
2482954b Increment version number
e9f1dd05 Assume that windows paths will have spaces in them (Fixes #75)
a07192ad support harvesting symlinks (#74)
ca733c51 Fix typo in changelog diff links
930d8a17 Merge in changes from a previous release
dea9678f Increment version number to v0.10.0
4917f249 Add JSON decoding to the changelog
7fb3d094 Add support for json decoding (filebeat >= 5.0) (#72)
3f9a7142 Increment version to 0.9.2
abf7f99a Add close and clean harvesting  (#70)
50409d58 Increment version number to 0.9.1
b5532281 Fixing yaml spacing and README tutorials for params.
77b4a4f5 Increment version to 0.9.0
1b185044 Don't install development packages when testing
7b86bd16 Lint fixes
6287d6d6 Clean up tests some more
e5ebb2e6 Improve testing and attempt to meet voxpupuli's style standards
a38244c3 Update changelog
b6b8386f Add a note about the registry_path to the readme
25054a2f Update download URL for windows to latest
b6365393 Align params.pp file
a6d371ea Update the changelog to reflect changes over last few days
194158f8 Validate config files before restarting services
61cbcce7 All filebeat templates should include the major version number in them
a12f7eda Fix a regression in filebeat_version that caused warnings before filebeat was installed
1b6b4ef2 Fix the filebeat_version fact in windows
b0674fbc Add Support for Filebeat Processors
2d3d2402 Merge pull request #68 from plarivee/add_tags_to_prospector
077be4a0 Adding support for tags in prospector
1404171e Increment version number
d513528d Update windows URL again
3e9e117a Merge pull request #65 from elconas/fix_broken_max_procs
3a952d38 Fix error when max_procs is empty

git-subtree-dir: modules/filebeat
git-subtree-split: e2e1d02a51cfeb7ae880e08b21267fca95183fc9
@dnsmichi dnsmichi modified the milestones: 1.4.0, 2.0.0 Feb 8, 2018
@dnsmichi
Copy link
Contributor Author

dnsmichi commented Feb 8, 2018

Apparently puppet-icingaweb2 already has that, and the http conn validator script is just a small generic one.

Fixed in feature/puppet-4, will be merged soon.

@dnsmichi dnsmichi closed this as completed Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant