diff --git a/build_lxc.sh b/build_lxc.sh index 643da7e4..48c952e9 100755 --- a/build_lxc.sh +++ b/build_lxc.sh @@ -233,19 +233,5 @@ fi # Start our container lxc-start -d -n $CONTAINER -# Done creating the container, let's tail the log -echo -echo "=============================================================" -echo " -- YAY! --" -echo "=============================================================" -echo -echo "We're done creating the container, about to start tailing the" -echo "stack.sh log. It will take a second or two to start." -echo -echo "Just CTRL-C at any time to stop tailing." - -while [ ! -e "$ROOTFS/$DEST/run.sh.log" ]; do - sleep 1 -done - -tail -F $ROOTFS/$DEST/run.sh.log +echo "Installation complete...." + diff --git a/files/keystone_data.sh b/files/keystone_data.sh index f48eaf9f..ec8b9d4a 100755 --- a/files/keystone_data.sh +++ b/files/keystone_data.sh @@ -28,9 +28,9 @@ $BIN_DIR/keystone-manage $* service add glance image "Glance Image Service" $BIN_DIR/keystone-manage $* service add keystone identity "Keystone Identity Service" #endpointTemplates -$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne nova http://%HOST_IP%:8774/v1.1/%tenant_id% http://%HOST_IP%:8774/v1.1/%tenant_id% http://%HOST_IP%:8774/v1.1/%tenant_id% 1 1 +$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne nova http://%HOST_PUBLIC_IP%:8774/v1.1/%tenant_id% http://%HOST_IP%:8774/v1.1/%tenant_id% http://%HOST_IP%:8774/v1.1/%tenant_id% 1 1 $BIN_DIR/keystone-manage $* endpointTemplates add RegionOne glance http://%HOST_IP%:9292/v1.1/%tenant_id% http://%HOST_IP%:9292/v1.1/%tenant_id% http://%HOST_IP%:9292/v1.1/%tenant_id% 1 1 -$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne keystone http://%HOST_IP%:5000/v2.0 http://%HOST_IP%:35357/v2.0 http://%HOST_IP%:5000/v2.0 1 1 +$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne keystone http://%HOST_PUBLIC_IP%:5000/v2.0 http://%HOST_IP%:35357/v2.0 http://%HOST_IP%:5000/v2.0 1 1 # $BIN_DIR/keystone-manage $* endpointTemplates add RegionOne swift http://%HOST_IP%:8080/v1/AUTH_%tenant_id% http://%HOST_IP%:8080/ http://%HOST_IP%:8080/v1/AUTH_%tenant_id% 1 1 # Tokens diff --git a/lxc_network_hostonlyplusnat.sh b/lxc_network_hostonlyplusnat.sh index 4e29ed70..a6ecb1fd 100755 --- a/lxc_network_hostonlyplusnat.sh +++ b/lxc_network_hostonlyplusnat.sh @@ -31,7 +31,7 @@ for arg in "$@"; do process_option $arg done -if [ $dry_run ]; then +if [ "$dry_run" -eq "1" ]; then DRIER=echo fi @@ -48,19 +48,6 @@ if [ ! -x "$BRCTL" ]; then exit 1 fi -# Scare off the nubs. -echo "=====================================================" -echo -echo "WARNING" -echo -echo "This script will modify your current network setup," -echo "this can be a scary thing and it is recommended that" -echo "you have something equivalent to physical access to" -echo "this machine before continuing in case your network" -echo "gets all funky." -echo -echo "If you don't want to continue, hit CTRL-C now." - if [ -z "$host_ip" ]; then echo "Otherwise, please type in your host's ip address and" @@ -68,11 +55,6 @@ then echo echo "=====================================================" read host_ip -else - echo "Otherwise hit enter." - echo - echo "=====================================================" - read accept fi diff --git a/stack.sh b/stack.sh index f6bf534e..78925b5d 100755 --- a/stack.sh +++ b/stack.sh @@ -70,9 +70,10 @@ if [[ $EUID -eq 0 ]]; then echo "Running the script as stack in 3 seconds..." sleep 3 if [[ "$SHELL_AFTER_RUN" != "no" ]]; then - exec su -c "cd /home/stack/$THIS_DIR/; bash stack.sh; bash" stack + #exec su -c "cd /home/stack/$THIS_DIR/; bash stack.sh; bash" stack + $(su -c "cd /home/stack/$THIS_DIR/; bash stack.sh" stack) else - exec su -c "cd /home/stack/$THIS_DIR/; bash stack.sh" stack + $(su -c "cd /home/stack/$THIS_DIR/; bash stack.sh" stack) fi exit 0 fi @@ -130,7 +131,7 @@ OPENSTACKX_DIR=$DEST/openstackx NOVNC_DIR=$DEST/noVNC # Specify which services to launch. These generally correspond to screen tabs -ENABLED_SERVICES=${ENABLED_SERVICES:-g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,dash,mysql,rabbit} +ENABLED_SERVICES=${ENABLED_SERVICES:-g-api,g-reg,key,n-vol,n-api,n-cpu,n-net,n-sch,n-vnc,dash,mysql,rabbit} # Nova hypervisor configuration. We default to **kvm** but will drop back to # **qemu** if we are unable to load the kvm module. Stack.sh can also install @@ -466,7 +467,7 @@ add_nova_flag "--vlan_interface=$VLAN_INTERFACE" add_nova_flag "--sql_connection=$BASE_SQL_CONN/nova" add_nova_flag "--libvirt_type=$LIBVIRT_TYPE" add_nova_flag "--osapi_extensions_path=$OPENSTACKX_DIR/extensions" -add_nova_flag "--vncproxy_url=http://$HOST_IP:6080" +add_nova_flag "--vncproxy_url=http://$HOST_PUBLIC_IP:6080" add_nova_flag "--vncproxy_wwwroot=$NOVNC_DIR/" add_nova_flag "--api_paste_config=$KEYSTONE_DIR/examples/paste/nova-api-paste.ini" add_nova_flag "--image_service=nova.image.glance.GlanceImageService" @@ -522,6 +523,7 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then KEYSTONE_DATA=$KEYSTONE_DIR/bin/keystone_data.sh cp $FILES/keystone_data.sh $KEYSTONE_DATA sudo sed -e "s,%HOST_IP%,$HOST_IP,g" -i $KEYSTONE_DATA + sudo sed -e "s,%HOST_PUBLIC_IP%,$HOST_PUBLIC_IP,g" -i $KEYSTONE_DATA sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $KEYSTONE_DATA sudo sed -e "s,%ADMIN_PASSWORD%,$ADMIN_PASSWORD,g" -i $KEYSTONE_DATA # initialize keystone with default users/endpoints @@ -540,13 +542,16 @@ fi function screen_it { NL=`echo -ne '\015'` if [[ "$ENABLED_SERVICES" =~ "$1" ]]; then - screen -S nova -X screen -t $1 - screen -S nova -p $1 -X stuff "$2$NL" + sudo screen -S nova -X screen -t $1 + sudo screen -S nova -p $1 -X stuff "$2$NL" fi } +# Fix issue with permissions on /dev/pts/0 for normal user +# Otherwise, screen call fails. + # create a new named screen to run processes in -screen -d -m -S nova -t nova +sudo screen -d -m -S nova -t nova sleep 1 # launch the glance registery service @@ -554,6 +559,7 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf" fi + # launch the glance api and wait for it to answer before continuing if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf" @@ -580,6 +586,12 @@ if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then sleep 1 done fi + +# launch volume service +if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then + screen_it n-vol "cd $NOVA_DIR; bin/nova-volume" +fi + # Launching nova-compute should be as simple as running ``nova-compute`` but # have to do a little more than that in our script. Since we add the group # ``libvirtd`` to our user in this script, when nova-compute is run it is @@ -614,7 +626,7 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then # we upload to glance with the glance cli tool. TTY is a stripped down # version of ubuntu. if [ ! -f $FILES/tty.tgz ]; then - wget -c http://images.ansolabs.com/tty.tgz -O $FILES/tty.tgz + wget -q -c http://images.ansolabs.com/tty.tgz -O $FILES/tty.tgz fi # extract ami-tty/image, aki-tty/image & ari-tty/image @@ -635,7 +647,7 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then # Downloaded from ubuntu enterprise cloud images. This # image doesn't use the ramdisk functionality if [ ! -f $FILES/natty.tgz ]; then - wget -c http://uec-images.ubuntu.com/natty/current/natty-server-cloudimg-amd64.tar.gz -O $FILES/natty.tgz + wget -q -c http://uec-images.ubuntu.com/natty/current/natty-server-cloudimg-amd64.tar.gz -O $FILES/natty.tgz fi tar -zxf $FILES/natty.tgz -C $FILES/images