From ea17d5781843c4c3b7eee524c39b920aec2e6f82 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Wed, 26 Nov 2025 19:02:51 +0100 Subject: [PATCH 1/3] add step to push to gitea --- .vscode/settings.json | 2 ++ Jenkinsfile | 16 ++++++++++++++++ metadata.json | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 metadata.json diff --git a/.vscode/settings.json b/.vscode/settings.json index a1ec93a..a507875 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,7 @@ "devel", "fastapi", "getenv", + "Gitea", "hashlib", "hmac", "httpx", @@ -15,6 +16,7 @@ "levelname", "logappender", "NOFILE", + "operatingsystemrelease", "Puppetfile", "pydantic", "pylint", diff --git a/Jenkinsfile b/Jenkinsfile index 6adc8b5..fba4053 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -101,5 +101,21 @@ pipeline { } } } + + stage('Mirror to Gitea') { + steps { + sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) { + script { + // Checkout from GitLab (already done implicitly) + sh """ + git remote add gitea https://gitea.confdroid.com/confdroid/puppet_cd.git + git -c user.email=jenkins@confdroid.com -c user.name=Jenkins push --mirror gitea + """ + } + } + } + when { branch 'main' } // Only on main branch to avoid noise + } + } } } \ No newline at end of file diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..4d5cdea --- /dev/null +++ b/metadata.json @@ -0,0 +1,34 @@ +{ + "name": "puppet_cd", + "version": "1.0.1", + "author": "arne@confdroid.com", + "summary": "Puppet module for managing puppet itself", + "license": "GPL-3.0-or-later", + "source": "", + "dependencies": [ + + ], + "operatingsystem_support": [ + { + "operatingsystem": "RedHat", + "operatingsystemrelease": [ + "9" + ] + }, + { + "operatingsystem": "Rocky", + "operatingsystemrelease": [ + "9" + ] + } + ], + "requirements": [ + { + "name": "puppet", + "version_requirement": ">= 7.24 < 9.0.0" + } + ], + "pdk-version": "3.4.0", + "template-url": "pdk-default#3.4.0", + "template-ref": "tags/3.4.0-0-gd3cc13f" + } \ No newline at end of file From 4a317743f97f6ee7d69875b142354683bf3375cf Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Wed, 26 Nov 2025 19:06:39 +0100 Subject: [PATCH 2/3] add step to push to gitea --- Jenkinsfile | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fba4053..01d4cf1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -102,20 +102,19 @@ pipeline { } } - stage('Mirror to Gitea') { - steps { - sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) { - script { - // Checkout from GitLab (already done implicitly) - sh """ - git remote add gitea https://gitea.confdroid.com/confdroid/puppet_cd.git - git -c user.email=jenkins@confdroid.com -c user.name=Jenkins push --mirror gitea - """ - } + stage('Mirror to Gitea') { + steps { + sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) { + script { + // Checkout from GitLab (already done implicitly) + sh """ + git remote add gitea https://gitea.confdroid.com/confdroid/puppet_cd.git + git -c user.email=jenkins@confdroid.com -c user.name=Jenkins push --mirror gitea + """ } } - when { branch 'main' } // Only on main branch to avoid noise - } + } + when { branch 'main' } // Only on main branch to avoid noise } } -} \ No newline at end of file +} From 28aa04be3fc2bc19b1b840acc138af6e8765f123 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Wed, 26 Nov 2025 19:07:52 +0100 Subject: [PATCH 3/3] Recommit for updates in build 108 --- doc/file.README.html | 60 +++++++++++++++++++++++++++++--------------- doc/index.html | 60 +++++++++++++++++++++++++++++--------------- 2 files changed, 80 insertions(+), 40 deletions(-) diff --git a/doc/file.README.html b/doc/file.README.html index 3398d3c..079b7bf 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -66,9 +66,11 @@

Synopsis

-

This Puppet module configures settings for Puppet master , agents and R10k, the full bundle. Puppetdb has been outsourced to a module on its own, due to complexity

+

This Puppet module configures settings a full Puppet environment, i.e. Puppet master, Puppet agents pointed to the master.

-

The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with External Node Classifiers (ENC), for instance Foreman.

+

Optionally: * R10k to connect to a control repo and manage puppet modules * webhook listener to trigger r10k when a puppet module has been updated. * PuppetDB for exporting and storing resources.

+ +

The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with Foreman as External Node Classifier (ENC), although it does not install Foreman.

WARNING

@@ -83,23 +85,6 @@

Any other system becomes a puppet agent.

-

R10k service (optional)

-
  • -

    install r10k service on your puppetmaster. If you set $pt_use_r10kto true, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.

    -
- -

R10k Web hook

-
  • -

    installs a webhook listener If you set $pt_use_r10k_webhookto true, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.

    -
- -

Puppetdb

-
  • -

    to do

    -
  • -

    install node.rb from the foreman for puppetdb

    -
-

Firewall

  • open firewall ports depending on choices above

    @@ -112,6 +97,25 @@

    start services as required

+

Optional

+ +

R10k service

+
  • +

    install r10k service on your puppetmaster. If you set $pt_use_r10kto true, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.

    +
+ +

R10k Web hook

+
  • +

    installs a webhook listener If you set $pt_use_r10k_webhookto true, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.

    +
+ +

Puppetdb

+
  • +

    to do

    +
  • +

    install node.rb from the foreman for puppetdb

    +
+

Support

  • Rocky 9

    @@ -125,7 +129,21 @@

    Module Deployment

    -

    ALmost every puppet setup is done in very custom ways, and hence the way the modules are deployed to nodes are different. This module assumes Foreman as ENC, so the modules just have to be present on the master node and Foreman will take care for it.

    +

    native Puppet deployment: via site.pp or nodes.pp

    + +
    include cd_puppet
    +
    + +

    through Foreman

    +
    • +

      ensure the module is present on the puppetmaster running Foreman in the module path, i.e. /etc/puppetlabs/code/environments/production/ . use r10k or clone the module there through git

      +
    • +

      import the module in Foreman

      +
    • +

      assign puppet_cd::params to the nodes in question, typically a host group.

      +
    • +

      overwrite the value for $pt_pm_fqdnto match your puppetmaster’s fqdn. This will overwrite the puppet.conf with the settings set in params.pp. It is highly recommended to use a test system first to see and fine tune those settings! Any node not matching this fqdn will become an agent.

      +

    Tests

    • @@ -147,6 +165,8 @@

      contact Us

      +

      Documentation

      +

      Disclaimer

      ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments. The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.

      diff --git a/doc/index.html b/doc/index.html index 243777b..31e6f5e 100644 --- a/doc/index.html +++ b/doc/index.html @@ -66,9 +66,11 @@

      Synopsis

      -

      This Puppet module configures settings for Puppet master , agents and R10k, the full bundle. Puppetdb has been outsourced to a module on its own, due to complexity

      +

      This Puppet module configures settings a full Puppet environment, i.e. Puppet master, Puppet agents pointed to the master.

      -

      The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with External Node Classifiers (ENC), for instance Foreman.

      +

      Optionally: * R10k to connect to a control repo and manage puppet modules * webhook listener to trigger r10k when a puppet module has been updated. * PuppetDB for exporting and storing resources.

      + +

      The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with Foreman as External Node Classifier (ENC), although it does not install Foreman.

      WARNING

      @@ -83,23 +85,6 @@

      Any other system becomes a puppet agent.

    -

    R10k service (optional)

    -
    • -

      install r10k service on your puppetmaster. If you set $pt_use_r10kto true, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.

      -
    - -

    R10k Web hook

    -
    • -

      installs a webhook listener If you set $pt_use_r10k_webhookto true, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.

      -
    - -

    Puppetdb

    -
    • -

      to do

      -
    • -

      install node.rb from the foreman for puppetdb

      -
    -

    Firewall

    • open firewall ports depending on choices above

      @@ -112,6 +97,25 @@

      start services as required

    +

    Optional

    + +

    R10k service

    +
    • +

      install r10k service on your puppetmaster. If you set $pt_use_r10kto true, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.

      +
    + +

    R10k Web hook

    +
    • +

      installs a webhook listener If you set $pt_use_r10k_webhookto true, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.

      +
    + +

    Puppetdb

    +
    • +

      to do

      +
    • +

      install node.rb from the foreman for puppetdb

      +
    +

    Support

    • Rocky 9

      @@ -125,7 +129,21 @@

      Module Deployment

      -

      ALmost every puppet setup is done in very custom ways, and hence the way the modules are deployed to nodes are different. This module assumes Foreman as ENC, so the modules just have to be present on the master node and Foreman will take care for it.

      +

      native Puppet deployment: via site.pp or nodes.pp

      + +
      include cd_puppet
      +
      + +

      through Foreman

      +
      • +

        ensure the module is present on the puppetmaster running Foreman in the module path, i.e. /etc/puppetlabs/code/environments/production/ . use r10k or clone the module there through git

        +
      • +

        import the module in Foreman

        +
      • +

        assign puppet_cd::params to the nodes in question, typically a host group.

        +
      • +

        overwrite the value for $pt_pm_fqdnto match your puppetmaster’s fqdn. This will overwrite the puppet.conf with the settings set in params.pp. It is highly recommended to use a test system first to see and fine tune those settings! Any node not matching this fqdn will become an agent.

        +

      Tests

      • @@ -147,6 +165,8 @@

        contact Us

        +

        Documentation

        +

        Disclaimer

        ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments. The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.