cookbook 'karaf', '~> 3.1.0', :supermarket
karaf (13) Versions 3.1.0 Follow0
Installs/Configures karaf
cookbook 'karaf', '~> 3.1.0'
knife supermarket install karaf
knife supermarket download karaf
karaf
This cookbook installs Apache Karaf.
Usage
Use the provided resources to install karaf and configure users and features.
Requirements
- java cookbook
- ark cookbook
Platform
- Tested on CentOS 6.6, CentOS 7.2 and Ubuntu 14.04 (via Kitchen)
Resources
karaf
karaf 'install karaf' do
install_java true
version '4.0.7'
user 'someuser'
action :install
end
Actions
-
:install
- Installs Karaf and the karaf-service wrapper feature, and starts the service. -
:remove
- Removes Karaf and the karaf-service wrapper
Attributes
-
install_java
- Whether or not to install Java. (default: true) -
source_url
- Optional URL to download the Karaf file tar file from. -
version
- The version of Karaf to install. -
install_path
- Optional install path. (default: /usr/local) -
user
- The user to run karaf-service as. (default: root) -
retry_count
- The number of times to retry when performing Karaf client actions. This is important for slower platforms but generally shouldn't need to be changed. (default: 20) -
retry_delay
- The number of seconds to wait when retrying a Karaf client action. This is important for slower platforms but generally shouldn't need to be changed. (default: 3)
Note: When setting the user to run Karaf as, it is assumed the user is already configured properly. When installing features, Maven may use a local repository for the user, which may require a home directory to be set.
karaf_feature_repository
karaf_feature_repository 'hawtio' do
version '1.4.51'
:install
end
Actions
-
:install
- Installs the specified feature repository.
Attributes
-
install_path
- The path to the installation folder. Needs to match the value inkaraf
. Will be cleaned-up/deprecated once a link is added from this resource tokaraf
. (default: '/usr/local') -
repository_name
- The name of the repository to add. (name attribute) -
version
- The version of the repository to add. (default: '')
karaf_feature
karaf_feature 'hawtio' do
:install
end
Actions
-
:install
- Installs the specified feature.
Attributes
-
install_path
- The path to the installation folder. Needs to match the value inkaraf
. Will be cleaned-up/deprecated once a link is added from this resource tokaraf
. (default: '/usr/local') -
feature_name
- The name of the feature to add. (name attribute) -
version
- The version of the feature to add. (default: '') -
start
- Whether or not to start the bundle. This may be dependent on the version of Karaf, and if it supports-s
for thebundle:install
command. (default: false)
karaf_bundle
karaf_bundle 'com.fasterxml.jackson.core/jackson-core' do
version '2.4.3'
start true
:install
end
Actions
-
:install
- Installs the specified bundle.
Attributes
-
install_path
- The path to the installation folder. Needs to match the value inkaraf
. Will be cleaned-up/deprecated once a link is added from this resource tokaraf
. (default: '/usr/local') -
bundle_name
- The name of the feature to add. (name attribute) -
version
- The version of the feature to add. (default: '') -
wrap
- If this bundle needs to be wrapped. Prepends . (default: false)
karaf_user
Manages the users defined in user.properties
ruby
karaf_user 'newuser' do
groups ['group1', 'group2']
password 'ultrafubar'
:create
end
Actions
-
:create
- Creates or updates the specified karaf user.
Attributes
-
install_path
- The path to the installation folder. Needs to match the value inkaraf
. Will be cleaned-up/deprecated once a link is added from this resource tokaraf
. (default: '/usr/local') -
user_name
- The name of the user to create. (name attribute) -
password
- The password for the user. -
groups
- An array of groups to add the user to.
karaf_group
Manages the groups defined in user.properties
ruby
karaf_group 'newgroup' do
roles ['role1', 'role2']
:create
end
Actions
-
:create
- Creates or updates the specified karaf group.
Attributes
-
install_path
- The path to the installation folder. Needs to match the value inkaraf
. Will be cleaned-up/deprecated once a link is added from this resource tokaraf
. (default: '/usr/local') -
group_name
- The name of the group to create. (name attribute) -
roles
- An array of roles to add the group to.
Notes
This resource automatically adds the (apparently) required group
role to the group definition. That is:
ruby
karaf_group 'newgroup' do
roles ['role1', 'role2']
:create
end
Will generate this line in user.properties:
_g_\:newgroup = group,role1,role2,
Troubleshooting
Installing the Karaf service wrapper sometimes encounters issues. The install log log is located at /tmp/karaf-install.log
Known Issues
The service wrapper component does not reliably install, depending on the version of Karaf and Centos.
- 4.0.7 - works fine with Java 8
- 4.0.4 - works fine
- 3.0.6 (and above?) - Not working
- 3.0.5 - Supports systemd, WORKS FINE
- 3.0.4 -
- Centos 6 fails; call to
feature:install service-wrapper
appears to not be working. - Centos 7 has similar issue.
- Centos 6 fails; call to
- 3.0.3 - No systemd file in wrapper; so Centos 7 fails.
Contributing
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change
- Run the tests, ensuring they all pass
- Run foodcritic and rubocop to make sure code is clean.
- Submit a Pull Request using Github
License and Authors
Authors: Jason Capriotti
Dependent cookbooks
java >= 0.0.0 |
ark >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
karaf CHANGELOG
This file is used to list changes made in each version of the karaf cookbook.
3.1.0 - !2/12/2016
- Add option to
karaf_bundle
to start the bundle after installation.
3.0.0 - 11/29/2016
- Support for newer Karaf versions
- The automation using
bin/client
necessitated removing the user parameter. I think username karaf is used by default and is able to authenticate when its a local connection.
- The automation using
- The
client_user
parameter was removed from the following resources. It may be added back at some point. The previous bullet is the reason).karaf_bundle
karaf_feature
karaf_feature_repository
2.0.1 - 9/22/2016
- Copy
karaf.service
to/etc/systemd/system
to prevent possible issues with using symlink.
2.0.0 - 8/2/2016
- Add support for
systemd
service. - Tested many patch version increments for Karaf with varying results. Documented in README.md.
1.2.1 - 3/16/2016
- Automatically add the
group
role to new groups.
1.2.0 - 3/1/2016
- Add bundle install feature.
1.1.0 - 2/25/2016
- Add retry logic around core installation steps
1.0.2
- Stabilizing race conditions with initial start and installing service-wrapper.
1.0.0
- Major update to use custom resource vs attribute-driven recipe
- Default install version to latest, 4.0.4
- Add support for customizing users and groups in
users.properties
0.2.1 - 1/27/2016
- Fixed issue where the initial start of karaf would not start as the defined service_user, which could cause problems for subsequent starts as service_user.
0.2.0 - 1/25/2016
- Add support for specifying user with which to run service
0.1.0
- Initial release of karaf
Collaborator Number Metric
3.1.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
3.1.0 failed this metric
FC066: Ensure chef_version is set in metadata: karaf/metadata.rb:1
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_bundle.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_feature.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_feature_repository.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_group.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_user.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:6
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:7
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:8
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:9
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:6
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:7
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:6
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
3.1.0 passed this metric
Publish Metric
3.1.0 passed this metric
Supported Platforms Metric
3.1.0 passed this metric
Testing File Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
3.1.0 failed this metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
3.1.0 failed this metric
FC066: Ensure chef_version is set in metadata: karaf/metadata.rb:1
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_bundle.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_feature.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_feature_repository.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_group.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_user.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:6
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:7
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:8
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:9
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:6
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:7
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:6
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
3.1.0 passed this metric
Publish Metric
3.1.0 passed this metric
Supported Platforms Metric
3.1.0 passed this metric
Testing File Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
3.1.0 failed this metric
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_bundle.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_feature.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_feature_repository.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_group.rb:4
FC115: Custom resource contains a name_property that is required: karaf/resources/karaf_user.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:6
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:7
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:8
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf.rb:9
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:6
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_bundle.rb:7
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_feature_repository.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_group.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:3
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:4
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:5
FC117: Do not use kind_of in custom resource properties: karaf/resources/karaf_user.rb:6
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
3.1.0 passed this metric
Publish Metric
3.1.0 passed this metric
Supported Platforms Metric
3.1.0 passed this metric
Testing File Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
3.1.0 passed this metric
3.1.0 passed this metric
Testing File Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
3.1.0 failed this metric
3.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number