diff options
Diffstat (limited to 'xci/installer/osh/deploy.sh')
-rwxr-xr-x | xci/installer/osh/deploy.sh | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/xci/installer/osh/deploy.sh b/xci/installer/osh/deploy.sh index 73e71303..e56845b8 100755 --- a/xci/installer/osh/deploy.sh +++ b/xci/installer/osh/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 $OSH_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,16 @@ 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 "-----------------------------------------------------------------------" |