Skip to content

Commit

Permalink
Update service version (#72)
Browse files Browse the repository at this point in the history
* chef 12 migration

* remove obsolute recipe

* chef 12 migration

* adding tuning config

* fix ruby version

* fix packages

* sync options with older version

* fix ruby version

* adding .lock files

* update mysql to mysql2, use mysql2 to test connections for master/slave

* Rakefile update

* updating Gemfile

* dealing with merge conflicts

* updating for cookstyle, and tests

* updating Rake and Gemfile

* cookstyle autocorrect

* updating to only tunable and rs-mysql

* updating my.cnf creation

* fixing tune attributes

* changing 4 to 5

* upping to > 1024 memory

* deleting log files after tuning

* adding apt

* reverting old changes

* updating tests, specifying gem version

* fixing specs

* sending notification immediately

* updating apt settings

* removing Berksfile.lock

* updating tests

* updating for rs-base, and tests

* adding rs-base, commenting out bad tests

* adding create_secrets

* using timestamp

* updating slave_monitors for rs-base change

* adding path to socket file

* updating connect for master and log days

* updating, adding socket

* adding change_master to log

* creating the repl user

* doing create and grant separately

* fixing mispelling

* removing broken test

* no need for slave to have master rep user

* fixing master user creation, and deprecating test

* updating master

* adding in dependent cookbook attributes

* fixing cookstyle

* updating for mysql-default in volume and stripe

* updating scripts for apparmor, fixing mysql_service_name, and fixing mysql rights

* adding dns, dns seems to be abandoned

* changing back to rightscale_development_v2

* adding log link for back compatibility

* fixing mysql2 connection info

* fixing test

* updating specs

* fixing backup_spec

* fixing errors in specs

* fixing single quotes from cookstyle

* updating Berksfile and Rakefile. Removing branch pins

* updating lock file

* updating readme

* updating berksfile, and kitchen

* separating create and start to add mysql user

* fixing syling

* Add azurerm private IP bind support

* Failsafe in bindip helper to skip cloud_v2 if it is null

* temporarily ignore block nesting issues in the helper

* commiting berksfile

* updating for /var/log change

* fixing cookstyle and adding more open files

* removing selinux_policy

* explicitly passing data_dir

* removing enforcing check

* updating data_dir

* updating getenforce for compile_time

* hard setting log path, and mvoing dir update

* adding in custom work for centos 7

* cleaning up selinux file

* going ahead and updating cookstyle

* reverting 0 change

* fixin to 390

* fixing frozen string

* updating helper to have the right less than

* doing 390,391,392

* update service on rs-mysql

* fixing table_open_cache issue

* Eph 3.0 (#75)

* updating cookbook for ephemeral_lvm > 3

* updating eph_lvm

* updating version

* updating readme for mysql versions

* updating changelog to reflect changes

Signed-off-by: Richard Shade <[email protected]>
  • Loading branch information
rshade authored Feb 28, 2017
1 parent 966c537 commit ac591c5
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 35 deletions.
58 changes: 58 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,64 @@ suites:
rs-mysql:
backup:
lineage: 'lineage'
mysql:
version: '5.5'
server_root_password: rootpass
server_repl_password: realpass
server_usage: dedicated
application_username: appuser
application_password: apppass
application_database_name: app_test
rightscale:
instance_uuid: '1111111'

- name: default-56
run_list:
- recipe[rs-mysql::default]
- recipe[rs-mysql::collectd]
- recipe[fake::database_mysql]
attributes:
apt:
compile_time_update: true
cloud:
provider: 'vagrant'
public_ips: ['100.64.1.1']
private_ips: ['10.0.2.15']
rs-base:
collectd_server: 'tss-4.rightscale.com'
rs-mysql:
backup:
lineage: 'lineage'
mysql:
version: '5.6'
server_root_password: rootpass
server_repl_password: realpass
server_usage: dedicated
application_username: appuser
application_password: apppass
application_database_name: app_test
rightscale:
instance_uuid: '1111111'

- name: default-57
run_list:
- recipe[rs-mysql::default]
- recipe[rs-mysql::collectd]
- recipe[fake::database_mysql]
attributes:
apt:
compile_time_update: true
cloud:
provider: 'vagrant'
public_ips: ['100.64.1.1']
private_ips: ['10.0.2.15']
rs-base:
collectd_server: 'tss-4.rightscale.com'
rs-mysql:
backup:
lineage: 'lineage'
mysql:
version: '5.7'
server_root_password: rootpass
server_repl_password: realpass
server_usage: dedicated
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
2.3.1
47 changes: 22 additions & 25 deletions Berksfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ DEPENDENCIES
path: test/cookbooks/fake
filesystem
git: https://github.com/rightscale-cookbooks-contrib/filesystem_cookbook.git
revision: 9c2a21a8aa41b16d3774ed5292f9a31b018dee92
revision: eb4bd72462aada927d17d57fcd8da32095a24650
branch: update_lvm_cookbook_dependency_3
machine_tag
git: https://github.com/rightscale-cookbooks/machine_tag.git
revision: 581dd0b7ddf2e65939527bb5e6c6c47788d1bf33
revision: e3b01e6e3af364ce2ee73a28445f08c833a2ac3f
marker
git: https://github.com/rightscale-cookbooks/marker.git
revision: 058e70879408fceceb628c600d487b1ddfa06cdb
Expand All @@ -29,18 +29,16 @@ DEPENDENCIES
revision: 48c24ba0f0815e86200793ef50fe27dce9f09d8e
rs-base
git: https://github.com/rightscale-cookbooks/rs-base.git
revision: 501761b8977004bee8d38c10b42434c37362d6cb
revision: 5d66d7b46d49d7c2a9eda6dafd12585c8abdfd0c
rs-mysql
path: .
metadata: true
runit
yum-epel

GRAPH
apt (5.1.0)
compat_resource (>= 12.16.3)
build-essential (7.0.3)
compat_resource (>= 12.16.3)
apt (6.0.1)
build-essential (8.0.0)
mingw (>= 1.1)
seven_zip (>= 0.0.0)
chef-sugar (3.4.0)
Expand All @@ -58,37 +56,37 @@ GRAPH
build-essential (>= 1.1.0)
hosts_file (~> 0.1.4)
xml (~> 1.2.0)
ephemeral_lvm (2.0.0)
lvm (~> 3.1)
ephemeral_lvm (3.0.0)
lvm (>= 4.0)
now (>= 0.0.0)
fake (0.1.0)
database (>= 0.0.0)
mysql2_chef_gem (>= 0.0.0)
rightscale_tag (>= 0.0.0)
rs-mysql (>= 0.0.0)
filesystem (0.11.0)
lvm (~> 3.1)
lvm (>= 1.1.0)
xfs (>= 0.0.0)
hosts_file (0.1.4)
lvm (3.1.0)
machine_tag (2.0.1)
lvm (4.0.5)
machine_tag (2.0.2)
apt (>= 0.0.0)
build-essential (>= 0.0.0)
mariadb (1.0.1)
apt (>= 0.0.0)
yum (>= 0.0.0)
yum-epel (>= 0.0.0)
marker (2.0.0)
mingw (1.2.5)
compat_resource (>= 12.16.3)
mingw (2.0.0)
seven_zip (>= 0.0.0)
mysql (8.2.0)
mysql2_chef_gem (1.1.0)
build-essential (>= 0.0.0)
mariadb (>= 0.0.0)
mysql (>= 6.0)
now (1.0.0)
ntp (3.3.1)
ohai (4.2.3)
compat_resource (>= 12.14.7)
ohai (5.0.0)
openssl (6.1.1)
packagecloud (0.2.5)
poise (2.7.2)
Expand All @@ -108,27 +106,27 @@ GRAPH
marker (~> 2.0)
rightscale_volume (2.0.0)
build-essential (>= 0.0.0)
rs-base (2.0.0)
rs-base (2.0.1)
apt (>= 0.0.0)
collectd (~> 2.2.2)
collectd_plugins (~> 2.1.3)
ephemeral_lvm (= 2.0.0)
ephemeral_lvm (~> 3.0)
machine_tag (~> 2.0)
marker (>= 0.0.0)
ntp (>= 0.0.0)
rightscale_tag (~> 2.0)
rsyslog (>= 0.0.0)
swap (>= 0.0.0)
yum-epel (>= 0.0.0)
rs-mysql (2.0.1)
rs-mysql (2.0.2)
build-essential (>= 0.0.0)
chef_handler (>= 0.0.0)
collectd (>= 0.0.0)
database (>= 0.0.0)
dns (>= 0.0.0)
ephemeral_lvm (~> 2.0)
ephemeral_lvm (~> 3.0)
filesystem (>= 0.0.0)
lvm (~> 3.1)
lvm (>= 0.0.0)
marker (~> 2.0)
mysql (>= 0.0.0)
mysql2_chef_gem (>= 0.0.0)
Expand All @@ -137,21 +135,20 @@ GRAPH
rightscale_volume (~> 2.0)
rs-base (~> 2.0)
yum-mysql-community (>= 0.0.0)
rsyslog (5.1.0)
compat_resource (>= 12.14.6)
rsyslog (6.0.0)
runit (3.0.5)
packagecloud (>= 0.0.0)
yum-epel (>= 0.0.0)
seven_zip (2.0.2)
windows (>= 1.2.2)
swap (0.3.8)
swap (2.0.0)
windows (2.1.1)
ohai (>= 4.0.0)
xfs (2.0.1)
xml (1.2.13)
build-essential (>= 0.0.0)
chef-sugar (>= 0.0.0)
yum (4.1.0)
yum (5.0.0)
yum-epel (2.1.1)
compat_resource (>= 12.16.3)
yum-mysql-community (2.0.3)
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ rs-mysql Cookbook CHANGELOG

This file is used to list changes made in each version of the rs-mysql cookbook.

v2.0.2
------
- adds ephemeral_lvm > 3.0
- allows customizable mysql server versions, refer to README.md for supported versions.
- updated test-kitchen to allow for testing for multiple versions.

v2.0.1
------
- adds azure rm support for private ips, issue: [#68][]
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ Github Repository: [https://github.com/rightscale-cookbooks/rs-mysql](https://gi
* See cookbook version 1.2.6 for chef11 support
* See cookbook version 1.1.9 for RightLink 6 support
* Platform
* Ubuntu 12.04
* CentOS 6
* Ubuntu 12.04(MySQL 5.5, MySQL 5.6)
* Ubuntu 14.04(MySQL 5.5, MySQL 5.6)
* CentOS 6(MySQL 5.5, MySQL 5.6, MySQL 5.7)
* CentOS 7(MySQL 5.5, MySQL 5.6, MySQL 5.7)
* Cookbooks
* [marker](http://community.opscode.com/cookbooks/marker)
* [mysql](http://community.opscode.com/cookbooks/mysql)
Expand Down
4 changes: 2 additions & 2 deletions attributes/old_mysql_cookbook_server_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
default['rs-mysql']['tunable']['bulk_insert_buffer_size'] = node['rs-mysql']['tunable']['tmp_table_size']
default['rs-mysql']['tunable']['net_read_timeout'] = '30'
default['rs-mysql']['tunable']['net_write_timeout'] = '30'
default['rs-mysql']['tunable']['table_cache'] = '128'
default['rs-mysql']['tunable']['table_open_cache'] = node['rs-mysql']['tunable']['table_cache'] # table_cache is deprecated
default['rs-mysql']['tunable']['table_cache'] = '128' if node['rs-mysql']['mysql']['version'] < '5.5'
default['rs-mysql']['tunable']['table_open_cache'] = '128' if node['rs-mysql']['mysql']['version'] > '5.5'
# in favor of table_open_cache
default['rs-mysql']['tunable']['thread_cache_size'] = 8
default['rs-mysql']['tunable']['thread_concurrency'] = 10
Expand Down
6 changes: 3 additions & 3 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
license 'Apache 2.0'
description 'Installs and configures a MySQL server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.0.1'
version '2.0.2'
issues_url 'https://github.com/rightscale-cookbooks/rs-mysql/issues' if respond_to?(:issues_url)
source_url 'https://github.com/rightscale-cookbooks/rs-mysql' if respond_to?(:source_url)
chef_version '>= 12.0' if respond_to?(:chef_version)
Expand All @@ -19,8 +19,8 @@
depends 'collectd'
depends 'rightscale_tag', '~> 2.0'
depends 'filesystem'
depends 'ephemeral_lvm', '~> 2.0'
depends 'lvm', '~> 3.1'
depends 'ephemeral_lvm', '~> 3.0'
depends 'lvm'
depends 'rightscale_volume', '~> 2.0'
depends 'rightscale_backup', '~> 2.0'
depends 'build-essential'
Expand Down
1 change: 1 addition & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class Chef::Recipe

mysql_service 'default' do
initial_root_password node['rs-mysql']['server_root_password']
version node['rs-mysql']['mysql']['version']
action [:create]
end

Expand Down
4 changes: 2 additions & 2 deletions templates/default/tunable.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ wait_timeout = <%= @config['wait_timeout'] %>
net_read_timeout = <%= @config['net_read_timeout'] %>
net_write_timeout = <%= @config['net_write_timeout'] %>
back_log = <%= @config['back_log'] %>
<%- if node['mysql']['version'].to_f >= 5.6 %>
<%- if node['rs-mysql']['mysql']['version'].to_f >= 5.6 %>
table_open_cache = <%= @config['table_open_cache'] %>
<%- else %>
table_cache = <%= @config['table_open_cache'] %>
table_cache = <%= @config['table_cache'] %>
<%- end %>

tmp_table_size = <%= @config['tmp_table_size'] %>
Expand Down

0 comments on commit ac591c5

Please sign in to comment.