aboutsummaryrefslogtreecommitdiffstats
path: root/test/security
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2019-07-26 14:14:19 +0200
committerPawel Wieczorek <p.wieczorek2@samsung.com>2019-07-26 14:42:17 +0200
commit435200f0bc6b8a7d75ab9e019361cd4ced0d6b58 (patch)
tree6ddd470ce8c3f9a7aede15a8ad6bc6d2429de20c /test/security
parent6b1f78b2efca686e61058ea5848b1f31d3f59270 (diff)
k8s: Add simple logging to provisioning scripts
Issue-ID: SECCOM-235 Change-Id: Iaeb4b3e621f09ea14b9576126223e4df4b8682f3 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security')
-rw-r--r--test/security/k8s/vagrant/dublin/Vagrantfile10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/security/k8s/vagrant/dublin/Vagrantfile b/test/security/k8s/vagrant/dublin/Vagrantfile
index 9e92580fa..fb65e1aa2 100644
--- a/test/security/k8s/vagrant/dublin/Vagrantfile
+++ b/test/security/k8s/vagrant/dublin/Vagrantfile
@@ -26,16 +26,19 @@ SCRIPT
$add_to_docker_group = <<-SCRIPT
USER="$1"
+ echo "Adding ${USER} to 'docker' group"
usermod -aG docker "$USER"
SCRIPT
$install_sshpass = <<-SCRIPT
apt-get update
+ echo "Installing 'sshpass'"
apt-get install sshpass
SCRIPT
$generate_key = <<-SCRIPT
KEY_FILE="$1"
+ echo "Generating SSH key (${KEY_FILE})"
ssh-keygen -q -b 4096 -t rsa -f "$KEY_FILE" -N ""
SCRIPT
@@ -44,14 +47,19 @@ $deploy_key = <<-SCRIPT
USER="$2"
PASS="$PASSWORD"
IPS="$3"
+ echo "Deploying ${KEY} for ${USER}"
for ip in $IPS; do
+ echo "on ${ip}"
sshpass -p "$PASS" ssh-copy-id -o StrictHostKeyChecking=no -i "$KEY" "${USER}@${ip}"
done
SCRIPT
$link_dotfiles = <<-SCRIPT
for rc in /vagrant/dot_*; do
- ln -sf "$rc" "${HOME}/.${rc##*dot_}"
+ src="$rc"
+ dst="${HOME}/.${rc##*dot_}"
+ echo "Symlinking ${src} to ${dst}"
+ ln -sf "$src" "$dst"
done
SCRIPT