vagrant-clone 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.idea/.rakeTasks +7 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/misc.xml +4 -0
- data/.idea/modules.xml +8 -0
- data/.idea/runConfigurations/clone.xml +21 -0
- data/.idea/runConfigurations/libvirt.xml +21 -0
- data/.idea/vagrant-clone.iml +114 -0
- data/.idea/vcs.xml +6 -0
- data/.idea/workspace.xml +948 -0
- data/Gemfile +9 -3
- data/Gemfile.lock +123 -37
- data/Rakefile +2 -1
- data/Vagrantfile +9 -0
- data/cookbooks/apt/CHANGELOG.md +321 -0
- data/cookbooks/apt/CONTRIBUTING.md +2 -0
- data/cookbooks/apt/MAINTAINERS.md +15 -0
- data/cookbooks/apt/README.md +250 -0
- data/cookbooks/apt/attributes/default.rb +57 -0
- data/cookbooks/apt/files/15update-stamp +1 -0
- data/cookbooks/apt/files/apt-proxy-v2.conf +50 -0
- data/cookbooks/apt/libraries/helpers.rb +49 -0
- data/cookbooks/apt/libraries/matchers.rb +16 -0
- data/cookbooks/apt/metadata.json +1 -0
- data/cookbooks/apt/recipes/cacher-client.rb +52 -0
- data/cookbooks/apt/recipes/cacher-ng.rb +39 -0
- data/cookbooks/apt/recipes/default.rb +93 -0
- data/cookbooks/apt/recipes/unattended-upgrades.rb +47 -0
- data/cookbooks/apt/resources/preference.rb +90 -0
- data/cookbooks/apt/templates/01proxy.erb +11 -0
- data/cookbooks/apt/templates/10dpkg-options.erb +8 -0
- data/cookbooks/apt/templates/10recommends.erb +3 -0
- data/cookbooks/apt/templates/20auto-upgrades.erb +5 -0
- data/cookbooks/apt/templates/50unattended-upgrades.erb +75 -0
- data/cookbooks/apt/templates/acng.conf.erb +275 -0
- data/cookbooks/apt/templates/unattended-upgrades.seed.erb +1 -0
- data/cookbooks/build-essential/.foodcritic +1 -0
- data/cookbooks/build-essential/CHANGELOG.md +257 -0
- data/cookbooks/build-essential/CONTRIBUTING.md +2 -0
- data/cookbooks/build-essential/MAINTAINERS.md +15 -0
- data/cookbooks/build-essential/README.md +134 -0
- data/cookbooks/build-essential/attributes/default.rb +21 -0
- data/cookbooks/build-essential/libraries/matchers.rb +9 -0
- data/cookbooks/build-essential/metadata.json +1 -0
- data/cookbooks/build-essential/recipes/_windows.rb +53 -0
- data/cookbooks/build-essential/recipes/default.rb +24 -0
- data/cookbooks/build-essential/resources/build_essential.rb +106 -0
- data/cookbooks/build-essential/resources/xcode_command_line_tools.rb +61 -0
- data/cookbooks/compat_resource/CHANGELOG.md +53 -0
- data/cookbooks/compat_resource/CONTRIBUTING.md +2 -0
- data/cookbooks/compat_resource/MAINTAINERS.md +16 -0
- data/cookbooks/compat_resource/README.md +60 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/constants.rb +47 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/delayed_evaluator.rb +40 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/core.rb +73 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/declare_resource.rb +315 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/platform_introspection.rb +292 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/recipe.rb +37 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/universal.rb +70 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/lazy_module_include.rb +98 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/notifying_block.rb +74 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/params_validate.rb +510 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/powershell_out.rb +117 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/properties.rb +328 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/property.rb +713 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/apt_repository.rb +269 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/apt_update.rb +105 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/noop.rb +56 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/support/yum_repo.erb +132 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/systemd_unit.rb +253 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/yum_repository.rb +136 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb +164 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/action_class.rb +114 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/apt_repository.rb +65 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/apt_update.rb +52 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/systemd_unit.rb +81 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/yum_repository.rb +97 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource.rb +214 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb +174 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef.rb +29 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/mixin/properties.rb +8 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/exceptions.rb +10 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/log.rb +30 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/mixin/params_validate.rb +17 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/node.rb +9 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/property.rb +15 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/provider.rb +65 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/recipe.rb +118 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/recipe_hook.rb +20 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource/lwrp_base.rb +60 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource.rb +156 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_builder.rb +167 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection/resource_list.rb +49 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection/resource_set.rb +49 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection.rb +103 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb +691 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb +153 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef.rb +33 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches.rb +41 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/property.rb +6 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/recipe.rb +8 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/resource/lwrp_base.rb +44 -0
- data/cookbooks/compat_resource/files/lib/chef_compat/resource.rb +56 -0
- data/cookbooks/compat_resource/files/lib/chef_upstream_version.rb +3 -0
- data/cookbooks/compat_resource/files/lib/compat_resource.rb +35 -0
- data/cookbooks/compat_resource/libraries/autoload.rb +31 -0
- data/cookbooks/compat_resource/metadata.json +1 -0
- data/cookbooks/inifile_chef_gem/CHANGELOG.md +11 -0
- data/cookbooks/inifile_chef_gem/README.md +46 -0
- data/cookbooks/inifile_chef_gem/metadata.json +51 -0
- data/cookbooks/inifile_chef_gem/metadata.rb +11 -0
- data/cookbooks/inifile_chef_gem/resources/default.rb +28 -0
- data/cookbooks/mariadb/CHANGELOG.md +332 -0
- data/cookbooks/mariadb/README.md +225 -0
- data/cookbooks/mariadb/attributes/default.rb +199 -0
- data/cookbooks/mariadb/libraries/mariadb_conn_helper.rb +53 -0
- data/cookbooks/mariadb/libraries/mariadb_helper.rb +216 -0
- data/cookbooks/mariadb/libraries/matchers.rb +21 -0
- data/cookbooks/mariadb/metadata.json +1 -0
- data/cookbooks/mariadb/providers/configuration.rb +39 -0
- data/cookbooks/mariadb/recipes/_audit_plugin.rb +63 -0
- data/cookbooks/mariadb/recipes/_debian_galera.rb +62 -0
- data/cookbooks/mariadb/recipes/_debian_server.rb +78 -0
- data/cookbooks/mariadb/recipes/_mariadb_repository.rb +29 -0
- data/cookbooks/mariadb/recipes/_redhat_client.rb +27 -0
- data/cookbooks/mariadb/recipes/_redhat_galera.rb +55 -0
- data/cookbooks/mariadb/recipes/_redhat_server.rb +58 -0
- data/cookbooks/mariadb/recipes/client.rb +47 -0
- data/cookbooks/mariadb/recipes/config.rb +115 -0
- data/cookbooks/mariadb/recipes/default.rb +46 -0
- data/cookbooks/mariadb/recipes/devel.rb +41 -0
- data/cookbooks/mariadb/recipes/galera.rb +324 -0
- data/cookbooks/mariadb/recipes/plugins.rb +3 -0
- data/cookbooks/mariadb/recipes/repository.rb +45 -0
- data/cookbooks/mariadb/recipes/server.rb +157 -0
- data/cookbooks/mariadb/resources/configuration.rb +13 -0
- data/cookbooks/mariadb/resources/mysql2_gem.rb +25 -0
- data/cookbooks/mariadb/resources/replication.rb +192 -0
- data/cookbooks/mariadb/templates/default/conf.d.generic.erb +19 -0
- data/cookbooks/mariadb/templates/default/debian.cnf.erb +12 -0
- data/cookbooks/mariadb/templates/default/mariadb-server.seed.erb +13 -0
- data/cookbooks/mariadb/templates/default/mariadb_grants.erb +42 -0
- data/cookbooks/mariadb/templates/default/my.cnf.erb +210 -0
- data/cookbooks/mariadb/templates/default/root.cnf.erb +5 -0
- data/cookbooks/mingw/.foodcritic +1 -0
- data/cookbooks/mingw/CHANGELOG.md +50 -0
- data/cookbooks/mingw/CONTRIBUTING.md +2 -0
- data/cookbooks/mingw/MAINTAINERS.md +14 -0
- data/cookbooks/mingw/README.md +133 -0
- data/cookbooks/mingw/files/default/bash.bat +17 -0
- data/cookbooks/mingw/files/default/custom-upgrade.sh +23 -0
- data/cookbooks/mingw/files/default/custom_prefix.sh +13 -0
- data/cookbooks/mingw/files/default/pthread.h +719 -0
- data/cookbooks/mingw/files/default/time.h +297 -0
- data/cookbooks/mingw/libraries/_helper.rb +38 -0
- data/cookbooks/mingw/metadata.json +1 -0
- data/cookbooks/mingw/recipes/default.rb +19 -0
- data/cookbooks/mingw/resources/get.rb +56 -0
- data/cookbooks/mingw/resources/msys2_package.rb +139 -0
- data/cookbooks/mingw/resources/tdm_gcc.rb +114 -0
- data/cookbooks/ohai/.foodcritic +2 -0
- data/cookbooks/ohai/CHANGELOG.md +166 -0
- data/cookbooks/ohai/CONTRIBUTING.md +2 -0
- data/cookbooks/ohai/MAINTAINERS.md +15 -0
- data/cookbooks/ohai/README.md +134 -0
- data/cookbooks/ohai/libraries/matchers.rb +41 -0
- data/cookbooks/ohai/metadata.json +1 -0
- data/cookbooks/ohai/recipes/default.rb +20 -0
- data/cookbooks/ohai/resources/hint.rb +55 -0
- data/cookbooks/ohai/resources/plugin.rb +117 -0
- data/cookbooks/selinux_policy/.gitignore +51 -0
- data/cookbooks/selinux_policy/.kitchen.yml +25 -0
- data/cookbooks/selinux_policy/.rubocop.yml +2 -0
- data/cookbooks/selinux_policy/.travis.yml +26 -0
- data/cookbooks/selinux_policy/Berksfile +8 -0
- data/cookbooks/selinux_policy/CHANGELOG.md +155 -0
- data/cookbooks/selinux_policy/LICENSE +13 -0
- data/cookbooks/selinux_policy/README.md +217 -0
- data/cookbooks/selinux_policy/Rakefile +68 -0
- data/cookbooks/selinux_policy/TESTING.md +2 -0
- data/cookbooks/selinux_policy/Thorfile +12 -0
- data/cookbooks/selinux_policy/attributes/default.rb +5 -0
- data/cookbooks/selinux_policy/chefignore +102 -0
- data/cookbooks/selinux_policy/libraries/helper-disabled.rb +29 -0
- data/cookbooks/selinux_policy/libraries/matchers.rb +57 -0
- data/cookbooks/selinux_policy/metadata.json +58 -0
- data/cookbooks/selinux_policy/metadata.rb +20 -0
- data/cookbooks/selinux_policy/providers/boolean.rb +28 -0
- data/cookbooks/selinux_policy/providers/fcontext.rb +78 -0
- data/cookbooks/selinux_policy/providers/module.rb +81 -0
- data/cookbooks/selinux_policy/providers/permissive.rb +26 -0
- data/cookbooks/selinux_policy/providers/port.rb +58 -0
- data/cookbooks/selinux_policy/recipes/default.rb +9 -0
- data/cookbooks/selinux_policy/recipes/install.rb +32 -0
- data/cookbooks/selinux_policy/resources/boolean.rb +8 -0
- data/cookbooks/selinux_policy/resources/fcontext.rb +8 -0
- data/cookbooks/selinux_policy/resources/module.rb +21 -0
- data/cookbooks/selinux_policy/resources/permissive.rb +6 -0
- data/cookbooks/selinux_policy/resources/port.rb +9 -0
- data/cookbooks/seven_zip/CHANGELOG.md +30 -0
- data/cookbooks/seven_zip/README.md +108 -0
- data/cookbooks/seven_zip/attributes/default.rb +31 -0
- data/cookbooks/seven_zip/libraries/matchers.rb +33 -0
- data/cookbooks/seven_zip/metadata.json +1 -0
- data/cookbooks/seven_zip/providers/archive.rb +68 -0
- data/cookbooks/seven_zip/recipes/default.rb +41 -0
- data/cookbooks/seven_zip/resources/archive.rb +29 -0
- data/cookbooks/windows/.foodcritic +2 -0
- data/cookbooks/windows/CHANGELOG.md +528 -0
- data/cookbooks/windows/CONTRIBUTING.md +2 -0
- data/cookbooks/windows/MAINTAINERS.md +21 -0
- data/cookbooks/windows/README.md +803 -0
- data/cookbooks/windows/attributes/default.rb +21 -0
- data/cookbooks/windows/files/dism_features.rb +45 -0
- data/cookbooks/windows/libraries/matchers.rb +586 -0
- data/cookbooks/windows/libraries/powershell_helper.rb +53 -0
- data/cookbooks/windows/libraries/registry_helper.rb +356 -0
- data/cookbooks/windows/libraries/version.rb +207 -0
- data/cookbooks/windows/libraries/version_helper.rb +79 -0
- data/cookbooks/windows/libraries/windows_helper.rb +174 -0
- data/cookbooks/windows/libraries/windows_privileged.rb +103 -0
- data/cookbooks/windows/libraries/wmi_helper.rb +32 -0
- data/cookbooks/windows/metadata.json +1 -0
- data/cookbooks/windows/recipes/default.rb +21 -0
- data/cookbooks/windows/resources/auto_run.rb +46 -0
- data/cookbooks/windows/resources/certificate.rb +166 -0
- data/cookbooks/windows/resources/certificate_binding.rb +128 -0
- data/cookbooks/windows/resources/feature.rb +82 -0
- data/cookbooks/windows/resources/feature_dism.rb +108 -0
- data/cookbooks/windows/resources/feature_powershell.rb +70 -0
- data/cookbooks/windows/resources/feature_servermanagercmd.rb +76 -0
- data/cookbooks/windows/resources/font.rb +80 -0
- data/cookbooks/windows/resources/http_acl.rb +110 -0
- data/cookbooks/windows/resources/pagefile.rb +152 -0
- data/cookbooks/windows/resources/path.rb +54 -0
- data/cookbooks/windows/resources/printer.rb +103 -0
- data/cookbooks/windows/resources/printer_port.rb +101 -0
- data/cookbooks/windows/resources/share.rb +291 -0
- data/cookbooks/windows/resources/shortcut.rb +53 -0
- data/cookbooks/windows/resources/task.rb +384 -0
- data/cookbooks/windows/resources/zipfile.rb +125 -0
- data/cookbooks/yum/.foodcritic +1 -0
- data/cookbooks/yum/CHANGELOG.md +351 -0
- data/cookbooks/yum/CONTRIBUTING.md +2 -0
- data/cookbooks/yum/MAINTAINERS.md +16 -0
- data/cookbooks/yum/README.md +125 -0
- data/cookbooks/yum/attributes/main.rb +103 -0
- data/cookbooks/yum/libraries/matchers.rb +9 -0
- data/cookbooks/yum/metadata.json +1 -0
- data/cookbooks/yum/recipes/default.rb +26 -0
- data/cookbooks/yum/recipes/dnf_yum_compat.rb +29 -0
- data/cookbooks/yum/resources/globalconfig.rb +119 -0
- data/cookbooks/yum/templates/.DS_Store +0 -0
- data/cookbooks/yum/templates/main.erb +276 -0
- data/cookbooks/yum-epel/CHANGELOG.md +138 -0
- data/cookbooks/yum-epel/CONTRIBUTING.md +2 -0
- data/cookbooks/yum-epel/MAINTAINERS.md +19 -0
- data/cookbooks/yum-epel/README.md +172 -0
- data/cookbooks/yum-epel/attributes/default.rb +8 -0
- data/cookbooks/yum-epel/attributes/epel-debuginfo.rb +15 -0
- data/cookbooks/yum-epel/attributes/epel-source.rb +15 -0
- data/cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb +15 -0
- data/cookbooks/yum-epel/attributes/epel-testing-source.rb +15 -0
- data/cookbooks/yum-epel/attributes/epel-testing.rb +15 -0
- data/cookbooks/yum-epel/attributes/epel.rb +21 -0
- data/cookbooks/yum-epel/metadata.json +1 -0
- data/cookbooks/yum-epel/recipes/default.rb +27 -0
- data/cookbooks/yum-scl/.kitchen.dokken.yml +24 -0
- data/cookbooks/yum-scl/.kitchen.yml +24 -0
- data/cookbooks/yum-scl/.rubocop.yml +6 -0
- data/cookbooks/yum-scl/.travis.yml +28 -0
- data/cookbooks/yum-scl/Berksfile +3 -0
- data/cookbooks/yum-scl/Berksfile.lock +25 -0
- data/cookbooks/yum-scl/CHANGELOG.md +11 -0
- data/cookbooks/yum-scl/Gemfile +46 -0
- data/cookbooks/yum-scl/README.md +76 -0
- data/cookbooks/yum-scl/attributes/centos.rb +83 -0
- data/cookbooks/yum-scl/attributes/default.rb +15 -0
- data/cookbooks/yum-scl/attributes/scientific.rb +1 -0
- data/cookbooks/yum-scl/files/default/RPM-GPG-KEY-CentOS-SIG-SCLo +20 -0
- data/cookbooks/yum-scl/libraries/yum_scl_helper.rb +33 -0
- data/cookbooks/yum-scl/metadata.json +42 -0
- data/cookbooks/yum-scl/metadata.rb +12 -0
- data/cookbooks/yum-scl/recipes/chef_install.rb +52 -0
- data/cookbooks/yum-scl/recipes/default.rb +17 -0
- data/cookbooks/yum-scl/recipes/native_install.rb +35 -0
- data/lib/vagrant-clone/command/clone.rb +66 -61
- data/lib/vagrant-clone/errors.rb +61 -0
- data/lib/vagrant-clone/util/clone_manager_base.rb +69 -0
- data/lib/vagrant-clone/util/clone_managers/docker.rb +31 -0
- data/lib/vagrant-clone/util/clone_managers/libvirt.rb +254 -0
- data/lib/vagrant-clone/util/vagrantfile_managers/docker.rb +154 -0
- data/lib/vagrant-clone/util/vagrantfile_managers/libvirt.rb +159 -0
- data/lib/vagrant-clone/version.rb +2 -2
- data/lib/vagrant-clone.rb +6 -6
- data/libvirt.txt +7 -0
- data/performance_testing.rb +165 -0
- data/results.txt +45 -0
- data/scripts/create_box.sh +134 -0
- data/test.rb +92 -0
- data/tools/create_box.sh +130 -0
- data/vagrant-clone.gemspec +7 -7
- metadata +296 -5
- data/lib/vagrant-clone/command/errors.rb +0 -16
- data/lib/vagrant-clone/command/provider/docker.rb +0 -13
- data/lib/vagrant-clone/utils/vagrantfile_manager.rb +0 -47
@@ -0,0 +1,62 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: _debian_galera
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
# To be sure that debconf is installed
|
21
|
+
package 'debconf-utils' do
|
22
|
+
action :install
|
23
|
+
end
|
24
|
+
|
25
|
+
# Preseed Debian Package
|
26
|
+
# (but test for resource, as it can be declared by apt recipe)
|
27
|
+
begin
|
28
|
+
resources(directory: '/var/cache/local/preseeding')
|
29
|
+
rescue Chef::Exceptions::ResourceNotFound
|
30
|
+
directory '/var/cache/local/preseeding' do
|
31
|
+
owner 'root'
|
32
|
+
group 'root'
|
33
|
+
mode '0755'
|
34
|
+
recursive true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
template '/var/cache/local/preseeding/mariadb-galera-server.seed' do
|
39
|
+
source 'mariadb-server.seed.erb'
|
40
|
+
owner 'root'
|
41
|
+
group 'root'
|
42
|
+
mode '0600'
|
43
|
+
variables(package_name: 'mariadb-server')
|
44
|
+
notifies :run, 'execute[preseed mariadb-galera-server]', :immediately
|
45
|
+
sensitive true
|
46
|
+
end
|
47
|
+
|
48
|
+
execute 'preseed mariadb-galera-server' do
|
49
|
+
command '/usr/bin/debconf-set-selections ' \
|
50
|
+
'/var/cache/local/preseeding/mariadb-galera-server.seed'
|
51
|
+
action :nothing
|
52
|
+
end
|
53
|
+
|
54
|
+
if node['mariadb']['install']['version'].to_f < 10.1
|
55
|
+
package "mariadb-galera-server-#{node['mariadb']['install']['version']}" do
|
56
|
+
action :install
|
57
|
+
end
|
58
|
+
else
|
59
|
+
package "mariadb-server-#{node['mariadb']['install']['version']}" do
|
60
|
+
action :install
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: _debian_server
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
if Chef::Config[:solo]
|
21
|
+
Chef::Log.warn('This recipe uses search. Chef Solo does not support search.')
|
22
|
+
else
|
23
|
+
exist_data_bag_mariadb_root = begin
|
24
|
+
search(:mariadb, 'id:user_root').first
|
25
|
+
rescue Net::HTTPServerException, Chef::Exceptions::InvalidDataBagPath
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
|
29
|
+
unless exist_data_bag_mariadb_root.nil?
|
30
|
+
data_bag_mariadb_root = data_bag_item('mariadb', 'user_root')
|
31
|
+
node.override['mariadb']['server_root_password'] = data_bag_mariadb_root['password']
|
32
|
+
end
|
33
|
+
|
34
|
+
exist_data_bag_mariadb_debian = begin
|
35
|
+
search(:mariadb, 'id:user_debian').first
|
36
|
+
rescue Net::HTTPServerException, Chef::Exceptions::InvalidDataBagPath
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
40
|
+
unless exist_data_bag_mariadb_debian.nil?
|
41
|
+
data_bag_mariadb_debian = data_bag_item('mariadb', 'user_debian')
|
42
|
+
node.override['mariadb']['debian']['password'] = data_bag_mariadb_debian['password']
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# To be sure that debconf is installed
|
47
|
+
package 'debconf-utils' do
|
48
|
+
action :install
|
49
|
+
end
|
50
|
+
|
51
|
+
# Preseed Debian Package
|
52
|
+
# (but test for resource, as it can be declared by apt recipe)
|
53
|
+
begin
|
54
|
+
resources(directory: '/var/cache/local/preseeding')
|
55
|
+
rescue Chef::Exceptions::ResourceNotFound
|
56
|
+
directory '/var/cache/local/preseeding' do
|
57
|
+
owner 'root'
|
58
|
+
group 'root'
|
59
|
+
mode '0755'
|
60
|
+
recursive true
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
template '/var/cache/local/preseeding/mariadb-server.seed' do
|
65
|
+
source 'mariadb-server.seed.erb'
|
66
|
+
owner 'root'
|
67
|
+
group 'root'
|
68
|
+
mode '0600'
|
69
|
+
variables(package_name: 'mariadb-server')
|
70
|
+
notifies :run, 'execute[preseed mariadb-server]', :immediately
|
71
|
+
sensitive true
|
72
|
+
end
|
73
|
+
|
74
|
+
execute 'preseed mariadb-server' do
|
75
|
+
command '/usr/bin/debconf-set-selections ' \
|
76
|
+
'/var/cache/local/preseeding/mariadb-server.seed'
|
77
|
+
action :nothing
|
78
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: _redhat_repository
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
if use_scl_package?(node['mariadb']['install']['prefer_scl_package'],
|
21
|
+
node['platform'], node['platform_version']) &&
|
22
|
+
scl_version_available?(node['mariadb']['install']['version'])
|
23
|
+
# SCL repository
|
24
|
+
include_recipe 'yum-scl'
|
25
|
+
elsif !use_os_native_package?(node['mariadb']['install']['prefer_os_package'],
|
26
|
+
node['platform'], node['platform_version'])
|
27
|
+
# MariaDB repository
|
28
|
+
include_recipe "#{cookbook_name}::repository"
|
29
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: _redhat_client
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
use_os_native = use_os_native_package?(node['mariadb']['install']['prefer_os_package'],
|
21
|
+
node['platform'],
|
22
|
+
node['platform_version'])
|
23
|
+
# To force removing of mariadb-libs on CentOS >= 7
|
24
|
+
package 'mysql-libs' do
|
25
|
+
action :remove
|
26
|
+
not_if { use_os_native || (node['platform'] == 'centos' && node['platform_version'].to_i >= 7) }
|
27
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: _redhat_galera
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
# To force removing of mariadb-libs on CentOS >= 7
|
21
|
+
package 'MariaDB-shared' do
|
22
|
+
action :install
|
23
|
+
end
|
24
|
+
|
25
|
+
package_name = if node['mariadb']['install']['version'].to_f < 10.1
|
26
|
+
'MariaDB-Galera-server'
|
27
|
+
else
|
28
|
+
'MariaDB-server'
|
29
|
+
end
|
30
|
+
|
31
|
+
package package_name do
|
32
|
+
action :install
|
33
|
+
notifies :create, 'directory[/var/log/mysql]', :immediately
|
34
|
+
notifies :start, 'service[mysql]', :immediately
|
35
|
+
notifies :run, 'execute[change first install root password]', :immediately
|
36
|
+
end
|
37
|
+
|
38
|
+
directory '/var/log/mysql' do
|
39
|
+
action :nothing
|
40
|
+
user 'mysql'
|
41
|
+
group 'mysql'
|
42
|
+
mode '0755'
|
43
|
+
end
|
44
|
+
|
45
|
+
service 'mysql' do
|
46
|
+
action :nothing
|
47
|
+
end
|
48
|
+
|
49
|
+
execute 'change first install root password' do
|
50
|
+
command '/usr/bin/mysqladmin -u root password \'' + \
|
51
|
+
node['mariadb']['server_root_password'] + '\''
|
52
|
+
action :nothing
|
53
|
+
sensitive true
|
54
|
+
not_if { node['mariadb']['server_root_password'].empty? }
|
55
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: _redhat_server
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
use_os_native = use_os_native_package?(node['mariadb']['install']['prefer_os_package'],
|
21
|
+
node['platform'],
|
22
|
+
node['platform_version'])
|
23
|
+
use_scl = use_scl_package?(node['mariadb']['install']['prefer_scl_package'],
|
24
|
+
node['platform'],
|
25
|
+
node['platform_version']) &&
|
26
|
+
scl_version_available?(node['mariadb']['install']['version'])
|
27
|
+
|
28
|
+
# To force removing of mariadb-libs on CentOS >= 7
|
29
|
+
package 'MariaDB-shared' do
|
30
|
+
action :install
|
31
|
+
not_if { use_os_native || use_scl }
|
32
|
+
end
|
33
|
+
|
34
|
+
ruby_block 'MariaDB first start' do
|
35
|
+
block do
|
36
|
+
true
|
37
|
+
end
|
38
|
+
action :nothing
|
39
|
+
subscribes :run, 'package[MariaDB-server]', :immediately
|
40
|
+
notifies :create, 'directory[/var/log/mysql]', :immediately
|
41
|
+
notifies :start, 'service[mysql]', :immediately
|
42
|
+
notifies :run, 'execute[change first install root password]', :immediately
|
43
|
+
end
|
44
|
+
|
45
|
+
directory '/var/log/mysql' do
|
46
|
+
action :nothing
|
47
|
+
user 'mysql'
|
48
|
+
group 'mysql'
|
49
|
+
mode '0755'
|
50
|
+
end
|
51
|
+
|
52
|
+
execute 'change first install root password' do
|
53
|
+
command '/usr/bin/mysqladmin -u root password \'' + \
|
54
|
+
node['mariadb']['server_root_password'] + '\''
|
55
|
+
action :nothing
|
56
|
+
sensitive true
|
57
|
+
not_if { node['mariadb']['server_root_password'].empty? }
|
58
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: client
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
# rubocop:disable Lint/EmptyWhen
|
21
|
+
|
22
|
+
Chef::Recipe.send(:include, MariaDB::Helper)
|
23
|
+
case node['mariadb']['install']['type']
|
24
|
+
when 'package'
|
25
|
+
# Include recipes to install repositories
|
26
|
+
include_recipe "#{cookbook_name}::_mariadb_repository"
|
27
|
+
|
28
|
+
# Include RH specific recipe
|
29
|
+
include_recipe "#{cookbook_name}::_redhat_client" if \
|
30
|
+
%w(redhat centos scientific amazon).include?(node['platform'])
|
31
|
+
|
32
|
+
# Install client package
|
33
|
+
client_package_name = packages_names_to_install(node['platform'],
|
34
|
+
node['platform_version'],
|
35
|
+
node['mariadb']['install']['version'],
|
36
|
+
node['mariadb']['install']['prefer_os_package'],
|
37
|
+
node['mariadb']['install']['prefer_scl_package'])['client']
|
38
|
+
package 'MariaDB-client' do
|
39
|
+
package_name client_package_name
|
40
|
+
action :install
|
41
|
+
end
|
42
|
+
|
43
|
+
# Install devel package if required
|
44
|
+
include_recipe "#{cookbook_name}::devel" if node['mariadb']['client']['development_files']
|
45
|
+
when 'from_source'
|
46
|
+
# To be filled as soon as possible
|
47
|
+
end
|
@@ -0,0 +1,115 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: config
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
template '/root/.my.cnf' do
|
21
|
+
source 'root.cnf.erb'
|
22
|
+
owner 'root'
|
23
|
+
group 'root'
|
24
|
+
mode '0600'
|
25
|
+
only_if { node['mariadb']['root_my_cnf'] }
|
26
|
+
end
|
27
|
+
|
28
|
+
template node['mariadb']['configuration']['path'] + '/my.cnf' do
|
29
|
+
source 'my.cnf.erb'
|
30
|
+
owner 'root'
|
31
|
+
group 'root'
|
32
|
+
mode '0644'
|
33
|
+
end
|
34
|
+
|
35
|
+
directory '/etc/my.cnf.d/' do
|
36
|
+
owner 'root'
|
37
|
+
group 'root'
|
38
|
+
mode '0755'
|
39
|
+
action :create
|
40
|
+
not_if { ::Dir.exist?('/etc/my.cnf.d/') }
|
41
|
+
end
|
42
|
+
|
43
|
+
innodb_options = {}
|
44
|
+
|
45
|
+
innodb_options['comment1'] = '#'
|
46
|
+
innodb_options['comment2'] = '# * InnoDB'
|
47
|
+
innodb_options['comment3'] = '#'
|
48
|
+
innodb_options['comment4'] = '# InnoDB is enabled by default with a 10MB ' \
|
49
|
+
'datafile in /var/lib/mysql/.'
|
50
|
+
innodb_options['comment5'] = '# Read the manual for more InnoDB ' \
|
51
|
+
'related options. There are many!'
|
52
|
+
|
53
|
+
innodb_options['innodb_log_file_size_comment1'] = '# you can\'t just ' \
|
54
|
+
'change log file size, ' \
|
55
|
+
'requires special procedure'
|
56
|
+
innodb_options['innodb_log_file_size'] = if node['mariadb']['innodb']['log_file_size'].empty?
|
57
|
+
'#innodb_log_file_size = 50M'
|
58
|
+
else
|
59
|
+
node['mariadb']['innodb']['log_file_size']
|
60
|
+
end
|
61
|
+
if node['mariadb']['innodb']['bps_percentage_memory']
|
62
|
+
innodb_options['innodb_buffer_pool_size'] =
|
63
|
+
(
|
64
|
+
node['mariadb']['innodb']['buffer_pool_size'].to_f *
|
65
|
+
(node['memory']['total'][0..-3].to_i / 1024)
|
66
|
+
).round.to_s + 'M'
|
67
|
+
else
|
68
|
+
innodb_options['innodb_buffer_pool_size'] = \
|
69
|
+
node['mariadb']['innodb']['buffer_pool_size']
|
70
|
+
end
|
71
|
+
innodb_options['innodb_log_buffer_size'] = \
|
72
|
+
node['mariadb']['innodb']['log_buffer_size']
|
73
|
+
innodb_options['innodb_file_per_table'] = \
|
74
|
+
node['mariadb']['innodb']['file_per_table']
|
75
|
+
innodb_options['innodb_open_files'] = node['mariadb']['innodb']['open_files']
|
76
|
+
innodb_options['innodb_io_capacity'] = \
|
77
|
+
node['mariadb']['innodb']['io_capacity']
|
78
|
+
innodb_options['innodb_flush_method'] = \
|
79
|
+
node['mariadb']['innodb']['flush_method']
|
80
|
+
node['mariadb']['innodb']['options'].each do |key, value|
|
81
|
+
innodb_options[key] = value
|
82
|
+
end
|
83
|
+
|
84
|
+
mariadb_configuration '20-innodb' do
|
85
|
+
section 'mysqld'
|
86
|
+
option innodb_options
|
87
|
+
action :add
|
88
|
+
end
|
89
|
+
|
90
|
+
replication_opts = {}
|
91
|
+
|
92
|
+
if node['mariadb']['replication']['log_bin']
|
93
|
+
replication_opts['log_bin'] = node['mariadb']['replication']['log_bin']
|
94
|
+
replication_opts['sync_binlog'] = \
|
95
|
+
node['mariadb']['replication']['sync_binlog']
|
96
|
+
replication_opts['log_bin_index'] = \
|
97
|
+
node['mariadb']['replication']['log_bin_index']
|
98
|
+
replication_opts['expire_logs_days'] = \
|
99
|
+
node['mariadb']['replication']['expire_logs_days']
|
100
|
+
replication_opts['max_binlog_size'] = \
|
101
|
+
node['mariadb']['replication']['max_binlog_size']
|
102
|
+
end
|
103
|
+
|
104
|
+
unless node['mariadb']['replication']['server_id'].empty?
|
105
|
+
replication_opts['server_id'] = node['mariadb']['replication']['server_id']
|
106
|
+
end
|
107
|
+
node['mariadb']['replication']['options'].each do |key, value|
|
108
|
+
replication_opts[key] = value
|
109
|
+
end
|
110
|
+
|
111
|
+
mariadb_configuration '30-replication' do
|
112
|
+
section 'mysqld'
|
113
|
+
option replication_opts
|
114
|
+
action :add
|
115
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: default
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
if Chef::Config[:solo]
|
21
|
+
Chef::Log.warn('This recipe uses search. Chef Solo does not support search.')
|
22
|
+
else
|
23
|
+
exist_data_bag_mariadb_root = begin
|
24
|
+
search(:mariadb, 'id:user_root').first
|
25
|
+
rescue Net::HTTPServerException, Chef::Exceptions::InvalidDataBagPath
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
|
29
|
+
unless exist_data_bag_mariadb_root.nil?
|
30
|
+
data_bag_mariadb_root = data_bag_item('mariadb', 'user_root')
|
31
|
+
node.override['mariadb']['server_root_password'] = data_bag_mariadb_root['password']
|
32
|
+
end
|
33
|
+
|
34
|
+
exist_data_bag_mariadb_debian = begin
|
35
|
+
search(:mariadb, 'id:user_debian').first
|
36
|
+
rescue Net::HTTPServerException, Chef::Exceptions::InvalidDataBagPath
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
40
|
+
unless exist_data_bag_mariadb_debian.nil?
|
41
|
+
data_bag_mariadb_debian = data_bag_item('mariadb', 'user_debian')
|
42
|
+
node.override['mariadb']['debian']['password'] = data_bag_mariadb_debian['password']
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
include_recipe "#{cookbook_name}::server"
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: mariadb
|
3
|
+
# Recipe:: client
|
4
|
+
#
|
5
|
+
# Copyright 2014, blablacar.com
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
# rubocop:disable Lint/EmptyWhen
|
21
|
+
|
22
|
+
Chef::Recipe.send(:include, MariaDB::Helper)
|
23
|
+
case node['mariadb']['install']['type']
|
24
|
+
when 'package'
|
25
|
+
# Include recipes to install repositories
|
26
|
+
include_recipe "#{cookbook_name}::_mariadb_repository"
|
27
|
+
|
28
|
+
# Install devel package
|
29
|
+
devel_package_name = packages_names_to_install(node['platform'],
|
30
|
+
node['platform_version'],
|
31
|
+
node['mariadb']['install']['version'],
|
32
|
+
node['mariadb']['install']['prefer_os_package'],
|
33
|
+
node['mariadb']['install']['prefer_scl_package'])['devel']
|
34
|
+
package 'MariaDB-devel' do
|
35
|
+
package_name devel_package_name
|
36
|
+
action :install
|
37
|
+
end
|
38
|
+
|
39
|
+
when 'from_source'
|
40
|
+
# To be filled as soon as possible
|
41
|
+
end
|