staypuft 0.1.1 → 0.1.2

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: 94824e862b595ccb4d2b4fb65510bb99b31dafe2
4
- data.tar.gz: c6d029fd8c66373cc2e70751ae5c8f88a66c2b6f
3
+ metadata.gz: f7301b7c1b7e335012bb653557cc106401da6e95
4
+ data.tar.gz: 0e5ac0bfec56e7b0be15f10cda44741a8d82bb8e
5
5
  SHA512:
6
- metadata.gz: 97ca036976447cb440e1eb31ecebe3f570ee65ce54ff9a882c8e638af13dc896d642592cfee5fa22068406396d90c4105815808c8f283ce0710a23e0fb9739d2
7
- data.tar.gz: 4e5ed51e8cb30a977dc06dcfe874fe712af41d5ee9773ae2136179dc1008a933f17a27bd9727859dbec8db2f92d5e41d804f2ec37ad052530df61fd1e4da144a
6
+ metadata.gz: 2df14ce916c35710c5fe4f19325657b844acda5bfb04d228a3d86f23f8537a5133db056b23513d2eef5a4156955d035c1964a9362fc65978f4f96ad9c5a9173f
7
+ data.tar.gz: 981de075c91c95cb49b24aed5aee084625af26e93e1bdcc815fde64601a2927a1e0b9b131580cb42d54f6d71f8c676ef128e08affaddfedd794918d4d5855b58
@@ -9,7 +9,7 @@ module Staypuft
9
9
  def new
10
10
  base_hostgroup = Hostgroup.get_base_hostgroup
11
11
 
12
- deployment = Deployment.new(:name => Deployment::NEW_NAME_PREFIX+SecureRandom.hex,
12
+ deployment = Deployment.new(:name => Deployment::NEW_NAME_PREFIX+SecureRandom.hex,
13
13
  :amqp_provider => Deployment::AMQP_RABBITMQ)
14
14
  deployment.layout = Layout.where(:name => "Distributed",
15
15
  :networking => "neutron").first
@@ -95,8 +95,8 @@ module Staypuft
95
95
  def export_config
96
96
  @deployment = Deployment.find(params[:id])
97
97
  send_data DeploymentParamExporter.new(@deployment).to_hash.to_yaml,
98
- :type => "application/x-yaml", :disposition => 'attachment',
99
- :filename => @deployment.name + '.yml'
98
+ :type => "application/x-yaml", :disposition => 'attachment',
99
+ :filename => @deployment.name + '.yml'
100
100
  end
101
101
 
102
102
  def import_config
@@ -121,11 +121,32 @@ module Staypuft
121
121
  private
122
122
 
123
123
  def assign_host_to_hostgroup(discovered_host, hostgroup)
124
+ converting_discovered = discovered_host.is_a? Host::Discovered
125
+
126
+ if converting_discovered
127
+ hosts_facts = FactValue.joins(:fact_name).where(host_id: discovered_host.id)
128
+ discovery_bootif = hosts_facts.where(fact_names: { name: 'discovery_bootif' }).first or
129
+ raise 'unknown discovery_bootif fact'
130
+
131
+ interface = hosts_facts.
132
+ includes(:fact_name).
133
+ where(value: discovery_bootif.value).
134
+ find { |v| v.fact_name.name =~ /^macaddress_.*$/ }.
135
+ fact_name.name.split('_').last
136
+
137
+ network = hosts_facts.where(fact_names: { name: "network_#{interface}" }).first
138
+ hostgroup.subnet.network == network.value or
139
+ raise "networks do not match: #{hostgroup.subnet.network} #{network.value}"
140
+ ip = hosts_facts.where(fact_names: { name: "ipaddress_#{interface}" }).first
141
+ end
142
+
124
143
  original_type = discovered_host.type
125
144
  host = discovered_host.becomes(::Host::Managed)
126
145
  host.type = 'Host::Managed'
127
146
  host.managed = true
128
147
  host.build = true
148
+ host.ip = ip.value if converting_discovered
149
+ host.mac = discovery_bootif.value if converting_discovered
129
150
 
130
151
  host.hostgroup = hostgroup
131
152
  # set discovery environment to keep booting discovery image
@@ -54,6 +54,7 @@ Staypuft::Service::UI_PARAMS = {
54
54
  'horizon_cert',
55
55
  'horizon_key',
56
56
  'horizon_secret_key',
57
+ 'ml2_firewall_driver',
57
58
  'ml2_flat_networks',
58
59
  'ml2_install_deps',
59
60
  'ml2_mechanism_drivers',
@@ -87,11 +88,28 @@ Staypuft::Service::UI_PARAMS = {
87
88
  'swift_storage_ips'],
88
89
  'Glance (non-HA)' => ['glance_db_password',
89
90
  'glance_user_password'],
90
- 'Cinder (controller)' => ['cinder_backend_gluster',
91
+ 'Cinder (controller)' => ['cinder_backend_eqlx',
92
+ 'cinder_backend_eqlx_name',
93
+ 'cinder_backend_gluster',
94
+ 'cinder_backend_gluster_name',
91
95
  'cinder_backend_iscsi',
96
+ 'cinder_backend_iscsi_name',
97
+ 'cinder_backend_nfs',
98
+ 'cinder_backend_nfs_name',
92
99
  'cinder_db_password',
93
- 'cinder_gluster_peers',
94
- 'cinder_gluster_volume',
100
+ 'cinder_multiple_backends',
101
+ 'cinder_gluster_shares',
102
+ 'cinder_nfs_shares',
103
+ 'cinder_nfs_mount_options',
104
+ 'cinder_san_ip',
105
+ 'cinder_san_login',
106
+ 'cinder_san_password',
107
+ 'cinder_san_thin_provision',
108
+ 'cinder_eqlx_group_name',
109
+ 'cinder_eqlx_pool',
110
+ 'cinder_eqlx_use_chap',
111
+ 'cinder_eqlx_chap_login',
112
+ 'cinder_eqlx_chap_password',
95
113
  'cinder_user_password'],
96
114
  'Heat' => ['heat_cfn',
97
115
  'heat_cloudwatch',
data/db/seeds.rb CHANGED
@@ -20,11 +20,30 @@ params = {
20
20
  'cinder_db_password' => SecureRandom.hex,
21
21
  'cinder_user_password' => SecureRandom.hex,
22
22
  'cinder_backend_gluster' => 'false',
23
+ 'cinder_backend_gluster_name' => 'glusterfs_backend',
23
24
  'cinder_backend_iscsi' => 'false',
25
+ 'cinder_backend_iscsi_name' => 'iscsi_backend',
26
+ 'cinder_backend_nfs' => 'false',
27
+ 'cinder_backend_nfs_name' => 'nfs_backend',
28
+ 'cinder_backend_eqlx' => 'false',
29
+ 'cinder_backend_eqlx_name' => 'eqlx_backend',
30
+ 'cinder_multiple_backends' => 'false',
24
31
  'cinder_gluster_peers' => [],
25
32
  'cinder_gluster_volume' => 'cinder',
26
33
  'cinder_gluster_replica_count' => '3',
27
- 'cinder_gluster_servers' => %w(192.168.0.4 192.168.0.5 192.168.0.6),
34
+ 'cinder_gluster_peers' => %w(192.168.0.4 192.168.0.5 192.168.0.6),
35
+ 'cinder_gluster_shares' => [ '192.168.0.4:/cinder -o backup-volfile-servers=192.168.0.5' ],
36
+ 'cinder_nfs_shares' => [ '192.168.0.4:/cinder' ],
37
+ 'cinder_nfs_mount_options' => '',
38
+ 'cinder_san_ip' => '192.168.124.11',
39
+ 'cinder_san_login' => 'grpadmin',
40
+ 'cinder_san_password' => SecureRandom.hex,
41
+ 'cinder_san_thin_provision' => 'false',
42
+ 'cinder_eqlx_group_name' => 'group-0',
43
+ 'cinder_eqlx_pool' => 'default',
44
+ 'cinder_eqlx_use_chap' => 'false',
45
+ 'cinder_eqlx_chap_login' => 'chapadmin',
46
+ 'cinder_eqlx_chap_password' => SecureRandom.hex,
28
47
  'glance_db_password' => SecureRandom.hex,
29
48
  'glance_user_password' => SecureRandom.hex,
30
49
  'glance_gluster_peers' => [],
@@ -78,12 +97,11 @@ params = {
78
97
  'ovs_bridge_mappings' => [],
79
98
  'ovs_bridge_uplinks' => [],
80
99
  'ovs_tunnel_iface' => 'eth0',
81
- 'tenant_network_type' => 'gre',
100
+ 'tenant_network_type' => 'vxlan',
82
101
  'enable_tunneling' => 'True',
83
102
  'ovs_vxlan_udp_port' => '4789',
84
- 'ovs_tunnel_types' => [],
103
+ 'ovs_tunnel_types' => ['vxlan'],
85
104
  'auto_assign_floating_ip' => 'True',
86
- 'neutron_core_plugin' => 'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
87
105
  'cisco_vswitch_plugin' => 'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
88
106
  'cisco_nexus_plugin' => 'neutron.plugins.cisco.nexus.cisco_nexus_plugin_v2.NexusPlugin',
89
107
  'nexus_config' => {},
@@ -147,7 +165,7 @@ services = {
147
165
  :neutron_controller => { :name => 'Neutron (Controller)', :class => [] },
148
166
  :non_ha_glance => { :name => 'Glance (non-HA)', :class => [] },
149
167
  :cinder_controller => { :name => 'Cinder (controller)', :class => [] },
150
- :cinder_node => { :name => 'Cinder (node)', :class => ['quickstack::storage_backend::lvm_cinder'] },
168
+ :cinder_node => { :name => 'Cinder (node)', :class => ['quickstack::storage_backend::cinder'] },
151
169
  :heat => { :name => 'Heat', :class => [] },
152
170
  :ceilometer => { :name => 'Ceilometer', :class => [] },
153
171
  :neutron_networker => { :name => 'Neutron Networker', :class => ['quickstack::neutron::networker'] },
@@ -1,3 +1,3 @@
1
1
  module Staypuft
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
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.1.1
4
+ version: 0.1.2
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-06-06 00:00:00.000000000 Z
11
+ date: 2014-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman-tasks