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

[BREAKING] Sous-Chefs Adoption #767

Merged
merged 69 commits into from
Mar 25, 2023
Merged

[BREAKING] Sous-Chefs Adoption #767

merged 69 commits into from
Mar 25, 2023

Conversation

damacus
Copy link
Member

@damacus damacus commented Mar 1, 2023

See below for possible breaking changes.

  • Default download to 7.17.9 which is supported until v9 is released
  • Remove load_platform_properties and suport test files that were no longer up to date or used
  • Remove rubocop ignore files
  • Remove the test that checked if a recipe was run
  • Update Chef spec tested platforms to:
    • Ubuntu: 18.04, 20.04
    • CentOS: 7.8.2003, 8
  • Sous-Chefs standardization
    • Change test cookbook name to test
    • Add GitHub Actions pipelines
    • Add Dokken configuration
    • Add support for testing on non-EOL Operating systems
    • Update Chef ignore
    • Update .gitignore
    • Update CHANGELOG format
    • Update CONTRIBUTING format
    • Add renovate configuration
    • [BREAKING] Support Chef 15.3+
    • Remove Rakefile
    • Remove Gemfile (replaced by Chef Workstation)
    • Move rspec files from test/unit/spec to spec
    • Remove: .rubocop.yml exceptions
    • Remove Rakefile, Gemfile, and Gemfile.lock
    • Move .kitchen.yml to kitchen.yml
    • Change test cookbook name to test
    • Add Dangerfile
  • Migrate library files to custom resources
  • [BREAKING] Remove default recipe
  • [BREAKING] Remove default attributes
    • For usage please see testing cookbook
  • [BREAKING] Remove support for tarball installation
    • Tarball installation does not support running in systemd
  • Use the Elasticsearch public key to verify the package rather than downloading the key from the internet on every run
  • Use the execute resource over shellout where possible. As this correctly triggers notifications
  • Stop depending on yum and apt cookbooks as they are not required
  • Remove dertime_download_url helper method and replace with default_downoad_url from Elasticsearch::VersionHelpers
  • Remove determine_download_checksum and replace with default_download_checksum from Elasticsearch::VersionHelpers
  • Move documentation for resources to the documentation folder
  • Split the install resources into multiple resources for clarity
  • Move common properties into partials

Resovles

#765, #731, #729, #730,

.github/CODEOWNERS Outdated Show resolved Hide resolved
EnvironmentFile=-<%= @default_dir %>/<%= @program_name %>

WorkingDirectory=<%= @path_home %>

User=elasticsearch
Group=elasticsearch
User=<%= @es_user %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Elasticsearch recommended these be overridden using systemd's "drop-in" file and not to customize their systemd unit, which is why the cookbook did things that way originally.

Copy link
Member Author

Choose a reason for hiding this comment

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

Have you got an example of how we can do a drop-in file with Chef? The old way was slightly confusing.

Copy link
Contributor

Choose a reason for hiding this comment

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

It was just a file resource with some content provided via that attribute. It's really not chef specific, but I think you're right that an example would be helpful...

recipes/default.rb Outdated Show resolved Hide resolved
spec/install_spec.rb Outdated Show resolved Hide resolved
attributes/default.rb Outdated Show resolved Hide resolved
damacus added 10 commits March 23, 2023 19:42
- Update check-chef-metadata-action to version `0.0.4`
- Add support for Amazon Linux 2022
- Comment out OpenSUSE Leap 15 and double instance suite from matrix

[.github/workflows/ci.yml]
- Update check-chef-metadata-action from version `0.0.3` to `0.0.4`
- Add support for Amazon Linux 2022
- Comment out OpenSUSE Leap 15 and double instance suite from matrix
- Add debug output on failure
@damacus damacus self-assigned this Mar 23, 2023
@damacus damacus added the Release: Major Release to Chef Supermarket as a major change when merged label Mar 23, 2023
@damacus damacus enabled auto-merge (squash) March 24, 2023 10:47
@damacus damacus requested review from martinb3, lrosenman and tas50 and removed request for tas50 and lrosenman March 24, 2023 10:48
@damacus damacus merged commit ee66158 into main Mar 25, 2023
@damacus damacus deleted the setup-repository branch March 25, 2023 21:21
@kitchen-porter
Copy link
Contributor

Released as: 5.0.0

directory new_resource.path_data do
owner es_user.username
group es_user.groupname
mode '0755'
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be 750?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you've got documentation that it should be. Happy for a PR 👍🏼

Copy link

Choose a reason for hiding this comment

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

to be more exact during a chef run:

    * directory[/data] action create
      - change mode from '0755' to '0750'
    * directory[/data] action create
      - change mode from '0750' to '0755'

Copy link
Member Author

Choose a reason for hiding this comment

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

Ace, if you can make the PR, I'l merge it today 👍🏼

Copy link
Contributor

Choose a reason for hiding this comment

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

You are setting 750 in the above resource, and 755 here.

Copy link
Contributor

Choose a reason for hiding this comment

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

end
end

directory new_resource.path_data do
Copy link
Contributor

Choose a reason for hiding this comment

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

What will happen if path_data is array here? Can this param be array at all in ES context? I doubt that. I'm happy to make a PR if you agree.

Copy link
Member Author

Choose a reason for hiding this comment

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

We should probably only accept a String there then or iterate over the array. Happy with which ever approach you see fit 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release: Major Release to Chef Supermarket as a major change when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants