cookbook 'mysql2_chef_gem', '~> 2.1.0'
mysql2_chef_gem (9) Versions 2.1.0 Follow19
Provides the mysql2_chef_gem resource
cookbook 'mysql2_chef_gem', '~> 2.1.0', :supermarket
knife supermarket install mysql2_chef_gem
knife supermarket download mysql2_chef_gem
Mysql2 Chef Gem Installer Cookbook
mysql2_chef_gem is a library cookbook that provides a resource for installing the mysql2 gem against either mysql or mariadb depending on usage.
Scope
This cookbook is concerned with the installation of the mysql2
Rubygem into Chef's gem path. Installation into other Ruby environments, or installation of related gems such as mysql
are outside the scope of this cookbook.
Requirements
- Chef 12.7+
Platform Support
The following platforms have been tested with Test Kitchen and are known to work.
|---------------------------------------+-----+-----+-----+-----|
| | 5.1 | 5.5 | 5.6 | 5.7 |
|---------------------------------------+-----+-----+-----+-----|
| Mysql2ChefGem::Mysql / centos-6 | X | X | X | X |
|---------------------------------------+-----+-----+-----+-----|
| Mysql2ChefGem::Mysql / centos-7 | | X | X | X |
|---------------------------------------+-----+-----+-----+-----|
| Mysql2ChefGem::Mysql / fedora | | X | X | X |
|---------------------------------------+-----+-----+-----+-----|
| Mysql2ChefGem::Mysql / debian-7 | | X | | |
|---------------------------------------+-----+-----+-----+-----|
| Mysql2ChefGem::Mysql / ubuntu-14.04 | | X | X | |
|---------------------------------------+-----+-----+-----+-----|
| Mysql2ChefGem::Mysql / ubuntu-16.04 | | | | X |
|---------------------------------------+-----+-----+-----+-----|
| Mysql2ChefGem::Mariadb / fedora | | X | | |
|---------------------------------------+-----+-----+-----+-----|
| Mysql2ChefGem::Mariadb / ubuntu-14.04 | | X | | |
|---------------------------------------+-----+-----+-----+-----|
Usage
Place a dependency on the mysql cookbook in your cookbook's metadata.rb
depends 'mysql2_chef_gem'
Then, in a recipe:
mysql2_chef_gem 'default' do action :install end
2.0 Compatibility
In order to ensure compatibility with Chef 13, the 2.0 release of this cookbook changed the method used to specify installation against mariadb. Instead of specifying the underlying provider, you instead reference the mariadb specific resource. See the example below for the new syntax.
Resources Overview
mysql2_chef_gem
The mysql2_chef_gem
resource installs mysql client development dependencies and installs the mysql2
rubygem into Chef's Ruby environment.
Example
mysql2_chef_gem 'default' do gem_version '0.4.5' action :install end
Properties
-
gem_version
- The version of themysql
Rubygem to install into the Chef environment. Defaults to '0.4.5' connector libraries -
package_version
- The version of the mysql client libraries to install and link against
Actions
-
:install
- Build and install the gem into the Chef environment -
:remove
- Delete the gem from the Chef environment
mysql2_chef_gem_mariadb
To install the mysql2 gem against an installation of mariadb reference the mysql2_chef_gem_mariadb
resource directly. This resource includes all the same properties of the standard mysql2_chef_gem
resource.
mysql2_chef_gem_mariadb 'default' do action :install end
License & Authors
- Author:: Sean OMeara (someara@sean.io)
- Author:: Tim Smith (tsmith@chef.io)
- Author:: Nicolas Blanc(sinfomicien@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
mysql2_chef_gem CHANGELOG
2.1.0 (2017-08-23)
- This cookbook now requires Chef 12.7 as 12.5/12.6 have issues with action_class and weren't actually functional in the previous releases
- The resource now installs the mysql2 0.4.9 gem
- Enabled FC016 testing once again
- Switch the kitchen-dokken config to use dokken images
- Update platforms we test in Test Kitchen and expand suites
- Updates the supported and tested platforms in the readme
- Updated the metadata to use a SPDX compliant license string
2.0.1 (2017-03-28)
- Include usage examples for installing on a mariadb server and included a note in the readme regarding the 2.0 changes.
2.0.0 (2017-03-28)
- Converted the previously HWRP resources/providers to a custom resource. This changes the behavior of choosing to install on mysql or mariadb in a breaking way. Instead of specifying the providers you need to call the resources directly. Specifying mysql2_chef_gem will default to mysql, but using mariadb will require using the mysql2_chef_gem_mariadb resource directly.
- Increase the minimum chef version to 12.5
- Require mysql cookbook 8.2+ and build-essential cookbook 2.4+
- Install the 0.4.5 gem by default
- Expand test recipe to cover more scenarios
- Switched testing to use Delivery local mode
- Switched from kitchen-docker to kitchen-dokken and removed testing for CentOS 5 / Ubuntu 12.04 as these are both going EOL
- Switched from Rubocop to cookstyle for linting
- Removed yum/apt from the Berksfile
- Remove test dependencies from the Gemfile and instead use ChefDK for testing
1.1.0 (2016-04-27)
- Added a chefignore file
- Loosen the dependency on mysql cookbook to allow for the use of the latest version
- Added source_url and issue_url metadata
- Added long_description metadata
- Removed the AWS based Test Kitchen testing and replaced with with kitchen-docker in Travis
- Updated Chefspec format to remove deprecation warnings
- Added Oracle Linux to the metadata
1.0.2 (2015-06-29)
- Updating metadata to depend on mysql ~> 6.0
1.0.1 (2014-12-25)
- Moving from recipe_eval in to include_recipe LWRP
1.0.0 (2014-12-23)
- Replacing recipes with resources
- Mysql and MariaDB providers for linking mysql2 gem
- Expanded platform test coverage
0.1.1 (2014-09-15)
- Correct a typo in documentation
- Correct a test failing with Travis CI
0.1.0 (2014-09-15)
- Correct documentation
- Correct rubocop offenses
0.0.3 (2014-09-12)
- Initial release (copy of mysql-chef_gem, but for mysql2)
Collaborator Number Metric
2.1.0 passed this metric
Contributing File Metric
2.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
Cookstyle Metric
2.1.0 failed this metric
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): mysql2_chef_gem/resources/mysql2_chef_gem_mariadb.rb: 1
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 1
Chef/Modernize/DefinesChefSpecMatchers: ChefSpec matchers are now auto generated by ChefSpec 7.1+ and do not need to be defined in a cookbook (https://docs.chef.io/workstation/cookstyle/chef_modernize_defineschefspecmatchers): mysql2_chef_gem/libraries/matchers.rb: 1
Chef/Modernize/UseBuildEssentialResource: Use the build_essential resource instead of the legacy build-essential recipe. This resource ships in the build-essential cookbook v5.0+ and is built into Chef Infra Client 14+ (https://docs.chef.io/workstation/cookstyle/chef_modernize_usebuildessentialresource): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 9
Chef/RedundantCode/NamePropertyIsRequired: Resource properties marked as name properties should not also be required properties (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_namepropertyisrequired): mysql2_chef_gem/resources/mysql2_chef_gem_mariadb.rb: 1
Chef/RedundantCode/NamePropertyIsRequired: Resource properties marked as name properties should not also be required properties (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_namepropertyisrequired): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 1
Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations
No Binaries Metric
2.1.0 passed this metric
Testing File Metric
2.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
2.1.0 passed this metric
2.1.0 passed this metric
2.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
Cookstyle Metric
2.1.0 failed this metric
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): mysql2_chef_gem/resources/mysql2_chef_gem_mariadb.rb: 1
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 1
Chef/Modernize/DefinesChefSpecMatchers: ChefSpec matchers are now auto generated by ChefSpec 7.1+ and do not need to be defined in a cookbook (https://docs.chef.io/workstation/cookstyle/chef_modernize_defineschefspecmatchers): mysql2_chef_gem/libraries/matchers.rb: 1
Chef/Modernize/UseBuildEssentialResource: Use the build_essential resource instead of the legacy build-essential recipe. This resource ships in the build-essential cookbook v5.0+ and is built into Chef Infra Client 14+ (https://docs.chef.io/workstation/cookstyle/chef_modernize_usebuildessentialresource): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 9
Chef/RedundantCode/NamePropertyIsRequired: Resource properties marked as name properties should not also be required properties (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_namepropertyisrequired): mysql2_chef_gem/resources/mysql2_chef_gem_mariadb.rb: 1
Chef/RedundantCode/NamePropertyIsRequired: Resource properties marked as name properties should not also be required properties (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_namepropertyisrequired): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 1
Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations
No Binaries Metric
2.1.0 passed this metric
Testing File Metric
2.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
2.1.0 passed this metric
2.1.0 failed this metric
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 1
Chef/Modernize/DefinesChefSpecMatchers: ChefSpec matchers are now auto generated by ChefSpec 7.1+ and do not need to be defined in a cookbook (https://docs.chef.io/workstation/cookstyle/chef_modernize_defineschefspecmatchers): mysql2_chef_gem/libraries/matchers.rb: 1
Chef/Modernize/UseBuildEssentialResource: Use the build_essential resource instead of the legacy build-essential recipe. This resource ships in the build-essential cookbook v5.0+ and is built into Chef Infra Client 14+ (https://docs.chef.io/workstation/cookstyle/chef_modernize_usebuildessentialresource): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 9
Chef/RedundantCode/NamePropertyIsRequired: Resource properties marked as name properties should not also be required properties (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_namepropertyisrequired): mysql2_chef_gem/resources/mysql2_chef_gem_mariadb.rb: 1
Chef/RedundantCode/NamePropertyIsRequired: Resource properties marked as name properties should not also be required properties (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_namepropertyisrequired): mysql2_chef_gem/resources/mysql2_chef_gem_mysql.rb: 1
Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations
2.1.0 passed this metric
Testing File Metric
2.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
2.1.0 passed this metric
2.1.0 failed this metric
2.1.0 passed this metric