Commit 70840e0822912e664b36f20d9262f93ceca2efd3

Authored by nollieheel
Committed by Earth Ugat
1 parent 1734bd1c

Version 0.2.0. Made MariaDB client installation optional. Add dependency to cfe-mongodb.

@@ -9,8 +9,6 @@ driver: @@ -9,8 +9,6 @@ driver:
9 associate_public_ip: true 9 associate_public_ip: true
10 require_chef_omnibus: 12.12.15 10 require_chef_omnibus: 12.12.15
11 shared_credentials_profile: earth 11 shared_credentials_profile: earth
12 - aws_ssh_key_id: cfe_stg_20160222  
13 - iam_profile_name: CFE_ops-test  
14 12
15 provisioner: 13 provisioner:
16 name: chef_zero 14 name: chef_zero
@@ -18,10 +16,10 @@ provisioner: @@ -18,10 +16,10 @@ provisioner:
18 platforms: 16 platforms:
19 - name: ubuntu-14.04 17 - name: ubuntu-14.04
20 driver: 18 driver:
21 - image_id: ami-a24598c2 19 + image_id: ami-xxx
22 transport: 20 transport:
23 username: ubuntu 21 username: ubuntu
24 - ssh_key: ~/.ssh/cfe_stg_20160222.pem 22 + ssh_key: ~/.ssh/xxx.pem
25 23
26 suites: 24 suites:
27 - name: default 25 - name: default
@@ -4,6 +4,7 @@ metadata @@ -4,6 +4,7 @@ metadata
4 4
5 cookbook 'cfe-users', git: 'https://gitlab.chromedia.com/ops/cfe-users.git', tag: 'v0.1.1' 5 cookbook 'cfe-users', git: 'https://gitlab.chromedia.com/ops/cfe-users.git', tag: 'v0.1.1'
6 cookbook 'cfe-mariadb', git: 'https://gitlab.chromedia.com/ops/cfe-mariadb.git', tag: 'v0.5.1' 6 cookbook 'cfe-mariadb', git: 'https://gitlab.chromedia.com/ops/cfe-mariadb.git', tag: 'v0.5.1'
  7 +cookbook 'cfe-mongodb', git: 'https://gitlab.chromedia.com/ops/cfe-mongodb.git', tag: 'v0.1.0'
7 cookbook 'backup-file2s3', git: 'https://gitlab.chromedia.com/ops/backup-file2s3.git', tag: 'v0.4.0' 8 cookbook 'backup-file2s3', git: 'https://gitlab.chromedia.com/ops/backup-file2s3.git', tag: 'v0.4.0'
8 cookbook 'cfe-nginx-php-fpm', git: 'https://gitlab.chromedia.com/ops/cfe-nginx-php-fpm.git', tag: 'v0.5.2' 9 cookbook 'cfe-nginx-php-fpm', git: 'https://gitlab.chromedia.com/ops/cfe-nginx-php-fpm.git', tag: 'v0.5.2'
9 cookbook 'cfe-simple-iptables', git: 'https://gitlab.chromedia.com/ops/cfe-simple-iptables.git', tag: 'v0.1.0' 10 cookbook 'cfe-simple-iptables', git: 'https://gitlab.chromedia.com/ops/cfe-simple-iptables.git', tag: 'v0.1.0'
  1 +## 0.2.0 - 2017-01-04
  2 +### Added
  3 +- Add dependency to 'cfe-mongodb' (removed 'mongodb3' direct dependency).
  4 +- Add attribute that makes MariaDB client installation optional.
  5 +
1 ## 0.1.4 - 2016-12-22 6 ## 0.1.4 - 2016-12-22
2 ### Changed 7 ### Changed
3 - Attribute node['cookbook-zabbix']['agent']['server_ip'] should now be in a secret data bag item named 'cfe-server-secret'. 8 - Attribute node['cookbook-zabbix']['agent']['server_ip'] should now be in a secret data bag item named 'cfe-server-secret'.
@@ -18,10 +18,16 @@ Tested on Ubuntu 14.04. @@ -18,10 +18,16 @@ Tested on Ubuntu 14.04.
18 <tr> 18 <tr>
19 <td><tt>['cfe-server']['db']['mariadb']['install']</tt></td> 19 <td><tt>['cfe-server']['db']['mariadb']['install']</tt></td>
20 <td>Boolean</td> 20 <td>Boolean</td>
21 - <td>Whether or not to install MariaDB server.</td> 21 + <td>Whether or not to install MariaDB server recipe.</td>
22 <td><tt>false</tt></td> 22 <td><tt>false</tt></td>
23 </tr> 23 </tr>
24 <tr> 24 <tr>
  25 + <td><tt>['cfe-server']['db']['include_mariadb']</tt></td>
  26 + <td>Boolean</td>
  27 + <td>Whether or not to include any of the recipes for MariaDB at all (server, client, backup reloading, and auto-backup scripts).</td>
  28 + <td><tt>true</tt></td>
  29 + </tr>
  30 + <tr>
