Skip to content

feat: modernize cookbook and update to Splunk 9.4.0#277

Open
damacus wants to merge 9 commits intomainfrom
feat/modernize-and-update-splunk-9.4.0
Open

feat: modernize cookbook and update to Splunk 9.4.0#277
damacus wants to merge 9 commits intomainfrom
feat/modernize-and-update-splunk-9.4.0

Conversation

@damacus
Copy link
Member

@damacus damacus commented Mar 25, 2026

This PR modernizes the chef-splunk cookbook according to modern Sous Chefs standards and updates the default Splunk version to 9.4.0.

Changes:

  • Splunk Update: Bumped default version to 9.4.0 (verified stable build).
  • Architecture Support: Added dynamic support for x86_64 and ARM64 architectures.
  • Init System: Standardized on systemd; removed all legacy init.d script logic.
  • Platform Refresh: Updated support for modern OSs (Ubuntu 24.04, Amazon 2023, Debian 12, etc.) and removed EOL platforms.
  • Code Modernization:
    • Enabled unified_mode true for all resources.
    • Added frozen_string_literal: true to all Ruby files.
    • Added resource documentation in documentation/.
    • Added LIMITATIONS.md for vendor platform support details.
  • Testing:
    • Migrated InSpec tests to the full profile structure.
    • Renamed the client suite to default.
    • Updated CI matrix to align with modernized platforms.

Verified convergence using Test Kitchen with Dokken on Ubuntu 24.04 (ARM64).

Update default Splunk version to 9.4.0.
Add dynamic multi-architecture support (x86_64/ARM64).
Standardize on systemd and remove legacy init logic.
Modernize platform support in metadata.rb, kitchen.yml, and CI.
Enable unified_mode for custom resources.
Add frozen_string_literal to all Ruby files.
Add resource documentation and LIMITATIONS.md.
Migrate InSpec tests to full profile structure.
Rename client suite to default.
@damacus damacus requested a review from a team as a code owner March 25, 2026 10:57
damacus added 8 commits March 25, 2026 11:01
- Delete recipes/ and attributes/ directories

- Add splunk_auth, splunk_client, splunk_server, splunk_service, splunk_ssl, splunk_clustering, splunk_shclustering, splunk_user resources

- Rewrite test cookbook recipes to use new resources

- Update kitchen.yml and CI matrix for new suites

- Add ChefSpec step_into tests for all resources

- Add documentation for all resources

- Fix stale test references to removed splunk_dir helper

- Fix upgrade test version assertions (8.0.6 -> 9.4.0)

- Fix server-resources and client-resources integration tests
- Platform: drop Debian 11, centos→centos_stream>=9.0, add version
  constraints to suse/rocky/almalinux, widen redhat to >=8.0; sync
  changes across metadata.rb, kitchen.yml, kitchen.dokken.yml, ci.yml

- Resources: fix splunk_installer and splunk_app to be self-contained
  (add runas_user/install_dir properties, remove node attribute deps
  from ChefSplunk::Helpers which caused NoMethodError in unified_mode)

- Tests: add missing ChefSpec specs for splunk_app, splunk_index,
  splunk_installer, splunk_monitor (was 8/12, now 12/12 coverage)

- Integration: add default kitchen suite (client/UF workflow) with
  test recipe and InSpec profile; remove supports field from two
  inspec.yml files; make download URLs architecture-aware (arm64/amd64)

- Documentation: rename 4 doc files to consistent splunk_<resource>.md
  pattern; update splunk_app and splunk_installer docs with new properties
…call

- RPM packages for 9.4.0 use .x86_64.rpm/.aarch64.rpm suffix format
  (not the older -linux-2.6-x86_64.rpm format), fixing 404 errors in CI
- Fix splunk_monitor resource call: use path as name property instead of
  non-existent input_path property
- Remove almalinux-8 (EOL-equivalent), rockylinux-8, rockylinux-9
- Use almalinux-9 as the standard RHEL-family platform
- Rename ubuntu platforms to ubuntu-2204/ubuntu-2404 to match Test
  Kitchen's dot-stripping normalization (was causing "No instances"
  errors for all ubuntu CI jobs)
@github-actions
Copy link

Slowest examples

Top 10 slowest examples (1.61 seconds, 23.25% of total time)
Example Description Time in seconds
spec/unit/resources/splunk_ssl_spec.rb:36 splunk_ssl action :create with custom cert paths is expected to create file "/opt/splunk/etc/auth/custom.crt" 0.28965
spec/unit/resources/splunk_service_spec.rb:20 splunk_service action :start for a server is expected to create directory "/opt/splunk/var" 0.26845
spec/unit/resources/splunk_client_spec.rb:34 splunk_client action :install with custom properties is expected to create template "/opt/splunkforwarder/etc/system/local/outputs.conf" 0.22075
spec/unit/resources/splunk_app_spec.rb:15 splunk_app action :install with cookbook_file is expected to install splunk_app "myapp" 0.14379
spec/unit/resources/splunk_app_spec.rb:25 splunk_app action :install with remote_file is expected to install splunk_app "myapp" 0.12696
spec/unit/resources/splunk_service_spec.rb:24 splunk_service action :start for a server is expected to create link "/etc/systemd/system/splunk.service" 0.11363
spec/unit/resources/splunk_shclustering_spec.rb:41 splunk_shclustering action :create in member mode is expected to run execute "initialize search head cluster member" 0.11218
spec/unit/resources/splunk_server_spec.rb:17 splunk_server action :install with defaults is expected to run splunk_installer "splunk" 0.11214
spec/unit/resources/splunk_user_spec.rb:29 splunk_user action :create with custom properties is expected to create group "custom_splunk" 0.11206
spec/unit/resources/splunk_user_spec.rb:41 splunk_user action :remove is expected to remove group "splunk" 0.11102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant