Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrey Brindeyev
committed
Dec 8, 2010
1 parent
0893580
commit dcb5c12
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
DB_NAME=nova | ||
DB_USER=nova | ||
DB_PASS=nova | ||
CC_HOST= | ||
PWD=nova | ||
ETH=eth0 | ||
|
||
CC_HOST=`./getmyip.sh $ETH` | ||
HOSTS='gd-1 gd-2 gd-3 gd-4' | ||
|
||
for service in api compute objectstore scheduler network; do service openstack-nova-$service stop; done | ||
|
||
mysqladmin -uroot -p$PWD -f drop nova | ||
mysqladmin -uroot -p$PWD create nova | ||
rm -f /var/log/nova/nova*log | ||
|
||
for h in $HOSTS localhost; do | ||
echo "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'$h' IDENTIFIED BY '$DB_PASS';" | mysql -uroot -p$DB_PASS mysql | ||
done | ||
echo "GRANT ALL PRIVILEGES ON $DB_NAME.* TO $DB_USER IDENTIFIED BY '$DB_PASS';" | mysql -uroot -p$DB_PASS mysql | ||
echo "GRANT ALL PRIVILEGES ON $DB_NAME.* TO root IDENTIFIED BY '$DB_PASS';" | mysql -uroot -p$DB_PASS mysql | ||
|
||
for service in api compute objectstore scheduler network; do service openstack-nova-$service start; done | ||
|
||
#rm -fr images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
ip addr show dev $1|grep 'inet '|perl -pi -e 's/^.*inet ([0-9\.]+).*$/$1/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
USER=admin | ||
PROJECT=admin | ||
NETWORK="192.168.0.0/16" | ||
NETWORKS_NUM=1 | ||
ADDR_PER_NETWORK=16 | ||
|
||
TMPDIR=`mktemp -d` | ||
|
||
nova-manage user admin $USER | ||
nova-manage project create $PROJECT $USER | ||
nova-manage network create $NETWORK $NETWORKS_NUM $ADDR_PER_NETWORK | ||
nova-manage project zip $PROJECT $USER $TMPFILE $TMPDIR/nova_creds.zip | ||
|
||
CDIR=`pwd` | ||
cd $TMPDIR || exit -1 | ||
unzip nova_creds.zip | ||
source novarc | ||
|
||
cd $CDIR | ||
#tar zxf images.tgz | ||
|
||
euca-bundle-image -i images/aki-lucid/image -p kernel --kernel true | ||
euca-bundle-image -i images/ari-lucid/image -p ramdisk --ramdisk true | ||
euca-upload-bundle -m /tmp/kernel.manifest.xml -b mybucket | ||
euca-upload-bundle -m /tmp/ramdisk.manifest.xml -b mybucket | ||
AMI_KERNEL=`euca-register mybucket/kernel.manifest.xml | perl -pi -e 's/^IMAGE\s+//'` | ||
AMI_RAMDISK=`euca-register mybucket/ramdisk.manifest.xml | perl -pi -e 's/^IMAGE\s+//'` | ||
euca-bundle-image -i images/ami-tiny/image -p machine --kernel $AMI_KERNEL --ramdisk $AMI_RAMDISK | ||
euca-upload-bundle -m /tmp/machine.manifest.xml -b mybucket | ||
AMI_MACHINE=`euca-register mybucket/machine.manifest.xml | perl -pi -e 's/^IMAGE\s+//'` | ||
|
||
cd $TMPDIR || exit -1 | ||
euca-add-keypair mykey > mykey.priv | ||
chmod 600 mykey.priv | ||
|
||
euca-run-instances $AMI_MACHINE --kernel $AMI_KERNEL --ramdisk $AMI_RAMDISK -k mykey | ||
euca-describe-instances | ||
sleep 2 | ||
euca-describe-instances | ||
cat /var/log/nova/nova-compute.log |