Skip to content

Instantly share code, notes, and snippets.

@robertstarmer
Last active December 14, 2015 05:09
Show Gist options
  • Select an option

  • Save robertstarmer/5033455 to your computer and use it in GitHub Desktop.

Select an option

Save robertstarmer/5033455 to your computer and use it in GitHub Desktop.
$build_node_name = "build-60"
$domain_name = 'sixty.lab'
$company_ntp_server = "192.168.26.163"
$cobbler_node_ip = '192.168.60.254'
$node_subnet = '192.168.60.0'
$node_netmask = '255.255.255.0'
$node_gateway = '192.168.60.1'
$location = "http://192.168.26.163/openstack/cisco"
$admin_user = 'localadmin'
$password_crypted = '$6$UfgWxrIv$k4KfzAEMqMg.fppmSOTd0usI4j6gfjs0962.JXsoJRWa5wMz8yQk4SfInn4.WZ3L/MCt5u.62tHDGB36EhiKF1'
$autostart_puppet = true
$controller_node_address = '192.168.60.10'
$controller_node_network = '192.168.60.0'
$controller_hostname = 'control'
$db_allowed_network = '192.168.60.%'
$management_interface = 'eth0'
$external_interface = 'eth1'
$install_drive = '/dev/sda'
$libvirt_type = 'kvm'
$admin_email = 'root@localhost'
$admin_password = 'Cisco123'
$keystone_db_password = 'keystone_db_pass'
$keystone_admin_token = 'keystone_admin_token'
$nova_db_password = 'nova_pass'
$nova_user_password = 'nova_pass'
$glance_db_password = 'glance_pass'
$glance_user_password = 'glance_pass'
$glance_on_swift = false
$rabbit_password = 'openstack_rabbit_password'
$rabbit_user = 'openstack_rabbit_user'
$verbose = false
define cobbler_node($node_type, $mac, $ip, $power_address, $power_id = undef) {
cobbler::node { $name:
mac => $mac,
ip => $ip,
### UCS CIMC Details ###
# Change these parameters to match the management console settings for your server
power_address => $power_address,
power_user => "admin",
power_password => "C1sc01234",
power_type => "ucs",
power_id => $power_id,
### Advanced Users Configuration ###
# These parameters typically should not be changed
profile => "precise-x86_64-auto",
domain => $::domain_name,
node_type => $node_type,
preseed => "cisco-preseed",
}
}
node /build-60/ inherits cobbler-base {
cobbler_node { "control": node_type => "control", mac => "00:25:B5:00:05:5F", ip => "192.168.60.10", power_address => "192.168.26.18", power_id => "Grizzly2"}
cobbler_node { "compute1": node_type => "compute", mac => "00:25:B5:00:05:2F", ip => "192.168.60.21", power_address => "192.168.26.18", power_id => "Grizzly3" }
cobbler_node { "compute2": node_type => "compute", mac => "00:25:B5:00:05:0F", ip => "192.168.60.22", power_address => "192.168.26.18", power_id => "Grizzly4" }
}
############# ALL-IN-ONE #################################
# For All-in-One type nodes, you only need this definition to match
# the hostnmae of your node. Your build-node above should _not_ match
# as this is already accomplished through this definiton
node all-in-one inherits build-base { class { allinone: } }
node control inherits base { class { control: crosstalk_ip => '192.168.60.10'} }
node compute1 inherits base { class { compute: internal_ip => '192.168.60.21', crosstalk_ip => '192.168.60.21'} }
node compute2 inherits base { class { compute: internal_ip => '192.168.60.22', crosstalk_ip => '192.168.60.22'} }
$dns_service = "dnsmasq"
$dhcp_service = "dnsmasq"
import 'core'
node default {
notify{"Default Node: Perhaps add a node definition to site.pp": }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment