staypuft 0.0.10 → 0.0.11

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: ff35433d1c3032de55e7570d0bb4b743c65f35b7
4
- data.tar.gz: 3ffdb215618e6332108f54714ceabdf612d4b129
3
+ metadata.gz: 1b2f7a42251bc0433abba04f69a42dd0a44ee334
4
+ data.tar.gz: 78482c6e8e64e8729a9e68fb30065570f0e4f217
5
5
  SHA512:
6
- metadata.gz: 53fa9dcad17f281e454c1ceb5b02e72e12f9b440585d6309ce3dde5ad3da03325e42dd71b26e5cd919097e7c4e2cd21ebb11b962023ebdf91690bcd697d28e54
7
- data.tar.gz: b2afa8a380522ae9d9083567e62a93da3d14cbf288eafa163d7fd2a70ca3c33ba7271c0901b3370abfd3b12da67bbefc25bbc950cffbe952cd6f35e22b803c24
6
+ metadata.gz: 7ab57733b68acf613c73164df5c9084b421db7e322aa32cad1196fa80ddd799d08568f3e88feb77cdbf7076c8852c88309fb7493d3118e133896d58d42482085
7
+ data.tar.gz: 974fdbedc6ef92a7fc68e399e1f5249195647a74a52f9e69017a069994395103b0b08bdc2c5e25ae4010cebf8da08aaa273bab42cde728733ea4549edd1c829a
@@ -8,7 +8,7 @@ module Staypuft
8
8
  def show
9
9
  case step
10
10
  when :deployment_settings
11
- @layouts = Layout.all
11
+ @layouts = ordered_layouts
12
12
  when :services_configuration
13
13
  @services = @deployment.services
14
14
  end
@@ -24,7 +24,7 @@ module Staypuft
24
24
 
25
25
  case step
26
26
  when :deployment_settings
27
- @layouts = Layout.all
27
+ @layouts = ordered_layouts
28
28
 
29
29
  Deployment.transaction do
30
30
  @deployment.update_attributes(params[:staypuft_deployment])
@@ -61,5 +61,9 @@ module Staypuft
61
61
  def redirect_to_finish_wizard(options = {})
62
62
  redirect_to deployment_path(@deployment), :notice => _("Deployment has been succesfully configured.")
63
63
  end
64
+
65
+ def ordered_layouts
66
+ Layout.order(:name).order("networking DESC").all
67
+ end
64
68
  end
65
69
  end
@@ -64,10 +64,11 @@ module Staypuft
64
64
  hosts_to_remove = assigned_hosts - targeted_hosts
65
65
 
66
66
  hosts_to_assign.each do |discovered_host|
67
- host = discovered_host.becomes(::Host::Managed)
68
- host.type = 'Host::Managed'
69
- host.managed = true
70
- host.build = true
67
+ original_type = discovered_host.type
68
+ host = discovered_host.becomes(::Host::Managed)
69
+ host.type = 'Host::Managed'
70
+ host.managed = true
71
+ host.build = true
71
72
 
72
73
  host.hostgroup = hostgroup
73
74
  # set discovery environment to keep booting discovery image
@@ -84,7 +85,12 @@ module Staypuft
84
85
  # FIXME this is definitely ugly, needs to be properly fixed
85
86
  discovered_host.update_column :type, 'Host::Managed'
86
87
 
87
- host.save!
88
+ begin
89
+ host.save!
90
+ rescue => e
91
+ discovered_host.update_column :type, original_type
92
+ raise e
93
+ end
88
94
  end
89
95
 
90
96
  hosts_to_remove.each do |host|
@@ -13,12 +13,13 @@ module Staypuft
13
13
  @deployment.name.empty?
14
14
  end
15
15
 
16
- def anything_deployed
17
- @deployment.child_hostgroups.
18
- # this could be an association on deployment
19
- inject([]) { |hosts, hg| hosts + hg.hosts }.
20
- any?
21
- # (:open_stack_deployed?)
16
+ def alert_if_deployed
17
+ if @deployment.hosts.any?(&:open_stack_deployed?)
18
+ (alert :class => 'alert-warning',
19
+ :text => _('Machines are already deployed with this configuration. Changing the configuration parameters
20
+ is unsupported and may result in an unusable configuration. <br/>Please proceed with caution.'),
21
+ :close => false).html_safe
22
+ end
22
23
  end
23
24
 
24
25
  end
@@ -15,6 +15,7 @@ module Staypuft
15
15
  has_many :roles, :through => :deployment_role_hostgroups
16
16
 
17
17
  has_many :services, :through => :roles
18
+ has_many :hosts, :through => :child_hostgroups
18
19
 
19
20
  validates :name, :presence => true, :uniqueness => true
20
21
 
@@ -65,16 +65,18 @@ module Staypuft
65
65
  "tenant_network_type", "tunnel_id_ranges", "verbose"],
