Updates to devstack build profile

- Increase memory of devstack server from 5GB to 7GB
- Update autostack script to reflect upstream changes
  (remove ceilometer hack)
- Disable Neutron, which was preventing VM from provisioning images
- Remove Glance from local.conf; it's already installed by default
- Added instance pre-creation steps to documentation

Change-Id: Ia3259cf440e5f16b194d8339a176f2d919b23bc4
This commit is contained in:
David Schroeder 2014-10-02 17:01:57 -06:00
parent 51b571a0ed
commit 0f28ca680e
6 changed files with 30 additions and 25 deletions

2
Vagrantfile vendored
View File

@ -38,7 +38,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
ds.vm.network :private_network, ip: "192.168.10.5" ds.vm.network :private_network, ip: "192.168.10.5"
ds.vm.network :private_network, ip: "10.1.2.44" ds.vm.network :private_network, ip: "10.1.2.44"
ds.vm.provider "virtualbox" do |vb| ds.vm.provider "virtualbox" do |vb|
vb.memory = 5280 vb.memory = 7168
vb.cpus = 4 vb.cpus = 4
end end
ds.vm.provision :chef_solo do |chef| ds.vm.provision :chef_solo do |chef|

View File

@ -56,7 +56,7 @@ fi
for line in `cat $basedir/devstack/stack-screenrc |tr -d "\r"`; do for line in `cat $basedir/devstack/stack-screenrc |tr -d "\r"`; do
if [[ $line == stuff* ]]; then if [[ $line == stuff* ]]; then
echo echo
# Extract the command line to run this service # Extract the command line to run this service
command=`echo "$line" |sed 's/^stuff //;s/"//g'` command=`echo "$line" |sed 's/^stuff //;s/"//g'`
base_command=`echo $command |sed 's:.*bin/::;s/ .*//'` base_command=`echo $command |sed 's:.*bin/::;s/ .*//'`
@ -64,17 +64,14 @@ echo
# Skip screen sessions that are only a tail command # Skip screen sessions that are only a tail command
[[ $command == *tail* ]] && continue [[ $command == *tail* ]] && continue
# Ceilometer's stack-screenrc invocation differs from all the others # Find a good log directory by first determining the parent
if [ `echo "$command" |grep -c ceilometer` = 1 ]; then #+ Openstack service (nova, glance, etc.)
base_command=`echo $command |sed "s/cd ; //;s/ libvirtd '//;s/ .*//"` parent=`echo "$base_command" |cut -d- -f1`
parent='/opt/stack/ceilometer'
else
# Determine an appropriate log directory
parent=`echo "$command" |cut -d' ' -f2 |sed 's/;//'`
fi
logdir="/var/log/`basename $parent`" logdir="/var/log/`basename $parent`"
logfile="$base_command.log" logfile="$base_command.log"
# Now, create the upstart script from this template
echo "Creating /etc/init/$base_command.conf" echo "Creating /etc/init/$base_command.conf"
cat > "/etc/init/$base_command.conf" <<EOF cat > "/etc/init/$base_command.conf" <<EOF
@ -92,6 +89,7 @@ respawn
exec su -c "$command --log-dir=$logdir --log-file=$logfile" $unpriv_user exec su -c "$command --log-dir=$logdir --log-file=$logfile" $unpriv_user
EOF EOF
# Swift processes do not support logfiles, so modify the init script # Swift processes do not support logfiles, so modify the init script
if [ `echo "$command" |grep -c swift` = 1 ]; then if [ `echo "$command" |grep -c swift` = 1 ]; then
sed -i 's/--log.*"/"/' /etc/init/$base_command.conf sed -i 's/--log.*"/"/' /etc/init/$base_command.conf

View File

@ -31,12 +31,9 @@ enable_service ceilometer-alarm-evaluator ceilometer-alarm-notifier
# Enable the ceilometer api services # Enable the ceilometer api services
enable_service ceilometer-api enable_service ceilometer-api
# Neutron # Neutron (disabled for now)
Q_PLUGIN=linuxbridge #Q_PLUGIN=linuxbridge
disable_service n-net #disable_service n-net
enable_service neutron q-svc q-agt q-dhcp q-l3 q-meta #enable_service neutron q-svc q-agt q-dhcp q-l3 q-meta
enable_service q-fwaas q-vpn q-metering #enable_service q-fwaas q-vpn q-metering
# Glance
enable_service g-api g-reg

View File

@ -4,5 +4,5 @@ maintainer_email "hpcs-mon@hp.com"
license "All rights reserved" license "All rights reserved"
description "Build customized devstack server" description "Build customized devstack server"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.0.2" version "0.0.3"
depends "apt" depends "apt"

View File

@ -13,13 +13,9 @@ The following services are enabled:
- Heat - Heat
- Horizon - Horizon
- Keystone - Keystone
- Neutron
- Nova - Nova
- Swift - Swift
Note that with Neutron, `Q_PLUGIN` is set to linuxbridge rather than
openvswitch.
# Upstart instead of screen # Upstart instead of screen
The cookbook includes a script which creates Upstart init scripts for each of The cookbook includes a script which creates Upstart init scripts for each of
@ -37,8 +33,22 @@ progress from another terminal by running `vagrant ssh` and then
`tail -f /opt/stack/logs/stack.sh.log` `tail -f /opt/stack/logs/stack.sh.log`
## Packaging for VagrantCloud ## Packaging for VagrantCloud
To ensure that this VM can provision its own instances, launch and delete
an instance prior to packging for VagrantCloud.
- Open http://192.168.10.5 in a web browser
- Log in using default admin credentials specified above
- Click on 'Project' at left, then 'Instances'
- Click the 'Launch Instance' button
- Enter an Instance Name, any name will do
- Select Flavor 'm1.tiny'
- Set Instance Boot Source to 'Boot from image'
- Choose 'cirros' as the Image Name
- Click the 'Launch' button
- Once the image is created successfully, terminate it
- Sign out from the web interface; you are now ready to package the box image
From within the `ds-build` directory, run this command to build a new From within the `ds-build` directory, run this command to build a new
VagrantCloud box image after `vagrant up` completed successfully: VagrantCloud box image:
``` ```
box='devstack.box'; [ -e ../$box ] && rm -v ../$box ; vagrant package devstack --output $box box='devstack.box'; [ -e ../$box ] && rm -v ../$box ; vagrant package devstack --output $box
``` ```

View File

@ -38,7 +38,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
ds.vm.box = "ubuntu/trusty64" ds.vm.box = "ubuntu/trusty64"
ds.vm.network :private_network, ip: "192.168.10.5" ds.vm.network :private_network, ip: "192.168.10.5"
ds.vm.provider "virtualbox" do |vb| ds.vm.provider "virtualbox" do |vb|
vb.memory = 5280 vb.memory = 7180
vb.cpus = 4 vb.cpus = 4
end end
ds.vm.provision :chef_solo do |chef| ds.vm.provision :chef_solo do |chef|