summaryrefslogtreecommitdiffstats
path: root/xci/installer/kubespray/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xci/installer/kubespray/deploy.sh')
-rwxr-xr-xxci/installer/kubespray/deploy.sh26
1 files changed, 18 insertions, 8 deletions
diff --git a/xci/installer/kubespray/deploy.sh b/xci/installer/kubespray/deploy.sh
index 76d503c5..af80b38f 100755
--- a/xci/installer/kubespray/deploy.sh
+++ b/xci/installer/kubespray/deploy.sh
@@ -33,6 +33,20 @@ echo "-----------------------------------------------------------------------"
echo "Info: Configured localhost for kubespray"
#-------------------------------------------------------------------------------
+# Configure installer
+#-------------------------------------------------------------------------------
+# TODO: summarize what this playbook does
+#-------------------------------------------------------------------------------
+
+echo "Info: Configuring kubespray installer"
+echo "-----------------------------------------------------------------------"
+cd $K8_XCI_PLAYBOOKS
+ansible-playbook ${XCI_ANSIBLE_PARAMS} \
+ -i ${XCI_PLAYBOOKS}/dynamic_inventory.py configure-installer.yml
+echo "-----------------------------------------------------------------------"
+echo "Info: Configured kubespray installer"
+
+#-------------------------------------------------------------------------------
# Configure deployment host, opnfv
#-------------------------------------------------------------------------------
# This playbook
@@ -75,7 +89,7 @@ echo "-----------------------------------------------------------------------"
ssh root@$OPNFV_HOST_IP "set -o pipefail; export XCI_FLAVOR=$XCI_FLAVOR; export INSTALLER_TYPE=$INSTALLER_TYPE; \
export IDF=/root/releng-xci/xci/var/idf.yml; export PDF=/root/releng-xci/xci/var/pdf.yml; \
cd releng-xci/.cache/repos/kubespray/; ansible-playbook \
- -i opnfv_inventory/dynamic_inventory.py cluster.yml -b | tee setup-kubernetes.log"
+ -i inventory/opnfv/dynamic_inventory.py cluster.yml -b | tee setup-kubernetes.log"
scp root@$OPNFV_HOST_IP:~/releng-xci/.cache/repos/kubespray/setup-kubernetes.log \
$LOG_PATH/setup-kubernetes.log
@@ -88,19 +102,15 @@ echo "-----------------------------------------------------------------------"
echo "Info: Kubernetes installation is successfully completed!"
echo "-----------------------------------------------------------------------"
-# Configure the kubernetes authentication in opnfv host. In future releases
-# kubectl is no longer an artifact so we should not fail if it's not available.
-# This needs to be removed in the future
-ssh root@$OPNFV_HOST_IP "mkdir -p ~/.kube/;\
- cp -f ~/admin.conf ~/.kube/config; \
- cp -f ~/kubectl /usr/local/bin || true"
-
#-------------------------------------------------------------------------------
# Execute post-installation tasks
#-------------------------------------------------------------------------------
# Playbook post.yml is used in order to execute any post-deployment tasks that
# are required for the scenario under test.
#-------------------------------------------------------------------------------
+# copy admin.conf
+ssh root@$OPNFV_HOST_IP "mkdir -p ~/.kube/; \
+ cp -f ~/admin.conf ~/.kube/config"
echo "-----------------------------------------------------------------------"
echo "Info: Running post-deployment scenario role"
echo "-----------------------------------------------------------------------"