Puppet Class: profile::docker::registry::swift

Defined in:
modules/profile/manifests/docker/registry/swift.pp

Overview

Parameters:

  • config (Any) (defaults to: hiera('profile::docker::registry::config', {}))
  • swift_accounts (Any) (defaults to: hiera('profile::swift::accounts'))
  • swift_auth_url (Any) (defaults to: hiera('profile::docker::registry::swift_auth_url'))
  • swift_account_keys (Any) (defaults to: hiera('profile::swift::accounts_keys'))
  • swift_container (Any) (defaults to: hiera('profile::docker::registry::swift_container', 'docker_registry'))
  • swift_password (Any) (defaults to: hiera('profile::docker::registry::swift_password', undef))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'modules/profile/manifests/docker/registry/swift.pp', line 1

class profile::docker::registry::swift (
    $config = hiera('profile::docker::registry::config', {}),
    $swift_accounts = hiera('profile::swift::accounts'),
    $swift_auth_url = hiera('profile::docker::registry::swift_auth_url'),
    # By default, the password will be extracted from swift, but can be overridden
    $swift_account_keys = hiera('profile::swift::accounts_keys'),
    $swift_container = hiera('profile::docker::registry::swift_container', 'docker_registry'),
    $swift_password = hiera('profile::docker::registry::swift_password', undef),
) {
    $swift_account = $swift_accounts['docker_registry']
    if !$swift_password {
        $password = $swift_account_keys['docker_registry']
    }
    else {
        $password = $swift_password
    }
    class { '::docker::registry':
        config          => $config,
        storage_backend => 'swift',
        swift_user      => $swift_account['user'],
        swift_password  => $password,
        swift_url       => 'http://swift.svc.codfw.wmnet/auth/v1.0',
        swift_container => $swift_container,
    }

}