66
66
  "DHCP" => [],
67
67
  "OVS" => ["ovs_bridge_mappings", "ovs_bridge_uplinks",
68
- "ovs_tunnel_iface", "ovs_tunnel_types", "ovs_vlan_ranges",
69
- "ovs_vxlan_udp_port" ],
68
+ "ovs_tunnel_iface", "ovs_tunnel_network", "ovs_tunnel_types",
69
+ "ovs_vlan_ranges", "ovs_vxlan_udp_port" ],
70
70
  "Nova-compute" => ["admin_password", "auto_assign_floating_ip",
71
71
  "ceilometer_metering_secret", "ceilometer_user_password",
72
72
  "cinder_backend_gluster", "controller_priv_host",
73
73
  "controller_pub_host", "fixed_network_range",
74
74
  "floating_network_range", "mysql_ca", "mysql_host",
75
- "nova_db_password", "nova_network_private_iface",
76
- "nova_network_public_iface", "nova_user_password",
77
- "qpid_host", "ssl", "verbose"],
75
+ "nova_db_password", "network_private_iface",
76
+ "network_private_network",
77
+ "network_public_iface",
78
+ "network_public_network", "nova_user_password",
79
+ "qpid_host", "ssl", "verbose", "use_qemu_for_poc"],
78
80
  "Neutron-compute" => ["admin_password", "ceilometer_metering_secret",
79
81
  "ceilometer_user_password", "cinder_backend_gluster",
80
82
  "controller_admin_host", "controller_priv_host",
@@ -83,12 +85,14 @@ module Staypuft
83
85
  "neutron_db_password", "neutron_user_password",
84
86
  "nova_db_password", "nova_user_password",
85
87
  "ovs_bridge_mappings", "ovs_tunnel_iface",
86
- "ovs_tunnel_types", "ovs_vlan_ranges",
88
+ "ovs_tunnel_network", "ovs_tunnel_types", "ovs_vlan_ranges",
87
89
  "ovs_vxlan_udp_port", "qpid_host", "ssl",
88
- "tenant_network_type", "tunnel_id_ranges", "verbose"],
90
+ "tenant_network_type", "tunnel_id_ranges", "verbose",
91
+ "use_qemu_for_poc"],
89
92
  "Neutron-ovs-agent"=> [],
90
93
  "Swift (node)" => ["swift_all_ips", "swift_ext4_device", "swift_local_interface",
91
- "swift_loopback", "swift_ring_server", "swift_shared_secret"]
94
+ "swift_local_network","swift_loopback", "swift_ring_server",
95
+ "swift_shared_secret"]
92
96
 
93
97
  }
94
98
 
@@ -1,7 +1,5 @@
1
1
  <%= render :layout => 'title' do %>
2
- <% if anything_deployed %>
3
- <%= alert :class => 'alert-warning', :text => _('Machines are already deployed with this configuration. Proceed with caution.') %>
4
- <% end %>
2
+ <%= alert_if_deployed %>
5
3
 
6
4
  <%= form_for(@deployment, :url => wizard_path, :method => 'PUT') do |f| %>
7
5
  <%= base_errors_for @deployment %>
@@ -17,7 +15,7 @@
17
15
  <div class="clearfix">
18
16
  <div class="form-group">
19
17
  <label class="col-md-2 control-label" for="layout_id"><%= _("Deployment Layout") %></label>
20
- <div class="col-md-4">
18
+ <div class="col-md-6">
21
19
  <% @layouts.each do |layout| %>
22
20
  <%= radio_button_f_non_inline(f, :layout_id, :checked => layout.id == @deployment.layout_id,:value=>layout.id, :text=> "#{layout.name}, #{layout.networking.capitalize} " + _("Networking")) %>
23
21
  <% end %>
