staypuft 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/javascripts/staypuft/staypuft.js +1 -1
- data/app/controllers/staypuft/deployments_controller.rb +19 -3
- data/app/lib/staypuft/seeder.rb +12 -14
- data/app/models/staypuft/concerns/lookup_key_extensions.rb +0 -1
- data/app/models/staypuft/deployment/neutron_service.rb +31 -27
- data/app/models/staypuft/deployment/nova_service.rb +7 -4
- data/app/models/staypuft/deployment.rb +0 -1
- data/app/views/staypuft/deployments/_assigned_hosts_table.html.erb +1 -1
- data/app/views/staypuft/deployments/_deployed_hosts_table.html.erb +1 -1
- data/app/views/staypuft/deployments/_free_hosts_table.html.erb +1 -1
- data/app/views/staypuft/deployments/edit.html.erb +57 -41
- data/app/views/staypuft/deployments/show.html.erb +18 -43
- data/app/views/staypuft/deployments/summary.html.erb +52 -22
- data/app/views/staypuft/steps/deployment_settings.html.erb +11 -12
- data/lib/staypuft/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWFkYzZlNjIwZjcxOWRjNTM0NmU4ZDVmYzFiNGZiZTY5OGRmN2ZlYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjlkODZkMGY2OTNmZGJkMWQ3Y2E1MmIzODg2ZDc0ODczZTRiZGJkNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDAyY2U4YjBlYTkyNDc3ZTNhN2JiNTk1ZGVmZDkxZmJlOTllODI2ODkxYzJk
|
10
|
+
MWY0ZTMyZGY1NTBkOGUyYjczYmI5M2I2M2FkNDEzNmZiNDY3NzYxOGU4MmRk
|
11
|
+
MGNiMTI5Y2U5MDM0MTliNTE3OTVmMzhkNDg5NWE0ZmE4ZWEwZjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjQ2YzU1MmYzYmRhMGRjZDQxNWFlYTk5MWYzOTU2ODUzNTlhMGQ2YzllMWIy
|
14
|
+
Y2JkYTc0ZGUzYjE3NzAzMGM2MjY1ODk3YzhhYTg5ZDY3ZWRjMGNmYmEzMjRj
|
15
|
+
MGE1M2NkOWI5YWQ2MTg2NzA5YTMyZGIzNzU3YmVmYjkzNDUwNmE=
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
$(function () {
|
16
16
|
// Check all checkboxes in table
|
17
|
-
$('
|
17
|
+
$('.check_all').on('change', function (e) {
|
18
18
|
var table = $(e.target).closest('table');
|
19
19
|
$('td input:checkbox', table).attr('checked', e.target.checked);
|
20
20
|
$('td input:checkbox', table).closest("tr").toggleClass("info", this.checked);
|
@@ -24,7 +24,23 @@ module Staypuft
|
|
24
24
|
@service_hostgroup_map = @deployment.services_hostgroup_map
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
def update
|
28
|
+
if params[:staypuft_deployment]
|
29
|
+
param_data = params[:staypuft_deployment][:hostgroup_params]
|
30
|
+
param_data.each do |hostgroup_id, hostgroup_params|
|
31
|
+
hostgroup = Hostgroup.find(hostgroup_id)
|
32
|
+
hostgroup_params[:puppetclass_params].each do |puppetclass_id, puppetclass_params|
|
33
|
+
puppetclass = Puppetclass.find(puppetclass_id)
|
34
|
+
puppetclass_params.each do |param_name, param_value|
|
35
|
+
hostgroup.set_param_value_if_changed(puppetclass, param_name, param_value)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
redirect_to summary_deployment_path(params[:id])
|
42
|
+
end
|
43
|
+
|
28
44
|
def edit
|
29
45
|
@deployment = Deployment.find(params[:id])
|
30
46
|
@service_hostgroup_map = @deployment.services_hostgroup_map
|
@@ -55,7 +71,7 @@ module Staypuft
|
|
55
71
|
hostgroup = ::Hostgroup.find params[:hostgroup_id]
|
56
72
|
deployment_in_progress = ForemanTasks::Lock.locked?(deployment, nil)
|
57
73
|
|
58
|
-
hosts_to_assign
|
74
|
+
hosts_to_assign = ::Host::Base.find Array(params[:host_ids])
|
59
75
|
|
60
76
|
unassigned_hosts = hosts_to_assign.reduce([]) do |unassigned_hosts, discovered_host|
|
61
77
|
success, host = assign_host_to_hostgroup discovered_host, hostgroup
|
@@ -80,7 +96,7 @@ module Staypuft
|
|
80
96
|
hostgroup = ::Hostgroup.find params[:hostgroup_id]
|
81
97
|
deployment_in_progress = ForemanTasks::Lock.locked?(deployment, nil)
|
82
98
|
|
83
|
-
hosts_to_unassign
|
99
|
+
hosts_to_unassign = ::Host::Base.find Array(params[:host_ids])
|
84
100
|
|
85
101
|
hosts_to_unassign.each do |host|
|
86
102
|
unless host.open_stack_deployed? && deployment_in_progress
|
data/app/lib/staypuft/seeder.rb
CHANGED
@@ -179,19 +179,20 @@ module Staypuft
|
|
179
179
|
network_create_networks = true
|
180
180
|
|
181
181
|
# Neutron
|
182
|
-
ovs_vlan_ranges = '<%=
|
183
|
-
|
184
|
-
|
182
|
+
ovs_vlan_ranges = '<%= @host.deployment.neutron.networker_vlan_ranges %>'
|
183
|
+
compute_ovs_vlan_ranges = '<%= @host.deployment.neutron.compute_vlan_ranges %>'
|
184
|
+
ml2_network_vlan_ranges = ovs_vlan_ranges
|
185
|
+
ml2_tenant_network_types = ['<%= @host.deployment.neutron.network_segmentation %>']
|
185
186
|
ml2_tunnel_id_ranges = ['10:100000']
|
186
187
|
ml2_vni_ranges = ['10:100000']
|
187
188
|
ovs_tunnel_types = ['vxlan', 'gre']
|
188
|
-
ovs_tunnel_iface = '<%= @host.deployment.neutron.networker_tenant_interface %>'
|
189
|
-
ovs_bridge_mappings = '<%= @host.deployment.neutron.
|
190
|
-
ovs_bridge_uplinks = '<%= @host.deployment.neutron.
|
191
|
-
compute_ovs_tunnel_iface = '<%= @host.deployment.neutron.compute_tenant_interface %>'
|
189
|
+
ovs_tunnel_iface = '<%= n = @host.deployment.neutron; n.enable_tunneling? ? n.networker_tenant_interface : "" %>'
|
190
|
+
ovs_bridge_mappings = '<%= @host.deployment.neutron.networker_ovs_bridge_mappings %>'
|
191
|
+
ovs_bridge_uplinks = '<%= @host.deployment.neutron.networker_ovs_bridge_uplinks %>'
|
192
|
+
compute_ovs_tunnel_iface = '<%= n = @host.deployment.neutron; n.enable_tunneling? ? n.compute_tenant_interface : "" %>'
|
192
193
|
compute_ovs_bridge_mappings = '<%= @host.deployment.neutron.compute_ovs_bridge_mappings %>'
|
193
194
|
compute_ovs_bridge_uplinks = '<%= @host.deployment.neutron.compute_ovs_bridge_uplinks %>'
|
194
|
-
enable_tunneling = '
|
195
|
+
enable_tunneling = '<%= @host.deployment.neutron.enable_tunneling?.to_s %>'
|
195
196
|
|
196
197
|
# Glance
|
197
198
|
backend = 'file'
|
@@ -445,7 +446,7 @@ module Staypuft
|
|
445
446
|
'swift_public_vip' => vip_format % :swift,
|
446
447
|
'lb_backend_server_addrs' => '<%= @host.deployment.ips.controller_ips %>',
|
447
448
|
'lb_backend_server_names' => '<%= @host.deployment.ips.controller_fqdns %>' },
|
448
|
-
'quickstack::pacemaker::common' => {
|
449
|
+
'quickstack::pacemaker::common' => {
|
449
450
|
'pacemaker_cluster_members' => '<%= @host.deployment.ips.controller_ips.join(" ") %>' },
|
450
451
|
'quickstack::pacemaker::neutron' => {
|
451
452
|
'ml2_network_vlan_ranges' => ml2_network_vlan_ranges,
|
@@ -554,7 +555,7 @@ module Staypuft
|
|
554
555
|
'ovs_bridge_uplinks' => compute_ovs_bridge_uplinks,
|
555
556
|
'ovs_tunnel_iface' => compute_ovs_tunnel_iface,
|
556
557
|
'ovs_tunnel_types' => ovs_tunnel_types,
|
557
|
-
'ovs_vlan_ranges' =>
|
558
|
+
'ovs_vlan_ranges' => compute_ovs_vlan_ranges,
|
558
559
|
'admin_password' => admin_pw,
|
559
560
|
'ceilometer_user_password' => ceilometer_user_pw,
|
560
561
|
'neutron_db_password' => neutron_db_pw,
|
@@ -651,10 +652,7 @@ module Staypuft
|
|
651
652
|
param = puppetclass.class_params.find_by_key(param_key)
|
652
653
|
unless param
|
653
654
|
Rails.logger.error "missing param #{param_key} in #{puppetclass_name} trying to set default_value: #{default_value.inspect} found in puppetclasses: " +
|
654
|
-
LookupKey.
|
655
|
-
smart_class_parameters.
|
656
|
-
search_for("key = #{param_key}").
|
657
|
-
map { |lk| lk.param_class.name }.inspect
|
655
|
+
LookupKey.search_for(param_key).map { |lk| (c = (lk.param_class || lk.puppetclass)).nil? ? "class not found" : c.name }.inspect
|
658
656
|
next
|
659
657
|
end
|
660
658
|
unless param.update_attributes default_value: default_value
|
@@ -5,6 +5,9 @@ module Staypuft
|
|
5
5
|
end
|
6
6
|
|
7
7
|
SEGMENTATION_LIST = ['vxlan', 'vlan', 'gre', 'flat']
|
8
|
+
INTERFACE_HELP = N_('(i.e. eth0, em1, etc.)')
|
9
|
+
VLAN_HELP = N_('[1-4094] (i.e. 10:100)')
|
10
|
+
|
8
11
|
|
9
12
|
param_attr :network_segmentation, :tenant_vlan_ranges, :networker_tenant_interface,
|
10
13
|
:use_external_interface, :external_interface_name, :compute_tenant_interface,
|
@@ -27,7 +30,7 @@ module Staypuft
|
|
27
30
|
|
28
31
|
module TenantVlanRanges
|
29
32
|
HUMAN = N_('Tenant (VM data) VLAN Ranges')
|
30
|
-
HUMAN_AFTER =
|
33
|
+
HUMAN_AFTER = VLAN_HELP
|
31
34
|
end
|
32
35
|
|
33
36
|
validates :tenant_vlan_ranges,
|
@@ -37,7 +40,7 @@ module Staypuft
|
|
37
40
|
|
38
41
|
module NetworkerTenantInterface
|
39
42
|
HUMAN = N_('Which interface to use for tenant networks:')
|
40
|
-
HUMAN_AFTER =
|
43
|
+
HUMAN_AFTER = INTERFACE_HELP
|
41
44
|
end
|
42
45
|
|
43
46
|
validates :networker_tenant_interface,
|
@@ -52,7 +55,7 @@ module Staypuft
|
|
52
55
|
|
53
56
|
module ExternalInterfaceName
|
54
57
|
HUMAN = N_('External interface connected to')
|
55
|
-
HUMAN_AFTER =
|
58
|
+
HUMAN_AFTER = INTERFACE_HELP
|
56
59
|
end
|
57
60
|
|
58
61
|
validates :external_interface_name,
|
@@ -68,7 +71,7 @@ module Staypuft
|
|
68
71
|
|
69
72
|
module VlanRangesForExternalNetwork
|
70
73
|
HUMAN = N_('VLAN Range for external network')
|
71
|
-
HUMAN_AFTER = N_('i.e.
|
74
|
+
HUMAN_AFTER = N_('i.e. 1000:2999')
|
72
75
|
end
|
73
76
|
|
74
77
|
validates :vlan_ranges_for_external_network,
|
@@ -78,7 +81,7 @@ module Staypuft
|
|
78
81
|
|
79
82
|
module ComputeTenantInterface
|
80
83
|
HUMAN = N_('Which interface to use for tenant networks:')
|
81
|
-
HUMAN_AFTER =
|
84
|
+
HUMAN_AFTER = INTERFACE_HELP
|
82
85
|
end
|
83
86
|
|
84
87
|
validates :compute_tenant_interface,
|
@@ -86,7 +89,7 @@ module Staypuft
|
|
86
89
|
# TODO: interface name format validation
|
87
90
|
|
88
91
|
def set_defaults
|
89
|
-
self.network_segmentation
|
92
|
+
self.network_segmentation = NetworkSegmentation::VXLAN
|
90
93
|
self.use_external_interface = 'false'
|
91
94
|
end
|
92
95
|
|
@@ -110,26 +113,19 @@ module Staypuft
|
|
110
113
|
[self.network_segmentation, *(SEGMENTATION_LIST - [self.network_segmentation])]
|
111
114
|
end
|
112
115
|
|
113
|
-
def
|
114
|
-
|
115
|
-
|
116
|
-
('physnet-external:br-ex' if self.use_external_interface?)].compact
|
117
|
-
else
|
118
|
-
[]
|
119
|
-
end
|
116
|
+
def networker_ovs_bridge_mappings
|
117
|
+
[("physnet-tenants:br-#{self.networker_tenant_interface}" unless self.enable_tunneling?),
|
118
|
+
('physnet-external:br-ex' if self.use_external_interface?)].compact
|
120
119
|
end
|
121
120
|
|
122
|
-
def
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
else
|
127
|
-
[]
|
128
|
-
end
|
121
|
+
def networker_ovs_bridge_uplinks
|
122
|
+
[("br-#{self.networker_tenant_interface}:#{self.networker_tenant_interface}" unless self.enable_tunneling?),
|
123
|
+
("br-ex:#{self.external_interface_name}" if self.use_external_interface?)
|
124
|
+
].compact
|
129
125
|
end
|
130
126
|
|
131
127
|
def compute_ovs_bridge_mappings
|
132
|
-
if self.
|
128
|
+
if !self.enable_tunneling?
|
133
129
|
["physnet-tenants:br-#{self.compute_tenant_interface}"]
|
134
130
|
else
|
135
131
|
[]
|
@@ -137,22 +133,26 @@ module Staypuft
|
|
137
133
|
end
|
138
134
|
|
139
135
|
def compute_ovs_bridge_uplinks
|
140
|
-
if self.
|
136
|
+
if !self.enable_tunneling?
|
141
137
|
["br-#{self.compute_tenant_interface}:#{self.compute_tenant_interface}"]
|
142
138
|
else
|
143
139
|
[]
|
144
140
|
end
|
145
141
|
end
|
146
142
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
if self.external_network_vlan?
|
151
|
-
[self.vlan_ranges_for_external_network]
|
143
|
+
def compute_vlan_ranges
|
144
|
+
if self.vlan_segmentation?
|
145
|
+
["physnet-tenants:#{self.tenant_vlan_ranges}"]
|
152
146
|
else
|
153
147
|
[]
|
154
148
|
end
|
155
149
|
end
|
150
|
+
|
151
|
+
def networker_vlan_ranges
|
152
|
+
[("physnet-tenants:#{self.tenant_vlan_ranges}" if self.vlan_segmentation?),
|
153
|
+
("physnet-external:#{self.vlan_ranges_for_external_network}" if self.external_network_vlan?)].compact
|
154
|
+
end
|
155
|
+
|
156
156
|
def vlan_segmentation?
|
157
157
|
self.network_segmentation == NetworkSegmentation::VLAN
|
158
158
|
end
|
@@ -161,5 +161,9 @@ module Staypuft
|
|
161
161
|
self.use_external_interface? && self.use_vlan_for_external_network?
|
162
162
|
end
|
163
163
|
|
164
|
+
def enable_tunneling?
|
165
|
+
[NetworkSegmentation::VXLAN, NetworkSegmentation::GRE].include?(network_segmentation)
|
166
|
+
end
|
167
|
+
|
164
168
|
end
|
165
169
|
end
|
@@ -4,6 +4,9 @@ module Staypuft
|
|
4
4
|
'nova'
|
5
5
|
end
|
6
6
|
|
7
|
+
INTERFACE_HELP = Deployment::NeutronService::INTERFACE_HELP
|
8
|
+
VLAN_HELP = Deployment::NeutronService::VLAN_HELP
|
9
|
+
|
7
10
|
param_attr :network_manager, :vlan_range, :external_interface_name, :public_floating_range,
|
8
11
|
:compute_tenant_interface, :private_fixed_range
|
9
12
|
|
@@ -20,7 +23,7 @@ module Staypuft
|
|
20
23
|
|
21
24
|
module VlanRange
|
22
25
|
HUMAN = N_('VLAN Range')
|
23
|
-
HUMAN_AFTER =
|
26
|
+
HUMAN_AFTER = VLAN_HELP
|
24
27
|
end
|
25
28
|
|
26
29
|
validates :vlan_range,
|
@@ -31,7 +34,7 @@ module Staypuft
|
|
31
34
|
|
32
35
|
module ExternalInterfaceName
|
33
36
|
HUMAN = N_('Which interface to use for external networks:')
|
34
|
-
HUMAN_AFTER =
|
37
|
+
HUMAN_AFTER = INTERFACE_HELP
|
35
38
|
end
|
36
39
|
|
37
40
|
validates :external_interface_name, presence: true
|
@@ -47,7 +50,7 @@ module Staypuft
|
|
47
50
|
|
48
51
|
module ComputeTenantInterface
|
49
52
|
HUMAN = N_('Which interface to use for tenant networks:')
|
50
|
-
HUMAN_AFTER =
|
53
|
+
HUMAN_AFTER = INTERFACE_HELP
|
51
54
|
end
|
52
55
|
|
53
56
|
validates :compute_tenant_interface,
|
@@ -56,7 +59,7 @@ module Staypuft
|
|
56
59
|
|
57
60
|
module PrivateFixedRange
|
58
61
|
HUMAN = N_('Private IP range for tenant networks:')
|
59
|
-
HUMAN_AFTER =
|
62
|
+
HUMAN_AFTER = PublicFloatingRange::HUMAN_AFTER
|
60
63
|
end
|
61
64
|
|
62
65
|
validates :private_fixed_range, presence: true
|
@@ -212,7 +212,6 @@ module Staypuft
|
|
212
212
|
Operatingsystem.where(name: 'RedHat', major: '6', minor: '5').first
|
213
213
|
when Platform::RHEL7
|
214
214
|
Operatingsystem.where(name: 'RedHat', major: '7', minor: '0').first
|
215
|
-
Operatingsystem.where(name: 'RedHat', major: '6', minor: '5').first
|
216
215
|
end or
|
217
216
|
raise 'missing Operatingsystem'
|
218
217
|
self.hostgroup.save!
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<thead>
|
15
15
|
<tr>
|
16
16
|
<th class="ca">
|
17
|
-
<%=
|
17
|
+
<%= tag :input, type: 'checkbox', class: 'check_all' %>
|
18
18
|
</th>
|
19
19
|
<th><%= sort :name, :as => _('Name') %></th>
|
20
20
|
<th class="hidden-s hidden-xs"><%= sort :ip, :as => _('IP Address') %></th>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<thead>
|
11
11
|
<tr>
|
12
12
|
<th class="ca">
|
13
|
-
<%=
|
13
|
+
<%= tag :input, type: 'checkbox', class: 'check_all' %>
|
14
14
|
</th>
|
15
15
|
<th><%= sort :name, :as => _('Name') %></th>
|
16
16
|
<th class="hidden-s hidden-xs"><%= sort :ip, :as => _('IP Address') %></th>
|
@@ -1,50 +1,66 @@
|
|
1
|
-
<% title _("
|
1
|
+
<% title _("Edit - %s Configuration Parameters") % @deployment.name %>
|
2
2
|
<% content_for(:title_actions) do %>
|
3
|
-
<%= link_to _("Back to
|
3
|
+
<%= link_to _("Back to Deployment"), deployment_path(@deployment.id) %>
|
4
|
+
<%= link_to _("Apply"), '',
|
5
|
+
class: "btn btn-primary",
|
6
|
+
id: 'edit_staypuft_deployment_submit' %>
|
7
|
+
<%= link_to _("Cancel"), summary_deployment_path(@deployment.id), :class => "btn btn-danger" %>
|
4
8
|
<% end %>
|
5
9
|
|
10
|
+
<script>
|
11
|
+
$('#edit_staypuft_deployment_submit').click(function (e) {
|
12
|
+
$('#edit_staypuft_deployment').submit();
|
13
|
+
e.preventDefault();
|
14
|
+
});
|
15
|
+
</script>
|
6
16
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<% @service_hostgroup_map.each_with_index do |(service, hostgroup), i| %>
|
12
|
-
<li class="<%= 'active' if i == 0 %>">
|
13
|
-
<a href="#<%= service.name.parameterize.underscore %>" data-toggle="tab">
|
14
|
-
<%= service.name %>
|
15
|
-
</a>
|
16
|
-
</li>
|
17
|
-
<% end %>
|
18
|
-
</ul>
|
17
|
+
<%= form_for(@deployment,
|
18
|
+
:url => deployment_path, :method => 'PUT',
|
19
|
+
:html => { :class => "clearfix", id: 'edit_staypuft_deployment' }) do |f| %>
|
20
|
+
<%= base_errors_for @deployment %>
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
22
|
+
<div class="col-md-12">
|
23
|
+
<div class="form-group tabbed_side_nav_form row">
|
24
|
+
<ul class="nav nav-pills nav-stacked col-md-3" data-tabs="pills">
|
25
|
+
<h3><%= _("Services") %></h3>
|
26
|
+
<% @service_hostgroup_map.each_with_index do |(service, hostgroup), i| %>
|
27
|
+
<li class="<%= 'active' if i == 0 %>">
|
28
|
+
<a href="#<%= service.name.parameterize.underscore %>" data-toggle="tab">
|
29
|
+
<%= service.name %>
|
30
|
+
</a>
|
31
|
+
</li>
|
32
|
+
<% end %>
|
33
|
+
</ul>
|
34
|
+
|
35
|
+
<div class="tab-content col-md-9">
|
36
|
+
<% @service_hostgroup_map.each_with_index do |(service, hostgroup), i| %>
|
37
|
+
<div class="tab-pane <%= 'active' if i == 0 %>" id="<%= service.name.parameterize.underscore %>">
|
38
|
+
<h3><%= "#{service.name} " + _("Service Configuration") %></h3>
|
39
|
+
<% if (params_hash = service.ui_params_for_form(hostgroup)).size > 0 %>
|
40
|
+
<% params_hash.each do |param_hash| %>
|
41
|
+
<div class="row">
|
42
|
+
<div class="col-md-4 control-label">
|
43
|
+
<%= label_tag param_hash[:param_key].key %>
|
44
|
+
</div>
|
45
|
+
<div class="col-md-5">
|
46
|
+
<%= text_field_tag format("staypuft_deployment[hostgroup_params][%s][puppetclass_params][%s][%s]",
|
47
|
+
param_hash[:hostgroup].id,
|
48
|
+
param_hash[:puppetclass].id,
|
49
|
+
param_hash[:param_key].key),
|
50
|
+
param_hash[:hostgroup].current_param_value_str(param_hash[:param_key]),
|
51
|
+
:class => "form-control",
|
52
|
+
:size => "45" %>
|
53
|
+
</div>
|
38
54
|
</div>
|
39
|
-
|
40
|
-
|
55
|
+
<br/>
|
56
|
+
<% end %>
|
57
|
+
<% else %>
|
58
|
+
<p><%= _("No configuration needed for this service.") %></p>
|
41
59
|
<% end %>
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
</div>
|
47
|
-
<% end %>
|
60
|
+
<%# render "puppetclasses/classes_parameters", { :obj => service.hostgroups.first } %>
|
61
|
+
</div>
|
62
|
+
<% end %>
|
63
|
+
</div>
|
48
64
|
</div>
|
49
65
|
</div>
|
50
|
-
|
66
|
+
<% end %>
|
@@ -1,36 +1,25 @@
|
|
1
1
|
<% title @deployment.name %>
|
2
2
|
|
3
3
|
<% content_for(:title_actions) do %>
|
4
|
-
|
4
|
+
<%= link_to(_("Advanced Configuration"), summary_deployment_path(@deployment.id), :class => '') %>
|
5
5
|
<%= link_to(_("Revisit Setup Wizard"), if @deployment.deployed?
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
:rel => 'popover',
|
24
|
-
:data => { 'content' => "#{render partial: 'import_form'}",
|
25
|
-
'original-title' => _('Import Config'),
|
26
|
-
'placement' => 'left'} }) %>
|
27
|
-
</li>
|
28
|
-
<li>
|
29
|
-
<%= link_to(icon_text("cloud-download", _("Export")),
|
30
|
-
export_config_deployment_path(@deployment.id)) %>
|
31
|
-
</li>
|
32
|
-
</ul>
|
33
|
-
</div>
|
6
|
+
deployment_step_path(deployment_id: @deployment, id: 'services_configuration')
|
7
|
+
else
|
8
|
+
deployment_steps_path(deployment_id: @deployment)
|
9
|
+
end) %>
|
10
|
+
|
11
|
+
<% if @deployment.in_progress? %>
|
12
|
+
<%= display_link_if_authorized(
|
13
|
+
_('Deploy in progress'),
|
14
|
+
hash_for_foreman_tasks_task_path(id: ForemanTasks::Lock.colliding_locks(@deployment, nil).first.task.id),
|
15
|
+
:class => 'btn-info') %>
|
16
|
+
<% else %>
|
17
|
+
<%= link_to(_("Deploy"),
|
18
|
+
"",
|
19
|
+
:class => %w(btn btn-primary),
|
20
|
+
:'data-toggle' => "modal",
|
21
|
+
:'data-target' => "#deploy_modal") %>
|
22
|
+
<% end %>
|
34
23
|
|
35
24
|
<% if Rails.env.development? %>
|
36
25
|
<div class="btn-group">
|
@@ -52,20 +41,6 @@
|
|
52
41
|
</div>
|
53
42
|
<% end %>
|
54
43
|
|
55
|
-
<% if @deployment.in_progress? %>
|
56
|
-
<%= display_link_if_authorized(
|
57
|
-
_('Deploy in progress'),
|
58
|
-
hash_for_foreman_tasks_task_path(id: ForemanTasks::Lock.colliding_locks(@deployment, nil).first.task.id),
|
59
|
-
:class => 'btn-info') %>
|
60
|
-
<% else %>
|
61
|
-
<%= link_to(_("Deploy"),
|
62
|
-
"",
|
63
|
-
:class => %w(btn btn-primary),
|
64
|
-
:'data-toggle' => "modal",
|
65
|
-
:'data-target' => "#deploy_modal") %>
|
66
|
-
<% end %>
|
67
|
-
|
68
|
-
|
69
44
|
<%= help_path %>
|
70
45
|
<% end %>
|
71
46
|
|
@@ -1,30 +1,60 @@
|
|
1
|
-
<% title _("%s
|
1
|
+
<% title _("%s Configuration Parameters") % @deployment.name %>
|
2
2
|
<% content_for(:title_actions) do %>
|
3
|
-
<%= link_to _("
|
4
|
-
<%= link_to _("
|
3
|
+
<%= link_to _("Back to Deployment"), deployment_path(@deployment.id) %>
|
4
|
+
<%= link_to(icon_text("cloud-upload", _("Import")),
|
5
|
+
{},
|
6
|
+
{ :remote => true,
|
7
|
+
:rel => 'popover',
|
8
|
+
:data => { 'content' => "#{render partial: 'import_form'}",
|
9
|
+
'original-title' => _('Import Config'),
|
10
|
+
'placement' => 'left' } }) %>
|
11
|
+
<%= link_to(icon_text("cloud-download", _("Export")),
|
12
|
+
export_config_deployment_path(@deployment.id)) %>
|
13
|
+
<%= link_to _("Edit"), edit_deployment_path(@deployment.id) %>
|
5
14
|
<% end %>
|
6
15
|
|
7
16
|
<div class="col-md-12">
|
8
|
-
|
9
|
-
<
|
10
|
-
<h3><%=
|
11
|
-
<%
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
17
|
+
<div class="form-group tabbed_side_nav_form row">
|
18
|
+
<ul class="nav nav-pills nav-stacked col-md-3" data-tabs="pills">
|
19
|
+
<h3><%= _("Services") %></h3>
|
20
|
+
<% @service_hostgroup_map.each_with_index do |(service, hostgroup), i| %>
|
21
|
+
<li class="<%= 'active' if i == 0 %>">
|
22
|
+
<a href="#<%= service.name.parameterize.underscore %>" data-toggle="tab">
|
23
|
+
<%= service.name %>
|
24
|
+
</a>
|
25
|
+
</li>
|
26
|
+
<% end %>
|
27
|
+
</ul>
|
28
|
+
|
29
|
+
<div class="tab-content col-md-9">
|
30
|
+
<% @service_hostgroup_map.each_with_index do |(service, hostgroup), i| %>
|
31
|
+
<div class="tab-pane <%= 'active' if i == 0 %>" id="<%= service.name.parameterize.underscore %>">
|
32
|
+
<h3><%= "#{service.name} " + _("Service Configuration") %></h3>
|
33
|
+
<% if (params_hash = service.ui_params_for_form(hostgroup)).size > 0 %>
|
34
|
+
<% params_hash.each do |param_hash| %>
|
35
|
+
<div class="row">
|
36
|
+
<div class="col-md-4 control-label">
|
37
|
+
<%= label_tag param_hash[:param_key].key %>
|
38
|
+
</div>
|
39
|
+
<div class="col-md-8">
|
40
|
+
<%= text_field_tag format("staypuft_deployment[hostgroup_params][%s][puppetclass_params][%s][%s]",
|
41
|
+
param_hash[:hostgroup].id,
|
42
|
+
param_hash[:puppetclass].id,
|
43
|
+
param_hash[:param_key].key),
|
44
|
+
param_hash[:hostgroup].current_param_value_str(param_hash[:param_key]),
|
45
|
+
:class => "form-control",
|
46
|
+
:size => "45",
|
47
|
+
disabled: true %>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
<br/>
|
51
|
+
<% end %>
|
52
|
+
<% else %>
|
53
|
+
<p><%= _("No configuration needed for this service.") %></p>
|
54
|
+
<% end %>
|
55
|
+
<% # render "puppetclasses/classes_parameters", { :obj => service.hostgroups.first } %>
|
26
56
|
</div>
|
27
57
|
<% end %>
|
28
58
|
</div>
|
29
|
-
|
59
|
+
</div>
|
30
60
|
</div>
|
@@ -11,11 +11,10 @@
|
|
11
11
|
<%= text_f f, :name %>
|
12
12
|
<%= textarea_f f, :description, :rows => 3 %>
|
13
13
|
|
14
|
-
<% { layout_name:
|
15
|
-
networking:
|
16
|
-
|
17
|
-
|
18
|
-
}.
|
14
|
+
<% { layout_name: Staypuft::Deployment::LayoutName,
|
15
|
+
networking: Staypuft::Deployment::Networking,
|
16
|
+
amqp_provider: Staypuft::Deployment::AmqpProvider,
|
17
|
+
platform: Staypuft::Deployment::Platform }.
|
19
18
|
each do |attr, constants| %>
|
20
19
|
|
21
20
|
<%= field(f, attr, :label => _(constants::HUMAN)) do
|
@@ -40,14 +39,14 @@
|
|
40
39
|
|
41
40
|
<div class="single_password col-md-offset-0 hide">
|
42
41
|
<%= password_f p, :single_password,
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
:label => _("Password"),
|
43
|
+
:class => "single_password",
|
44
|
+
:help_inline => _("Password should be 6 characters or more"),
|
45
|
+
:placeholder => '' %>
|
47
46
|
<%= password_f p, :single_password_confirmation,
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
:label => _("Confirm"),
|
48
|
+
:class => "single_password",
|
49
|
+
:placeholder => '' %>
|
51
50
|
</div>
|
52
51
|
<% end %>
|
53
52
|
|
data/lib/staypuft/version.rb
CHANGED