fhcap-cli 0.4.11 → 0.4.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09020b5dc2b0856ed6a23b9cba27bd6b64292a28
4
- data.tar.gz: 3feb30346f4309392dfab910dc01717a3e75ab61
3
+ metadata.gz: 586e4b4984cbf2ee4847cfa59ca3a69bb7784345
4
+ data.tar.gz: bb3fc51822d6289862e760de8251eea9abbb2689
5
5
  SHA512:
6
- metadata.gz: bb24f0d1e80edb6eb66c3298e8eb7cb2698a59ceabeb12dea7d37b40d5b7b2dcb9e4e68bb73e167f3715b91311b3f234665d312c65e1bb340448dc12535bf6e1
7
- data.tar.gz: 31c31e4980a12127a5c7e6d1a524b2acce6d18954c636c835ca4350cf2132db9f6394628a4707e40dc804eae5c82a610f09daa9d0eba77ac99ffc6f1fe281d37
6
+ metadata.gz: ab9358a1d95772e4bc80f9b256da13a476c0b2075eb3b11dd90377d64645229a0808761d811f6562b68275b844cc231d74f4c476a162ff779c31ecdb62434742
7
+ data.tar.gz: c7410c8d9b6ec940b8b130ffefbd1f7504961fe1f53ba7a5d6fdff1bd05d80aa29ccabdb6633a5a3e8aa10e1610f29bd9b2a1136d1bfa969392fdf6f604a031a
@@ -1,6 +1,15 @@
1
1
 
2
2
  ## Unreleased
3
3
 
4
+ ## 0.4.12
5
+
6
+ * [RHMAP-14106] - Add cookbook option to component update tasks. Allows updating the version of a component that isn't contained in a cookbook of the same name.
7
+ * [RHMAP-13583] - Adding support for NFS server in Openshift Multi Node templates
8
+ * [RHMAP-13133] - Add options to component update task that allow any stage to be skipped (artifact/config/cookbook update)
9
+ * [RHMAP-13133] - Use force flag to force attribute file update during component update if set to true.
10
+ * [RHMAP-13137] - Openshift Multi Node Cluster support: Added new templates, environments and post create recipes for both AWS and Openstack
11
+ * [RHMAP-13265] - Modified DNS creation logic to support ELBs in AWS Openshift Multi Node Cluster template (ose_multi_node)
12
+
4
13
  ## 0.4.11
5
14
 
6
15
  * Fix component update for components that do not have a config that can be parsed into chef attributes (unifiedpush)
