FUEL-269 (autocreate LVM groups for Cinder if need. Centos.)
This commit is contained in:
parent
fcf58f7f89
commit
fe6ffd33bb
@ -19,6 +19,7 @@ mco_stompport=61613 \
|
||||
mco_stompuser=mcollective \
|
||||
mco_stomppassword=AeN5mi5thahz2Aiveexo \
|
||||
mco_enable=1"
|
||||
# cinder_bd_for_vg=/dev/sdb,/dev/sdc \
|
||||
hostname: "fuel-01"
|
||||
name-servers: "10.0.0.100"
|
||||
name-servers-search: "your-domain-name.com"
|
||||
|
@ -26,6 +26,9 @@ class cobbler::snippets {
|
||||
|
||||
cobbler_snippet {"post_install_network_config":}
|
||||
|
||||
cobbler_snippet {"cinder_create_lvm_group":}
|
||||
cobbler_snippet {"cinder_create_lvm_group__ubuntu":}
|
||||
|
||||
cobbler_snippet {"ubuntu_disable_pxe":}
|
||||
cobbler_snippet {"ubuntu_packages":}
|
||||
cobbler_snippet {"ubuntu_puppet_config":}
|
||||
|
@ -59,7 +59,13 @@ zerombr
|
||||
clearpart --all --initlabel
|
||||
|
||||
# AUTOMATICALLY CREATE / /boot AND swap PARTITIONS
|
||||
autopart
|
||||
# autopart can't work together with autocreate LVS group for cinder
|
||||
# autopart
|
||||
part /boot --fstype ext3 --size=512 --asprimary
|
||||
part pv.01 --size=1 --grow
|
||||
volgroup sysvg pv.01
|
||||
logvol swap --fstype swap --name=swap --vgname=sysvg --recommended
|
||||
logvol / --fstype ext3 --name=root --vgname=sysvg --size=1 --grow
|
||||
|
||||
# COBBLER EMBEDDED SNIPPET: 'network_config'
|
||||
# CONFIGURES NETWORK INTERFACES DEPENDING ON
|
||||
@ -140,6 +146,9 @@ $SNIPPET('puppet_register_if_enabled')
|
||||
# SYNC NTPDATE AND RUN NTP SERVICE
|
||||
$SNIPPET('ntp_register_if_enabled')
|
||||
|
||||
# CREATING LVM GROUP FOR CINDER
|
||||
$SNIPPET('cinder_create_lvm_group')
|
||||
|
||||
# COBBLER EMBEDDED SNIPPET: 'mcollective_conf'
|
||||
# CONFIGURES MCOLLECTIVE AGENT
|
||||
$SNIPPET('mcollective_conf')
|
||||
|
@ -59,7 +59,13 @@ zerombr
|
||||
clearpart --all --initlabel
|
||||
|
||||
# AUTOMATICALLY CREATE / /boot AND swap PARTITIONS
|
||||
autopart
|
||||
# autopart can't work together with autocreate LVS group for cinder
|
||||
# autopart
|
||||
part /boot --fstype ext3 --size=512 --asprimary
|
||||
part pv.01 --size=1 --grow
|
||||
volgroup sysvg pv.01
|
||||
logvol swap --fstype swap --name=swap --vgname=sysvg --recommended
|
||||
logvol / --fstype ext3 --name=root --vgname=sysvg --size=1 --grow
|
||||
|
||||
# COBBLER EMBEDDED SNIPPET: 'network_config'
|
||||
# CONFIGURES NETWORK INTERFACES DEPENDING ON
|
||||
@ -135,6 +141,9 @@ $SNIPPET('puppet_conf')
|
||||
# CREATES CERTIFICATE REQUEST AND SENDS IT TO PUPPET MASTER
|
||||
$SNIPPET('puppet_register_if_enabled')
|
||||
|
||||
# CREATING LVM GROUP FOR CINDER
|
||||
$SNIPPET('cinder_create_lvm_group')
|
||||
|
||||
# COBBLER EMBEDDED SNIPPET: 'mcollective_conf'
|
||||
# CONFIGURES MCOLLECTIVE AGENT
|
||||
$SNIPPET('mcollective_conf')
|
||||
|
@ -0,0 +1,11 @@
|
||||
#set $vgname = $getVar("cinder_vgname", "cinder-volumes")
|
||||
#set $bds = $getVar("cinder_bd_for_vg", "")
|
||||
#if $bds
|
||||
#set $devs = ""
|
||||
#for $bd in $bds.split(",")
|
||||
dd if=/dev/zero bs=8192 count=1 of=$bd
|
||||
echo ";" | sfdisk -f -q -L $bd && sfdisk -R $bd && sleep 1 && pvcreate ${bd}1
|
||||
#set $devs += "%s1 " % $bd
|
||||
#end for
|
||||
vgcreate $vgname $devs
|
||||
#end if
|
@ -0,0 +1,2 @@
|
||||
#import late_command
|
||||
in-target $late_command.late_command($SNIPPET('cinder_create_lvm_group'), source_method="content") \
|
Loading…
Reference in New Issue
Block a user