Forge Home

yas3fs

A module to install and manage yas3fs mounts

31,068 downloads

983 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

  • 0.4.0 (latest)
  • 0.3.3
  • 0.3.2
  • 0.3.1 (deleted)
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0
released Jul 22nd 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
  • Puppet >= 6.21.0 < 8.0.0
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'pcfens-yas3fs', '0.4.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add pcfens-yas3fs
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install pcfens-yas3fs --version 0.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
Tags: aws, s3, s3fs

Documentation

pcfens/yas3fs — version 0.4.0 Jul 22nd 2021

#puppet-yas3fs

Build Status

####Table of Contents

  1. Overview
  2. Module Description
  3. Setup - The basics of getting started with yas3fs
  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.

##Overview

The yas3fs module installs yas3fs, and provides a way to manage S3 mounts.

##Module Description

yas3fs is a python tool used to mount S3 buckets using fuse. yas3fs provides caching, as well as a mechanism for invalidating caches on other nodes using SQS and SNS.

##Setup

###What yas3fs affects

  • fuse package and configuration
  • init jobs (sysvinit, upstart or systemd) that are used to manage yas3fs mounts
  • python-pip package (optional)

###Beginning with yas3fs

To install fuse, python-pip, and yas3fs

class { 'yas3fs': }

To install fuse, python-pip, and yas3fs from github source

class { 'yas3fs':
  provider: 'vcs',
}

If you'd rather provide pip though some other means, set install_pip_package to false:

class { 'yas3fs':
  install_pip_package => false,
}

##Usage

###Classes and Defined Types

####Class: yas3fs

The primary module. By default, fuse, python-pip, and yas3fs are installed and configured.

Parameters within yas3fs

#####install_pip_package

When set to true, the python-pip package is installed. If the parameter is false then the pip command should be provided by some other means or yas3fs will not be installed.

#####init_system

Defines the type of init script/configuration to install out of upstart, systemd or sysvinit. If the parameter is unset, autodiscovery takes place.

#####provider

Sets if yas3fs should installed from default pip package provider or if github source is pulled and pip package is built. Set to 'vcs' to build from github source. To switch to vcs from yas3fs previously installied pip package manually intervention is required. Please manually uninstall previosly installied pip package before switching to vcs type install. Default: 'pip'

#####vcs_remote

Optionally set yas3fs source code to be other than original Default: 'https://github.com/danilop/yas3fs.git'

#####vcs_revision

Optionally set to use code from a specific commit or branch Default: 'master'

#####mounts

A hash of mounts can be passed (possibly from hiera) as part of the class declaration.

class { 'yas3fs':
  mounts => {
    'example-mount' => {
      's3_url'     => 's3://example-bucket/',
      'local_path' => '/media/s3',
    }
  }
}

####Defined Type: yas3fs::mount

Mounts a bucket/path using fuse by creating an init job.

yas3fs::mount { 'example-mount':
  s3_url     => 's3://example-bucket/',
  local_path => '/media/s3',
  options    => [
    'recheck-s3',
    'uid 1000',
    'gid 1000',
  ]
}

Parameters within yas3fs::mount

#####ensure

Control what to do with this mount. Valid values are mounted (default), unmounted, absent, and present.

WARNING: setting ensure to absent removes the service configuration, but cannot verify that the service is stopped.

#####s3_url

The S3 URL that should be mounted (e.g. s3://my-bucket/my-path)

#####local_path

The location where the S3 bucket should be mounted.

#####aws_access_key_id and aws_secret_access_key

The credentials to use when connecting to AWS. Credentials can be omitted on EC2 instances with appropriate IAM roles assigned.

#####options

An array of command line arguments that should be passed to yas3fs. The leading dashes can be omitted. A full list of options is in the yas3fs documentation.

##Reference

###Classes

####Public Classes

  • yas3fs: Guides the install of yas3fs

####Private Classes

  • yas3fs::config: Manages the fuse configuration
  • yas3fs::package: Installs pip, fuse, and yas3fs
  • yas3fs::params: Manages base parameters

###Defined Types

####Public Defined Types

  • yas3fs::mount: Manages a single yas3fs mount

##Limitations

yas3fs is written for python 2.6, though there has been a lot of success running it on 2.7.