cloudfile
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 'chrislorro-cloudfile', '0.2.0'
Learn more about managing modules with a PuppetfileDocumentation
cloudfile
Welcome to your new module. A short overview of the generated parts can be found in the PDK documentation at https://puppet.com/pdk/latest/pdk_generating_modules.html .
Table of Contents
- cloudfile
- [Table of Contents](#table-of-contents)
- cloudfile
Description
Download archived packages from various locations and optionally install locally
Setup
This module is dependant on the archive module and also almost does the same, it has additional functionality for AWS CLI on windows platforms, and optional will use a package resource with optional install parameters
What cloudfile affects
If using this module with AWS S3 bucket infrastructure the AWSCLI is automatically downloaded and install, for AZ filestore a token can be passed.
Setup Requirements OPTIONAL
Include puppet/archive
and any dependencies
Beginning with cloudfile
The Linux system must have python configured for the AWSCLI installer to work, and the .bash_profile will need the /usr/local/bin set in $PATH.
Usage
Examples
retrieve an application call invader from s3 storage to linux
class cloudfile {
app_name => 'invader',
package_name => 'invader.tar.gz',
package_uri => 's3://chrislorro',
extract => true,
cloud_download => standard,
aws_region => eu-west-2,
}
retrieve an application call invader from s3 storage and install the application
class cloudfile {
app_name => 'mcafee',
package_name => 'McAfee.zip',
package_uri => 'https://chrislorro.blob.core.windows.net/puppet,
extract => true,
cloud_download => 'secure',
token => 'sp=rwd&st=2022-01-27T11:46[…]sig=2ytxxRcpND1Khs4UgUL1tfMxOwHsZMMit'
package_name => McAfee.exe,
install_options => [ '/SILENT', '/INSTALL=AGENT']
}
Limitations
This is a beta version and is under development its been tested for downloading from AWS and Azure on Redhat, Centos, Windows 2016/2019.
This package install is in the early stages and will be improved during the next release
The AWSCLI requires to puppet agent runs on windows because the %PATH% is not set during the first execution
Development
If you run into an issue with this module, or if you would like to request a feature, you can fork the repo and submit a PR, raise a bug or new feature request.
Release Notes/Contributors/Etc. Optional
Coming soon
cloudfile
Reference
Table of Contents
Classes
cloudfile
: Download archived packages from various locations and optionally local install.
Defined types
cloudfile::getfile
: Download archived packages from various locations and optionally local install.
Classes
cloudfile
A module to download application files from cloud filestores or http/https hosted packages,
currently compatable with AWS and Azure cloud providers. Package installation features will
be added in future releases, including running a template to install custom applications
that cannot use the package
resource type.
Examples
retrieve an application call invader from s3 storage to linux
class { 'cloudfile':
application => 'invader',
package_name => 'invader.tar.gz',
package_uri => 's3://chrislorro',
extract => true,
cloud_download => aws_s3,
aws_region => eu-west-2,
}
retrieve an application call invader from s3 storage and install the application
class { 'cloudfile':
application => 'mcafee',
package_name => 'McAfee.zip',
package_uri => 'https://chrislorro.blob.core.windows.net/puppet,
extract => true,
cloud_download => 'secure',
install_package => true,
token => 'sp=rwd&st=2022-01-27T11:46[…]sig=2ytxxRcpND1Khs4UgUL1tfMxOwHsZMMit'
installer_exe => McAfee.exe,
install_options => [ '/SILENT', '/INSTALL=AGENT']
}
Parameters
The following parameters are available in the cloudfile
class:
application
install_package
package_name
package_uri
extract
cloud_download
installer_exe
install_options
token
aws_region
installer
application
Data type: String
The application name that is being installed, use the exact application string for windows so that the package resource runs idempotent
Default value: undef
install_package
Data type: Boolean
Boolean true or false to install the extracted package
Default value: false
package_name
Data type: String
The package name that will be downloaded from cloud storage
Default value: undef
package_uri
Data type: String
The URL of the cloud storage where the package is stored
Default value: undef
extract
Data type: Boolean
set this parameter to extract the package from an archive file, it defaults to true because we expect a compressed file
Default value: true
cloud_download
Data type: Enum[ 'standard', 'aws_s3', 'secure' ]
The cloud platform that is used to host the application package Accepts 3 different parametes: - standard: standard download using http://URI https://URI - aws_s3: Dowload using s3://URI and optional $install_options *- secure: Download using a secure token, must be used exclusive with token parameter
Default value: undef
installer_exe
Data type: Optional[String]
Optional parameter to install the package (this option will be enhanced in the next release)
Default value: undef
install_options
Data type: Optional[Array]
Optional parameter to pass installation options to the package installer
Default value: undef
token
Data type: Optional[String]
Optional parameter for passing a token to the package URL tested on AZ for now, token is expected if IAM is configured on the platform
Default value: undef
aws_region
Data type: Optional[String]
Optional parameter for the AWS region, if this is not set for, windows agents the package uses a default deployed with the sdk
Default value: undef
installer
Optional paramter for executing install scripts on Linux only
Defined types
cloudfile::getfile
A module to download application files from cloud filestores or http/https hosted packages,
currently compatable with AWS and Azure cloud providers. Package installation features will
be added in future releases, including running a template to install custom applications
that cannot use the package
resource type.
Examples
usage AWS windows installation:
cloudfile::getfile { 'putty-64bit-0.76-installer.msi.zip':
application => 'PuTTY release 0.76 (64-bit)',
cloud_download => 'aws_s3',
extract => true,
package_uri => 's3://chrislorro',
aws_region => 'eu-west2',
install_package => true,
$installer_exe => 'putty-64bit-0.76-installer.msi',
}
retrieve an application call McAfee from AZ storage and install the application
cloudfile::getfile { 'McAfee.zip':
application => 'mcafee',
package_uri => 'https://chrislorro.blob.core.windows.net/puppet,
extract => true,
cloud_download => 'secure',
install_package => true,
token => 'sp=rwd&st=2022-01-27T11:46[…]sig=2ytxxRcpND1Khs4UgUL1tfMxOwHsZMMit'
installer_exe => McAfee.exe,
install_options => [ '/SILENT', '/INSTALL=AGENT']
}
Parameters
The following parameters are available in the cloudfile::getfile
defined type:
application
package_name
package_uri
extract
cloud_download
install_package
installer_exe
install_options
token
aws_region
installer
application
Data type: String
The application name that is being installed, use the exact application string for windows so that the package resource runs idempotent
Default value: undef
package_name
The package name that will be downloaded from cloud storage
package_uri
Data type: String
The URL of the cloud storage where the package is stored
Default value: undef
extract
Data type: Boolean
set this parameter to extract the package from an archive file, it defaults to true because we expect a compressed file
Default value: true
cloud_download
Data type: Enum[ 'standard', 'aws_s3', 'secure' ]
The cloud platform that is used to host the application package Accepts 3 different parametes: - standard: standard download using http://URI https://URI - aws_s3: Dowload using s3://URI and optional $install_options *- secure: Download using a secure token, must be used exclusive with token parameter
Default value: undef
install_package
Data type: Boolean
Boolean true or false to install the extracted package
Default value: false
installer_exe
Data type: Optional[String]
Optional parameter to install the package (this option will be enhanced in the next release)
Default value: undef
install_options
Data type: Optional[Array]
Optional parameter to pass installation options to the package installer
Default value: undef
token
Data type: Optional[String]
Optional parameter for passing a token to the package URL tested on AZ for now, token is expected if IAM is configured on the platform
Default value: undef
aws_region
Data type: Optional[String]
Optional parameter for the AWS region, if this is not set for, windows agents the package uses a default deployed with the sdk
Default value: undef
installer
Optional paramter for executing install scripts on Linux only
Dependencies
- puppet/windows_env (>= 5.5.8 < 7.0.0)
- puppet/archive (>= 6.1.0 < 7.0.0)