Version information
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
Add this module to your Puppetfile:
mod 'pcfens-yas3fs', '0.4.0'
Learn more about managing modules with a PuppetfileDocumentation
#puppet-yas3fs
####Table of Contents
- Overview
- Module Description
- Setup - The basics of getting started with yas3fs
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- 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 configurationyas3fs::package
: Installs pip, fuse, and yas3fsyas3fs::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.
Dependencies
- puppetlabs/stdlib (>=4.6.0 <5.0.0)
- jethrocarr/initfact (>=1.0.0 <2.0.0)