Import Vagrant environment from test/security/k8s
Infrastructure mockup has been previously set up for CIS guidelines
checking. Empty Kubernetes cluster was sufficient for that purpose. It
will be adjusted to satisfy minimal ONAP requirements and should
eventually supersede previous testing environment.
Issue-ID: ONAPARC-537
Change-Id: Iada29d86642b8a5513e9d1bbd895db2094ad12b9
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
diff --git a/bootstrap/vagrant-minimal-onap/tools/get_rke.sh b/bootstrap/vagrant-minimal-onap/tools/get_rke.sh
new file mode 100755
index 0000000..01dd20a
--- /dev/null
+++ b/bootstrap/vagrant-minimal-onap/tools/get_rke.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+#
+# @file test/security/k8s/tools/dublin/get_rke.sh
+# @author Pawel Wieczorek <p.wieczorek2@samsung.com>
+# @brief Utility for obtaining RKE tool
+#
+
+# Dependencies:
+# wget
+# coreutils
+#
+# Privileges:
+# Script expects to be run with administrative privileges for accessing /usr/local/bin
+#
+# Usage:
+# # ./get_rke.sh [VERSION [ARCH [SYSTEM]]]
+#
+
+# Constants
+DEFAULT_VERSION='v0.2.1'
+DEFAULT_ARCH='amd64'
+DEFAULT_SYSTEM='linux'
+
+# Variables
+VERSION="${1:-$DEFAULT_VERSION}"
+ARCH="${2:-$DEFAULT_ARCH}"
+SYSTEM="${3:-$DEFAULT_SYSTEM}"
+
+BINARY="rke_${SYSTEM}-${ARCH}"
+URL="https://github.com/rancher/rke/releases/download/${VERSION}/${BINARY}"
+
+
+# Prerequistes
+wget "$URL"
+chmod +x "$BINARY"
+
+# Installation
+mv "$BINARY" "/usr/local/bin/${BINARY%%_*}" # this also renames binary to "rke"