{"id":22700238,"url":"https://github.com/simp/simp-adapter","last_synced_at":"2025-08-07T08:32:00.422Z","repository":{"id":23688232,"uuid":"93779230","full_name":"simp/simp-adapter","owner":"simp","description":"SIMP Installation support for different Puppet distributions","archived":false,"fork":false,"pushed_at":"2023-04-20T18:29:30.000Z","size":213,"stargazers_count":0,"open_issues_count":1,"forks_count":7,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-04-19T10:51:56.428Z","etag":null,"topics":["simp"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-08T18:21:20.000Z","updated_at":"2024-07-17T17:58:06.206Z","dependencies_parsed_at":"2024-07-17T18:09:58.900Z","dependency_job_id":null,"html_url":"https://github.com/simp/simp-adapter","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simp%2Fsimp-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simp%2Fsimp-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simp%2Fsimp-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simp%2Fsimp-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simp","download_url":"https://codeload.github.com/simp/simp-adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229013251,"owners_count":18006191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["simp"],"created_at":"2024-12-10T06:10:37.819Z","updated_at":"2024-12-10T06:10:38.497Z","avatar_url":"https://github.com/simp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n[![Build Status](https://travis-ci.org/simp/simp-adapter.svg)](https://travis-ci.org/simp/simp-adapter)\n\n# simp-adapter\n\n#### Table of Contents\n\n1. [Description](#description)\n2. [Important Changes](#important-changes)\n3. [simp_rpm_helper](#simp_rpm_helper)\n\n   * [Overview](#overview)\n   * [Operation](#operation)\n   * [Configuration](#configuration)\n   * [Other details](#other-details)\n\n4. [Installation support for different Puppet distributions](#installation-support-for-different-puppet-distributions)\n\n\n## Description\n\nThe `simp-adapter` package provides two capabilities:\n\n* The `simp_rpm_helper` script which creates/updates local Git repositories\n  with the Puppet module content of SIMP-provided, Puppet module RPMs.\n  These local Git repositories can be used by R10K or Code Manager to populate\n  Puppet module environments.\n\n* Miscellaneous installation support  for different Puppet distributions (FOSS,\n  PE), i.e., workarounds for Puppetlabs RPM deficiencies.\n\n## Important changes\n\nPrevious version of the `simp-adapter` (versions \u003c 1.0.0) could be configured\nto use the `simp_rpm_helper` to auto-update a Puppet module in the `simp`\nenvironment, `/etc/puppetlabs/code/environments/simp`.  This behavior proved\nto only be useful to a subset of SIMP users, i.e., those who were not using\nmultiple Puppet environments.  The SIMP users that routinely used multiple\nPuppet environments, for example, to support pre-production testing workflows,\nhad to devise their on mechanism to handle SIMP Puppet module upgrades.\n\nBeginning with `simp-adapter` 1.0.0, the auto-update behavior has been replaced\nwith creation/maintenance of a local Git repository for each Puppet module that\nSIMP packages as an RPM. This change allows SIMP users to manage one or more\nPuppet environments easily using R10K (with or without the use of of a control\nrepository) or Code Manager.  The use of R10K/Code Manager, in turn, provides\nPuppet module installation that aligns with current, industry-wide, best practices.\n\n## simp_rpm_helper\n\n### Overview\n\n`simp_rpm_helper` ensures that the Puppet module content of each\nSIMP-provided, Puppet module RPM is imported from its RPM installation\nlocation, `/usr/share/simp/modules/\u003cmodule name\u003e`, into a local,\nSIMP-managed, Git repository.  This local Git repository can, in turn,\nbe referenced in Puppetfiles that R10K or Code Manager can use to\npopulate Puppet module environments.\n\n### Operation\n\n`simp_rpm_helper` is automatically called by different RPM scriptlets\n(sections) of a SIMP-provided, Puppet module RPM.\n\n* When called during the `%posttrans` scriptlet of the an RPM install,\n  upgrade, or downgrade, it does the following:\n\n  - Creates `/usr/share/simp/git/`, if it does not exist\n  - Creates `/usr/share/simp/git/puppet_modules/`, if it does not exist\n  - Creates a central (bare) Git repository for the module, if it\n    does not exist\n\n    - The repository is named using the top-level 'name' field from\n      the module's `metadata.json` file:\n\n      `/usr/share/simp/git/puppet_modules/\u003cowner\u003e-\u003cname\u003e.git`\n\n  - Updates the master branch of the repository to be the contents\n    of the RPM, excluding any empty directories\n  - Adds a Git tag to the repository that matches the version number\n    in the module's `metadata.json` file, as necessary\n\n    - Overwrites the tag if it already exists but doesn't match the\n      contents of the RPM\n\n* When called during any other RPM scriptlet, it does nothing to the\n  module's repository.  However, it does log important information\n  in two cases:\n\n  - If called during the `%post` section in an install or upgrade,\n    (i.e., is called from an old, buggy, SIMP-provided Puppet module\n    RPM), it logs a message telling the user how to fix the problem\n    by calling `simp_rpm_helper` with the correct arguments.\n  - If called during a `%preun` when the RPM status is 0, i.e., a RPM\n    uninstall (erase), it logs a message telling the user that the\n    module's local, RPM-based git repo has been preserved. (We can't\n    remove the repository, as we don't know if it is in use.)\n\n### Configuration\n\nPlease see the delivered `/etc/simp/adapter_conf.yaml` file for the\nlatest list of configuration operations.\n\n**NOTE:**  If you have modified `/etc/simp/adapter_conf.yaml` for your\nsite's needs, the latest configuration file will be installed by\n`rpm` at `/etc/simp/adapter_conf.yaml.rpmnew`, instead.  Your custom\nmodifications will not be overwritten upon `simp-adapter` RPM upgrade.\n\n### Other Details\n\nBelow are a few other details about `simp_rpm_helper` that are worth noting:\n\n* `simp_rpm_helper` no longer supports installation of files from the\n  `simp-environment` RPM.  The mechanism to install `simp-environment` files\n  into a Puppet environment or into `/var/simp/environments/\u003cenvironment\u003e`,\n  (sometimes referred to as SIMP's secondary environment), has been migrated\n  to a new command provided by SIMP's command line interface\n  (`rubygem-simp-cli` package). Execute `simp help` for more information.\n* `simp_rpm_helper` will not create a Git repository for `pupmod-simp-site`\n  package, as this package is no longer used beginning with SIMP 6.4.0.\n* The `master` branch of a local Puppet module Git repository will contain\n  a local transaction history for the RPM of that module, ***not*** a\n  copy of the Git history in the public repository for that project.\n  Regardless, you should always use a tagged version from a local module\n  repository.\n* If for any reason you need to debug `simp_rpm_helper` operation, this script\n  executes git operations in temporary directories, that, by default, are\n  located in `/var/lib/simp-adapter`.  These temporary directories are normally\n  purged after successful `simp_rpm_helper` operation.  Upon git-related\n  failures, however, they are preserved to aid debug.\n\n## Installation support for different Puppet distributions\n\nFILL-ME-IN  This section will be fleshed out (or removed) pending\nthe result of [SIMP-6348](https://simp-project.atlassian.net/browse/SIMP-6348)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimp%2Fsimp-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimp%2Fsimp-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimp%2Fsimp-adapter/lists"}