From 07adef3d6e19737962ad63b9eae36f18ccab02bb Mon Sep 17 00:00:00 2001
From: Pawel Wieczorek
Date: Tue, 23 Jul 2019 15:02:00 +0200
Subject: k8s: Add "vagrant" user to "docker" group in virtual environment
Node customization scripts do that for "ubuntu" user only (added by
default on OpenStack images). Vagrant boxes use "vagrant" user [1]
instead.
[1] https://www.vagrantup.com/docs/boxes/base.html#quot-vagrant-quot-user
Issue-ID: SECCOM-235
Change-Id: Ic4f832aa9a37230503e3c5bd29f8ae5fcd3883db
Signed-off-by: Pawel Wieczorek
---
test/security/k8s/vagrant/dublin/Vagrantfile | 2 ++
1 file changed, 2 insertions(+)
(limited to 'test/security/k8s/vagrant/dublin/Vagrantfile')
diff --git a/test/security/k8s/vagrant/dublin/Vagrantfile b/test/security/k8s/vagrant/dublin/Vagrantfile
index dc5580944..abef9f8a1 100644
--- a/test/security/k8s/vagrant/dublin/Vagrantfile
+++ b/test/security/k8s/vagrant/dublin/Vagrantfile
@@ -41,10 +41,12 @@ Vagrant.configure('2') do |config|
if machine[:name] == 'control'
config.vm.provision :shell, path: "../../tools/dublin/imported/openstack-k8s-controlnode.sh"
+ config.vm.provision :shell, inline: "usermod -aG docker vagrant" # script above adds "ubuntu" user only
end
if machine[:name] == 'worker'
config.vm.provision :shell, path: "../../tools/dublin/imported/openstack-k8s-workernode.sh"
+ config.vm.provision :shell, inline: "usermod -aG docker vagrant" # script above adds "ubuntu" user only
end
if machine[:name] == 'operator'
--
cgit 1.2.3-korg