Deprecate rake tasks for Puppet import


#1

We currently have rake tasks for Puppet classes/environments import, which I propose to deprecate and remove. Reasons:

  • We have UI, CLI and API for this feature
  • rake task executed by any user runs as admin, so it bypasses permissions
  • no tests coverage
  • poses maintenance burden due to all of the above

Let me know what you think:

  • keep rake tasks
  • deprecate and remove rake tasks

0 voters


#2

As I said in the PR: :+1: and let’s include the deprecation in 1.22.


#3

Can we remove this without a deprecation?


#4

Seems like people are using it: https://github.com/theforeman/foreman/pull/6807


#5

We’re using r10k, and we have 10+ puppet environments. Importing all this env’s from webUI taking too many time, and we’re prefer to use rake task for import one changed environment. Also, it’s more useful - from one cli script, we can make r10k deploy and import changed to foreman.
Is there another way to import only one environment from cli/api? Is it interactive?


#6

There is hammer proxy import-classes which scans your environments for changes and updates Puppet classes. I think it should be used instead of foreman-rake puppet:import:puppet_classes.


#7

Just fore the sake of completeness:
hammer proxy import-classes also supports passing --environment and --environment-id to just reimport from a certain environment.
Also, there are the POST /api/smart_proxies/:smart_proxy_id/environments/:id/import_puppetclasses and POST /api/environments/:environment_id/smart_proxies/:id/import_puppetclasses API endpoints to achieve the same thing.

Regards