diff --git a/tests/deploy_kolla.sh b/tests/deploy_aio.sh
similarity index 75%
rename from tests/deploy_kolla.sh
rename to tests/deploy_aio.sh
index a5e5b2892b1d5ddac50c43dd511561012acc7394..2d76aca8d069d757b1fe0a238bde93c795ef0ad5 100755
--- a/tests/deploy_kolla.sh
+++ b/tests/deploy_aio.sh
@@ -12,16 +12,7 @@ function print_failure {
     exit 1
 }
 
-# Setup ssh key as required
-ssh-keygen -f kolla-ssh -N ""
-cat kolla-ssh.pub | tee /root/.ssh/authorized_keys
-
-# Install Ansible and docker-py
-pip install "ansible<2" docker-py
-pip freeze | egrep "docker|ansible"
-
-# Setup configs
-cp -a etc/kolla /etc/
+# Populate globals.yml
 cat << EOF > /etc/kolla/globals.yml
 ---
 kolla_base_distro: "$1"
diff --git a/tests/setup_deploy.sh b/tests/setup_deploy.sh
new file mode 100755
index 0000000000000000000000000000000000000000..366bbf5a86e595525428ee2c658836ffe7134f94
--- /dev/null
+++ b/tests/setup_deploy.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -o xtrace
+set -o errexit
+
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
+function create_keys {
+    # Setup ssh key as required
+    sudo -H ssh-keygen -f /root/.ssh/id_rsa -N ""
+    sudo -H cat /root/.ssh/id_rsa.pub | sudo -H tee /root/.ssh/authorized_keys
+}
+
+function install_deps {
+    # Install Ansible and docker-py
+    sudo -H pip install "ansible<2" docker-py
+    pip freeze | egrep "docker|ansible"
+}
+
+function copy_configs {
+    # Copy configs
+    sudo cp -a etc/kolla /etc/
+}
+
+create_keys
+install_deps
+copy_configs
+
+# Link the logs directory into root
+mkdir -p logs
+sudo ln -s $(pwd)/logs /root/logs
diff --git a/tox.ini b/tox.ini
index 1b693d2479be5f83736753e1753a6942571f663a..c3b60663eb2a35265f2cda74c4b4dd5cde2d0dbd 100644
--- a/tox.ini
+++ b/tox.ini
@@ -70,7 +70,8 @@ commands =
    find . -type f -name "*.pyc" -delete
    bash -c "if [ ! -d .testrepository ]; then testr init; fi"
    sudo -g docker testr run test_build.DeployTestCentosBinary
-   sudo tests/deploy_kolla.sh centos binary
+   bash tests/setup_deploy.sh
+   sudo tests/deploy_aio.sh centos binary
 
 [testenv:deploy-images-centos-source]
 whitelist_externals = find
@@ -80,7 +81,8 @@ commands =
    find . -type f -name "*.pyc" -delete
    bash -c "if [ ! -d .testrepository ]; then testr init; fi"
    sudo -g docker testr run test_build.DeployTestCentosSource
-   sudo tests/deploy_kolla.sh centos source
+   bash tests/setup_deploy.sh
+   sudo tests/deploy_aio.sh centos source
 
 [testenv:deploy-images-ubuntu-source]
 whitelist_externals = find
@@ -90,7 +92,8 @@ commands =
    find . -type f -name "*.pyc" -delete
    bash -c "if [ ! -d .testrepository ]; then testr init; fi"
    sudo -g docker testr run test_build.DeployTestUbuntuSource
-   sudo tests/deploy_kolla.sh ubuntu source
+   bash tests/setup_deploy.sh
+   sudo tests/deploy_aio.sh ubuntu source
 
 [testenv:functional]
 whitelist_externals = find