labs: rudimentary verification of installed services

The current scripts make no effort to verify that the installed
services are configured correctly.

With this patch, some basic configuration errors will at least leave
traces in the script log files.

Change-Id: I4c85f81c1540ff50a8a690dc170871fc56667f7d
Co-Authored-By: Pranav Salunke <dguitarbite@gmail.com>
Implements: blueprint openstack-training-labs
This commit is contained in:
Roger Luethi 2014-08-14 10:20:26 +02:00
parent 9f03ec0809
commit 89ebaf0eb8
4 changed files with 64 additions and 0 deletions

View File

@ -99,3 +99,19 @@ keystone endpoint-create \
echo "Restarting cinder service."
sudo service cinder-scheduler restart
sudo service cinder-api restart
#------------------------------------------------------------------------------
# Verify the Block Storage installation
#------------------------------------------------------------------------------
echo "cinder create --display-name labsVolume 1"
cinder create --display-name labsVolume 1
echo "cinder list"
cinder list
echo "cinder delete labsVolume"
cinder delete labsVolume
echo "cinder list"
cinder list

View File

@ -110,3 +110,11 @@ glance image-create \
--container-format bare \
--disk-format qcow2 < "$IMG_DIR/cirros-0.3.2-x86_64-disk.img"
#------------------------------------------------------------------------------
# Verify the Image Service installation
#------------------------------------------------------------------------------
echo "Verifying that the image was successfully added to the service."
echo "glance image-list"
glance image-list

View File

@ -89,3 +89,27 @@ echo "Adding service tenant."
keystone tenant-create \
--name "$SERVICE_TENANT_NAME" \
--description "Service Tenant"
#------------------------------------------------------------------------------
# Verify the Identity Service installation
#------------------------------------------------------------------------------
echo "Verifying keystone installation."
# From this point on, we are going to use keystone for authentication
unset OS_SERVICE_TOKEN OS_SERVICE_ENDPOINT
# Load keystone credentials
source "$CONFIG_DIR/labs-openstackrc.sh"
# The output of the following commands can be used to verify or debug the
# service.
echo "keystone token-get"
keystone token-get
echo "keystone user-list"
keystone user-list
echo "keystone user-role-list --user $ADMIN_USER_NAME --tenant $ADMIN_TENANT_NAME"
keystone user-role-list --user "$ADMIN_USER_NAME" --tenant "$ADMIN_TENANT_NAME"

View File

@ -101,3 +101,19 @@ for component in "${components[@]}"; do
sudo service "$component" restart
done
#------------------------------------------------------------------------------
# Verify the Compute controller installation
#------------------------------------------------------------------------------
echo "Verifying nova output."
echo "Verify nova service status."
# This call needs root privileges for read access to /etc/nova/nova.conf.
echo "sudo nova-manage service list"
sudo nova-manage service list
echo "nova image-list"
nova image-list
echo "nova list-extensions"
nova list-extensions