25 <td><tt>['cfe-server']['db']['include_mongodb']</tt></td> 31 <td><tt>['cfe-server']['db']['include_mongodb']</tt></td>
26 <td>Boolean</td> 32 <td>Boolean</td>
27 <td>Whether or not to include the recipe `mongodb3`.</td> 33 <td>Whether or not to include the recipe `mongodb3`.</td>
@@ -36,8 +36,9 @@ databag = @@ -36,8 +36,9 @@ databag =
36 end 36 end
37 secret = Chef::EncryptedDataBagItem.load(databag, "#{cb}-secret") 37 secret = Chef::EncryptedDataBagItem.load(databag, "#{cb}-secret")
38 38
  39 +default[cb]['db']['include_mongodb'] = true
  40 +default[cb]['db']['include_mariadb'] = true
39 default[cb]['db']['mariadb']['install'] = false 41 default[cb]['db']['mariadb']['install'] = false
40 -default[cb]['db']['include_mongodb'] = true  
41 42
42 default[cb]['filesystem']['swapfile'] = false 43 default[cb]['filesystem']['swapfile'] = false
43 default[cb]['filesystem']['swapsize'] = '2G' 44 default[cb]['filesystem']['swapsize'] = '2G'
@@ -4,12 +4,12 @@ maintainer_email 'sysadmin@chromedia.com' @@ -4,12 +4,12 @@ maintainer_email 'sysadmin@chromedia.com'
4 license 'Apache License' 4 license 'Apache License'
5 description 'Simplifies setting up common Linux servers.' 5 description 'Simplifies setting up common Linux servers.'
6 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 6 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7 -version '0.1.4' 7 +version '0.2.0'
8 8
9 %w{ 9 %w{
10 cfe-users cfe-mariadb 10 cfe-users cfe-mariadb
11 backup-file2s3 cfe-nginx-php-fpm 11 backup-file2s3 cfe-nginx-php-fpm
12 - cfe-simple-iptables 12 + cfe-simple-iptables cfe-mongodb
13 13
14 cookbook-letsencrypt cookbook-phpmyadmin 14 cookbook-letsencrypt cookbook-phpmyadmin
15 cookbook-updater cookbook-zabbix 15 cookbook-updater cookbook-zabbix
@@ -17,7 +17,6 @@ version '0.1.4' @@ -17,7 +17,6 @@ version '0.1.4'
17 depends cb 17 depends cb
18 end 18 end
19 19
20 -depends 'mongodb3', '~> 5.2.0'  
21 depends 'composer', '~> 2.5.2' 20 depends 'composer', '~> 2.5.2'
22 depends 'cron', '~> 1.7.6' 21 depends 'cron', '~> 1.7.6'
23 22
@@ -18,16 +18,19 @@ @@ -18,16 +18,19 @@
18 # limitations under the License. 18 # limitations under the License.
19 # 19 #
20 20
21 -if node[cookbook_name]['db']['mariadb']['install']  
22 - include_recipe 'cfe-mariadb'  
23 -else  
24 - include_recipe 'mariadb::client'  
25 - include_recipe 'cfe-mariadb::schema'  
26 -end 21 +if node[cookbook_name]['db']['include_mariadb']
  22 + if node[cookbook_name]['db']['mariadb']['install']
  23 + include_recipe 'cfe-mariadb'
  24 + else
  25 + include_recipe 'mariadb::client'
  26 + include_recipe 'cfe-mariadb::schema'
  27 + end
27 28
28 -include_recipe 'cfe-mariadb::reload_from_s3'  
29 -include_recipe 'cfe-mariadb::backup2s3' 29 + include_recipe 'cfe-mariadb::reload_from_s3'
  30 + include_recipe 'cfe-mariadb::backup2s3'
  31 +end
30 32
31 if node[cookbook_name]['db']['include_mongodb'] 33 if node[cookbook_name]['db']['include_mongodb']
32 - include_recipe 'mongodb3' 34 + include_recipe 'cfe-mongodb'
  35 + include_recipe 'cfe-mongodb::backup2s3'
33 end 36 end