egon 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,5 +3,9 @@ require 'egon/undercloud/commands'
3
3
  require 'egon/undercloud/installer'
4
4
 
5
5
  installer = Egon::Undercloud::Installer.new
6
- installer.install(Egon::Undercloud::Commands.OSP8_no_registration)
7
- installer.check_ports
6
+ installer.install(Egon::Undercloud::Commands.OSP10_no_registration)
7
+ if installer.failure?
8
+ exit 1
9
+ else
10
+ installer.check_ports
11
+ end
@@ -15,7 +15,7 @@ SATELLITE_ACTIVATION_KEY = ARGV[5]
15
15
 
16
16
  connection = Egon::Undercloud::SSHConnection.new(SSH_HOST, SSH_USER, SSH_PASSWORD)
17
17
  installer = Egon::Undercloud::Installer.new(connection)
18
- installer.install(Egon::Undercloud::Commands.OSP8_satellite(SATELLITE_URL, SATELLITE_ORG, SATELLITE_ACTIVATION_KEY))
18
+ installer.install(Egon::Undercloud::Commands.OSP10_satellite(SATELLITE_URL, SATELLITE_ORG, SATELLITE_ACTIVATION_KEY))
19
19
  while !installer.completed?
20
20
  sleep 1
21
21
  end
@@ -13,7 +13,7 @@ RHSM_POOL_ID = ARGV[5]
13
13
 
14
14
  connection = Egon::Undercloud::SSHConnection.new(SSH_HOST, SSH_USER, SSH_PASSWORD)
15
15
  installer = Egon::Undercloud::Installer.new(connection)
16
- installer.install(Egon::Undercloud::Commands.OSP8_vanilla_rhel(RHSM_USER, RHSM_PASSWORD, RHSM_POOL_ID))
16
+ installer.install(Egon::Undercloud::Commands.OSP10_vanilla_rhel(RHSM_USER, RHSM_PASSWORD, RHSM_POOL_ID))
17
17
  while !installer.completed?
18
18
  sleep 1
19
19
  end
@@ -1,4 +1,5 @@
1
- require 'fog'
1
+ require 'fog/openstack'
2
+ require 'json'
2
3
  require_relative 'undercloud_handle/deployment'
3
4
  require_relative 'undercloud_handle/flavor'
4
5
  require_relative 'undercloud_handle/image'
@@ -18,7 +19,31 @@ module Overcloud
18
19
  @auth_url = auth_url
19
20
  @port = port
20
21
  end
21
-
22
+
23
+ def execute_workflow(workflow, input, wait_for_complete = true)
24
+ connection = service('Workflow')
25
+ response = connection.create_execution(workflow, input)
26
+ state = response.body['state']
27
+ workflow_execution_id = response.body['id']
28
+
29
+ return unless wait_for_complete
30
+
31
+ while state == 'RUNNING'
32
+ sleep 2
33
+ response = connection.get_execution(workflow_execution_id)
34
+ state = response.body['state']
35
+ end
36
+
37
+ if state != 'SUCCESS'
38
+ raise "Executing workflow #{workflow} on #{input} failed: #{response.body['output']}"
39
+ end
40
+ workflow_execution_id
41
+ end
42
+
43
+ def workflow_action_execution(action_name, params = {})
44
+ return JSON.parse(service('Workflow').create_action_execution(action_name, params).body["output"])["result"]
45
+ end
46
+
22
47
  private
23
48
 
24
49
  def service(service_name)
@@ -32,6 +57,8 @@ module Overcloud
32
57
 
33
58
  if service_name == 'Planning'
34
59
  return Fog::Openstack.const_get(service_name).new(fog_parameters)
60
+ elsif service_name == 'Workflow'
61
+ return Fog::Workflow::OpenStack.new(fog_parameters)
35
62
  end
36
63
  return Fog.const_get(service_name).new(fog_parameters)
37
64
  end
@@ -4,63 +4,30 @@ module Overcloud
4
4
  # BASE PLAN ACTIONS
5
5
 
6
6
  def list_plans
7
- uri = "#{base_tripleo_api_url}/plans"
8
- response = Fog::Core::Connection.new(uri, false).request({
9
- :expects => 200,
10
- :headers => {'Content-Type' => 'application/json',
11
- 'Accept' => 'application/json',
12
- 'X-Auth-Token' => auth_token},
13
- :method => 'GET'
14
- })
15
- body = Fog::JSON.decode(response.body)
16
- body['plans']
7
+ return workflow_action_execution('tripleo.plan.list')
17
8
  end
18
9
 
19
10
  def get_plan(plan_name)
20
- uri = "#{base_tripleo_api_url}/plans/#{plan_name}"
21
- response = Fog::Core::Connection.new(uri, false).request({
22
- :expects => 200,
23
- :headers => {'Content-Type' => 'application/json',
24
- 'Accept' => 'application/json',
25
- 'X-Auth-Token' => auth_token},
26
- :method => 'GET'
27
- })
28
- body = Fog::JSON.decode(response.body)
29
- body['plan']
11
+ # this doesn't exist anymore?
12
+ return {'name' => plan_name}
30
13
  end
31
14
 
32
15
  def deploy_plan(plan_name)
33
- plan = get_plan(plan_name)
34
-
35
16
  # ensure that nodes are in correct state
36
17
  for node in list_nodes
37
18
  node.set_provision_state('provide') if node.provision_state == 'manageable'
38
19
  end
39
20
 
40
- uri = "#{base_tripleo_api_url}/plans/#{plan_name}/deploy"
41
- response = Fog::Core::Connection.new(uri, false).request({
42
- :expects => 202,
43
- :headers => {'Content-Type' => 'application/json',
44
- 'Accept' => 'application/json',
45
- 'X-Auth-Token' => auth_token},
46
- :method => 'PUT'
47
- })
21
+ workflow = 'tripleo.deployment.v1.deploy_plan'
22
+ input = { container: plan_name }
23
+ execute_workflow(workflow, input, false)
48
24
  end
49
25
 
50
26
  ## PLAN PARAMETER METHODS
51
27
 
52
28
  def get_plan_parameters(plan_name)
53
- uri = "#{base_tripleo_api_url}/plans/#{plan_name}/parameters"
54
- response = Fog::Core::Connection.new(uri, false).request({
55
- :expects => 200,
56
- :headers => {'Content-Type' => 'application/json',
57
- 'Accept' => 'application/json',
58
- 'X-Auth-Token' => auth_token},
59
- :method => 'GET',
60
- :read_timeout => 360,
61
- })
62
- body = Fog::JSON.decode(response.body)
63
- body['parameters']['Parameters']
29
+ all_params = workflow_action_execution('tripleo.parameters.get', { :container => plan_name })
30
+ return flatten_parameters(all_params["heat_resource_tree"])
64
31
  end
65
32
 
66
33
  def get_plan_parameter_value(plan_name, parameter_name)
@@ -73,17 +40,11 @@ module Overcloud
73
40
  end
74
41
 
75
42
  def edit_plan_parameters(plan_name, parameters)
76
- uri = "#{base_tripleo_api_url}/plans/#{plan_name}/parameters"
77
- response = Fog::Core::Connection.new(uri, false).request({
78
- :expects => 200,
79
- :headers => {'Content-Type' => 'application/json',
80
- 'Accept' => 'application/json',
81
- 'X-Auth-Token' => auth_token},
82
- :method => 'PATCH',
83
- :body => Fog::JSON.encode(parameters),
84
- :read_timeout => 360,
85
- :write_timeout => 360,
86
- })
43
+ action_parameters = {
44
+ :container => plan_name,
45
+ :parameters => parameters
46
+ }
47
+ workflow_action_execution('tripleo.parameters.update', action_parameters)
87
48
  end
88
49
 
89
50
  def edit_plan_deployment_role_count(plan_name, role_name, count)
@@ -104,50 +65,21 @@ module Overcloud
104
65
  ## PLAN ENVIRONMENT ACTIONS
105
66
 
106
67
  def get_plan_environments(plan_name)
107
- uri = "#{base_tripleo_api_url}/plans/#{plan_name}/environments"
108
- response = Fog::Core::Connection.new(uri, false).request({
109
- :expects => 200,
110
- :headers => {'Content-Type' => 'application/json',
111
- 'Accept' => 'application/json',
112
- 'X-Auth-Token' => auth_token},
113
- :method => 'GET',
114
- :read_timeout => 360,
115
- })
116
- body = Fog::JSON.decode(response.body)
117
- body['environments']
68
+ return workflow_action_execution('tripleo.heat_capabilities.get', { :container => plan_name })
118
69
  end
119
70
 
120
71
  def edit_plan_environments(plan_name, environments)
121
- uri = "#{base_tripleo_api_url}/plans/#{plan_name}/environments"
122
- response = Fog::Core::Connection.new(uri, false).request({
123
- :expects => 200,
124
- :headers => {'Content-Type' => 'application/json',
125
- 'Accept' => 'application/json',
126
- 'X-Auth-Token' => auth_token},
127
- :method => 'PATCH',
128
- :body => Fog::JSON.encode(environments),
129
- :read_timeout => 360,
130
- :write_timeout => 360,
131
- })
72
+ action_parameters = {
73
+ :container => plan_name,
74
+ :environments => environments
75
+ }
76
+ workflow_action_execution('tripleo.heat_capabilities.update', action_parameters)
132
77
  end
133
78
 
134
79
  ## MISCELLANEOUS PLAN ACTIONS
135
80
 
136
81
  def get_plan_deployment_roles(plan_name)
137
- # temporarily hard-coded until API adds role function
138
- return ['Controller', 'Compute', 'BlockStorage', 'ObjectStorage',
139
- 'CephStorage']
140
-
141
- #uri = "#{base_tripleo_api_url}/plans/#{plan_name}/roles"
142
- #response = Fog::Core::Connection.new(uri, false).request({
143
- # :expects => 200,
144
- # :headers => {'Content-Type' => 'application/json',
145
- # 'Accept' => 'application/json',
146
- # 'X-Auth-Token' => auth_token},
147
- # :method => 'GET'
148
- # })
149
- #body = Fog::JSON.decode(response.body)
150
- #body['roles']
82
+ return workflow_action_execution('tripleo.role.list', { :container => plan_name })
151
83
  end
152
84
 
153
85
  ## HEAT ACTIONS
@@ -166,8 +98,17 @@ module Overcloud
166
98
 
167
99
  private
168
100
 
169
- def base_tripleo_api_url
170
- return "http://#{@auth_url}:8585/v1"
101
+ def flatten_parameters(base_parameters)
102
+ flat_parameters = {}
103
+ if base_parameters.key?('Parameters')
104
+ flat_parameters.merge!base_parameters['Parameters']
105
+ end
106
+ if base_parameters.key?('NestedParameters')
107
+ for nested_parameters in base_parameters['NestedParameters']
108
+ flat_parameters.merge!(flatten_parameters(nested_parameters[1]))
109
+ end
110
+ end
111
+ flat_parameters
171
112
  end
172
113
 
173
114
  end
@@ -20,7 +20,7 @@ module Overcloud
20
20
  def get_node(node_id)
21
21
  service('Baremetal').nodes.find_by_uuid(node_id)
22
22
  end
23
-
23
+
24
24
  def create_node(node_parameters)
25
25
  node = create_node_only(node_parameters)
26
26
  introspect_node(node.uuid)
@@ -28,11 +28,24 @@ module Overcloud
28
28
  end
29
29
 
30
30
  def create_node_only(node_parameters)
31
- node = service('Baremetal').nodes.create(node_parameters)
32
- create_port({:node_uuid => node.uuid, :address => node_parameters[:address]})
31
+ workflow = 'tripleo.baremetal.v1.register_or_update'
32
+ json = node_parameters_to_json(node_parameters)
33
+ input = { nodes_json: json }
34
+ workflow_execution_id = execute_workflow(workflow, input)
33
35
 
34
- node.set_provision_state('manage')
35
- node
36
+ connection = service('Workflow')
37
+ output = connection.get_execution(workflow_execution_id).body['output']
38
+ output_json = JSON.parse(output)
39
+ node_uuid = output_json['registered_nodes'].first['uuid']
40
+
41
+ configure_node(node_uuid)
42
+ get_node(node_uuid)
43
+ end
44
+
45
+ def configure_node(node_uuid)
46
+ workflow = 'tripleo.baremetal.v1.configure'
47
+ input = { node_uuids: [node_uuid] }
48
+ execute_workflow(workflow, input)
36
49
  end
