Puppet Class: artifactory

Defined in:
manifests/init.pp

Summary

Installs and configures Artifactory

Overview

Parameters:

  • manage_repo (Boolean) (defaults to: true)

    Whether to manage the artifactory yum repository

  • edition (Enum['oss','pro']) (defaults to: 'oss')

    Controls which version of Artifactory is installed

  • package_name (String[1]) (defaults to: "jfrog-artifactory-${edition}")

    The Artifactory package name

  • package_version (String[1]) (defaults to: 'installed')

    The RPM version of the Artifactory package, (or ‘latest`, `installed` etc.)

  • db_type (Enum[ 'derby', 'mariadb', 'mssql', 'mysql', 'oracle', 'postgresql' ]) (defaults to: 'postgresql')

    The database type. Artifactory works with other databases, but strongly recommends only using ‘postgresql`

  • db_host (Stdlib::Host) (defaults to: 'localhost')

    The host of database server housing Artifactory’s database

  • db_name (String[1]) (defaults to: 'artifactory')

    The name of the database (or SERVICE for ‘oracle` databases)

  • db_user (String[1]) (defaults to: 'artifactory')

    The username used to connect to the database

  • db_port (Stdlib::Port) (defaults to: 5432)

    The TCP port the database listens on

  • db_password (Variant[ Sensitive[String[1]], String[1] ]) (defaults to: extlib::cache_data('artifactory', 'db_password', extlib::random_password(16)))

    The password of the ‘db_user`. By default a random password will be generated, and cached on your puppet server. Only use when you have a single Puppetserver

  • db_url (Optional[String[1]]) (defaults to: undef)

    Instead of allowing this Puppet module to set the JDBC database URL based on, ‘db_type`, `db_host`, `db_port` and `db_name`, manaully override the URL by setting this parameter

  • additional_system_config (Hash) (defaults to: {})

    A hash of any additional configuration. This will be merged into the default configuration, and database configuration when building the ‘system.yaml` file.

  • manage_db (Boolean) (defaults to: true)

    Whether to install and configure Artifactory’s database. Only supported for ‘db_type` postgresql

  • uid (Optional[Integer]) (defaults to: undef)

    If set, the UID to use when managing the ‘artifactory` user. If not set, the module will not manage the user

  • gid (Optional[Integer]) (defaults to: $uid)

    The GID to use for the ‘artifactory` group when managing the `artifactory` user. Will default to the same as the `uid`

  • master_key (Optional[ Variant[ Sensitive[Pattern[/\A(\h{32}|\h{64})\z/]], Pattern[/\A(\h{32}|\h{64})\z/] ] ]) (defaults to: undef)

    If set, this will be used at the value for the ‘master.key`. This should not be changed after Artifactory has been deployed.

  • binary_store_config_xml (Optional[String[1]]) (defaults to: undef)

    The contents to be used for a custom binary-store.xml file. When not set, the default file-system configuration will be used.

  • jvm_max_heap_size (String[1]) (defaults to: '2G')

    The Java Maximum Heap Size. Used in the ‘-Xmx` java option.

  • jvm_min_heap_size (String[1]) (defaults to: $jvm_max_heap_size)

    The Java Minimum Heap Size. Used in the ‘-Xms’ java option. Defaults to the ‘jvm_max_heap_size`.

  • jvm_extra_args (Array[String[1]]) (defaults to: [])

    Any extra java options. For example, setting the stack size with ‘-Xss1m`

  • system_properties (Hash) (defaults to: {})

    A hash of Artifactory ‘system properties’. These will be added to the ‘artifactory.system.properties` file. Set a value to `undef` if you want to remove it from the file.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'manifests/init.pp', line 45

class artifactory (
  Boolean           $manage_repo     = true,
  Enum['oss','pro'] $edition         = 'oss',
  String[1]         $package_name    = "jfrog-artifactory-${edition}",
  String[1]         $package_version = 'installed',

  Enum[
    'derby',
    'mariadb',
    'mssql',
    'mysql',
    'oracle',
    'postgresql'
  ]                   $db_type = 'postgresql',
  Boolean             $manage_db = true,
  Stdlib::Host        $db_host = 'localhost',
  String[1]           $db_name = 'artifactory',
  String[1]           $db_user = 'artifactory',
  Stdlib::Port        $db_port = 5432,
  Variant[
    Sensitive[String[1]],
    String[1]
  ]                   $db_password = extlib::cache_data('artifactory', 'db_password', extlib::random_password(16)),
  Optional[String[1]] $db_url = undef,

  Hash              $additional_system_config = {},
  Optional[Integer] $uid = undef,
  Optional[Integer] $gid = $uid,

  Optional[
    Variant[
      Sensitive[Pattern[/\A(\h{32}|\h{64})\z/]],
      Pattern[/\A(\h{32}|\h{64})\z/]
    ]
  ] $master_key = undef,

  Optional[String[1]] $binary_store_config_xml = undef,

  String[1]        $jvm_max_heap_size  = '2G',
  String[1]        $jvm_min_heap_size  = $jvm_max_heap_size,
  Array[String[1]] $jvm_extra_args     = [],

  Hash $system_properties = {},
) {
  if $manage_repo {
    contain artifactory::repo
    Class['artifactory::repo'] -> Class['artifactory::install']
  }

  if $manage_db {
    unless $db_type == 'postgresql' { fail('Only postgresql is supported when `manage_db` is `true`') }
    contain artifactory::db
    Class['artifactory::db'] -> Class['artifactory::service']
  }

  if $uid and $gid {
    contain artifactory::user
    Class['artifactory::user'] -> Class['artifactory::install']
  }

  contain artifactory::install
  contain artifactory::config
  contain artifactory::service

  Class['artifactory::install']
  -> Class['artifactory::config']
  ~> Class['artifactory::service']
}