staypuft 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45b52d5a9c0aa95ff9d31fbef3c20b491d000a1b
|
4
|
+
data.tar.gz: b901b85c5ab666ed79303e20ef127f76cf928607
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f63308f66381fc965dfe19a7718925494295d4e7f7a76ee1fbb4123f1cd12d1a993ce4854151cfa9c5004525e9c59ce8aae9eaaa3a4e4bb78680c6eba758f5ee
|
7
|
+
data.tar.gz: 6eb41ec18540190e04906eb24c94c684b0273f53174b26244ee9ca40361cb2e36761eee3946a168d2ece55bb69d2eb97dc3023429739bb8944bbe8161e298d2f
|
data/app/lib/staypuft/seeder.rb
CHANGED
@@ -172,8 +172,8 @@ module Staypuft
|
|
172
172
|
network_num_networks = { :string => '<%= @host.deployment.nova.num_networks %>' }
|
173
173
|
network_fixed_range = { :string => '<%= @host.deployment.nova.private_fixed_range %>' }
|
174
174
|
network_floating_range = { :string => '<%= @host.deployment.nova.public_floating_range %>' }
|
175
|
-
network_private_iface = { :string => '<%= @host.deployment.nova.
|
176
|
-
network_public_iface = { :string => '<%= @host.deployment.nova.
|
175
|
+
network_private_iface = { :string => '<%= @host.deployment.nova.private_iface %>' }
|
176
|
+
network_public_iface = { :string => '<%= @host.deployment.nova.public_iface %>' }
|
177
177
|
network_create_networks = true
|
178
178
|
|
179
179
|
# Neutron
|
@@ -185,10 +185,10 @@ module Staypuft
|
|
185
185
|
ml2_tunnel_id_ranges = ['10:1000']
|
186
186
|
ml2_vni_ranges = ['10:1000']
|
187
187
|
ovs_tunnel_types = ['vxlan', 'gre']
|
188
|
-
ovs_tunnel_iface = { :string => '<%= n = @host.deployment.neutron; n.enable_tunneling? ? n.
|
188
|
+
ovs_tunnel_iface = { :string => '<%= n = @host.deployment.neutron; n.enable_tunneling? ? n.networker_tenant_iface : "" %>' }
|
189
189
|
ovs_bridge_mappings = { :array => '<%= @host.deployment.neutron.networker_ovs_bridge_mappings %>' }
|
190
190
|
ovs_bridge_uplinks = { :array => '<%= @host.deployment.neutron.networker_ovs_bridge_uplinks %>' }
|
191
|
-
compute_ovs_tunnel_iface = { :string => '<%= n = @host.deployment.neutron; n.enable_tunneling? ? n.
|
191
|
+
compute_ovs_tunnel_iface = { :string => '<%= n = @host.deployment.neutron; n.enable_tunneling? ? n.compute_tenant_iface : "" %>' }
|
192
192
|
compute_ovs_bridge_mappings = { :array => '<%= @host.deployment.neutron.compute_ovs_bridge_mappings %>' }
|
193
193
|
compute_ovs_bridge_uplinks = { :array => '<%= @host.deployment.neutron.compute_ovs_bridge_uplinks %>' }
|
194
194
|
enable_tunneling = { :string => '<%= @host.deployment.neutron.enable_tunneling?.to_s %>' }
|
@@ -239,6 +239,8 @@ module Staypuft
|
|
239
239
|
cinder_eqlx_chap_login = ['']
|
240
240
|
cinder_eqlx_chap_password = ['']
|
241
241
|
|
242
|
+
# Keystone
|
243
|
+
keystonerc = 'true'
|
242
244
|
|
243
245
|
# effective_value grabs shared password if deployment is in shared password mode,
|
244
246
|
# otherwise use the service-specific one
|
@@ -315,6 +317,7 @@ module Staypuft
|
|
315
317
|
'glance_backend' => backend,
|
316
318
|
'glance_rbd_store_user' => glance_rbd_store_user,
|
317
319
|
'glance_rbd_store_pool' => glance_rbd_store_pool,
|
320
|
+
'keystonerc' => keystonerc,
|
318
321
|
'admin_password' => admin_pw,
|
319
322
|
'ceilometer_user_password' => ceilometer_user_pw,
|
320
323
|
'cinder_db_password' => cinder_db_pw,
|
@@ -384,6 +387,7 @@ module Staypuft
|
|
384
387
|
'glance_backend' => backend,
|
385
388
|
'glance_rbd_store_user' => glance_rbd_store_user,
|
386
389
|
'glance_rbd_store_pool' => glance_rbd_store_pool,
|
390
|
+
'keystonerc' => keystonerc,
|
387
391
|
'admin_password' => admin_pw,
|
388
392
|
'ceilometer_user_password' => ceilometer_user_pw,
|
389
393
|
'cinder_db_password' => cinder_db_pw,
|
@@ -518,6 +522,7 @@ module Staypuft
|
|
518
522
|
'eqlx_chap_login' => cinder_eqlx_chap_login,
|
519
523
|
'eqlx_chap_password' => cinder_eqlx_chap_password },
|
520
524
|
'quickstack::pacemaker::keystone' => {
|
525
|
+
'keystonerc' => keystonerc,
|
521
526
|
'admin_password' => admin_pw,
|
522
527
|
'admin_token' => keystone_admin_token },
|
523
528
|
'quickstack::pacemaker::horizon' => {
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'resolv'
|
2
|
+
|
1
3
|
module Staypuft
|
2
4
|
class Deployment::IPS < Deployment::AbstractParamScope
|
3
5
|
|
@@ -10,7 +12,9 @@ module Staypuft
|
|
10
12
|
end
|
11
13
|
|
12
14
|
def controller_ips
|
13
|
-
controllers.map
|
15
|
+
controllers.map do |controller|
|
16
|
+
ip_for_controller(controller)
|
17
|
+
end
|
14
18
|
end
|
15
19
|
|
16
20
|
def controller_fqdns
|
@@ -18,8 +22,15 @@ module Staypuft
|
|
18
22
|
end
|
19
23
|
|
20
24
|
def controller_ip
|
21
|
-
controllers.tap { |v| v.size == 1 or raise }.first
|
25
|
+
ip_for_controller(controllers.tap { |v| v.size == 1 or raise }.first)
|
22
26
|
end
|
23
27
|
|
28
|
+
# TODO: a better fix is needed once we have explicit subnet support in staypuft
|
29
|
+
# This is needed because host.ip doesn't always return the expected ip address
|
30
|
+
# when the host has more than one network interface -- this ensures that the
|
31
|
+
# provisioning network interface is the chosen one.
|
32
|
+
def ip_for_controller(controller)
|
33
|
+
Resolv::DNS.new(:nameserver => 'localhost').getaddress(controller.fqdn).to_s
|
34
|
+
end
|
24
35
|
end
|
25
36
|
end
|
@@ -77,8 +77,8 @@ module Staypuft
|
|
77
77
|
|
78
78
|
class Jail < Safemode::Jail
|
79
79
|
allow :networker_vlan_ranges, :compute_vlan_ranges, :network_segmentation, :enable_tunneling?,
|
80
|
-
:
|
81
|
-
:
|
80
|
+
:networker_tenant_iface, :networker_ovs_bridge_mappings, :networker_ovs_bridge_uplinks,
|
81
|
+
:compute_tenant_iface, :compute_ovs_bridge_mappings, :compute_ovs_bridge_uplinks
|
82
82
|
end
|
83
83
|
|
84
84
|
def set_defaults
|
@@ -102,19 +102,19 @@ module Staypuft
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def networker_ovs_bridge_mappings
|
105
|
-
[("physnet-tenants:br-#{self.
|
105
|
+
[("physnet-tenants:br-#{self.networker_tenant_iface}" unless self.enable_tunneling?),
|
106
106
|
('physnet-external:br-ex' if self.use_external_interface?)].compact
|
107
107
|
end
|
108
108
|
|
109
109
|
def networker_ovs_bridge_uplinks
|
110
|
-
[("br-#{self.
|
111
|
-
("br-ex:#{self.external_interface_name}" if self.use_external_interface?)
|
110
|
+
[("br-#{self.networker_tenant_iface}:#{self.networker_tenant_iface}" unless self.enable_tunneling?),
|
111
|
+
("br-ex:#{self.external_interface_name.downcase}" if self.use_external_interface?)
|
112
112
|
].compact
|
113
113
|
end
|
114
114
|
|
115
115
|
def compute_ovs_bridge_mappings
|
116
116
|
if !self.enable_tunneling?
|
117
|
-
["physnet-tenants:br-#{self.
|
117
|
+
["physnet-tenants:br-#{self.compute_tenant_iface}"]
|
118
118
|
else
|
119
119
|
[]
|
120
120
|
end
|
@@ -122,7 +122,7 @@ module Staypuft
|
|
122
122
|
|
123
123
|
def compute_ovs_bridge_uplinks
|
124
124
|
if !self.enable_tunneling?
|
125
|
-
["br-#{self.
|
125
|
+
["br-#{self.compute_tenant_iface}:#{self.compute_tenant_iface}"]
|
126
126
|
else
|
127
127
|
[]
|
128
128
|
end
|
@@ -149,6 +149,14 @@ module Staypuft
|
|
149
149
|
[NetworkSegmentation::VXLAN, NetworkSegmentation::GRE].include?(network_segmentation)
|
150
150
|
end
|
151
151
|
|
152
|
+
def networker_tenant_iface
|
153
|
+
networker_tenant_interface.downcase unless networker_tenant_interface.nil?
|
154
|
+
end
|
155
|
+
|
156
|
+
def compute_tenant_iface
|
157
|
+
compute_tenant_interface.downcase unless compute_tenant_interface.nil?
|
158
|
+
end
|
159
|
+
|
152
160
|
def param_hash
|
153
161
|
{ 'network_segmentation' => network_segmentation,
|
154
162
|
'tenant_vlan_ranges' => tenant_vlan_ranges,
|
@@ -87,7 +87,6 @@ module Staypuft
|
|
87
87
|
end
|
88
88
|
|
89
89
|
validates :public_floating_range, presence: true
|
90
|
-
# TODO: interface format validation
|
91
90
|
|
92
91
|
module ComputeTenantInterface
|
93
92
|
HUMAN = N_('Which interface to use for tenant networks')
|
@@ -99,12 +98,11 @@ module Staypuft
|
|
99
98
|
# TODO: interface name format validation
|
100
99
|
|
101
100
|
module PrivateFixedRange
|
102
|
-
HUMAN = N_('
|
101
|
+
HUMAN = N_('Fixed IP range for tenant networks')
|
103
102
|
HUMAN_AFTER = PublicFloatingRange::HUMAN_AFTER
|
104
103
|
end
|
105
104
|
|
106
105
|
validates :private_fixed_range, presence: true
|
107
|
-
# TODO: interface format validation
|
108
106
|
|
109
107
|
def set_defaults
|
110
108
|
self.network_manager = NetworkManager::FLAT_DHCP
|
@@ -140,6 +138,14 @@ module Staypuft
|
|
140
138
|
end
|
141
139
|
end
|
142
140
|
|
141
|
+
def private_iface
|
142
|
+
compute_tenant_interface.downcase unless compute_tenant_interface.nil?
|
143
|
+
end
|
144
|
+
|
145
|
+
def public_iface
|
146
|
+
external_interface_name.downcase unless external_interface_name.nil?
|
147
|
+
end
|
148
|
+
|
143
149
|
def param_hash
|
144
150
|
{ 'network_manager' => network_manager,
|
145
151
|
'vlan_range' => vlan_range,
|
@@ -151,7 +157,7 @@ module Staypuft
|
|
151
157
|
|
152
158
|
class Jail < Safemode::Jail
|
153
159
|
allow :network_manager, :network_overrides, :private_fixed_range, :public_floating_range,
|
154
|
-
:
|
160
|
+
:private_iface, :public_iface, :num_networks
|
155
161
|
end
|
156
162
|
|
157
163
|
end
|
data/lib/staypuft/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.1
|
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-08-
|
11
|
+
date: 2014-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks
|