summaryrefslogtreecommitdiffstats
path: root/kud/hosting_providers/containerized
diff options
context:
space:
mode:
authorr.kuralamudhan <kuralamudhan.ramakrishnan@intel.com>2019-11-19 23:05:47 -0800
committerr.kuralamudhan <kuralamudhan.ramakrishnan@intel.com>2019-11-20 06:41:11 -0800
commitd405884a52745df2b09f777a62c2facd7651885f (patch)
tree3d41b67e900dfd01bdaf801945ccd1475a5f3281 /kud/hosting_providers/containerized
parentf168ebb73d8dad0e1c75747cbc9b0a0de8fc2357 (diff)
Enabling testing for the containerized installer
Issue-ID: MULTICLOUD-942 Signed-off-by: r.kuralamudhan <kuralamudhan.ramakrishnan@intel.com> Change-Id: I4c5da84002135d856c5c3dcccf103aa52bb8a0f9
Diffstat (limited to 'kud/hosting_providers/containerized')
-rw-r--r--kud/hosting_providers/containerized/README.md4
-rwxr-xr-xkud/hosting_providers/containerized/installer.sh19
2 files changed, 11 insertions, 12 deletions
diff --git a/kud/hosting_providers/containerized/README.md b/kud/hosting_providers/containerized/README.md
index d1659629..12ce1a19 100644
--- a/kud/hosting_providers/containerized/README.md
+++ b/kud/hosting_providers/containerized/README.md
@@ -27,7 +27,7 @@ Kubernetes jobs(a cluster per job) are used to install multiple clusters and log
## Quickstart Installation Guide
-Build the kud docker images as follows:
+Build the kud docker images as follows, add KUD_ENABLE_TESTS & KUD_PLUGIN_ENABLED for the testing only:
```
$ git clone https://github.com/onap/multicloud-k8s.git && cd multicloud-k8s
@@ -38,6 +38,8 @@ $ docker build --rm \
--build-arg HTTPS_PROXY=${HTTPS_PROXY} \
--build-arg no_proxy=${no_proxy} \
--build-arg NO_PROXY=${NO_PROXY} \
+ --build-arg KUD_ENABLE_TESTS=true \
+ --build-arg KUD_PLUGIN_ENABLED=true \
-t github.com/onap/multicloud-k8s:latest . -f build/Dockerfile
```
Let's create a cluster-101 and cluster-102 hosts.ini as follows
diff --git a/kud/hosting_providers/containerized/installer.sh b/kud/hosting_providers/containerized/installer.sh
index ad44dc56..713847ea 100755
--- a/kud/hosting_providers/containerized/installer.sh
+++ b/kud/hosting_providers/containerized/installer.sh
@@ -19,7 +19,7 @@ function install_prerequisites {
#install package for docker images
apt-get update
apt-get install -y curl vim wget git \
- software-properties-common python-pip
+ software-properties-common python-pip sudo
add-apt-repository -y ppa:longsleep/golang-backports
apt-get update
apt-get install -y golang-go rsync
@@ -136,21 +136,17 @@ function install_addons {
# install_plugin() - Install ONAP Multicloud Kubernetes plugin
function install_plugin {
- echo "Installing multicloud/k8s plugin"
- mkdir -p /opt/{kubeconfig,consul/config}
- cp $HOME/.kube/config /opt/kubeconfig/kud
-
- pushd $kud_folder/../../../deployments
- ./build.sh
+ echo "Installing multicloud/k8s onap4k8s plugin"
if [[ "${testing_enabled}" == "true" ]]; then
- ./start.sh
pushd $kud_tests
- for functional_test in plugin plugin_edgex plugin_fw; do
- bash ${functional_test}.sh
+ echo "Test the onap4k8s installation"
+ bash onap4k8s.sh
+ echo "Test the onap4k8s plugin installation"
+ for functional_test in plugin_edgex plugin_fw; do
+ bash ${functional_test}.sh --external
done
popd
fi
- popd
}
# _print_kubernetes_info() - Prints the login Kubernetes information
@@ -191,6 +187,7 @@ k8s_info_file=$kud_folder/k8s_info.log
testing_enabled=${KUD_ENABLE_TESTS:-false}
mkdir -p /opt/csar
+export CSAR_DIR=/opt/csar
function install_pkg {
# Install dependencies