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

Convert Cookbook to Resource-Based #350

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

Conversation

ArtofBugs
Copy link

Description

Removes recipes and attributes; adds custom resources and helpers. Drops direct support for installation from community repos and from source. See UPGRADING.md for more details on changes.

Issues Resolved

#252

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

@ArtofBugs ArtofBugs requested a review from a team as a code owner October 2, 2023 17:57
@ramereth ramereth marked this pull request as draft October 3, 2023 16:56
@ramereth ramereth added the Release: Major Release to Chef Supermarket as a major change when merged label Oct 3, 2023
@ramereth ramereth linked an issue Oct 3, 2023 that may be closed by this pull request
6 tasks
@ArtofBugs ArtofBugs force-pushed the ArtofBugs/php-resources branch 2 times, most recently from c454e6f to fe2f66b Compare October 3, 2023 17:25
libraries/helpers.rb Outdated Show resolved Hide resolved
libraries/helpers.rb Outdated Show resolved Hide resolved
@@ -7,3 +7,6 @@

depends 'php'
depends 'apt'
depends 'ondrej_ppa_ubuntu'
depends 'yum-epel'
depends 'yum-remi-chef', '>= 5.0.1'
Copy link
Member

Choose a reason for hiding this comment

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

What's the thinking behind moving these down into the test cookbook?

The original thinking is that if they're needed for it to install, then they're cookbook deps, not test deps.

Copy link
Contributor

Choose a reason for hiding this comment

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

@damacus I'm working with @ArtofBugs on this. The thinking is that the cookbook follow similar principles we have with other cookbooks:

  1. Focus on making it work with the stock OS repos
  2. Remove management of third-party from the cookbook, but make sure the new resource are flexible enough to deal with those third-party packages (thus why we moved them here).

Basically, the third-party repos are causing a lot of issues and really outside the scope of this cookbook.

Copy link
Author

Choose a reason for hiding this comment

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

My thinking was that since these dependencies are only used by the community test recipe (the php_install resource itself doesn't specify where the packages are being installed from), they should be in the test metadata and not the general cookbook metadata. Would it make more sense to move them back?

Copy link
Author

@ArtofBugs ArtofBugs Oct 3, 2023

Choose a reason for hiding this comment

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

Oops, sorry for the redundant comment... my GitHub seems to be out of sync a lot today...

Copy link
Member

Choose a reason for hiding this comment

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

Yes, please. Our general thinking is that the cookbook should work off the shelf.

Copy link
Member

Choose a reason for hiding this comment

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

@ramereth if that's our new direction then I'm happy to move that way 👍🏼

Best document it over on sous-chefs.org or something similar. That way we can move a lot of our deps to the test cookbook all over the place.

Copy link
Contributor

Choose a reason for hiding this comment

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

@damacus is the documentation on that site pulled in from the cookbooks automatically?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure, I can check and setup automation for it.
mid you haven’t heard back by Monday from me ping me in slack

Copy link
Member

@damacus damacus left a comment

Choose a reason for hiding this comment

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

👏🏼 👏🏼 👏🏼 Nice

@damacus
Copy link
Member

damacus commented Nov 8, 2023

@ArtofBugs and @awhittle2 how're you both getting on with this, do you need a hand at all?

@ramereth
Copy link
Contributor

ramereth commented Nov 8, 2023

@damacus @ArtofBugs is working on this for me (they're an OSL student) and is still working out the issues while also refactoring our wrapper cookbook with this (which is uncovering other issues sometimes).

@ArtofBugs ArtofBugs force-pushed the ArtofBugs/php-resources branch 3 times, most recently from 600a651 to abc9e0a Compare April 2, 2024 23:28
@ArtofBugs ArtofBugs marked this pull request as ready for review May 21, 2024 19:34
ArtofBugs and others added 26 commits May 22, 2024 16:35
Signed-off-by: ArtofBugs <oweng@osuosl.org>
…main branch in all links

Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
…php_version to use major-minor only

Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <oweng@osuosl.org>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
…e search command ignores preferred state

Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
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.

Custom Resource Rewrite
5 participants