Skip to content

Conversation

@ryayon
Copy link

@ryayon ryayon commented Dec 8, 2015

No description provided.

README.md Outdated
Copy link

Choose a reason for hiding this comment

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

I would like to use a different word than conflict. In Puppet lingo that's normally associated with resource conflicts, and that's not the case. It doesn't really conflict in that sense, it just causes all virtual resources to be realised at that point because of the unfortunate side-effect that collectors <||> cause realisation.

Copy link
Author

Choose a reason for hiding this comment

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

I understand.

What about:
Be aware that this example will realize all your virtual package resources. Adapt it to your environment.
?

Copy link

Choose a reason for hiding this comment

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

👍. Though this now poses the interesting question if people will understand what we mean with "realise". I think it's good enough for now though, we can clarify it further if it comes up often.

@daenney
Copy link

daenney commented Dec 8, 2015

@jbondpdx Any thoughts on the wording now?

@ryayon I'm going to have to ask you to squash this down to a single commit.

@ryayon
Copy link
Author

ryayon commented Dec 8, 2015

@daenney Not sure I did well for the git squash.
Let me know.

@daenney
Copy link

daenney commented Dec 9, 2015

@ryayon I'm seeing 4 commits now. We should be down to 1 from 2 but it multiplied so I think that went wrong 😄.

@ryayon ryayon closed this Dec 9, 2015
@ryayon ryayon reopened this Dec 9, 2015
@ryayon ryayon closed this Dec 9, 2015
@ryayon ryayon reopened this Dec 9, 2015
@ryayon
Copy link
Author

ryayon commented Dec 9, 2015

@daenney I completely messed up.
I did a hard reset, then you should get only one commit, although not the best way.

@daenney
Copy link

daenney commented Dec 9, 2015

That's alright, as long as we get the intended end result. Thank you!

README.md Outdated
Copy link

Choose a reason for hiding this comment

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

Do we want to restrict this to apt packages only? Otherwise other providers such as gems would be affected.

Class['apt::update'] -> Package <| provider == 'apt' |>

Copy link
Author

Choose a reason for hiding this comment

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

I agree with you, but the way you realize the resource means that you have to specifically provide the parameter provider?

Copy link

Choose a reason for hiding this comment

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

I'm not sure I follow. Using the spaceship collector without specifying the provide will collect all package resources in the catalogue, which you probably don't need to do, as it will collect gems, npm packages etc.

Copy link
Author

Choose a reason for hiding this comment

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

I mean,

  1. if you are on a Debian-like OS, by default, Puppet will use apt to manage packages.
  2. if you specify provider=apt, it will also use apt to manage packages.

Once you use:

Package <| provider == 'apt' |> 

, will it realize all resources or only the 2nd case resources?

Copy link

Choose a reason for hiding this comment

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

Ok, I understand what you're saying now 👍

99% sure it's 2, as I've done this with yum_repo resources before, but I can check

Copy link
Author

Choose a reason for hiding this comment

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

I will try to check also.

Copy link

Choose a reason for hiding this comment

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

Yeah, it's 2, so that's the correct change 👍

@jbondpdx
Copy link

jbondpdx commented Dec 9, 2015

I'm 👍 on the language.

@daenney
Copy link

daenney commented Dec 9, 2015

Alright. Then I'll wait on the change that @petems has suggested and merge it.

@ryayon
Copy link
Author

ryayon commented Dec 9, 2015

Done

@daenney
Copy link

daenney commented Dec 9, 2015

I feel that this has gone wrong:

Limitations

This module is tested and officially supported on Debian 6 and 7 and Ubuntu 10.04, 12.04, and 14.04. Testing on other platforms has been light and cannot be guaranteed.

This module is not designed to be split across stages. If you want to ensure that apt update is run before all packages, add a proper dependency like this:

Class['apt::update'] -> Package<||>
Be aware that this example will realize all your virtual package resources.

Adapt it to your environment.

Adding new sources or PPAs

If you are adding a new source or PPA and trying to install packages from the new source or PPA on the same Puppet run, your package resource should depend on Class['apt::update'], in addition to depending on the Apt::Source or the Apt::Ppa. You can also add collectors to ensure that all packages happen after apt::update, but this can lead to dependency cycles and has implications for virtual resources.

Class['apt::update'] -> Package <| provider == 'apt' |>

Now we have two examples with different collectors.

@ryayon
Copy link
Author

ryayon commented Dec 10, 2015

Indeed, I didn't see that.
Maybe, we can just add:

This module is not designed to be split across stages.

and update the current Class['apt::update'] -> Package<| |> to Class['apt::update'] -> Package <| provider == 'apt' |>

@daenney
Copy link

daenney commented Dec 10, 2015

Sounds good to me.

@ryayon
Copy link
Author

ryayon commented Dec 10, 2015

Pushed again.
Let me know.

daenney added a commit that referenced this pull request Dec 10, 2015
MODULES-2861: run stages limitation added to the documentation.
@daenney daenney merged commit 79ab8af into puppetlabs:master Dec 10, 2015
@daenney
Copy link

daenney commented Dec 10, 2015

Off it goes. Thank you for the work!

@ryayon
Copy link
Author

ryayon commented Dec 11, 2015

Sounds good.
Thank you for your help.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants