alpha consolidation
This commit is contained in:
parent
ce914162a2
commit
8883ae9eb6
|
@ -0,0 +1,151 @@
|
|||
|
||||
##Network section of node configuration
|
||||
nodes:
|
||||
- <<: *node_01
|
||||
|
||||
ks_meta: &ks_meta
|
||||
|
||||
|
||||
|
||||
|
||||
node_01: &node_01
|
||||
network_data:
|
||||
- name: management|public|storage|floating|fixed|admin
|
||||
ip: 192.168.6.2/24
|
||||
vlan: null|<1-1024>
|
||||
dev: String
|
||||
netmask: Netmask
|
||||
brd: Broadcast Address
|
||||
gateway: IP
|
||||
id: 01
|
||||
uid: 01
|
||||
mac: 08:00:27:C2:06:DE
|
||||
name: controller
|
||||
ip: 192.168.150.2
|
||||
fqdn: controller-01.domain.tld
|
||||
power_type: ssh
|
||||
power_user: root
|
||||
power_pass: /root/.ssh/bootstrap.rsa
|
||||
netboot_enabled: '1'
|
||||
name_servers: ! '"192.168.150.2"'
|
||||
ks_meta:
|
||||
mco_enable: 1
|
||||
mco_vhost: mcollective
|
||||
mco_pskey: unset
|
||||
mco_user: mcollective
|
||||
puppet_enable: 0
|
||||
install_log_2_syslog: 1
|
||||
mco_password: marionette
|
||||
puppet_auto_setup: 1
|
||||
puppet_master: fuelweb.domain.tld
|
||||
mco_auto_setup: 1
|
||||
auth_key: ! '""'
|
||||
puppet_version: 2.7.19
|
||||
mco_connector: rabbitmq
|
||||
mco_host: 192.168.150.2
|
||||
ks_spaces: ! '"[{\"type\": \"disk\", \"id\": \"disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0\",
|
||||
\"volumes\": [{\"mount\": \"/boot\", \"type\": \"partition\", \"size\": 209715200},
|
||||
{\"type\": \"mbr\"}, {\"size\": 16959668224, \"type\": \"pv\", \"vg\": \"os\"}],
|
||||
\"size\": 17179869184}, {\"type\": \"disk\", \"id\": \"disk/by-path/pci-0000:00:0d.0-scsi-1:0:0:0\",
|
||||
\"volumes\": [{\"size\": 536860426240, \"type\": \"pv\", \"vg\": \"os\"}], \"size\":
|
||||
536870912000}, {\"type\": \"disk\", \"id\": \"disk/by-path/pci-0000:00:0d.0-scsi-2:0:0:0\",
|
||||
\"volumes\": [{\"size\": 2411714314240, \"type\": \"pv\", \"vg\": \"os\"}],
|
||||
\"size\": 2411724800000}, {\"type\": \"vg\", \"id\": \"os\", \"volumes\": [{\"mount\":
|
||||
\"/\", \"type\": \"lv\", \"name\": \"root\", \"size\": 2963243016192}, {\"mount\":
|
||||
\"swap\", \"type\": \"lv\", \"name\": \"swap\", \"size\": 2090065920}]}]"'
|
||||
meta:
|
||||
memory:
|
||||
total: 778694656
|
||||
interfaces:
|
||||
- mac: '08:00:27:31:09:34'
|
||||
max_speed: 100
|
||||
name: eth2
|
||||
current_speed: 100
|
||||
- mac: 08:00:27:93:54:B0
|
||||
max_speed: 100
|
||||
name: eth1
|
||||
current_speed: 100
|
||||
- name: eth0
|
||||
ip: 10.20.0.95
|
||||
netmask: 255.255.255.0
|
||||
mac: 08:00:27:C2:06:DE
|
||||
max_speed: 100
|
||||
current_speed: 100
|
||||
disks:
|
||||
- model: VBOX HARDDISK
|
||||
disk: disk/by-path/pci-0000:00:0d.0-scsi-2:0:0:0
|
||||
name: sdc
|
||||
size: 2411724800000
|
||||
- model: VBOX HARDDISK
|
||||
disk: disk/by-path/pci-0000:00:0d.0-scsi-1:0:0:0
|
||||
name: sdb
|
||||
size: 536870912000
|
||||
- model: VBOX HARDDISK
|
||||
disk: disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0
|
||||
name: sda
|
||||
size: 17179869184
|
||||
system:
|
||||
serial: '0'
|
||||
version: '1.2'
|
||||
fqdn: bootstrap
|
||||
family: Virtual Machine
|
||||
manufacturer: VirtualBox
|
||||
cpu:
|
||||
real: 0
|
||||
total: 1
|
||||
spec:
|
||||
- model: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
|
||||
frequency: 2397
|
||||
error_type:
|
||||
use_cow_images: true|false
|
||||
libvirt_type: qemu|kvm
|
||||
dns_nameservers: Array of IPs
|
||||
public_br: <String>
|
||||
internal_br: <String>
|
||||
verbose: true|false
|
||||
debug: true|false
|
||||
auto_assign_floating_ip: true|false
|
||||
start_guests_on_host_boot: true|false
|
||||
create_networks: true|false
|
||||
compute_scheduler_driver: <String - name of compute scheduler type>
|
||||
quantum: true|false
|
||||
master_hostname: <hostname>
|
||||
nagios: true|false
|
||||
proj_name: String
|
||||
nagios_master: IP|hostname
|
||||
#Nova-network part, gets ignored if $quantum = `false`
|
||||
nova-network_parameters:
|
||||
- fixed_network_range: CIDR
|
||||
vlan_start: <1-1024>
|
||||
network_manager: String
|
||||
network_size: <Integer>
|
||||
#Quantum part, used only if quantum='true'
|
||||
quantum_parameters:
|
||||
- tenant_network_type: 'gre|vlan'
|
||||
segment_range: <Range of integers from 1 to 1024>
|
||||
mysql:
|
||||
root_password: <password>
|
||||
glance:
|
||||
db_password: <password>
|
||||
user_password: <password>
|
||||
swift:
|
||||
user_password: <password>
|
||||
nova:
|
||||
db_password: <password>
|
||||
user_password: <password>
|
||||
access:
|
||||
password: <password>
|
||||
user: <username>
|
||||
tenant: <tenant_name>
|
||||
email: <email>
|
||||
keystone:
|
||||
db_password: <password>
|
||||
admin_token: <password>
|
||||
quantum:
|
||||
db_password: <password>
|
||||
rabbit:
|
||||
password: <password>
|
||||
user: <username>
|
||||
deployment_mode: ha|simple
|
||||
deployment_source: cli|web
|
||||
|
|
@ -79,27 +79,27 @@ module Astute
|
|||
|
||||
def attrs_ha(nodes, attrs)
|
||||
# TODO(mihgen): we should report error back if there are not enough metadata passed
|
||||
ctrl_nodes = attrs['controller_nodes']
|
||||
ctrl_manag_addrs = {}
|
||||
ctrl_public_addrs = {}
|
||||
ctrl_storage_addrs = {}
|
||||
ctrl_nodes.each do |n|
|
||||
#ctrl_nodes = attrs['controller_nodes']
|
||||
#ctrl_manag_addrs = {}
|
||||
#ctrl_public_addrs = {}
|
||||
#ctrl_storage_addrs = {}
|
||||
#ctrl_nodes.each do |n|
|
||||
# current puppet modules require `hostname -s`
|
||||
hostname = n['fqdn'].split(/\./)[0]
|
||||
ctrl_manag_addrs.merge!({hostname =>
|
||||
n['network_data'].select {|nd| nd['name'] == 'management'}[0]['ip'].split(/\//)[0]})
|
||||
ctrl_public_addrs.merge!({hostname =>
|
||||
n['network_data'].select {|nd| nd['name'] == 'public'}[0]['ip'].split(/\//)[0]})
|
||||
ctrl_storage_addrs.merge!({hostname =>
|
||||
# hostname = n['fqdn'].split(/\./)[0]
|
||||
# ctrl_manag_addrs.merge!({hostname =>
|
||||
# n['network_data'].select {|nd| nd['name'] == 'management'}[0]['ip'].split(/\//)[0]})
|
||||
# ctrl_public_addrs.merge!({hostname =>
|
||||
# n['network_data'].select {|nd| nd['name'] == 'public'}[0]['ip'].split(/\//)[0]})
|
||||
# ctrl_storage_addrs.merge!({hostname =>
|
||||
n['network_data'].select {|nd| nd['name'] == 'storage'}[0]['ip'].split(/\//)[0]})
|
||||
end
|
||||
#end
|
||||
|
||||
# we use the same set of mount points for all storage nodes
|
||||
attrs['mp'] = {'point' => '1', 'weight' => '1'}
|
||||
attrs['nodes'] = ctrl_nodes.map do |n|
|
||||
attrs['nodes'] = nodes.map do |n|
|
||||
{
|
||||
'name' => n['fqdn'].split(/\./)[0],
|
||||
'role' => 'controller',
|
||||
'role' => n['role'],
|
||||
'internal_address' => n['network_data'].select {|nd| nd['name'] == 'management'}[0]['ip'].split(/\//)[0],
|
||||
'public_address' => n['network_data'].select {|nd| nd['name'] == 'public'}[0]['ip'].split(/\//)[0],
|
||||
'mountpoints' => "#{attrs['mp']['point']} #{attrs['mp']['weight']}",
|
||||
|
@ -107,12 +107,12 @@ module Astute
|
|||
'storage_local_net_ip' => n['network_data'].select {|nd| nd['name'] == 'storage'}[0]['ip'].split(/\//)[0],
|
||||
}
|
||||
end
|
||||
attrs['nodes'].first['role'] = 'primary-controller'
|
||||
attrs['ctrl_hostnames'] = ctrl_nodes.map {|n| n['fqdn'].split(/\./)[0]}
|
||||
attrs['master_hostname'] = ctrl_nodes[0]['fqdn'].split(/\./)[0]
|
||||
attrs['ctrl_public_addresses'] = ctrl_public_addrs
|
||||
attrs['ctrl_management_addresses'] = ctrl_manag_addrs
|
||||
attrs['ctrl_storage_addresses'] = ctrl_storage_addrs
|
||||
attrs['nodes'].first['role'] = 'primary-controller' if attrs['nodes'].select { |node| node['role'] == primary-controller }.empty?
|
||||
#attrs['ctrl_hostnames'] = ctrl_nodes.map {|n| n['fqdn'].split(/\./)[0]}
|
||||
attrs['master_hostname'] = ctrl_nodes[0]['fqdn'].split(/\./)[0] if attrs['master_hostname'].nil?
|
||||
#attrs['ctrl_public_addresses'] = ctrl_public_addrs
|
||||
#attrs['ctrl_management_addresses'] = ctrl_manag_addrs
|
||||
#attrs['ctrl_storage_addresses'] = ctrl_storage_addrs
|
||||
attrs
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue