aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/k8s/vagrant
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2019-07-26 14:22:03 +0200
committerPawel Wieczorek <p.wieczorek2@samsung.com>2019-07-26 14:42:17 +0200
commit63640ac2f6d4456eb07a91a9f16783c1b866e720 (patch)
tree51347e2d62f74ddbbd12d10b1f05b731363d9a87 /test/security/k8s/vagrant
parent435200f0bc6b8a7d75ab9e019361cd4ced0d6b58 (diff)
k8s: Use named provisioners
This not only makes testing easier, but also allows better control over VM provisioning after its creation. Issue-ID: SECCOM-235 Change-Id: I29ab3ed46976267e1043c2f61f56578f2c5d7a57 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security/k8s/vagrant')
-rw-r--r--test/security/k8s/vagrant/dublin/Vagrantfile22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/security/k8s/vagrant/dublin/Vagrantfile b/test/security/k8s/vagrant/dublin/Vagrantfile
index fb65e1aa2..224cd9a11 100644
--- a/test/security/k8s/vagrant/dublin/Vagrantfile
+++ b/test/security/k8s/vagrant/dublin/Vagrantfile
@@ -81,32 +81,32 @@ Vagrant.configure('2') do |config|
end
config.vm.network :private_network, ip: machine[:ip]
- config.vm.provision :shell, run: "always", inline: $replace_dns, args: host_ip
+ config.vm.provision "replace_dns", type: :shell, run: "always", inline: $replace_dns, args: host_ip
if machine[:name] == 'control'
- config.vm.provision :shell, path: "../../tools/dublin/imported/openstack-k8s-controlnode.sh"
- config.vm.provision :shell, inline: $add_to_docker_group, args: vagrant_user
+ config.vm.provision "customize_control", type: :shell, path: "../../tools/dublin/imported/openstack-k8s-controlnode.sh"
+ config.vm.provision "fix_groups_control", type: :shell, inline: $add_to_docker_group, args: vagrant_user
end
if machine[:name] == 'worker'
- config.vm.provision :shell, path: "../../tools/dublin/imported/openstack-k8s-workernode.sh"
- config.vm.provision :shell, inline: $add_to_docker_group, args: vagrant_user
+ config.vm.provision "customize_worker", type: :shell, path: "../../tools/dublin/imported/openstack-k8s-workernode.sh"
+ config.vm.provision "fix_group_worker", type: :shell, inline: $add_to_docker_group, args: vagrant_user
end
if machine[:name] == 'operator'
config.vm.synced_folder "../../tools/config", "/vagrant", type: "rsync"
- config.vm.provision :shell, run: "always", inline: $link_dotfiles
- config.vm.provision :shell, run: "always", privileged: false, inline: $link_dotfiles
+ config.vm.provision "link_dotfiles_root", type: :shell, run: "always", inline: $link_dotfiles
+ config.vm.provision "link_dotfiles_user", type: :shell, run: "always", privileged: false, inline: $link_dotfiles
- config.vm.provision :shell, path: "../../tools/dublin/get_rke.sh"
+ config.vm.provision "get_rke", type: :shell, path: "../../tools/dublin/get_rke.sh"
- config.vm.provision :shell, inline: $install_sshpass
- config.vm.provision :shell, privileged: false, inline: $generate_key, args: operator_key
+ config.vm.provision "install_sshpass", type: :shell, inline: $install_sshpass
+ config.vm.provision "generate_key", type: :shell, privileged: false, inline: $generate_key, args: operator_key
ips = ""
cluster.each { |node| ips << node[:ip] << " " }
- config.vm.provision :shell do |s|
+ config.vm.provision "deploy_key", type: :shell do |s|
s.privileged = false
s.inline = $deploy_key
s.args = [operator_key, vagrant_user, ips]