Forge Home

minio

A module to manage Minio to enjoy self-hosted S3 storage

17,101 downloads

5,717 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.

Version information

  • 1.1.4 (latest)
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Sep 23rd 2021
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 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 < 8.0.0
  • , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'kogitoapp-minio', '1.1.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add kogitoapp-minio
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install kogitoapp-minio --version 1.1.4

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
Tags: git, linux, minio

Documentation

kogitoapp/minio — version 1.1.4 Sep 23rd 2021

puppet-minio

Build Status Puppet Forge Puppet Forge - downloads Puppet Forge - scores

Description

A Puppet module for managing Minio (Amazon S3 compatible storage) settings.

This module allows you to install and configure Minio using pre-built binaries and does not need external package repositories. You can chose to install Minio with default settings, or customize all settings to your liking.

Setup

What Minio affects

  • puppet-minio depends on
  • it manages a user and group minio
  • it manages the Minio directory (/opt/minio) and the storage (/var/minio)
  • it installs a minio service listening on port 9000

Beginning with Minio

The simplest use case is to rely on defaults. This can be done by simply including the class:

include ::minio

Reference

See REFERENCE.md for the full reference.

Configuration

In addition to standard minio server environment variables, there are the following ones:

  • MINIO_OPTS - used to specify additional command-line arguments for the minio server. Example: "--quiet --anonymous" (with quotes)

  • MINIO_DEPLOYMENT_DEFINITION - used to specify custom deployment definition. Required for erasure coding and distributed mode. Not required if used with a single storage root. Examples:

    • /var/minio{1...4} - for erasure coding
    • https://server{1...4}/var/minio{1...4} https://server{4...8}/var/minio{1...4} - for distributed deployments
    • /var/minio - for standalone deployment without erasure coding. Will be the default value if storage_root is /var/minio or ['/var/minio'].

Class: minio

class { 'minio':
    package_ensure                => 'present',
    owner                         => 'minio',
    group                         => 'minio',
    base_url                      => 'https://dl.minio.io/server/minio/release',
    version                       => 'RELEASE.2021-08-20T18-32-01Z',
    checksum                      => '0bf72d6fd0a88fee35ac598a1e7a5c90c78b53b6db3988414e34535fb6cf420c',
    checksum_type                 => 'sha256',
    configuration_directory       => '/etc/minio',
    installation_directory        => '/opt/minio',
    storage_root                  => '/var/minio', # Could also be an array
    listen_ip                     => '127.0.0.1',
    listen_port                   => 9000,
    configuration                 => {
        'MINIO_ROOT_USER'             => 'admin',
        'MINIO_ROOT_PASSWORD'         => 'password',
        'MINIO_REGION_NAME'           => 'us-east-1',
        'MINIO_OPTS'                  => '"--quiet --anonymous"',
        'MINIO_DEPLOYMENT_DEFINITION' => 'https://example{1..4}.com/var/minio{1...4} https://example{5..8}.com/var/minio{1...4}'
    },
    manage_service                => true,
    service_template              => 'minio/systemd.erb',
    service_provider              => 'systemd',
    service_ensure                => 'running',
    manage_server_installation    => true,
    manage_client_installation    => true,
    client_package_ensure         => 'present',
    client_base_url               => 'https://dl.minio.io/client/mc/release',
    client_version                => 'RELEASE.2021-07-27T06-46-19Z',
    client_checksum               => '0df81285771e12e16a0c4c2f5e0ebc700e66abb8179013cc740d48b0abad49be',
    client_checksum_type          => 'sha256',
    client_installation_directory => '/opt/minioclient',
    cert_ensure                   => 'present',
    cert_directory                => '/etc/minio/certs',
    default_cert_configuration    => {
        'source_path'      => 'puppet:///modules/minio/examples',
        'source_cert_name' => 'localhost',
        'source_key_name'  => 'localhost',
    },
    additional_certs              => {
        'example' => {
            'source_path'      => 'puppet:///modules/minio/examples',
            'source_cert_name' => 'example.test',
            'source_key_name'  => 'example.test',
        }
    },
}

Class: minio::server

class { 'minio::server':
    manage_server_installation => true,
    package_ensure             => 'present',
    owner                      => 'minio',
    group                      => 'minio',
    base_url                   => 'https://dl.minio.io/server/minio/release',
    version                    => 'RELEASE.2021-08-20T18-32-01Z',
    checksum                   => '0bf72d6fd0a88fee35ac598a1e7a5c90c78b53b6db3988414e34535fb6cf420c',
    checksum_type              => 'sha256',
    configuration_directory    => '/etc/minio',
    installation_directory     => '/opt/minio',
    storage_root               => '/var/minio', # Could also be an array
    listen_ip                  => '127.0.0.1',
    listen_port                => 9000,
    configuration              => {
        'MINIO_ROOT_USER'             => 'admin',
        'MINIO_ROOT_PASSWORD'         => 'password',
        'MINIO_REGION_NAME'           => 'us-east-1',
        'MINIO_OPTS'                  => '"--quiet --anonymous"',
        'MINIO_DEPLOYMENT_DEFINITION' => 'https://example{1..4}.com/var/minio{1...4} https://example{5..8}.com/var/minio{1...4}'
    },
    manage_service             => true,
    service_template           => 'minio/systemd.erb',
    service_provider           => 'systemd',
    service_ensure             => 'running',
    cert_ensure                => 'present',
    cert_directory             => '/etc/minio/certs',
    default_cert_configuration => {
        'source_path'      => 'puppet:///modules/minio/examples',
        'source_cert_name' => 'localhost',
        'source_key_name'  => 'localhost',
    },
    additional_certs           => {
        'example' => {
            'source_path'      => 'puppet:///modules/minio/examples',
            'source_cert_name' => 'example.test',
            'source_key_name'  => 'example.test',
        }
    },
}

Class: minio::client

class { 'minio::client':
    manage_client_installation => true,
    package_ensure             => 'present',
    base_url                   => 'https://dl.minio.io/client/mc/release',
    version                    => 'RELEASE.2021-07-27T06-46-19Z',
    checksum                   => '0df81285771e12e16a0c4c2f5e0ebc700e66abb8179013cc740d48b0abad49be',
    checksum_type              => 'sha256',
    installation_directory     => '/usr/local/bin',
    binary_name                => 'minio-client',
    aliases                    => {
        'default' => {
            'ensure'              => 'present',
            'endpoint'            => 'http://localhost:9000',
            'access_key'          => 'admin',
            'secret_key'          => Sensitive('password'), # can also be a string
            'api_signature'       => 'S3v4', # optional
            'path_lookup_support' => 'on',   # optional
        }
    },
    purge_unmanaged_aliases    => true
}

Limitations

See metadata.json for supported platforms.

  • It's currently not possible to purge unmanaged client aliases in the same run when the client is being installed.

Development

Running tests

This project contains tests for rspec-puppet.

Quickstart:

pdk bundle install
pdk bundle exec rake 'litmus:provision_list[puppet6]'
pdk bundle exec rake 'litmus:install_agent[puppet6]'
pdk bundle exec rake litmus:install_module
pdk bundle exec rake litmus:acceptance:parallel
pdk bundle exec rake litmus:tear_down

When submitting pull requests, please make sure that module documentation, test cases and syntax checks pass.