Defined Type: nexus::resource::repository::docker::hosted

Defined in:
manifests/resource/repository/docker/hosted.pp

Summary

Resource to manage docker hosted repository

Overview

Examples:

nexus::repository::docker::hosted { 'docker-hosted':
}

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: 'present')

    Define if the resource should be created/present or deleted/absent.

  • online (Boolean) (defaults to: true)

    Allow incoming requests to this repository.

  • storage_blob_store_name (String[1]) (defaults to: $title)

    The name of the blobstore inside of nexus repository manager to be used. We suggest to use a own blobstore for each defined repository.

  • storage_strict_content_type_validation (Boolean) (defaults to: true)

    Validate that all content uploaded to this repository is of a MIME type appropriate for the repository format.

  • storage_write_policy (Enum['ALLOW','ALLOW_ONCE','DENY']) (defaults to: 'ALLOW_ONCE')

    Controls if deployments of and updates to artifacts are allowed.

  • component_proprietary_components (Boolean) (defaults to: true)

    Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall).

  • docker_v1_enabled (Boolean) (defaults to: false)

    Allow clients to use the V1 API to interact with this repository.

  • docker_force_basic_auth (Boolean) (defaults to: true)

    Allow anonymous docker pull ( Docker Bearer Token Realm required ).

  • docker_http_port (Optional[Stdlib::Port]) (defaults to: undef)

    Create an HTTP connector at specified port. Normally used if the server is behind a secure proxy.

  • docker_https_port (Optional[Stdlib::Port]) (defaults to: undef)

    Create an HTTPS connector at specified port. Normally used if the server is configured for https.

  • docker_subdomain (Optional[Stdlib::Fqdn]) (defaults to: undef)

    Use the following subdomain to make push and pull requests for this repository.

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

    Apply a list of cleanup policies to the repository. If a cleanup policy doesn’t exist, nothing happens.



33
34
35
36
37
38
39
40
41
42
43
44
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
# File 'manifests/resource/repository/docker/hosted.pp', line 33

define nexus::resource::repository::docker::hosted (
  Enum['present', 'absent'] $ensure = 'present',
  Boolean $online = true,
  String[1] $storage_blob_store_name = $title,
  Boolean $storage_strict_content_type_validation = true,
  Enum['ALLOW','ALLOW_ONCE','DENY'] $storage_write_policy = 'ALLOW_ONCE',
  Boolean $component_proprietary_components = true,
  Boolean $docker_v1_enabled = false,
  Boolean $docker_force_basic_auth = true,
  Optional[Stdlib::Port] $docker_http_port = undef,
  Optional[Stdlib::Port] $docker_https_port = undef,
  Optional[Stdlib::Fqdn] $docker_subdomain = undef,
  Array[String[1]] $cleanup_policy_names = [],
) {
  nexus_repository { $title:
    ensure     => $ensure,
    format     => 'docker',
    type       => 'hosted',
    attributes => {
      'online'    => $online,
      'storage'   => {
        'blobStoreName'               => $storage_blob_store_name,
        'strictContentTypeValidation' => $storage_strict_content_type_validation,
        'writePolicy'                 => $storage_write_policy,
      },
      'cleanup'   => {
        'policyNames' => $cleanup_policy_names,
      },
      'component' => {
        'proprietaryComponents' => $component_proprietary_components,
      },
      'docker'    => {
        'v1Enabled'      => $docker_v1_enabled,
        'forceBasicAuth' => $docker_force_basic_auth,
        'httpPort'       => $docker_http_port,
        'httpsPort'      => $docker_https_port,
        'subdomain'      => $docker_subdomain,
      },
    },
  }
}