aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-01-23 17:55:17 +0100
committerPawel Wieczorek <p.wieczorek2@samsung.com>2020-01-29 17:12:32 +0100
commitdc298f1933c3bb4ac977c7c1362ce9eac78acb67 (patch)
treef77e2e2ed7f87e874d2ecbf31fb08d9c99595ceb /bootstrap
parentba88f291de193a74f03e99e4348c37ff9c4ffdfd (diff)
Increase inline provisioners configurability
Scripts "get_oom" and "deploy_onap" are more useful if an additional parameter is accepted: external repository and deployment override, respectively. These parameteres will make testing easier and allow improving this setup quicker. Previous behaviour stays as it was using default argument values. Changes in their invocations were meant to make ad-hoc modifications more explicit. SSH configuration from host machine is synchronized in case additional access rights are necessary. Issue-ID: ONAPARC-551 Change-Id: I585586f721457388ab30b089f2c25c4ad88ad4d3 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/vagrant-minimal-onap/Vagrantfile15
1 files changed, 10 insertions, 5 deletions
diff --git a/bootstrap/vagrant-minimal-onap/Vagrantfile b/bootstrap/vagrant-minimal-onap/Vagrantfile
index e12c035bf..5272dd6af 100644
--- a/bootstrap/vagrant-minimal-onap/Vagrantfile
+++ b/bootstrap/vagrant-minimal-onap/Vagrantfile
@@ -115,7 +115,8 @@ $rke_down = "rke remove --force"
$get_oom = <<-SCRIPT
BRANCH="${1:-5.0.1-ONAP}"
- git clone -b "$BRANCH" https://git.onap.org/oom --recurse-submodules
+ REPO="${2:-https://git.onap.org/oom}"
+ git clone -b "$BRANCH" "$REPO" --recurse-submodules
SCRIPT
$get_helm_plugins = "mkdir -p ${HOME}/.helm && cp -R ${HOME}/oom/kubernetes/helm/plugins/ ${HOME}/.helm"
@@ -139,7 +140,9 @@ $setup_helm_repo = <<-SCRIPT
SCRIPT
$deploy_onap = <<-SCRIPT
- ENV="$1"
+ OVERRIDE="${1:-${HOME}/oom/kubernetes/onap/resources/environments/minimal-onap.yaml}"
+
+ ENV="${2:-#{os_env}}"
export $(cat "$ENV" | xargs)
encrypt () {
@@ -153,7 +156,6 @@ $deploy_onap = <<-SCRIPT
export KUBECONFIG="${HOME}/.kube/config.onap"
- OVERRIDE="${HOME}/oom/kubernetes/onap/resources/environments/minimal-onap.yaml"
helm deploy minimal local/onap --namespace onap -f "$OVERRIDE" --verbose --timeout 900
SCRIPT
@@ -196,6 +198,7 @@ Vagrant.configure('2') do |config|
if machine[:name] == 'operator'
config.vm.synced_folder ".", synced_folder_main, type: "rsync", rsync__exclude: ["Vagrantfile", "operator"]
+ config.vm.synced_folder "~/.ssh", "/home/#{vagrant_user}/.ssh", type: "rsync", rsync__exclude: "authorized_keys"
config.vm.synced_folder "./operator", "/home/#{vagrant_user}", type: "sshfs", reverse: true, sshfs_opts_append: "-o nonempty"
config.vm.provision "setup_debconf", type: :shell, inline: $setup_debconf
@@ -245,7 +248,10 @@ Vagrant.configure('2') do |config|
s.path = "tools/setup_kubectl.sh"
end
config.vm.provision "get_helm", type: :shell, path: "tools/get_helm.sh"
- config.vm.provision "get_oom", type: :shell, privileged: false, inline: $get_oom
+ config.vm.provision "get_oom", type: :shell do |s|
+ s.privileged = false
+ s.inline = $get_oom
+ end
config.vm.provision "get_helm_plugins", type: :shell, privileged: false, inline: $get_helm_plugins
config.vm.provision "install_make", type: :shell, inline: $install_make
config.vm.provision "setup_helm_cluster", type: :shell, run: "never", privileged: false, inline: $setup_helm_cluster
@@ -253,7 +259,6 @@ Vagrant.configure('2') do |config|
config.vm.provision "deploy_onap", type: :shell, run: "never" do |s|
s.privileged = false
s.inline = $deploy_onap
- s.args = os_env
end
end
end