aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-minimal-onap/Vagrantfile
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-12-11 16:42:44 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-12-14 07:45:36 +0000
commit07144679dc38c6a71c85ce77848e14f09bf7b130 (patch)
tree3c7b49527b720c5f583e2e6d2dca0aa91bf48e12 /bootstrap/vagrant-minimal-onap/Vagrantfile
parent4bce25d9c853eba57965c3f361dc5f58448ae1a9 (diff)
Add Docker on operator machine
Automated setup of "kubernetes/platform/components/oom-cert-service" requires having Docker in the deployment environment. Previously Docker was required only on Kubernetes cluster nodes. This patch also unifies naming convention for provisioners that add local user to the "docker" group. Issue-ID: OOM-2526 Change-Id: Id081c0c90e2b729ed78fc5b4e6758721c72added Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'bootstrap/vagrant-minimal-onap/Vagrantfile')
-rw-r--r--bootstrap/vagrant-minimal-onap/Vagrantfile24
1 files changed, 23 insertions, 1 deletions
diff --git a/bootstrap/vagrant-minimal-onap/Vagrantfile b/bootstrap/vagrant-minimal-onap/Vagrantfile
index 5a117e87d..a8a02d12a 100644
--- a/bootstrap/vagrant-minimal-onap/Vagrantfile
+++ b/bootstrap/vagrant-minimal-onap/Vagrantfile
@@ -115,6 +115,26 @@ $install_make = <<-SCRIPT
apt-get install make
SCRIPT
+$install_docker = <<-SCRIPT
+ apt-get update
+ echo "Setting up 'docker' repository"
+ apt-get install \
+ apt-transport-https \
+ ca-certificates \
+ curl \
+ gnupg-agent \
+ software-properties-common
+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
+ add-apt-repository \
+ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
+ $(lsb_release -cs) \
+ stable"
+ apt-get update
+
+ echo "Installing 'docker'"
+ apt-get install docker-ce docker-ce-cli containerd.io
+SCRIPT
+
$resize_disk = <<-SCRIPT
DEV=${1:-vda}
PART=${2:-3}
@@ -249,7 +269,7 @@ Vagrant.configure('2') do |config|
if machine[:name] == 'worker'
config.vm.provision "customize_worker", type: :shell, path: "tools/imported/openstack-k8s-workernode.sh"
- config.vm.provision "fix_group_worker", type: :shell, inline: $add_to_docker_group, args: vagrant_user
+ config.vm.provision "fix_groups_worker", type: :shell, inline: $add_to_docker_group, args: vagrant_user
config.vm.provision "resize_disk", type: :shell, inline: $resize_disk
end
@@ -273,6 +293,8 @@ Vagrant.configure('2') do |config|
s.args = synced_folder_tools_config
end
+ config.vm.provision "install_docker", type: :shell, inline: $install_docker
+ config.vm.provision "fix_groups_operator", type: :shell, inline: $add_to_docker_group, args: vagrant_user
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