| ... | ... |
@@ -51,12 +51,19 @@ fi |
| 51 | 51 |
|
| 52 | 52 |
# Warm the base image on first install |
| 53 | 53 |
CACHEDIR=/var/cache/lxc/natty/rootfs-amd64 |
| 54 |
-if [ ! -d $CACHEDIR ]; then |
|
| 54 |
+if [ -d $CACHEDIR ]; then |
|
| 55 | 55 |
# trigger the initial debootstrap |
| 56 | 56 |
lxc-create -n $CONTAINER -t natty -f $LXC_CONF |
| 57 | 57 |
chroot $CACHEDIR apt-get update |
| 58 | 58 |
chroot $CACHEDIR apt-get install -y `cat apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server)"` |
| 59 | 59 |
chroot $CACHEDIR pip install `cat pips/*` |
| 60 |
+ git clone https://github.com/cloudbuilders/nova.git $CACHEDIR/opt/nova |
|
| 61 |
+ git clone https://github.com/cloudbuilders/openstackx.git $CACHEDIR/opt/openstackx |
|
| 62 |
+ git clone https://github.com/cloudbuilders/noVNC.git $CACHEDIR/opt/noVNC |
|
| 63 |
+ git clone https://github.com/cloudbuilders/openstack-dashboard.git $CACHEDIR/opt/dash |
|
| 64 |
+ git clone https://github.com/cloudbuilders/python-novaclient.git $CACHEDIR/opt/python-novaclient |
|
| 65 |
+ git clone https://github.com/cloudbuilders/keystone.git $CACHEDIR/opt/keystone |
|
| 66 |
+ git clone https://github.com/cloudbuilders/glance.git $CACHEDIR/opt/glance |
|
| 60 | 67 |
fi |
| 61 | 68 |
|
| 62 | 69 |
# Destroy the old container |
| ... | ... |
@@ -60,7 +60,7 @@ EC2_DMZ_HOST=${EC2_DMZ_HOST:-$HOST_IP}
|
| 60 | 60 |
LIBVIRT_TYPE=${LIBVIRT_TYPE:-qemu}
|
| 61 | 61 |
|
| 62 | 62 |
# Mysql connection info |
| 63 |
-MYSQL_USER=${MYSQL_USER:-root}
|
|
| 63 |
+MYSQL_USER=${MYSQL_USER:-nova}
|
|
| 64 | 64 |
MYSQL_PASS=${MYSQL_PASS:-nova}
|
| 65 | 65 |
MYSQL_HOST=${MYSQL_HOST:-localhost}
|
| 66 | 66 |
# don't specify /db in this string, so we can use it for multiple services |
| ... | ... |
@@ -168,6 +168,9 @@ sudo sed -e "s,%DASH_DIR%,$DASH_DIR,g" -i /etc/apache2/sites-enabled/000-default |
| 168 | 168 |
# dashboard can run |
| 169 | 169 |
sudo chown -R www-data:www-data $DASH_DIR |
| 170 | 170 |
|
| 171 |
+# Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases: |
|
| 172 |
+sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' WITH GRANT OPTION;" |
|
| 173 |
+ |
|
| 171 | 174 |
# Edit /etc/mysql/my.cnf to change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0) and restart the mysql service: |
| 172 | 175 |
sudo sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf |
| 173 | 176 |
sudo service mysql restart |