diff --git a/apts/nova b/apts/nova index a846b06..eb85e26 100644 --- a/apts/nova +++ b/apts/nova @@ -1,8 +1,6 @@ dnsmasq-base kpartx mysql-server -mysql-common # install mysql-common/client explicitly since mysql-server isn't bootstrapped -mysql-client-5.1 python-mysqldb kvm gawk @@ -15,11 +13,6 @@ libvirt-bin vlan curl rabbitmq-server -erlang-base # install erlang deps for rabbit explicitly since we don't install rabbit during bootstrap -erlang-ssl -erlang-nox -erlang-inets -erlang-mnesia socat # used by ajaxterm python-mox python-paste diff --git a/apts/preseed b/apts/preseed new file mode 100644 index 0000000..d64c3b0 --- /dev/null +++ b/apts/preseed @@ -0,0 +1,12 @@ +# a collection of packages that speed up installation as they are dependencies +# of packages we can't install during bootstraping (rabbitmq-server, +# mysql-server, libvirt-bin) +# +# NOTE: only add packages to this file that aren't needed directly +mysql-common +mysql-client-5.1 +erlang-base +erlang-ssl +erlang-nox +erlang-inets +erlang-mnesia diff --git a/build_nfs.sh b/build_nfs.sh index 89d8141..fbfecfc 100755 --- a/build_nfs.sh +++ b/build_nfs.sh @@ -51,5 +51,11 @@ if [ -f /root/.ssh/id_rsa.pub ]; then fi # set root password to password -echo root:password | chroot $DEST chpasswd +echo root:pass | chroot $DEST chpasswd +# create a stack user +chroot $DEST useradd stack -s /bin/bash -d /opt +echo stack:pass | chroot $DEST chpasswd +chroot $DEST chown -R stack /opt + +echo "stack ALL=(ALL) NOPASSWD: ALL" >> $DEST/etc/sudoers diff --git a/stack.sh b/stack.sh index e82933d..ccdb193 100755 --- a/stack.sh +++ b/stack.sh @@ -44,17 +44,17 @@ SQL_CONN=${SQL_CONN:-mysql://root:$MYSQL_PASS@localhost/nova} # TODO: set rabbitmq conn string explicitly as well # seed configuration with mysql password -cat < /etc/apache2/sites-enabled/000-default -chown -R www-data:www-data $DASH_DIR +cat $DIR/files/000-default.template | sed 's/%DASH_DIR%/\/opt\/dash/g' > /tmp/000-default +sudo mv /tmp/000-default /etc/apache2/sites-enabled + +# `python setup.py develop` left some files owned by root in $DASH_DIR and +# others by the original owner. We need to change the owner to apache so +# dashboard can run +sudo chown -R www-data:www-data $DASH_DIR mkdir -p /var/log/glance @@ -175,8 +180,8 @@ rm -rf $NOVA_DIR/networks mkdir -p $NOVA_DIR/networks # (re)create nova database -mysql -p$MYSQL_PASS -e 'DROP DATABASE nova;' || true -mysql -p$MYSQL_PASS -e 'CREATE DATABASE nova;' +mysql -uroot -p$MYSQL_PASS -e 'DROP DATABASE nova;' || true +mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE nova;' $NOVA_DIR/bin/nova-manage db sync # initialize keystone with default users/endpoints