chef/cookbooks/ark/metadata.json
2015-07-21 19:45:23 +02:00

38 lines
12 KiB
JSON

{
"name": "ark",
"version": "0.9.0",
"description": "Installs/Configures ark",
"long_description": "# <a name=\"title\"></a> chef-ark [![Build Status](https://secure.travis-ci.org/opscode-cookbooks/ark.png?branch=master)](https://travis-ci.org/opscode-cookbooks/ark)\n\nOverview\n========\n\nThis cookbook provides `ark`, a resource for managing software\narchives. It manages the fetch-unpack-configure-build-install process\ncommon to installing software from source, or from binary\ndistributions that are not fully fledged OS packages.\n\nThis is a modified verion of Infochimp's awesome\n[install_from cookbook](http://github.com/infochimps-cookbooks/install_from).\nIt has been heavily refactored and extended to meet different use\ncases.\n\nGiven a simple project archive available at a url:\n\n ark 'pig' do\n url 'http://apache.org/pig/pig-0.8.0.tar.gz'\n end\n\nThe provider will:\n\n* fetch it to to `/var/cache/chef/`\n* unpack it to the default path (`/usr/local/pig-0.8.0`)\n* create a symlink for `:home_dir` (`/usr/local/pig`) pointing to path\n* add specified binary commands to the enviroment `PATH` variable\n\nBy default, the ark will not run again if the `:path` is not empty.\nArk provides many actions to accommodate different use cases, such as\n`:dump`, `:cherry_pick`, `:put`, and `:install_with_make`.\n\nAt this time ark only handles files available from URLs. It does not\nhandle local files.\n\nRequirements\n============\n\nThis cookbook requires Chef 11 for the provider, as it uses the\n`use_inline_resources` method.\n\nMore about\n[use_inline_resources](http://docs.opscode.com/lwrp_common_inline_compile.html)\nin the Chef documentation.\n\nShould work on common Unix/Linux systems with typical userland\nutilities like tar, gzip, etc. May require the installation of build\ntools for compiling from source, but that installation is outside the\nscope of this cookbook.\n\nAttributes\n==========\n\nCustomize the attributes to suit site specific conventions and\ndefaults.\n\n* `node['ark']['apache_mirror']` - if the URL is an apache mirror,\n use the attribute as the default.\n* `node['ark']['prefix_root']` - default base location if the\n `prefix_root` is not passed into the resource.\n* `node['ark']['prefix_bin']` - default binary location if the\n `prefix_bin` is not passed into the resource.\n* `node['ark']['prefix_home']` - default home location if the\n `prefix_home` is not passed into the resource.\n* `node['ark']['win_install_dir']` - directory where the files will\n be put on windows\n* `node['ark']['package_dependencies']` - prerequisite system\n packages that need to be installed to support ark.\n\nResources/Providers\n===================\n\n* `ark` - does the extract/build/configure dance\n\nActions\n-------\n\n- `:install`: extracts the file and creates a 'friendly' symbolic link\n to the extracted directory path\n- `:configure`: configure ahead of the install action\n- `:install_with_make`: extracts the archive to a path, runs `make`,\n and `make install`. It does _not_ run the configure step at this\n time\n- `:dump`: strips all directories from the archive and dumps the\n contained files into a specified path\n- `:cherry_pick`: extract a specified file from an archive and places\n in specified path\n- `:put`: extract the archive to a specified path, does not create any\n symbolic links\n- `:remove`: removes the extracted directory and related symlink #TODO\n- `:setup_py_build`: runs the command \"python setup.py build\" in the\n extracted directory\n- `:setup_py_install`: runs the comand \"python setup.py install\" in\n the extracted directory\n\n## :cherry_pick\n\nExtract a specified file from an archive and places in specified path.\n\n### Relevant Attribute Parameters for :cherry_pick\n\n- `path`: directory to place file in.\n- `creates`: specific file to cherry-pick.\n\n## :dump\n\nStrips all directories from the archive and dumps the contained files\ninto a specified path.\n\nNOTE: This currently only works for zip archives\n\n### Attribute Parameters for :dump\n\n- `path`: path to dump files to.\n- `mode`: file mode for `app_home`, as an integer.\n - Example: `0775`\n- `creates`: if you are appending files to a given directory, ark\n needs a condition to test whether the file has already been\n extracted. You can specify with creates, a file whose existence\n indicates the ark has previously been extracted and does not need to\n be extracted again.\n\n## :put\n\nExtract the archive to a specified path, does not create any symbolic\nlinks.\n\n### Attribute Parameters for :put\n\n- `path`: path to extract to.\n - Default: `/usr/local`\n- `has_binaries`: array of binary commands to symlink into\n `/usr/local/bin/`, you must specify the relative path.\n - Example: `[ 'bin/java', 'bin/javaws' ]`\n- `append_env_path`: boolean, if true, append the `./bin` directory of\n the extracted directory to the global `PATH` variable for all users.\n\nAttribute Parameters\n--------------------\n\n- `name`: name of the package, defaults to the resource name.\n- `url`: url for tarball, `.tar.gz`, `.bin` (oracle-specific), `.war`,\n and `.zip` currently supported. Also supports special syntax\n `:name:version:apache_mirror:` that will auto-magically construct\n download url from the apache mirrors site.\n- `version`: software version, defaults to `1`.\n- `checksum`: sha256 checksum, used for security .\n- `mode`: file mode for `app_home`, is an integer.\n- `prefix_root`: default `prefix_root`, for use with `:install*`\n actions.\n- `prefix_home`: default directory prefix for a friendly symlink to\n the path.\n - Example: `/usr/local/maven` -> `/usr/local/maven-2.2.1`\n- `prefix_bin`: default directory to place a symlink to a binary\n command.\n - Example: `/opt/bin/mvn` -> `/opt/maven-2.2.1/bin/mvn`, where the\n `prefix_bin` is `/opt/bin`\n- `path`: path to extract the ark to. The `:install*` actions\n overwrite any user-provided values for `:path`.\n - Default: `/usr/local/<name>-<version>` for the `:install`,\n `:install_with_make` actions\n- `home_dir`: symbolic link to the path `:prefix_root/:name-:version`,\n does not apply to `:dump`, `:put`, or `:cherry_pick` actions.\n - Default: `:prefix_root/:name`\n- `has_binaries`: array of binary commands to symlink into\n `/usr/local/bin/`, you must specify the relative path.\n - Example: `[ 'bin/java', 'bin/javaws' ]`\n- `append_env_path`: boolean, similar to `has_binaries` but less\n granular. If true, append the `./bin` directory of the extracted\n directory to. the `PATH` environment variable for all users, by\n placing a file in `/etc/profile.d/`. The commands are symbolically\n linked into `/usr/bin/*`. This option provides more granularity than\n the boolean option.\n - Example: `mvn`, `java`, `javac`, etc.\n- `environment`: hash of environment variables to pass to invoked\n shell commands like `tar`, `unzip`, `configure`, and `make`.\n- `strip_components`: number of components in path to strip when extracting archive.\n With default value of `1`, ark strips the leading directory from an archive, \n which is the default for both `unzip` and `tar` commands.\n- `autoconf_opts`: an array of command line options for use with the\n GNU `autoconf` script.\n - Example: `[ '--include=/opt/local/include', '--force' ]`\n- `make_opts`: an array of command line options for use with `make`.\n - Example: `[ '--warn-undefined-variables', '--load-average=2' ]`\n- `owner`: owner of extracted directory.\n - Default: `root`\n\n### Examples\n\nThis example copies `ivy.tar.gz` to\n`/var/cache/chef/ivy-2.2.0.tar.gz`, unpacks its contents to\n`/usr/local/ivy-2.2.0/` -- stripping the leading directory, and\nsymlinks `/usr/local/ivy` to `/usr/local/ivy-2.2.0`\n\n # install Apache Ivy dependency resolution tool\n ark \"ivy\" do\n url 'http://someurl.example.com/ivy.tar.gz'\n version '2.2.0'\n checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'\n action :install\n end\n\nThis example copies `jdk-7u2-linux-x64.tar.gz` to\n`/var/cache/chef/jdk-7.2.tar.gz`, unpacks its contents to\n`/usr/local/jvm/jdk-7.2/` -- stripping the leading directory, symlinks\n`/usr/local/jvm/default` to `/usr/local/jvm/jdk-7.2`, and adds\n`/usr/local/jvm/jdk-7.2/bin/` to the global `PATH` for all users. The\nuser 'foobar' is the owner of the `/usr/local/jvm/jdk-7.2` directory:\n\n ark 'jdk' do\n url 'http://download.example.com/jdk-7u2-linux-x64.tar.gz'\n version '7.2'\n path \"/usr/local/jvm/\"\n home_dir \"/usr/local/jvm/default\"\n checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'\n append_env_path true\n owner 'foobar'\n end\n\nInstall Apache Ivy dependency resolution tool in <path>/resource_name in this case\n`/usr/local/ivy`, do not symlink, and strip any leading directory if one\nexists in the tarball:\n\n ark \"ivy\" do\n url 'http://someurl.example.com/ivy.tar.gz'\n checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'\n action :put\n end\n\nInstall Apache Ivy dependency resolution tool in /home/foobar/ivy, strip any\nleading directory if one exists:\n\n ark \"ivy\" do\n path \"/home/foobar\n url 'http://someurl.example.com/ivy.tar.gz'\n checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'\n action :put\n end\n\n Strip all directories and dump files into path specified by the path attribute.\n You must specify the `creates` attribute in order to keep the extraction from\n running every time. The directory path will be created if it doesn't already exist:\n\n ark \"my_jars\" do\n url \"http://example.com/bunch_of_jars.zip\"\n path \"/usr/local/tomcat/lib\"\n creates \"mysql.jar\"\n owner \"tomcat\"\n action :dump\n end\n\nExtract specific files from a tarball (currently only handles one named file):\n\n ark 'mysql-connector-java' do\n url 'http://oracle.com/mysql-connector.zip'\n creates 'mysql-connector-java-5.0.8-bin.jar'\n path '/usr/local/tomcat/lib'\n action :cherry_pick\n end\n\nBuild and install haproxy and use alternave values for `prefix_root`, `prefix_home`, and `prefix_bin`:\n\n ark \"haproxy\" do\n url \"http://haproxy.1wt.eu/download/1.5/src/snapshot/haproxy-ss-20120403.tar.gz\"\n version \"1.5\"\n checksum 'ba0424bf7d23b3a607ee24bbb855bb0ea347d7ffde0bec0cb12a89623cbaf911'\n make_opts [ 'TARGET=linux26' ]\n prefix_root '/opt'\n prefix_home '/opt'\n prefix_bin '/opt/bin'\n action :install_with_make\n end\n\nYou can also pass multiple actions to ark and supply the file extension in case\nthe file extension can not be determined by the URL:\n\n ark \"test_autogen\" do\n url 'https://github.com/zeromq/libzmq/tarball/master'\n extension \"tar.gz\"\n action [ :configure, :install_with_make ]\n end\n\nLicense and Author\n==================\n\n- Author: Philip (flip) Kromer - Infochimps, Inc(<coders@infochimps.com>)\n- Author: Bryan W. Berry (<bryan.berry@gmail.com>)\n- Author: Denis Barishev (<denis.barishev@gmail.com>)\n- Author: Sean OMeara (<someara@opscode.com>)\n- Copyright: 2011, Philip (flip) Kromer - Infochimps, Inc\n- Copyright: 2012, Bryan W. Berry\n- Copyright: 2012, Denis Barishev\n- Copyright: 2013, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
"maintainer": "Bryan W. Berry",
"maintainer_email": "bryan.berry@gmail.com",
"license": "Apache 2.0",
"platforms": {
"debian": ">= 0.0.0",
"ubuntu": ">= 0.0.0",
"centos": ">= 0.0.0",
"redhat": ">= 0.0.0",
"fedora": ">= 0.0.0",
"windows": ">= 0.0.0"
},
"dependencies": {
"windows": ">= 0.0.0",
"7-zip": ">= 0.0.0"
},
"recommendations": {
},
"suggestions": {
},
"conflicting": {
},
"providing": {
},
"replacing": {
},
"attributes": {
},
"groupings": {
},
"recipes": {
"ark::default": "Installs and configures ark"
}
}