should speed up by 20 seconds - sudo and no sleep
This commit is contained in:
parent
00d6bc6529
commit
c7f72ad890
2 changed files with 3 additions and 3 deletions
3
stack.sh
3
stack.sh
|
@ -103,8 +103,7 @@ if [[ $EUID -eq 0 ]]; then
|
||||||
|
|
||||||
# since this script runs as a normal user, we need to give that user
|
# since this script runs as a normal user, we need to give that user
|
||||||
# ability to run sudo
|
# ability to run sudo
|
||||||
apt_get update
|
dpkg -l sudo || apt_get update && apt_get install sudo
|
||||||
apt_get install sudo
|
|
||||||
|
|
||||||
if ! getent passwd stack >/dev/null; then
|
if ! getent passwd stack >/dev/null; then
|
||||||
echo "Creating a user called stack"
|
echo "Creating a user called stack"
|
||||||
|
|
|
@ -171,13 +171,14 @@ EOF
|
||||||
cat > $vm_dir/uec/user-data<<EOF
|
cat > $vm_dir/uec/user-data<<EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install git -y
|
apt-get install git sudo -y
|
||||||
git clone https://github.com/cloudbuilders/devstack.git
|
git clone https://github.com/cloudbuilders/devstack.git
|
||||||
cd devstack
|
cd devstack
|
||||||
git remote set-url origin `cd $TOP_DIR; git remote show origin | grep Fetch | awk '{print $3}'`
|
git remote set-url origin `cd $TOP_DIR; git remote show origin | grep Fetch | awk '{print $3}'`
|
||||||
git fetch
|
git fetch
|
||||||
git checkout `git rev-parse HEAD`
|
git checkout `git rev-parse HEAD`
|
||||||
cat > localrc <<LOCAL_EOF
|
cat > localrc <<LOCAL_EOF
|
||||||
|
ROOTSLEEP=0
|
||||||
`cat $TOP_DIR/localrc`
|
`cat $TOP_DIR/localrc`
|
||||||
LOCAL_EOF
|
LOCAL_EOF
|
||||||
./stack.sh
|
./stack.sh
|
||||||
|
|
Loading…
Reference in a new issue