@@ -51,9 +49,9 @@
51
49
  <%= link_to _("Cancel"), deployment_path(@deployment),
52
50
  :class => "btn btn-danger" %>
53
51
  <% else %>
54
- <%= link_to _("Cancel"), deployment_path(@deployment), :method => :delete,
55
- :confirm => _("This will clear whole deployment configuration. Are you sure?"),
56
- :class => "btn btn-danger" %>
52
+ <%= link_to _("Cancel"), deployment_path(@deployment), :method => :delete,
53
+ :confirm => _("This will clear whole deployment configuration. Are you sure?"),
54
+ :class => "btn btn-danger" %>
57
55
  <% end %>
58
56
  <%= button_tag(:type => 'submit', :class => "btn btn-primary pull-right") do %>
59
57
  <%= _("Next") %>
@@ -1,7 +1,5 @@
1
1
  <%= render :layout => 'title' do %>
2
- <% if anything_deployed %>
3
- <%= alert :class => 'alert-warning', :text => _('Machines are already deployed with this configuration. Proceed with caution.') %>
4
- <% end %>
2
+ <%= alert_if_deployed %>
5
3
 
6
4
  <%= form_for(@deployment, :url => wizard_path, :method => 'PUT') do |f| %>
7
5
  <%= base_errors_for @deployment %>
@@ -1,7 +1,5 @@
1
1
  <%= render :layout => 'title' do %>
2
- <% if anything_deployed %>
3
- <%= alert :class => 'alert-warning', :text => _('Machines are already deployed with this configuration. Proceed with caution.') %>
4
- <% end %>
2
+ <%= alert_if_deployed %>
5
3
 
6
4
  <%= form_for(@deployment, :url => wizard_path, :method => 'PUT') do |f| %>
7
5
  <%= base_errors_for @deployment %>
data/db/seeds.rb CHANGED
@@ -158,10 +158,10 @@ services = {
158
158
  :keystone_ha => {:name => "Keystone (HA)", :class => ["quickstack::pacemaker::keystone"]},
159
159
  :load_balancer_ha => {:name => "Load Balancer (HA)", :class => ["quickstack::pacemaker::load_balancer"]},
160
160
  :memcached_ha => {:name => "Memcached (HA)", :class => ["quickstack::pacemaker::memcached"]},
161
- :qpid_ha => {:name => "qpid (HA)", :class => ["quickstack::pacemaker::qpid",
162
- "qpid::server"]},
161
+ :qpid_ha => {:name => "qpid (HA)", :class => ["quickstack::pacemaker::qpid"]},
163
162
  :glance_ha => {:name => "Glance (HA)", :class => ["quickstack::pacemaker::glance"]},
164
163
  :nova_ha => {:name => "Nova (HA)", :class => ["quickstack::pacemaker::nova"]},
164
+ :heat_ha => {:name => "Heat (HA)", :class => ["quickstack::pacemaker::heat"]},
165
165
  :cinder_ha => {:name => "Cinder (HA)", :class => ["quickstack::pacemaker::cinder"]},
166
166
  :swift_ha => {:name => "Swift (HA)", :class => ["quickstack::pacemaker::swift"]},
167
167
  :horizon_ha => {:name => "Horizon (HA)", :class => ["quickstack::pacemaker::horizon"]},
@@ -231,7 +231,7 @@ roles = [
231
231
  {:name=>"HA Controller",
232
232
  :class=>[],
233
233
  :layouts=>[[:ha_nova, 1], [:ha_neutron, 1]],
234
- :services=>[:ha_controller, :keystone_ha, :load_balancer_ha, :memcached_ha, :qpid_ha, :glance_ha, :nova_ha, :cinder_ha, :swift_ha, :horizon_ha, :mysql_ha, :neutron_ha]}
234
+ :services=>[:ha_controller, :keystone_ha, :load_balancer_ha, :memcached_ha, :qpid_ha, :glance_ha, :nova_ha, :heat_ha, :cinder_ha, :swift_ha, :horizon_ha, :mysql_ha, :neutron_ha]}
235
235
  ]
236
236
 
237
237
  roles.each do |r|
@@ -1,3 +1,3 @@
1
1
  module Staypuft
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staypuft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Staypuft team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-22 00:00:00.000000000 Z
11
+ date: 2014-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman-tasks