openstack-manuals/doc/training-guides/training-labs/Scripts/Cinder/Cinder.sh
Sean Roberts 7ec78aef2d changes the trunk location for the training guides
was incorrectly placed in trunk/training-guide non-plural, now trunk/training-guides.
also add redirect from trunk/openstack-training and trunk/training-guide to the
new location.

Change-Id: I0648a9604dc6a1d6c7480a90c07871608a8752ca
Closes-Bug: #1255684
2013-11-27 14:41:18 -08:00

49 lines
1.7 KiB
Bash

#!/bin/sh
#
# About:Setup Dependences for Virtual Box Sandbox
# meant for OpenStack Labs.
#
# Contact: pranav@aptira.com
# Copyright : Aptira @aptira,aptira.com
# License: Apache Software License (ASL) 2.0
###############################################################################
# #
# This Script will install Cinder related packages and after installaion, it #
# will configure Cinder, populate the database. #
# #
###############################################################################
# Note: You DoNot Need Internet for this due to the magic of --download-only
echo "Internet connection is not required for this script to run"
Install_Cinder() {
# 1. Install Cinder
apt-get install -y cinder-api cinder-scheduler cinder-volume iscsitarget open-iscsi iscsitarget-dkms
# 2. Configure iscsi services
sed -i 's/false/true/g' /etc/default/iscsitarget
# 3. Restart the services
service iscsitarget start
service open-iscsi start
# 4. Configure the templates
cp --no-preserve=mode,ownership Templates/api-paste.ini /etc/cinder/api-paste.ini
cp --no-preserve=mode,ownership Templates/cinder.conf /etc/cinder/cinder.conf
# 5. MySQL database
cinder-manage db sync
# 5. Format the disks -- see if something else is available instead of
# fdisk
bash format_volumes # Need Expert Advice on this ....
pvcreate /dev/sdb
vgcreate cinder-volumes /dev/sdb
# 6. Restart Cinder Related Services
for i in $( ls /etc/init.d/cinder-* ); do $i restart; done
}
Install_Cinder