cookbook 'libartifact', '= 1.2.0'
The libartifact cookbook has been deprecated
Author provided reason for deprecation:
The libartifact cookbook has been deprecated and is no longer being maintained by its authors. Use of the libartifact cookbook is no longer recommended.
You may find that the poise-archive cookbook is a suitable alternative.
libartifact (9) Versions 1.2.0 Follow1
Library cookbook for managing release artifacts.
cookbook 'libartifact', '= 1.2.0', :supermarket
knife supermarket install libartifact
knife supermarket download libartifact
libartifact-cookbook
Library cookbook which provides a resource for managing release
artifacts.
This cookbook takes an opinionated approach to managing release
artifacts on the system. It utilizes the libarchive cookbook to
extract remote files to a release directory. After this is done it
creates (or updates) a current symlink so that scripts can always
reference the most recent version of the packaged software.
An example of the layout on the file system would go as follows:
sh
/srv/twbs % ll
total 12K
4.0K drwxr-xr-x. 2 jbellone jbellone 4.0K May 20 14:38 3.3.1/
4.0K drwxr-xr-x. 2 root root 4.0K May 20 14:38 3.3.2/
4.0K drwxr-xr-x. 2 jbellone jbellone 4.0K May 20 14:38 3.3.4/
0 lrwxrwxrwx. 1 root root 15 May 20 14:38 current -> /srv/twbs/3.3.4/
Requirements
Usage
Here is a simple recipe for installing the Redis database. This
will extract the files from the remote location to /srv/redis/3.0.1
and create a symbolic link from /srv/redis/current to
/srv/redis/3.0.1.
include_recipe 'build-essential::default' source_version = '3.0.1' download_url = "http://download.redis.io/releases/%{name}-%{version}.tar.gz" group 'redis' do system true end user 'redis' do system true gid 'redis' end libartifact_file 'redis-3.0.1' do artifact_name 'redis' artifact_version '3.0.1' owner 'redis' group 'redis' remote_url download_url notifies :restart, 'service[redis-server]', :delayed end service 'redis-server' do supports :restart, :reload action [:create, :start] end
It is important to note that the both the user and group must
exist. The resource does not make an attempt to create these. If you
want to restart a service you can do so using Chef notifications.
libartifact_file Resource/Provider
Actions
- create - Downloads and extracts a released artifact.
- delete - Deletes a release artifact and unlinks the current symlink.
Parameter Attributes
- artifact_name - Name of the release artifact.
- artifact_version - Version of the release artifact.
- install_path - Absolute path to the base location for extracting the release artifact.
- remote_url - String (or Array) of locations to download the release artifact.
- remote_checksum - SHA256 checksum of the release artifact.
- owner - Owner of the release artifact (and extracted files).
- group - Group of the release artifact (and extracted files).
- extract_options - Extraction options to pass to the libarchive cookbook.
Foodcritic Metric
1.2.0 failed this metric
FC031: Cookbook without metadata file: /tmp/cook/a952ee34317af203a0e1c647/libartifact/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/a952ee34317af203a0e1c647/libartifact/metadata.rb:1
1.2.0 failed this metric
FC045: Consider setting cookbook name in metadata: /tmp/cook/a952ee34317af203a0e1c647/libartifact/metadata.rb:1