37
50
 
38
51
  def create_port(port_parameters)
@@ -48,10 +61,13 @@ module Overcloud
48
61
  driver = node_data[4]
49
62
  mac_address = node_data[8]
50
63
  if driver == 'pxe_ssh'
64
+ ssh_key_contents = node_data[7]
65
+ # CSV processing appends an extra '\', we need to remove it
66
+ ssh_key_contents.gsub!("\\n", "\n")
51
67
  driver_info = {
52
68
  :ssh_address => node_data[5],
53
69
  :ssh_username => node_data[6],
54
- :ssh_key_contents => node_data[7],
70
+ :ssh_key_contents => ssh_key_contents,
55
71
  :ssh_virt_type => 'virsh',
56
72
  :deploy_kernel => get_baremetal_deploy_kernel_image.id,
57
73
  :deploy_ramdisk => get_baremetal_deploy_ramdisk_image.id
@@ -84,6 +100,33 @@ module Overcloud
84
100
  end
85
101
  end
86
102
 
103
+ def node_parameters_to_json(node_parameters)
104
+ json = {
105
+ 'disk' => node_parameters[:properties][:local_gb],
106
+ 'cpu' => node_parameters[:properties][:cpus],
107
+ 'memory' => node_parameters[:properties][:memory_mb],
108
+ 'arch' => node_parameters[:properties][:cpu_arch],
109
+ 'mac' => [node_parameters[:address]],
110
+ 'pm_type' => node_parameters[:driver]
111
+ }
112
+ if node_parameters[:driver] == 'pxe_ssh'
113
+ json['pm_user'] = node_parameters[:driver_info][:ssh_username]
114
+ if node_parameters[:driver_info][:ssh_password]
115
+ json['pm_password'] = node_parameters[:driver_info][:ssh_password]
116
+ elsif node_parameters[:driver_info][:ssh_key_contents]
117
+ json['pm_password'] = node_parameters[:driver_info][:ssh_key_contents]
118
+ end
119
+ json['pm_addr'] = node_parameters[:driver_info][:ssh_address]
120
+ elsif node_parameters[:driver] == 'pxe_ipmitool'
121
+ json['pm_user'] = node_parameters[:driver_info][:ipmi_username]
122
+ json['pm_password'] = node_parameters[:driver_info][:ipmi_password]
123
+ json['pm_addr'] = node_parameters[:driver_info][:ipmi_address]
124
+ else
125
+ raise "Unknown node driver: #{node_parameters[:driver]}"
126
+ end
127
+ [json]
128
+ end
129
+
87
130
  def delete_node(node_id)
88
131
  begin
89
132
  node = get_node(node_id)
@@ -107,14 +150,9 @@ module Overcloud
107
150
  ## OPENSTACK AND KEYSTONE
108
151
 
109
152
  def introspect_node(node_uuid)
110
- uri = "http://#{@auth_url}:5050/v1/introspection/#{node_uuid}"
111
- response = Fog::Core::Connection.new(uri, false).request({
112
- :expects => 202,
113
- :headers => {'Content-Type' => 'application/json',
114
- 'Accept' => 'application/json',
115
- 'X-Auth-Token' => auth_token},
116
- :method => 'POST'
117
- })
153
+ workflow = 'tripleo.baremetal.v1.introspect'
154
+ input = { node_uuids: [node_uuid] }
155
+ execute_workflow(workflow, input, false)
118
156
  end
119
157
 
120
158
  def introspect_node_status(node_uuid)
@@ -1,25 +1,37 @@
1
+ require 'securerandom'
1
2
 
2
3
  module Egon
3
4
  module Undercloud
4
5
  class Commands
5
6
 
6
- ## OSP7
7
-
8
- def self.OSP7_satellite(satellite_url, org, activation_key)
7
+ ## OSP Common
8
+ def self.OSP_common_satellite(satellite_url, org, activation_key)
9
9
  return "
10
10
  curl -k -O #{satellite_url}/pub/katello-ca-consumer-latest.noarch.rpm
11
11
  sudo yum install -y katello-ca-consumer-latest.noarch.rpm
12
- sudo subscription-manager register --org=\"#{org}\" --activationkey=\"#{activation_key}\"
13
- #{self.OSP7_no_registration}"
12
+ sudo subscription-manager register --org=\"#{org}\" --activationkey=\"#{activation_key}\""
14
13
  end
15
-
16
- def self.OSP7_vanilla_rhel(rhsm_user, rhsm_password, rhsm_pool_id)
14
+
15
+ def self.OSP_common_vanilla_rhel(rhsm_user, rhsm_password, rhsm_pool_id)
17
16
  return "
18
17
  sudo subscription-manager register --force --username=\"#{rhsm_user}\" --password=\"#{rhsm_password}\"
19
18
  sudo subscription-manager attach --pool=\"#{rhsm_pool_id}\"
20
19
  sudo subscription-manager repos --enable=rhel-7-server-rpms \
21
20
  --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-extras-rpms \
22
- --enable=rhel-7-server-openstack-6.0-rpms
21
+ --enable=rhel-7-server-openstack-6.0-rpms"
22
+ end
23
+
24
+ ## OSP7
25
+
26
+ def self.OSP7_satellite(satellite_url, org, activation_key)
27
+ return "
28
+ #{self.OSP_common_satellite(satellite_url, org, activation_key)}
29
+ #{self.OSP7_no_registration}"
30
+ end
31
+
32
+ def self.OSP7_vanilla_rhel(rhsm_user, rhsm_password, rhsm_pool_id)
33
+ return "
34
+ #{self.OSP_common_vanilla_rhel(rhsm_user, rhsm_password, rhsm_pool_id)}
23
35
  #{self.OSP7_no_registration}"
24
36
  end
25
37
 
@@ -243,25 +255,18 @@ module Egon
243
255
 
244
256
  def self.OSP8_satellite(satellite_url, org, activation_key)
245
257
  return "
246
- curl -k -O #{satellite_url}/pub/katello-ca-consumer-latest.noarch.rpm
247
- sudo yum install -y katello-ca-consumer-latest.noarch.rpm
248
- sudo subscription-manager register --org=\"#{org}\" --activationkey=\"#{activation_key}\"
258
+ #{self.OSP_common_satellite(satellite_url, org, activation_key)}
249
259
  #{self.OSP8_no_registration}"
250
260
  end
251
261
 
252
262
  def self.OSP8_vanilla_rhel(rhsm_user, rhsm_password, rhsm_pool_id)
253
263
  return "
254
- sudo subscription-manager register --force --username=\"#{rhsm_user}\" --password=\"#{rhsm_password}\"
255
- sudo subscription-manager attach --pool=\"#{rhsm_pool_id}\"
256
- sudo subscription-manager repos --enable=rhel-7-server-rpms \
257
- --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-extras-rpms \
258
- --enable=rhel-7-server-openstack-6.0-rpms
264
+ #{self.OSP_common_vanilla_rhel(rhsm_user, rhsm_password, rhsm_pool_id)}
259
265
  #{self.OSP8_no_registration}"
260
266
  end
261
267
 
262
268
  def self.OSP8_no_registration
263
269
  return "
264
- sudo yum install -y python-rdomanager-oscplugin
265
270
  if [ ! -f ~/undercloud.conf ]; then
266
271
  cp -f /usr/share/instack-undercloud/undercloud.conf.sample ~/undercloud.conf;
267
272
  sed -i -- 's/#store_events = false/store_events = true/g' ~/undercloud.conf
@@ -274,7 +279,7 @@ module Egon
274
279
  end
275
280
 
276
281
  POST_INSTALL_8 = "
277
- sudo setenforce permissive
282
+ sudo setenforce enforcing
278
283
  source ~/stackrc
279
284
 
280
285
  sudo yum install -y rhosp-director-images
@@ -297,50 +302,212 @@ module Egon
297
302
  sudo sed -i -- \"s/#admin_password = <None>/admin_password = $OS_PASSWORD/g\" /etc/tripleo/tripleo.conf
298
303
  sudo service openstack-tripleo-api restart
299
304
  sudo systemctl enable openstack-tripleo-api
305
+
300
306
  sudo sed -i -- \"s/max_json_body_size = 1048576/max_json_body_size = 2000000/g\" /etc/heat/heat.conf
301
307
  sudo service openstack-heat-api restart
302
308
  sudo service openstack-heat-api-cfn restart
303
309
  sudo service openstack-heat-engine restart
304
310
 
311
+ sudo sed -i -- \"s/scheduler_use_baremetal_filters=False/scheduler_use_baremetal_filters=True/g\" /etc/nova/nova.conf
312
+ sudo sed -i -- \"s/#baremetal_scheduler_default_filters/baremetal_scheduler_default_filters/g\" /etc/nova/nova.conf
313
+ sudo service openstack-nova-scheduler restart
314
+
315
+ retries=5
316
+
317
+ # Temporarily deal with BZ#1319795
318
+ retry_count=0
319
+ while ! systemctl is-active openstack-swift-* --all >/dev/null && (( retry_count < retries )); do
320
+ echo \"Swift services not started, retrying.\"
321
+ let retry_count+=1; sudo openstack-service restart swift; sleep 60;
322
+ done
323
+
324
+ # Swift is not always immediately responsive
325
+ retry_count=0
326
+ while ! swift stat 2>/dev/null && (( $retry_count < $retries )); do
327
+ echo \"Swift is not ready. Sleeping for 30 seconds.\";
328
+ let retry_count+=1; sleep 30;
329
+ done
330
+
331
+ if ! swift stat 2>/dev/null; then
332
+ echo \"Swift did not start properly. Please fix the problem before trying again\"
333
+ exit 1
334
+ fi
335
+
305
336
  if ! [ $(swift list | grep overcloud) ]; then
306
337
 
307
338
  cp -r /usr/share/openstack-tripleo-heat-templates .
308
339
  cp /usr/share/tripleo-api/templates/capabilities-map.yaml openstack-tripleo-heat-templates/.
340
+ cat << 'EOF' >> openstack-tripleo-heat-templates/capabilities-map.yaml
341
+ - title: TLS
342
+ description:
343
+ environment_groups:
344
+ - title: TLS
345
+ description: >
346
+ Enable TLS
347
+ environments:
348
+ - file: environments/enable-tls.yaml
349
+ title: Enable TLS
350
+ description:
351
+ requires:
352
+ - ../puppet/extraconfig/tls/tls-cert-inject.yaml
353
+ - file: environments/inject-trust-anchor.yaml
354
+ title: Inject CA
355
+ description:
356
+ requires:
357
+ - ../puppet/extraconfig/tls/tls-cert-inject.yaml
358
+
359
+ - title: Registration
360
+ description:
361
+ environment_groups:
362
+ - title: Registration
363
+ description: >
364
+ Register the Overcloud to CDN or Satellite
365
+ environments:
366
+ - file: environments/rhel-registration.yaml
367
+ title: RHEL Registration
368
+ description:
369
+ requires:
370
+ - extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml
371
+ EOF
372
+
373
+ cat openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml > openstack-tripleo-heat-templates/environments/rhel-registration.yaml
374
+ cat openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml >> openstack-tripleo-heat-templates/environments/rhel-registration.yaml
375
+ sed -i 's,rhel-registration.yaml,../extraconfig/pre_deploy/rhel-registration/rhel-registration.yaml,g' openstack-tripleo-heat-templates/environments/rhel-registration.yaml
309
376
 
310
377
  echo ' BlockStorageImage: overcloud-full' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
311
378
  echo ' CephStorageImage: overcloud-full' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
312
379
  echo ' SwiftStorageImage: overcloud-full' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
313
380
  echo ' controllerImage: overcloud-full' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
314
381
  echo ' NovaImage: overcloud-full' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
315
- echo ' CinderPassword: Ma3kfBHqB8FDb2hgJa3sPUAzh' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
316
- echo ' GlancePassword: EBNnAsWxuzAHfqG8trjjMDsCu' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
317
- echo ' SwiftPassword: KfqyTxGtQ9y7P6yCK2m7n2xMz' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
318
- echo ' NeutronMetadataProxySharedSecret: A2kEkckqfAzxcdVEJtnWj4hGP' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
319
- echo ' HeatPassword: BEhHu9UhKd4ZnQwmtCUFsZrh4' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
320
- echo ' HeatStackDomainAdminPassword: fpRbkRneNJVutk4QqK8xYR3Qm' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
321
- echo ' NeutronPassword: 9n3AfD2b9zfBrmmBHwHyc7TgV' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
322
- echo ' AdminToken: CuVyGZqfwZdbTwUaX9euaPGaA' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
323
- echo ' SwiftHashSuffix: JN273288Xt3JTBqnE8RBsrYze' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
324
- echo ' CeilometerMeteringSecret: Hvkf9Rzz6tHF6UVsErPjCE3uM' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
325
- echo ' SnmpdReadonlyUserPassword: password' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
326
- echo ' CeilometerPassword: 2zgV6yAE2d3JTskTnBUsvzDf4' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
327
- echo ' NovaPassword: QCn7EHTkMMrJHH7Upp6txzUYX' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
328
- echo ' RedisPassword: Rhq8Fd7eEIoPP821Ui' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
329
- echo ' HAProxyStatsPassword: veLYjyhxgs7GtQuKXF' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
382
+ echo ' CinderPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
383
+ echo ' GlancePassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
384
+ echo ' SwiftPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
385
+ echo ' NeutronMetadataProxySharedSecret: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
386
+ echo ' HeatPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
387
+ echo ' HeatStackDomainAdminPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
388
+ echo ' NeutronPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
389
+ echo ' AdminToken: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
390
+ echo ' SwiftHashSuffix: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
391
+ echo ' CeilometerMeteringSecret: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
392
+ echo ' SnmpdReadonlyUserPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
393
+ echo ' CeilometerPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
394
+ echo ' NovaPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
395
+ echo ' RedisPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
396
+ echo ' HAProxyStatsPassword: #{SecureRandom.hex}' >> openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml
330
397
 
331
398
  echo 'parameter_defaults:' >> openstack-tripleo-heat-templates/environments/deployment_parameters.yaml
332
399
  echo ' AdminPassword: changeme' >> openstack-tripleo-heat-templates/environments/deployment_parameters.yaml
333
400
 
334
401
  sudo tripleo-plan-create --config-file /etc/tripleo/tripleo.conf
402
+
403
+ pushd openstack-tripleo-heat-templates
404
+ swift upload overcloud extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration extraconfig/pre_deploy/rhel-registration/scripts/rhel-unregistration
405
+ popd
335
406
  fi
336
407
  "
337
408
 
338
409
  OSP8_COMMON = "
339
- sudo sed -i '$ a\net.ipv4.ip_forward = 1' /etc/sysctl.conf
410
+ sudo sed -i '/^net.ipv4.ip_forward =/{h;s/=.*/= 1/};${x;/^$/{s//net.ipv4.ip_forward = 1/;H};x}' /etc/sysctl.conf
340
411
  sudo sysctl -p /etc/sysctl.conf
341
412
  openstack undercloud install
342
413
  #{POST_INSTALL_8}"
343
414
 
415
+ ## OSP10
416
+
417
+ def self.OSP10_satellite(satellite_url, org, activation_key)
418
+ return "
419
+ #{self.OSP_common_satellite(satellite_url, org, activation_key)}
420
+ #{self.OSP10_no_registration}"
421
+ end
422
+
423
+ def self.OSP10_vanilla_rhel(rhsm_user, rhsm_password, rhsm_pool_id)
424
+ return "
425
+ #{self.OSP_common_vanilla_rhel(rhsm_user, rhsm_password, rhsm_pool_id)}
426
+ #{self.OSP10_no_registration}"
427
+ end
428
+
429
+ def self.OSP10_no_registration
430
+ return "
431
+ if [ ! -f ~/undercloud.conf ]; then
432
+ cp -f /usr/share/instack-undercloud/undercloud.conf.sample ~/undercloud.conf;
433
+ fi
434
+ sed -i -- 's/#store_events = false/store_events = true/g' ~/undercloud.conf
435
+ sed -i -- 's/#enable_telemetry = false/enable_telemetry = true/g' ~/undercloud.conf
436
+ #{self.OSP10_no_registration_no_packages}"
437
+ end
438
+
439
+ def self.OSP10_no_registration_no_packages
440
+ return OSP10_COMMON
441
+ end
442
+
443
+ POST_INSTALL_10 = "
444
+ sudo setenforce enforcing
445
+ source ~/stackrc
446
+
447
+ sudo yum install -y rhosp-director-images
448
+ cd /usr/share/rhosp-director-images
449
+ sudo tar xf ironic-python-agent.tar
450
+ sudo tar xf overcloud-full.tar
451
+ openstack overcloud image upload
452
+ cd ~
453
+
454
+ SUBNET_ID=$(neutron subnet-show '' | awk '$2==\"id\" {print $4}')
455
+ neutron subnet-update $SUBNET_ID --dns-nameserver 192.168.122.1
456
+
457
+ openstack action execution run tripleo.plan.delete '{\"container\": \"overcloud\"}'
458
+
459
+ cp -r /usr/share/openstack-tripleo-heat-templates .
460
+ cat << 'EOF' >> openstack-tripleo-heat-templates/capabilities-map.yaml
461
+
462
+ - title: TLS
463
+ description:
464
+ environment_groups:
465
+ - title: TLS
466
+ description: >
467
+ Enable TLS
468
+ environments:
469
+ - file: environments/enable-tls.yaml
470
+ title: Enable TLS
471
+ description:
472
+ requires:
473
+ - ../puppet/extraconfig/tls/tls-cert-inject.yaml
474
+ - file: environments/inject-trust-anchor.yaml
475
+ title: Inject CA
476
+ description:
477
+ requires:
478
+ - ../puppet/extraconfig/tls/tls-cert-inject.yaml
479
+
480
+ - title: Registration
481
+ description:
482
+ environment_groups:
483
+ - title: Registration
484
+ description: >
485
+ Register the Overcloud to CDN or Satellite
486
+ environments:
487
+ - file: environments/rhel-registration.yaml
488
+ title: RHEL Registration
489
+ description:
490
+ requires:
491
+ - extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml
492
+ EOF
493
+
494
+ cat openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml > openstack-tripleo-heat-templates/environments/rhel-registration.yaml
495
+ cat openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml >> openstack-tripleo-heat-templates/environments/rhel-registration.yaml
496
+ sed -i 's,rhel-registration.yaml,../extraconfig/pre_deploy/rhel-registration/rhel-registration.yaml,g' openstack-tripleo-heat-templates/environments/rhel-registration.yaml
497
+ sed -i 's, rpm -Uvh katello-ca-consumer-latest.noarch.rpm || true, rpm -Uvh katello-ca-consumer-latest.noarch.rpm || true\\n echo \"\{\"network.hostname\":\"$HOSTNAME\"\}\" > /etc/rhsm/facts/katello.facts,' openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration
498
+
499
+ openstack action execution run tripleo.plan.create_container '{\"container\": \"overcloud\"}'
500
+ cd openstack-tripleo-heat-templates
501
+ swift upload overcloud *
502
+ cd ..
503
+ openstack workflow execution create tripleo.plan_management.v1.create_deployment_plan '{\"container\": \"overcloud\"}'
504
+ "
505
+
506
+ OSP10_COMMON = "
507
+ sudo sed -i '/^net.ipv4.ip_forward =/{h;s/=.*/= 1/};${x;/^$/{s//net.ipv4.ip_forward = 1/;H};x}' /etc/sysctl.conf
508
+ sudo sysctl -p /etc/sysctl.conf
509
+ openstack undercloud install
510
+ #{POST_INSTALL_10}"
344
511
  end
345
512
  end
346
513
  end
@@ -1,3 +1,3 @@
1
1
  module Egon
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Egon and Fusor team
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-05-17 00:00:00.000000000 Z
12
+ date: 2017-02-22 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,27 +38,47 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
40
45
  version: '10.0'
41
46
  - !ruby/object:Gem::Dependency
42
- name: fog
47
+ name: fog-core
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
47
- version: 1.36.0
53
+ version: 1.43.0
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
54
- version: 1.36.0
61
+ version: 1.43.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: fog-openstack
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 0.1.15
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 0.1.15
55
78
  - !ruby/object:Gem::Dependency
56
79
  name: net-ssh
57
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
58
82
  requirements:
59
83
  - - ~>
60
84
  - !ruby/object:Gem::Version
@@ -62,6 +86,7 @@ dependencies:
62
86
  type: :development
63
87
  prerelease: false
64
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
65
90
  requirements:
66
91
  - - ~>
67
92
  - !ruby/object:Gem::Version
@@ -69,6 +94,7 @@ dependencies:
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: rspec
71
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
72
98
  requirements:
73
99
  - - ~>
74
100
  - !ruby/object:Gem::Version
@@ -76,6 +102,7 @@ dependencies:
76
102
  type: :development
77
103
  prerelease: false
78
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
79
106
  requirements:
80
107
  - - ~>
81
108
  - !ruby/object:Gem::Version
@@ -84,23 +111,13 @@ description: ''
84
111
  email:
85
112
  - foreman-dev+egon@googlegroups.com
86
113
  executables:
87
- - undercloud-install-satellite.rb
88
114
  - initialize_overcloud.sh
89
- - undercloud-install-vanilla-rhel.rb
90
115
  - undercloud-install-local.rb
116
+ - undercloud-install-satellite.rb
117
+ - undercloud-install-vanilla-rhel.rb
91
118
  extensions: []
92
119
  extra_rdoc_files: []
93
120
  files:
94
- - Gemfile
95
- - Gemfile.lock
96
- - LICENSE
97
- - README.md
98
- - Rakefile
99
- - bin/initialize_overcloud.sh
100
- - bin/undercloud-install-local.rb
101
- - bin/undercloud-install-satellite.rb
102
- - bin/undercloud-install-vanilla-rhel.rb
103
- - egon.gemspec
104
121
  - lib/egon.rb
105
122
  - lib/egon/overcloud/undercloud_handle.rb
106
123
  - lib/egon/overcloud/undercloud_handle/deployment.rb
@@ -112,39 +129,42 @@ files:
112
129
  - lib/egon/undercloud/port-check-mixin.rb
113
130
  - lib/egon/undercloud/ssh-connection.rb
114
131
  - lib/egon/version.rb
115
- - pkg/egon-0.0.1.gem
116
- - pkg/egon-0.0.2.gem
117
- - pkg/egon-0.1.0.gem
118
- - pkg/egon-0.4.3.gem
119
- - rubygem-egon.spec
132
+ - LICENSE
133
+ - Rakefile
134
+ - README.md
120
135
  - test/test_ssh_connection.rb
121
136
  - test/test_undercloud.rb
122
137
  - test/test_undercloud_handle.rb
138
+ - bin/initialize_overcloud.sh
139
+ - bin/undercloud-install-local.rb
140
+ - bin/undercloud-install-satellite.rb
141
+ - bin/undercloud-install-vanilla-rhel.rb
123
142
  homepage: https://github.com/fusor/egon
124
143
  licenses:
125
144
  - GPL-3.0+
126
- metadata: {}
127
145
  post_install_message:
128
146
  rdoc_options: []
129
147
  require_paths:
130
148
  - lib
131
149
  required_ruby_version: !ruby/object:Gem::Requirement
150
+ none: false
132
151
  requirements:
133
152
  - - ! '>='
134
153
  - !ruby/object:Gem::Version
135
154
  version: '0'
136
155
  required_rubygems_version: !ruby/object:Gem::Requirement
156
+ none: false
137
157
  requirements:
138
158
  - - ! '>='
139
159
  - !ruby/object:Gem::Version
140
160
  version: '0'
141
161
  requirements: []
142
162
  rubyforge_project:
143
- rubygems_version: 2.2.2
163
+ rubygems_version: 1.8.23.2
144
164
  signing_key:
145
- specification_version: 4
165
+ specification_version: 3
146
166
  summary: A library on top of Fog that encapsulates TripleO deployment operations
147
167
  test_files:
148
- - test/test_undercloud_handle.rb
149
- - test/test_undercloud.rb
150
168
  - test/test_ssh_connection.rb
169
+ - test/test_undercloud.rb
170
+ - test/test_undercloud_handle.rb
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NjY5YTQ1NjU5ZjNkZTU0Nzg3NzExMTQ5NjI5YzRmNzNmN2Y3OTYxNA==
5
- data.tar.gz: !binary |-
6
- YzM2MjEyMTI0ZmI1MDZkN2ZkZTliYmQ0Y2Q3NGQ0YjlkOGUxMjQzYQ==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- MWJmMjQyMmIwYjVlODY2MzNmMzk2ZDZlOGFhMTcxYjVkOTM0ODg1NDQwMjJl
10
- OWRiNzBjOGZmNzdmNDVkZThiYmJhNmI3YWM2MWM3N2NiZjRmNDllOTEyMzk4
11
- Mjc0Y2U0NGZhYmU2M2RlOTJkOWMzNGRmMzhiOTdiM2QwYWVkN2U=
12
- data.tar.gz: !binary |-
13
- MmYwODFlNzA0ZGUyNTQyNWQyY2JiNzcxNTNhMWYwMjYxZDFjN2ExZDY3ZTcy
14
- OWEyMmMwYTM3YzEwMGRiM2I2MmYxYWM1YTQxZjg2Mjc2YmI4ZmQ1ODJlZmYy
15
- ZDYyMWQ5MDJmZTgyNjI5Yjk1ZDJlMzIxODA0ZmE0MWYyZWJiODU=
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in egon.gemspec
4
- gemspec
@@ -1,144 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- egon (0.4.4)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- CFPropertyList (2.3.1)
10
- builder (3.2.2)
11
- diff-lcs (1.2.5)
12
- excon (0.45.3)
13
- fission (0.5.0)
14
- CFPropertyList (~> 2.2)
15
- fog (1.36.0)
16
- fog-atmos
17
- fog-aws (~> 0.0)
18
- fog-brightbox (~> 0.4)
19
- fog-core (~> 1.30)
20
- fog-ecloud
21
- fog-google (>= 0.0.2)
22
- fog-json
23
- fog-local
24
- fog-powerdns (>= 0.1.1)
25
- fog-profitbricks
26
- fog-radosgw (>= 0.0.2)
27
- fog-riakcs
28
- fog-sakuracloud (>= 0.0.4)
29
- fog-serverlove
30
- fog-softlayer
31
- fog-storm_on_demand
32
- fog-terremark
33
- fog-vmfusion
34
- fog-voxel
35
- fog-xml (~> 0.1.1)
36
- ipaddress (~> 0.5)
37
- nokogiri (~> 1.5, >= 1.5.11)
38
- fog-atmos (0.1.0)
39
- fog-core
40
- fog-xml
41
- fog-aws (0.4.0)
42
- fog-core (~> 1.27)
43
- fog-json (~> 1.0)
44
- fog-xml (~> 0.1)
45
- ipaddress (~> 0.8)
46
- fog-brightbox (0.7.1)
47
- fog-core (~> 1.22)
48
- fog-json
49
- inflecto (~> 0.0.2)
50
- fog-core (1.30.0)
51
- builder
52
- excon (~> 0.45)
53
- formatador (~> 0.2)
54
- mime-types
55
- net-scp (~> 1.1)
56
- net-ssh (>= 2.1.3)
57
- fog-ecloud (0.1.2)
58
- fog-core
59
- fog-xml
60
- fog-google (0.0.5)
61
- fog-core
62
- fog-json
63
- fog-xml
64
- fog-json (1.0.2)
65
- fog-core (~> 1.0)
66
- multi_json (~> 1.10)
67
- fog-local (0.2.1)
68
- fog-core (~> 1.27)
69
- fog-powerdns (0.1.1)
70
- fog-core (~> 1.27)
71
- fog-json (~> 1.0)
72
- fog-xml (~> 0.1)
73
- fog-profitbricks (0.0.3)
74
- fog-core
75
- fog-xml
76
- nokogiri
77
- fog-radosgw (0.0.4)
78
- fog-core (>= 1.21.0)
79
- fog-json
80
- fog-xml (>= 0.0.1)
81
- fog-riakcs (0.1.0)
82
- fog-core
83
- fog-json
84
- fog-xml
85
- fog-sakuracloud (1.0.1)
86
- fog-core
87
- fog-json
88
- fog-serverlove (0.1.2)
89
- fog-core
90
- fog-json
91
- fog-softlayer (0.4.6)
92
- fog-core
93
- fog-json
94
- fog-storm_on_demand (0.1.1)
95
- fog-core
96
- fog-json
97
- fog-terremark (0.1.0)
98
- fog-core
99
- fog-xml
100
- fog-vmfusion (0.1.0)
101
- fission
102
- fog-core
103
- fog-voxel (0.1.0)
104
- fog-core
105
- fog-xml
106
- fog-xml (0.1.2)
107
- fog-core
108
- nokogiri (~> 1.5, >= 1.5.11)
109
- formatador (0.2.5)
110
- inflecto (0.0.2)
111
- ipaddress (0.8.0)
112
- mime-types (2.6.1)
113
- mini_portile (0.6.2)
114
- multi_json (1.11.0)
115
- net-scp (1.2.1)
116
- net-ssh (>= 2.6.5)
117
- net-ssh (2.9.2)
118
- nokogiri (1.6.6.2)
119
- mini_portile (~> 0.6.0)
120
- rake (10.4.2)
121
- rspec (3.2.0)
122
- rspec-core (~> 3.2.0)
123
- rspec-expectations (~> 3.2.0)
124
- rspec-mocks (~> 3.2.0)
125
- rspec-core (3.2.3)
126
- rspec-support (~> 3.2.0)
127
- rspec-expectations (3.2.1)
128
- diff-lcs (>= 1.2.0, < 2.0)
129
- rspec-support (~> 3.2.0)
130
- rspec-mocks (3.2.1)
131
- diff-lcs (>= 1.2.0, < 2.0)
132
- rspec-support (~> 3.2.0)
133
- rspec-support (3.2.2)
134
-
135
- PLATFORMS
136
- ruby
137
-
138
- DEPENDENCIES
139
- bundler (~> 1.7)
140
- egon!
141
- fog (~> 1.31.0)
142
- net-ssh (~> 2.9.2)
143
- rake (~> 10.0)
144
- rspec (~> 3.2.0)
@@ -1,30 +0,0 @@
1
- # coding: utf-8
2
- require File.expand_path('../lib/egon/version', __FILE__)
3
- require 'date'
4
-
5
- lib = File.expand_path('../lib', __FILE__)
6
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
-
8
- Gem::Specification.new do |s|
9
- s.name = "egon"
10
- s.version = Egon::VERSION
11
- s.authors = ['Egon and Fusor team']
12
- s.email = ['foreman-dev+egon@googlegroups.com']
13
- s.summary = %q{A library on top of Fog that encapsulates TripleO deployment operations}
14
- s.description = %q{}
15
- s.homepage = 'https://github.com/fusor/egon'
16
- s.date = Date.today.to_s
17
- s.license = 'GPL-3.0+'
18
-
19
- s.files = Dir['**/*']
20
- s.test_files = Dir['{test,spec,features}/**/*']
21
- s.executables = Dir['bin/*'].map{ |f| File.basename(f) }
22
-
23
- s.require_paths = ["lib"]
24
-
25
- s.add_development_dependency "bundler", "~> 1.7"
26
- s.add_development_dependency "rake", "~> 10.0"
27
- s.add_development_dependency "fog", "~> 1.36.0"
28
- s.add_development_dependency "net-ssh", "~> 2.9.2"
29
- s.add_development_dependency "rspec", "~> 3.2.0"
30
- end
Binary file
Binary file
Binary file
Binary file
@@ -1,116 +0,0 @@
1
- %{?scl:%scl_package rubygem-%{gem_name}}
2
- %{!?scl:%global pkg_name %{name}}
3
-
4
- %global gem_name egon
5
-
6
- Name: %{?scl_prefix}rubygem-%{gem_name}
7
- Version: 1.0.0
8
- Release: 0%{?dist}
9
- Summary: A library on top of Fog that encapsulates TripleO deployment operations
10
- Group: Development/Languages
11
- License: GPL-3.0+
12
- URL: https://github.com/fusor/egon
13
- Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
14
- BuildRequires: %{?scl_prefix}rubygems-devel
15
- Requires: %{?scl_prefix}ruby
16
- Requires: %{?scl_prefix}rubygem(fog) => 1.36.0
17
- Requires: %{?scl_prefix}rubygem(net-ssh) => 2.9.2
18
- Requires: %{?scl_prefix}rubygem(net-ssh) < 2.10
19
- BuildArch: noarch
20
-
21
- %description
22
- A library on top of Fog that encapsulates TripleO deployment operations.
23
-
24
- %package doc
25
- Summary: Documentation for %{pkg_name}
26
- Group: Documentation
27
- Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
28
- BuildArch: noarch
29
-
30
- %description doc
31
- Documentation for %{pkg_name}.
32
-
33
- %prep
34
- %{?scl:scl enable %{scl} - << \EOF}
35
- gem unpack %{SOURCE0}
36
- %{?scl:EOF}
37
-
38
- %setup -q -D -T -n %{gem_name}-%{version}
39
-
40
- %{?scl:scl enable %{scl} - << \EOF}
41
- gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
42
- %{?scl:EOF}
43
-
44
- %build
45
- # Create the gem as gem install only works on a gem file
46
- %{?scl:scl enable %{scl} - << \EOF}
47
- gem build %{gem_name}.gemspec
48
- %{?scl:EOF}
49
-
50
- %{?scl:scl enable %{scl} - << \EOF}
51
- gem install %{gem_name}-%{version}.gem --local --install-dir .%{gem_dir}
52
- %{?scl:EOF}
53
-
54
- %install
55
- mkdir -p %{buildroot}%{gem_dir}
56
- mkdir .%{_bindir}
57
- mv .%{gem_dir}/bin/* \
58
- .%{_bindir}
59
- cp -a .%{gem_dir}/* \
60
- %{buildroot}%{gem_dir}/
61
-
62
- mkdir -p %{buildroot}%{_bindir}
63
- cp -pa .%{_bindir}/* \
64
- %{buildroot}%{_bindir}/
65
-
66
- find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
67
-
68
- # Run the test suite
69
-
70
- %check
71
- pushd .%{gem_instdir}
72
-
73
- popd
74
-
75
- %files
76
- %dir %{gem_instdir}
77
- %{_bindir}/undercloud-install-local.rb
78
- %{_bindir}/undercloud-install-satellite.rb
79
- %{_bindir}/undercloud-install-vanilla-rhel.rb
80
- %license %{gem_instdir}/LICENSE
81
- %{gem_instdir}/bin
82
- %{gem_libdir}
83
- %{gem_instdir}/rubygem-egon.spec
84
- %exclude %{gem_cache}
85
- %{gem_spec}
86
-
87
- %files doc
88
- %doc %{gem_docdir}
89
- %{gem_instdir}/Gemfile
90
- %doc %{gem_instdir}/README.md
91
- %{gem_instdir}/Rakefile
92
- %{gem_instdir}/egon.gemspec
93
- %{gem_instdir}/test
94
-
95
- %changelog
96
- * Thu Oct 29 2015 Jason Rist <jrist@redhat.com> 0.4.8
97
- - bump fog requirement to 1.36.0 to fix uuid bug (jrist@redhat.com)
98
-
99
- * Thu Sep 10 2015 Jason Montleon <jmontleo@redhat.com> 0.4.2-7
100
- - gempsec and rpm spec cleanup (jmontleo@redhat.com)
101
-
102
- * Thu Sep 10 2015 Jason Montleon <jmontleo@redhat.com> 0.4.2-6
103
- - remove dev require (jmontleo@redhat.com)
104
-
105
- * Thu Sep 10 2015 Jason Montleon <jmontleo@redhat.com> 0.4.2-5
106
- - Allow newer version of fog
107
-
108
- * Wed Sep 09 2015 Jason Montleon <jmontleo@redhat.com> 0.4.2-4
109
- - remove bad require (jmontleo@redhat.com)
110
-
111
- * Wed Sep 09 2015 Jason Montleon <jmontleo@redhat.com> 0.4.2-3
112
- - Egon RPM compatible with SCL and Foreman (jrist@redhat.com)
113
- - Egon RPM compatible with SCL (jrist@redhat.com)
114
-
115
- * Mon Aug 31 2015 jrist <jrist@redhat.com> - 0.4.1-1
116
- - Initial package