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 Repo-package install option #30

Conversation

zipkid
Copy link

@zipkid zipkid commented Jun 2, 2022

No description provided.

@TuningYourCode
Copy link
Collaborator

I guess you are packaging nexus yourself or is there a public repository to retrieve the packages? If there are official / public packages we could think about dropping the source install method.

@zipkid
Copy link
Author

zipkid commented Aug 1, 2022

We repackage them to deb packages.
No need to drop the source install option (yet).

@zipkid
Copy link
Author

zipkid commented Sep 8, 2022

Hi,

Is there anything i need to add to get this accepted?

Regards,

Stefan.

@TuningYourCode
Copy link
Collaborator

Hi,

sorry for the late response. I exchanged with my colleagues about this topic. We don't think it is a good idea to merge something that special to your case into a public module - at least how it is implemented right now.

We would be open for a contribution which disables the download / managing of the software itself like the keycloak module is doing: https://github.com/treydock/puppet-module-keycloak/blob/master/manifests/install.pp#L26-L45

That would enable you to handle the package installation in your own code (e.g. your profile/role code) and still use the remaining parts of this module (e.g. config file, rest api resources etc.).

Sorry once again for the late response but we think the suggested implementation would be the better way for a public module implementation like this is :)

Best regards,

Stephan

@zipkid
Copy link
Author

zipkid commented Sep 8, 2022

Hello,

No problem about the delay.
I understand your thinking but i would like to add that there is nothing specific to our setup in the PR.
This is just allowing admins to use the standard puppet package resources.

Adding this in our profile is indeed an option but that way others, who need this, will also have to code their solution, which leads to more duplication and thus more potential errors.

I suppose that many teams package things to have a better control over what gets installed and updated.

I would appreciate it if you would reconsider, this, or an alternate implementation of this.

Kind regards,

Stefan.

@zipkid
Copy link
Author

zipkid commented Sep 9, 2022

The only real code addition this PR has is this.

  case $nexus::package_type {
    'src': {
      ...
    }
    'pkg': {
      $install_dir = "${nexus::install_root}/nexus"
      package { $nexus::package_name:
        ensure => $nexus::package_ensure,
      }
    }
    default: {
      fail("Unknown value for nexus::package_type: ${nexus::package_type}")
    }

I don't know what there is to object to...

@TuningYourCode
Copy link
Collaborator

TuningYourCode commented Sep 12, 2022

well, my current object is that the default of nexus::version is null and is an allowed value but the nexus::package_type: src will most likely fail fantastically if we pass null as $version - did you test what happens in that case?
I guess it would make sense to add some assert in the src case that we get an error that nexus::version has to be set for that case.

Also it would be very nice if you would share (like a gist or some BUILD.md) how you build your package - that others can easily benefit with this extension of the module too.

@zipkid
Copy link
Author

zipkid commented Sep 14, 2022

I will try to make the suggested modifications.

We build the packages with fpm via a shell script, not very fancy.
I will look into making a gist.

@zipkid zipkid force-pushed the feature/nexus-pkg-install branch from 3071de1 to 58eae38 Compare December 6, 2023 10:13
@zipkid
Copy link
Author

zipkid commented Dec 6, 2023

I lost track of this PR....
I just added the requested check for an unset version with the src package type.
Also added a spec test for the pkg package type.

@zipkid zipkid force-pushed the feature/nexus-pkg-install branch from f07a671 to fa5308e Compare December 6, 2023 10:16
@zipkid zipkid force-pushed the feature/nexus-pkg-install branch 3 times, most recently from 40caf7e to 678d92a Compare December 6, 2023 11:03
@zipkid zipkid force-pushed the feature/nexus-pkg-install branch from 678d92a to 39dd9e5 Compare December 6, 2023 11:04
@TuningYourCode TuningYourCode merged commit 8f6dc81 into puppets-epic-show-theatre:master Dec 7, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants