Refactor Lab Section

Adds basic skeleton/structure with stubs. Changes are done as per Roger
Luethi's scripts. These changes are done to incorporate various features
like logging, multi-os setup etc. These scripts may also target more
virtualization products like KVM, LXC down the roadmap.

blueprint openstack-training-labs

Change-Id: I0bb33b518080f8a9b9c0e1624f43a66337eb8278
This commit is contained in:
Pranav Salunke 2014-06-12 13:47:15 +05:30
parent 72cd9532b3
commit 0110baf375
54 changed files with 40 additions and 291 deletions

0
labs/ChangeLog Normal file
View File

4
labs/Hacking.rst Normal file
View File

@ -0,0 +1,4 @@
TODO: Add steps on how to setup the environment, test etc. in this
file
Maybe, identify and describe major/important files or folders

35
labs/README.md Executable file
View File

@ -0,0 +1,35 @@
Training Labs
=============
About
-----
Training Labs will provide scripts to automate creation of Training
Environment.
**Note:** Training Labs are specifically meant for OpenStack Training and are
speficially tuned as per Training Manuals repo.
BluePrints
---------
Training Manuals : https://blueprints.launchpad.net/openstack-manuals/+spec/training-manuals
Training Labs : https://blueprints.launchpad.net/openstack-manuals/+spec/openstack-training-labs
IRC
---
To contribute please contact Pranav Salunke ( dguitarbite@gmail.com) or hop on
to IRC channel `#openstack-manuals`.
To follow the weekly meetings schedule for OpenStack Training, please refer
the following link.
For IRC meetings, refer the wiki page on training manuals.
https://wiki.openstack.org/wiki/Meetings/training-manual
Wiki
----
Follow various links on OpenStack Training Manuals here :
https://wiki.openstack.org/wiki/Training-guides

View File

@ -1,30 +0,0 @@
# allinone.sh
#
# Author: Trevor Roberts Jr (VMTrooper@gmail.com)
# This script is called by the Vagrant shell provisioner to build the student's
# lab machine.
#
# Vagrant's shell provisioner receives deployment instructions from this file.
# Removing this file without removing the shell provisioner command in the
# Vagrantfile will cause deployment errors.
#
# See the remaining OpenStack Training Labs code for more details at GitHub:
# https://github.com/openstack/openstack-manuals/tree/master/doc/training-guides/training-labs
# Change to the root user
sudo su -
cd ~
# Get latest catalogs from Ubuntu
apt-get update
apt-get install -y vim
# Copy the deployment scripts to /root
cp -avr /vagrant/Scripts .
cd Scripts
mkdir Logs
# Execute the deployment scripts
# ./auto_scripts.sh
echo "Execute PreInstall script to build student environment"
bash PreInstall/Vagrant-PreInstall.sh "single-node" > Logs/PreInstall.log

View File

@ -1,31 +0,0 @@
# compute.sh
#
# Author: Trevor Roberts Jr (VMTrooper@gmail.com)
# This script is called by the Vagrant shell provisioner to build the student's
# lab machine.
#
# Vagrant's shell provisioner receives deployment instructions from this file.
# Removing this file without removing the shell provisioner command in the
# Vagrantfile will cause deployment errors.
#
# See the remaining OpenStack Training Labs code for more details at GitHub:
# https://github.com/openstack/openstack-manuals/tree/master/doc/training-guides/training-labs
# Change to the root user
sudo su -
cd ~
# Get latest catalogs from Ubuntu
apt-get update
apt-get install -y vim
# Copy the deployment scripts to /root
cp -avr /vagrant/Scripts .
cd Scripts
mkdir Logs
# Execute the deployment scripts
# ./auto_scripts.sh
echo "Execute PreInstall script to build student environment"
bash PreInstall/PreInstall.sh "single-node" > Logs/PreInstall.log

View File

@ -1,31 +0,0 @@
# controller.sh
#
# Author: Trevor Roberts Jr (VMTrooper@gmail.com)
# This script is called by the Vagrant shell provisioner to build the student's
# lab machine.
#
# Vagrant's shell provisioner receives deployment instructions from this file.
# Removing this file without removing the shell provisioner command in the
# Vagrantfile will cause deployment errors.
#
# See the remaining OpenStack Training Labs code for more details at GitHub:
# https://github.com/openstack/openstack-manuals/tree/master/doc/training-guides/training-labs
# Change to the root user
sudo su -
cd ~
# Get latest catalogs from Ubuntu
apt-get update
apt-get install -y vim
# Copy the deployment scripts to /root
cp -avr /vagrant/Scripts .
cd Scripts
mkdir Logs
# Execute the deployment scripts
# ./auto_scripts.sh
echo "Execute PreInstall script to build student environment"
bash PreInstall/PreInstall.sh "single-node" > Logs/PreInstall.log

1
labs/getting-started.rst Normal file
View File

@ -0,0 +1 @@
TODO: Getting started section will lie in this section.

View File

@ -1,82 +0,0 @@
#!/bin/bash
#
# About: Set up dependencies for VirtualBox sandbox meant for OpenStack Labs.
#
# Contact: pranav@aptira.com
# Copyright: Aptira @aptira,aptira.com
# License: Apache Software License (ASL) 2.0
###############################################################################
# #
# This script will ask the user for the type of OpenStack install and it will #
# configure the VM #
# #
###############################################################################
# Check for kvm-ok >> VirtualBox >>
# Colors and decorations (ignore)
RCol='\e[0m' # Text reset
#Regular #Bold #Underline #High Intensity #BoldHigh Intens #Background #High Intensity Backgrounds
Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m';
Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m';
Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m';
Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m';
Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m';
Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m';
Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m'; BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m';
Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m';
echo -e "${On_Bla}"
echo -e "
${IWhi}##################################################
${BIRed}Note: ${BIblu}You need Internet access for this script to run
${IWhi}##################################################"
echo -e "${IYel}"
echo -e "${RCol}"
end(){
echo -e "${BBlu}Program terminating"
echo -e "${RCol}"
exit
}
check (){
if [ $? -eq 0 ]; then
echo -e "${BBlu}... $1 Success ..."
else
if [$2 -eq 1 ]; then
echo -e "${BIRed}Failed. Terminating"
end
else
echo -e "${BIRed}$2 Failed! Please recheck"
end
fi
fi
}
echo "Press [y/N] for single node"
read single_node_install
if [ "$single_node_install" == "Y" -o "$single_node_install" == "y" ]; then
echo "Configuring VirtualBox VMs for single node deployment"
./singlenode.sh
else
echo "Press [y/N] for multi node"
read multi_node_install
if [ "$multi_node_install" == "Y" -o "$multi_node_install" == "y" ]; then
echo "Configuring VirtualBox VMs for multi node deployment"
./multinode.sh
fi
fi
end

0
labs/localrc Normal file
View File

View File

@ -1,28 +0,0 @@
#!/bin/sh
#
# About: Set up dependencies for VirtualBox sandbox meant for OpenStack Labs.
#
# Contact: pranav@aptira.com
# Copyright: Aptira @aptira,aptira.com
# License: Apache Software License (ASL) 2.0
###############################################################################
# #
# Carry out tasks for setting up multi node environment for OpenStack #
# #
###############################################################################
echo "Multi node"
echo "This script is to be implemented later on. Please refer to single node for now."
uname=root
pass=cloud
vm_id="d57da699-ff1e-4b24-b270-78093a2b25a9"
# Download the VM from repo/storage space on the Internet
# Register the VM and start the VM
# Execute the single node script to configure the network
#vboxmanage guestcontrol $vm_id execute --image "/bin/ls" --username $uname --password $pass --wait-exit --wait-stdout
# Execute the single node install scripts and take snapshots after each script
# vboxmanage guestcontrol $vm_id execute --image "/bin/ls" --username $uname --password $pass --wait-exit --wait-stdout
# vboxmanage snapshot $vm_id take "test_snapshot" --description "test snapshot -- igore :D"

View File

@ -1,31 +0,0 @@
# network.sh
#
# Author: Trevor Roberts Jr (VMTrooper@gmail.com)
# This script is called by the Vagrant shell provisioner to build the student's
# lab machine.
#
# Vagrant's shell provisioner receives deployment instructions from this file.
# Removing this file without removing the shell provisioner command in the
# Vagrantfile will cause deployment errors.
#
# See the remaining OpenStack Training Labs code for more details at GitHub:
# https://github.com/openstack/openstack-manuals/tree/master/doc/training-guides/training-labs
# Change to the root user
sudo su -
cd ~
# Get latest catalogs from Ubuntu
apt-get update
apt-get install -y vim
# Copy the deployment scripts to /root
cp -avr /vagrant/Scripts .
cd Scripts
mkdir Logs
# Execute the deployment scripts
# ./auto_scripts.sh
echo "Execute PreInstall script to build student environment"
bash PreInstall/PreInstall.sh "single-node" > Logs/PreInstall.log

0
labs/osbash.sh Normal file
View File

View File

@ -1,58 +0,0 @@
#!/bin/sh
#
# About: Set up dependencies for VirtualBox sandbox meant for OpenStack Labs.
#
# Contact: pranav@aptira.com
# Copyright: Aptira @aptira,aptira.com
# License: Apache Software License (ASL) 2.0
###############################################################################
# #
# Carry out tasks for setting up single node environment for OpenStack #
# #
###############################################################################
echo "Single node"
uname=
pass=
vm_id=
# Download the VM from repo/storage space on the Internet
# Register the VM and start the VM
# Execute the single node script to configure the network and getting Ubuntu
# ready for OpenStack
vboxmanage guestcontrol $vm_id execute --image "/bin/ls" --username $uname --password $pass --wait-exit --wait-stdout
# Snapshot 1. Basic settings
# Execute the single node install scripts and take snapshots after each script
# 1. Download all the packages using apt-get --download-only but not installing
# them.
# 2. Snapshot 2. Offline ready
# 3. Keystone
# 4. Snapshot 3. Keystone ready
# 5. Glance
# 6. Snapshot 4. Glance ready
# 7. Quantum
# 8. Snapshot 5. Quantum ready
# 9. Nova
# 10. Snapshot 6. Nova ready
# 11. Cinder
# 12. Snapshot 7. Cinder ready
# 13. Horizon
# 14. Snapshot 8. Horizon ready
# 15. Configure and kickstart VM in OpenStack
# 16. Snapshot 9. OpenStack configured