@@ -0,0 +1,41 @@
1
+ include_recipe 'provision::common'
2
+ include_recipe "provision::#{node['driver']}"
3
+
4
+ with_cluster_instances(node) do |cluster_instances|
5
+ cluster_instances.each do |chef_environment, instances|
6
+ with_chef_environment chef_environment do
7
+
8
+ search_role = '.*ose.*_server'
9
+ run_list_query = /role\[#{search_role}\]/
10
+
11
+ ose_instances = instances.select do |name, cfg|
12
+ if cfg[:instance_config] && cfg[:instance_config][:run_list] && cfg[:instance_config][:run_list].index { |s| s =~ run_list_query }
13
+ node.default['tmp_node_run_list'] = {} unless node['tmp_node_run_list']
14
+ tmp_run_list = node['tmp_node_run_list'][name] ? node['tmp_node_run_list'][name].dup : []
15
+ if cfg[:instance_config][:run_list].include?("role[ose_storage_server]")
16
+ tmp_run_list << 'role[ose_storage_server]'
17
+ else
18
+ tmp_run_list << 'recipe[openshift::common]'
19
+ end
20
+ cfg[:instance_config][:tmp_run_list] = tmp_run_list
21
+ node.default['tmp_node_run_list'][name] = tmp_run_list
22
+ true
23
+ else
24
+ false
25
+ end
26
+ end
27
+
28
+ machine_batch "ose_reset_cluster: Batch Provison" do
29
+ ose_instances.each do |name, cfg|
30
+ machine name do
31
+ chef_environment chef_environment
32
+ machine_options(cfg[:machine_options])
33
+ run_list cfg[:instance_config][:tmp_run_list]
34
+ end
35
+ end
36
+ action :converge
37
+ end
38
+
39
+ end
40
+ end
41
+ end
@@ -1,4 +1,5 @@
1
1
 
2
2
  include_recipe "provision::galera_reset_cluster"
3
3
  include_recipe "provision::rabbitmq_reset_cluster"
4
- include_recipe "provision::mongo_reset_cluster"
4
+ include_recipe "provision::mongo_reset_cluster"
5
+ include_recipe "provision::ose_reset_cluster"
@@ -3,7 +3,7 @@ require "pathname"
3
3
 
4
4
  module Fhcap
5
5
  GEM_DIR = File.expand_path '..', File.dirname(__FILE__)
6
- TEMPLATE_NAMES = %w{single core-3node mbaas-3node core-mbaas-6node core-small-9node nginx-test single-blank farm-3node farm-5node farm-single ose-single}.sort
6
+ TEMPLATE_NAMES = %w{single core-3node mbaas-3node core-mbaas-6node core-small-9node nginx-test single-blank farm-3node farm-5node farm-single ose-single ose-multi-node}.sort
7
7
 
8
8
  class << self
9
9
  def source_root
@@ -7,36 +7,41 @@ module Fhcap
7
7
 
8
8
  add_shared_option :verbose, :aliases => "-v", :desc => "Verbose output", :type => :boolean, :required => false, :default => false
9
9
  add_shared_option :interactive, :aliases => "-i", :desc => "Interactive mode (Stops for input)", :type => :boolean, :required => false, :default => false
10
+ add_shared_option :cookbook, :desc => "Cookbook where component artifact version is stored if different from component name", :type => :string, :required => false
10
11
 
11
12
  desc "update COMPONENT VERSION BUILD", "Update a single component"
12
13
 
13
- shared_options :interactive, :verbose
14
+ shared_options :interactive, :verbose, :cookbook
14
15
  method_option 'force', :type => :boolean, :aliases => "-f", :desc => "Will force the component version update even if the artifact cant be found"
15
16
  method_option 'level', :type => :string, :aliases => "-l", :desc => "Cookbook Bump level", :default => 'minor', :enum => %w{major minor patch}
17
+ method_option 'update-artifact', :desc => "Update component artifact", :type => :boolean, :required => false, :default => true
18
+ method_option 'update-config', :desc => "Update component config", :type => :boolean, :required => false, :default => true
19
+ method_option 'update-cookbook', :desc => "Update component cookbook", :type => :boolean, :required => false, :default => true
16
20
 
17
21
  def update(component, version, build)
18
22
 
23
+ artifact_cookbook = options[:cookbook] || component
19
24
  #1. Update artifact version
20
- Fhcap::CLI::Component.new.invoke(:update_artifact, [component, version, build], {interactive: options[:interactive]})
25
+ Fhcap::CLI::Component.new.invoke(:update_artifact, [component, version, build], {cookbook: artifact_cookbook, interactive: options[:interactive]}) if options['update-artifact']
21
26
 
22
27
  #2. Update config
23
- Fhcap::CLI::Component.new.invoke(:update_config, [component], {force: options[:force]})
28
+ Fhcap::CLI::Component.new.invoke(:update_config, [artifact_cookbook], {force: options[:force]}) if options['update-config']
24
29
 
25
30
  #3. Update cookbook
26
- Fhcap::CLI::Cookbook.new.invoke(:update, [], {cookbooks: [component], level: options['level']})
31
+ Fhcap::CLI::Cookbook.new.invoke(:update, [], {cookbooks: [artifact_cookbook], level: options['level']}) if options['update-cookbook']
27
32
 
28
33
  end
29
34
 
30
35
  desc "update_artifact COMPONENT VERSION BUILD", "Update a single component artifact"
31
36
 
32
- shared_options :interactive
37
+ shared_options :interactive, :cookbook
33
38
 
34
39
  def update_artifact(component, version, build)
35
40
  require "fhcap/tasks/chef/cookbook/update_artifact"
36
- Tasks::Chef::Cookbook::UpdateArtifact.new(task_options(options.dup.merge({cookbook: component, version: version, build: build}))).run
41
+ Tasks::Chef::Cookbook::UpdateArtifact.new(task_options(options.dup.merge({cookbook: options[:cookbook], component: component, version: version, build: build}))).run
37
42
  end
38
43
 
39
- desc "update_config COMPONENT", "Generates a chef attributes file from the given config file (json or java properties)"
44
+ desc "update_config COOKBOOK", "Generates a chef attributes file from the given config file (json or java properties)"
40
45
  long_desc <<-LONGDESC
41
46
  Updates a chef attribute file e.g. site-cookbooks/fh-ngui/attributes/conf.json form a config file stored within the
42
47
  components own git repository e.g. <FH_SRC_DIR>/fh-ngui/config.dev.json. It can take both json config files
@@ -6,20 +6,24 @@ module Fhcap
6
6
  module Cookbook
7
7
  class UpdateArtifact < ChefTaskBase
8
8
 
9
- attr_reader :name, :version, :build
9
+ attr_reader :name, :cookbook, :version, :build
10
10
 
11
11
  def initialize(options)
12
12
  super
13
- @name = options[:cookbook]
13
+ @name = options[:component]
14
+ @cookbook = options[:cookbook] || @name
14
15
  @version = options[:version]
15
16
  @build = options[:build]
16
17
  end
17
18
 
18
19
  def run
19
- thor.say "Chef::Cookbook::UpdateArtifact cookbook = #{name}, version = #{version}, build = #{build}", :yellow
20
- cookbook = cookbook_loader.cookbooks_by_name[name]
20
+ thor.say "Chef::Cookbook::UpdateArtifact name = #{name}, cookbook = #{cookbook}, version = #{version}, build = #{build}", :yellow
21
+ c = cookbook_loader.cookbooks_by_name[cookbook]
22
+ unless c
23
+ exit_with_error("Failed to load cookbook \"#{cookbook}\"!")
24
+ end
21
25
 
22
- artifact_attribute_filepath = cookbook.attribute_filenames.find { |e| /artifact.rb/ =~ e }
26
+ artifact_attribute_filepath = c.attribute_filenames.find { |e| /artifact.rb/ =~ e }
23
27
 
24
28
  if artifact_attribute_filepath
25
29
  text = File.read(artifact_attribute_filepath)
@@ -27,7 +31,7 @@ module Fhcap
27
31
  replace = replace.gsub(/default\['#{name}'\]\['build'\] = .+$/, "default['#{name}']['build'] = '#{build}'")
28
32
  thor.create_file(artifact_attribute_filepath, replace, {force: !options[:interactive]})
29
33
  else
30
- thor.say_status("error", "No artifact file found for #{name}", :red)
34
+ thor.say_status("error", "No artifact file found for #{name} in #{cookbook}", :red)
31
35
  end
32
36
 
33
37
  end
@@ -63,7 +63,7 @@ module Fhcap
63
63
  end
64
64
  cfg.from_attributes_file(name, conf_attr_file)
65
65
  cfg.from_file(file, force, overrides)
66
- thor.create_file(conf_attr_file, cfg.attribute_file_content(name, sort))
66
+ thor.create_file(conf_attr_file, cfg.attribute_file_content(name, sort), {force: force})
67
67
  else
68
68
  thor.say "Missing local file '#{file}', skipping config update"
69
69
  end
@@ -71,42 +71,44 @@ module Fhcap
71
71
  end
72
72
 
73
73
  def create_dns_record_openstack
74
- create_records_for_query("recipes:nginx_feedhenry\\:\\:loadbalancer", ["*"])
74
+ cluster_config[:environments].each do |env_name, env_cfg|
75
+ create_records_for_query(env_name, env_cfg, "recipes:nginx_feedhenry\\:\\:loadbalancer", ["*"])
76
+ end
75
77
  end
76
78
 
77
79
  def create_records_openshift
78
80
  #This is a very basic openshift DNS setup and does not take into account a HA setup or LBs
79
- create_records_for_query("roles:ose_master_server", [""])
80
- create_records_for_query("roles:ose_node_server", ["*"])
81
+ cluster_config[:environments].each do |env_name, env_cfg|
82
+ create_records_for_query(env_name, env_cfg, "roles:ose_master_server", [""])
83
+ create_records_for_query(env_name, env_cfg, "roles:ose_node_server", ["*"]) unless env_cfg[:load_balancers]
84
+ end
81
85
  end
82
86
 
83
- def create_records_for_query(query, records)
84
- cluster_config[:environments].each do |env_name, env_cfg|
85
- env_name = "#{name}-#{env_name}"
86
- knife_config_file = knife_config_file_for(cluster_config[:chef_server])
87
- #ToDo [RHMAP-2898] Use knife object
88
- nodes = JSON.parse(`knife search "chef_environment:#{env_name} AND #{query}" -c #{knife_config_file} -F json -a name -a cloud.public_ipv4`)
89
-
90
- query_node = nodes['rows'].collect do |row|
91
- name, attrs = row.first
92
- attrs
93
- end.first
94
-
95
- if query_node
96
- if query_node['cloud.public_ipv4']
97
- records.each do |record|
98
- dns_record_cfg = {
99
- domain: [record, env_cfg[:domain]].compact.reject(&:empty?).join('.'),
100
- ipaddress: query_node['cloud.public_ipv4']
101
- }
102
- Dns::CreateRecord.new(@options.dup.merge(dns_record_cfg)).run
103
- end
104
- else
105
- thor.say "Found query node '#{query_node['name']}', but was unable to retrieve it's IP!!}"
87
+ def create_records_for_query(env_name, env_cfg, query, records)
88
+ env_name = "#{name}-#{env_name}"
89
+ knife_config_file = knife_config_file_for(cluster_config[:chef_server])
90
+ #ToDo [RHMAP-2898] Use knife object
91
+ nodes = JSON.parse(`knife search "chef_environment:#{env_name} AND #{query}" -c #{knife_config_file} -F json -a name -a cloud.public_ipv4`)
92
+
93
+ query_node = nodes['rows'].collect do |row|
94
+ name, attrs = row.first
95
+ attrs
96
+ end.first
97
+
98
+ if query_node
99
+ if query_node['cloud.public_ipv4']
100
+ records.each do |record|
101
+ dns_record_cfg = {
102
+ domain: [record, env_cfg[:domain]].compact.reject(&:empty?).join('.'),
103
+ ipaddress: query_node['cloud.public_ipv4']
104
+ }
105
+ Dns::CreateRecord.new(@options.dup.merge(dns_record_cfg)).run
106
106
  end
107
107
  else
108
- thor.say "Unable to locate node for query '#{query}' in cluster!!"
108
+ thor.say "Found query node '#{query_node['name']}', but was unable to retrieve it's IP!!}"
109
109
  end
110
+ else
111
+ thor.say "Unable to locate node for query '#{query}' in cluster!!"
110
112
  end
111
113
  end
112
114
 
@@ -123,4 +125,4 @@ module Fhcap
123
125
  end
124
126
  end
125
127
  end
126
- end
128
+ end
@@ -160,6 +160,8 @@ module Fhcap
160
160
  'mbaas'
161
161
  when /ose-single/
162
162
  'ose-single'
163
+ when /ose-multi-node/
164
+ 'ose-multi-node'
163
165
  when /single/
164
166
  'single'
165
167
  when /farm/
@@ -172,4 +174,4 @@ module Fhcap
172
174
  end
173
175
  end
174
176
  end
175
- end
177
+ end
@@ -1,3 +1,3 @@
1
1
  module Fhcap
2
- VERSION = "0.4.11"
2
+ VERSION = "0.4.12"
3
3
  end
@@ -15,20 +15,46 @@ describe Fhcap::Tasks::Chef::Cookbook::UpdateArtifact do
15
15
  {}
16
16
  end
17
17
 
18
- let(:options) do
19
- {
20
- :config => config,
21
- :thor => thor,
22
- :cookbook => 'testname',
23
- :version => '9.9.9',
24
- :build => '999'
25
- }
26
- end
18
+ context "without cookbook" do
19
+
20
+ let(:options) do
21
+ {
22
+ :config => config,
23
+ :thor => thor,
24
+ :component => 'testname',
25
+ :version => '9.9.9',
26
+ :build => '999'
27
+ }
28
+ end
29
+
30
+ describe "#initialize" do
31
+ specify { expect(subject.name).to eq('testname') }
32
+ specify { expect(subject.cookbook).to eq('testname') }
33
+ specify { expect(subject.version).to eq('9.9.9') }
34
+ specify { expect(subject.build).to eq('999') }
35
+ end
27
36
 
28
- describe "#initialize" do
29
- specify { expect(subject.name).to eq('testname') }
30
- specify { expect(subject.version).to eq('9.9.9') }
31
- specify { expect(subject.build).to eq('999') }
32
37
  end
33
38
 
39
+ context "with cookbook" do
40
+
41
+ let(:options) do
42
+ {
43
+ :config => config,
44
+ :thor => thor,
45
+ :component => 'testname',
46
+ :cookbook => 'testcookbook',
47
+ :version => '9.9.9',
48
+ :build => '999'
49
+ }
50
+ end
51
+
52
+ describe "#initialize" do
53
+ specify { expect(subject.name).to eq('testname') }
54
+ specify { expect(subject.cookbook).to eq('testcookbook') }
55
+ specify { expect(subject.version).to eq('9.9.9') }
56
+ specify { expect(subject.build).to eq('999') }
57
+ end
58
+
59
+ end
34
60
  end
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "<%= config[:name] %>",
3
+ "description": "<%= config[:name] %> Environment",
4
+ "cookbook_versions": {
5
+ },
6
+ "json_class": "Chef::Environment",
7
+ "chef_type": "environment",
8
+ "default_attributes": {
9
+ "openshift": {
10
+ "domain": "<%= config[:domain] %>"
11
+ },
12
+ "rhsm": {
13
+ "username": "CHANGEME",
14
+ "password": "CHANGEME"
15
+ },
16
+ "resolver": {
17
+ "nameservers": [
18
+ "8.8.8.8",
19
+ "8.8.4.4"
20
+ ]
21
+ }
22
+ },
23
+ "override_attributes": {
24
+ "authorization": {
25
+ "sudo": {
26
+ "passwordless": true
27
+ }
28
+ }
29
+ }
30
+ }
@@ -39,11 +39,34 @@
39
39
  "security_groups": {
40
40
  "ops-admin": {
41
41
  "authorize_ingress": [
42
+ {
43
+ "protocols": ["icmp"],
44
+ "start": -1,
45
+ "end": -1,
46
+ "sources": [
47
+ "52.51.188.129"
48
+ ]
49
+ },
42
50
  {
43
51
  "protocols": ["all"],
44
52
  "start": 0,
45
53
  "end": 65535,
46
- "sources": ["<%= @my_public_ip %>", "83.147.149.210/32", "46.38.161.225/32", "54.229.76.48/32", "79.125.117.182/32", "78.137.150.209/32", "52.37.106.23", "52.50.12.70", "52.62.158.176", "52.70.198.93", "52.193.17.19", "52.86.106.110", "52.48.49.57"]
54
+ "sources": [
55
+ "<%= @my_public_ip %>",
56
+ "46.38.161.225/32",
57
+ "52.193.17.19",
58
+ "52.37.106.23",
59
+ "52.48.49.57",
60
+ "52.50.12.70",
61
+ "52.51.188.129",
62
+ "52.62.158.176",
63
+ "52.70.198.93",
64
+ "52.86.106.110",
65
+ "54.229.76.48/32",
66
+ "78.137.150.209/32",
67
+ "79.125.117.182/32",
68
+ "149.11.36.106/32"
69
+ ]
47
70
  }
48
71
  ]
49
72
  },
@@ -58,4 +81,4 @@
58
81
  ]
