Forge Home

artifactory_utils

Toolbox of utils for artifactory interaction

2,137 downloads

2,137 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.4.0 (latest)
released Oct 29th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'fervid-artifactory_utils', '1.4.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add fervid-artifactory_utils
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install fervid-artifactory_utils --version 1.4.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

fervid/artifactory_utils — version 1.4.0 Oct 29th 2019

Build Status Puppet Forge Puppet Forge

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with artifactory_utils
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

Providers and functions that allow Puppet to take advantage of full range of Artifactory capabilities.

Module Description

Autostructure's artifactory_util module introduces providers which are used to manage resources contained in Artifactory.

This module extends configuration management to Artifactory. Packages, or other files, can be deployed through a simple http server. However Artifactory allows searches, maintains properties and stores checksums externally. These benefits can be leveraged by Puppet to enforce state and allow dynamic changes through the Artifactory UI.

If you need to deploy packages from Artifactory, or you want teams to manage the state of files from Artifactory you should use these utilities.

Setup

What artifactory_utils affects

  • Files, directories and file systems in general.
  • If synchronizing a repository use a unique destination. Anything under the synchronization tree WILL BE MODIFIED OR DELETED to conform to what is in Artifactory.

Setup Requirements OPTIONAL

You will need a service account setup for Puppet in Artifactory. If you add credentials into hiera be sure to use hiera-eyaml to secure your api-key.

Beginning with artifactory_utils

The very basic steps needed for a user to get the module up and running.

If your most recent release breaks compatibility or requires particular steps for upgrading, you may wish to include an additional section here: Upgrading (For an example, see http://forge.puppetlabs.com/puppetlabs/firewall).

Usage

Example of synchronizing a repository

Synchronize a repository:

  repository_sync {'my-local-repo':
    ensure           => present,
    destination      => $destination,
    artifactory_host => $artifactory_host,
    user             => $user,
    password         => $password,
  }

Delete a repository:

  repository_sync {'my-local-repo':
    ensure           => absent,
    destination      => $destination,
  }

Owners, groups and modes can be assigned through their respective properties in Artifactory:

alt text

Example of synchronizing a file

Synchronize a file:

  artifact_sync {'/opt/tomcat/webapps/my_app.war':
    ensure     => present,
    source_url => 'http://artifactory.mydomain.com/artifactory/libs-release-local/com/mydomain/myapp/[RELEASE]/myapp-[RELEASE].war'
  }

Delete an artifact:

  artifact_sync {'/opt/tomcat/webapps/my_app.war':
    ensure => absent,
  }

Reference

Here, list the classes, types, providers, facts, etc contained in your module. This section should include all of the under-the-hood workings of your module so people know what the module is touching on their system but don't need to mess with things. (We are working on automating this section!)

Limitations

This currently only work on *-nix nodes.

Development

No rules for contributing yet, but any assistance on setting up spec is greatly appreciated.