59
82
  }
60
83
  }
61
- }
84
+ }
@@ -0,0 +1,230 @@
1
+ {
2
+ "domain": "<%= config[:domain] %>",
3
+ <%- unless config[:provider_config][:cidr] == "none" -%>
4
+ "subnets": {
5
+ "1a": {
6
+ "cidr": "0/26",
7
+ "availability_zone": "1a"
8
+ },
9
+ "1b": {
10
+ "cidr": "64/26",
11
+ "availability_zone": "1b"
12
+ },
13
+ "1c": {
14
+ "cidr": "128/26",
15
+ "availability_zone": "1c"
16
+ }
17
+ },
18
+ "vpc": {
19
+ "enable_dns_support": true,
20
+ "enable_dns_hostnames": true
21
+ },
22
+ <%- end -%>
23
+ "security_groups": {
24
+ "<%= config[:environment_name] %>-ose-master": {
25
+ "authorize_ingress": [
26
+ {
27
+ "protocols": [
28
+ "all"
29
+ ],
30
+ "start": 0,
31
+ "end": 65535,
32
+ "groups": [
33
+ "<%= config[:environment_name] %>-ose-master",
34
+ "<%= config[:environment_name] %>-ose-node",
35
+ "<%= config[:environment_name] %>-ose-nfs"
36
+ ]
37
+ },
38
+ {
39
+ "protocols": [
40
+ "icmp"
41
+ ],
42
+ "start": -1,
43
+ "end": -1,
44
+ "groups": [
45
+ "<%= config[:environment_name] %>-ose-master",
46
+ "<%= config[:environment_name] %>-ose-node",
47
+ "<%= config[:environment_name] %>-ose-nfs"
48
+ ]
49
+ },
50
+ {
51
+ "protocols": [
52
+ "tcp"
53
+ ],
54
+ "start": 8443,
55
+ "end": 8443,
56
+ "sources": [
57
+ "0.0.0.0/0"
58
+ ]
59
+ }
60
+ ]
61
+ },
62
+ "<%= config[:environment_name] %>-ose-node": {
63
+ "authorize_ingress": [
64
+ {
65
+ "protocols": [
66
+ "all"
67
+ ],
68
+ "start": 0,
69
+ "end": 65535,
70
+ "groups": [
71
+ "<%= config[:environment_name] %>-ose-master",
72
+ "<%= config[:environment_name] %>-ose-node",
73
+ "<%= config[:environment_name] %>-ose-lb",
74
+ "<%= config[:environment_name] %>-ose-nfs"
75
+ ]
76
+ },
77
+ {
78
+ "protocols": [
79
+ "icmp"
80
+ ],
81
+ "start": -1,
82
+ "end": -1,
83
+ "groups": [
84
+ "<%= config[:environment_name] %>-ose-master",
85
+ "<%= config[:environment_name] %>-ose-node",
86
+ "<%= config[:environment_name] %>-ose-lb",
87
+ "<%= config[:environment_name] %>-ose-nfs"
88
+ ]
89
+ }
90
+ ]
91
+ },
92
+ "<%= config[:environment_name] %>-ose-lb": {
93
+ "authorize_ingress": [
94
+ {
95
+ "protocols": [
96
+ "tcp"
97
+ ],
98
+ "start": 80,
99
+ "end": 80,
100
+ "sources": [
101
+ "0.0.0.0/0"
102
+ ]
103
+ }
104
+ ]
105
+ },
106
+ "<%= config[:environment_name] %>-ose-nfs": {
107
+ "authorize_ingress": [
108
+ {
109
+ "protocols": [
110
+ "all"
111
+ ],
112
+ "start": 0,
113
+ "end": 65535,
114
+ "groups": [
115
+ "<%= config[:environment_name] %>-ose-master",
116
+ "<%= config[:environment_name] %>-ose-node",
117
+ "<%= config[:environment_name] %>-ose-nfs"
118
+ ]
119
+ },
120
+ {
121
+ "protocols": [
122
+ "icmp"
123
+ ],
124
+ "start": -1,
125
+ "end": -1,
126
+ "groups": [
127
+ "<%= config[:environment_name] %>-ose-master",
128
+ "<%= config[:environment_name] %>-ose-node",
129
+ "<%= config[:environment_name] %>-ose-lb"
130
+ ]
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ "load_balancers": {
136
+ "ose-lb": {
137
+ "security_groups": ["<%= config[:environment_name] %>-ose-lb"],
138
+ "subnets": ["1a", "1b", "1c"],
139
+ "scheme": "internet-facing",
140
+ "listeners": [
141
+ {
142
+ "port": 80,
143
+ "protocol": "http",
144
+ "instance_port": 80,
145
+ "instance_protocol": "http"
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ "instances": {
151
+ "master1": {
152
+ "aws": {
153
+ "security_groups": [
154
+ "ops-admin",
155
+ "<%= config[:environment_name] %>-ose-master"
156
+ ]
157
+ <%- unless config[:provider_config][:cidr] == "none" -%>
158
+ ,"private_ip_address": "",
159
+ "subnet": "1a"
160
+ <%- end -%>
161
+ },
162
+ "run_list": [
163
+ "role[ose_master_server]"
164
+ ]
165
+ },
166
+ "node1": {
167
+ "aws": {
168
+ "security_groups": [
169
+ "ops-admin",
170
+ "<%= config[:environment_name] %>-ose-node"
171
+ ]
172
+ <%- unless config[:provider_config][:cidr] == "none" -%>
173
+ ,"private_ip_address": "",
174
+ "subnet": "1a"
175
+ <%- end -%>
176
+ },
177
+ "run_list": [
178
+ "role[ose_node_server]"
179
+ ],
180
+ "load_balancers": ["ose-lb"]
181
+ },
182
+ "node2": {
183
+ "aws": {
184
+ "security_groups": [
185
+ "ops-admin",
186
+ "<%= config[:environment_name] %>-ose-node"
187
+ ]
188
+ <%- unless config[:provider_config][:cidr] == "none" -%>
189
+ ,"private_ip_address": "",
190
+ "subnet": "1b"
191
+ <%- end -%>
192
+ },
193
+ "run_list": [
194
+ "role[ose_node_server]"
195
+ ],
196
+ "load_balancers": ["ose-lb"]
197
+ },
198
+ "node3": {
199
+ "aws": {
200
+ "security_groups": [
201
+ "ops-admin",
202
+ "<%= config[:environment_name] %>-ose-node"
203
+ ]
204
+ <%- unless config[:provider_config][:cidr] == "none" -%>
205
+ ,"private_ip_address": "",
206
+ "subnet": "1c"
207
+ <%- end -%>
208
+ },
209
+ "run_list": [
210
+ "role[ose_node_server]"
211
+ ],
212
+ "load_balancers": ["ose-lb"]
213
+ },
214
+ "nfs1": {
215
+ "aws": {
216
+ "security_groups": [
217
+ "ops-admin",
218
+ "<%= config[:environment_name] %>-ose-nfs"
219
+ ]
220
+ <%- unless config[:provider_config][:cidr] == "none" -%>
221
+ ,"private_ip_address": "",
222
+ "subnet": "1a"
223
+ <%- end -%>
224
+ },
225
+ "run_list": [
226
+ "role[ose_storage_server]"
227
+ ]
228
+ }
229
+ }
230
+ }
@@ -87,8 +87,9 @@
87
87
  },
88
88
  "run_list": [
89
89
  "role[ose_master_server]",
90
- "role[ose_node_server]"
90
+ "role[ose_node_server]",
91
+ "role[ose_storage_server]"
91
92
  ]
92
93
  }
93
94
  }
94
- }
95
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "domain": "<%= config[:domain] %>",
3
+ "instances": {
4
+ "master1": {
5
+ "run_list": [
6
+ "role[ose_master_server]"
7
+ ]
8
+ },
9
+ "node1": {
10
+ "run_list": [
11
+ "role[ose_node_server]"
12
+ ]
13
+ },
14
+ "node2": {
15
+ "run_list": [
16
+ "role[ose_node_server]"
17
+ ]
18
+ },
19
+ "node3": {
20
+ "run_list": [
21
+ "role[ose_node_server]"
22
+ ]
23
+ },
24
+ "nfs1": {
25
+ "run_list": [
26
+ "role[ose_storage_server]"
27
+ ]
28
+ }
29
+ }
30
+ }
@@ -4,8 +4,9 @@
4
4
  "node1": {
5
5
  "run_list": [
6
6
  "role[ose_master_server]",
7
- "role[ose_node_server]"
7
+ "role[ose_node_server]",
8
+ "role[ose_storage_server]"
8
9
  ]
9
10
  }
10
11
  }
11
- }
12
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "environments": [
3
+ {
4
+ "name": "ose-multi-node",
5
+ "template": "ose-multi-node"
6
+ }
7
+ ]
8
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fhcap-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.11
4
+ version: 0.4.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Nairn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -476,6 +476,7 @@ files:
476
476
  - lib/cookbooks/provision/recipes/openstack_cluster_destroy.rb
477
477
  - lib/cookbooks/provision/recipes/ose_install.rb
478
478
  - lib/cookbooks/provision/recipes/ose_post_install.rb
479
+ - lib/cookbooks/provision/recipes/ose_reset_cluster.rb
479
480
  - lib/cookbooks/provision/recipes/post_create_instances.rb
480
481
  - lib/cookbooks/provision/recipes/rabbitmq_reset_cluster.rb
481
482
  - lib/cookbooks/provision/recipes/restart_services.rb
@@ -601,6 +602,7 @@ files:
601
602
  - templates/chef/environment_empty.json.erb
602
603
  - templates/chef/environment_farm.json.erb
603
604
  - templates/chef/environment_mbaas.json.erb
605
+ - templates/chef/environment_ose-multi-node.json.erb
604
606
  - templates/chef/environment_ose-single.json.erb
605
607
  - templates/chef/environment_single.json.erb
606
608
  - templates/cluster/aws/common.json.erb
@@ -611,6 +613,7 @@ files:
611
613
  - templates/cluster/aws/farm-single.json.erb
612
614
  - templates/cluster/aws/mbaas-3node.json.erb
613
615
  - templates/cluster/aws/nginx-test.json.erb
616
+ - templates/cluster/aws/ose-multi-node.json.erb
614
617
  - templates/cluster/aws/ose-single.json.erb
615
618
  - templates/cluster/aws/single-blank.json.erb
616
619
  - templates/cluster/aws/single.json.erb
@@ -630,9 +633,11 @@ files:
630
633
  - templates/cluster/openstack/farm-single.json.erb
631
634
  - templates/cluster/openstack/mbaas-3node.json.erb
632
635
  - templates/cluster/openstack/nginx-test.json.erb
636
+ - templates/cluster/openstack/ose-multi-node.json.erb
633
637
  - templates/cluster/openstack/ose-single.json.erb
634
638
  - templates/cluster/openstack/single-blank.json.erb
635
639
  - templates/cluster/openstack/single.json.erb
640
+ - templates/cluster/ose-multi-node.json.erb
636
641
  - templates/cluster/ose-single.json.erb
637
642
  - templates/cluster/single-blank.json.erb
638
643
  - templates/cluster/single.json.erb