offline-packaging: Package offline deployment dependencies for k8s
This change implements functionality to package the dependencies
needed to provision nodes and install kubernetes on them in an
offline/air gapped environment. Only bifrost and kubespray are
supported and the work to introduce support for heat based deployments
is pending. Support for OpenStack/Kolla will be introduced
depending on need. ONAP offline packaging will be developed
based on this packaging as well.
A new script named package.sh is introduced to be able to run
packaging process separately from the deployment so one can run
the packaging and then take the produced archive file to use
for offline deployment.
The packaged dependencies are
- operating system packages (only apt supported for the timebeing)
- python packages
- git repositories
- images to provision target nodes
- kubernetes and related binaries and container images
In order to package the correct versions of the open source artifacts,
versions of them are pinned in engine/inventory/group_vars/all/versions.yaml
file.
Some other cosmetic changes are also done as well.
- move conditionals to functions themselves to clean main deployment
script
- stop using ansible with_items for package installations since it
will be removed in future releases
- align Info and Error messages
Change-Id: Idd153e1d8032aa07b2ccc94ea074ff1b0ff0fa8c
diff --git a/install.sh b/install.sh
index be19ae6..1288055 100755
--- a/install.sh
+++ b/install.sh
@@ -27,7 +27,7 @@
# configure target hosts
echo "-------------------------------------------------------------------------"
-echo "Info: Configure target hosts"
+echo "Info : Configure target hosts"
echo "-------------------------------------------------------------------------"
cd "${ENGINE_PATH}"
ansible-playbook "${ENGINE_ANSIBLE_PARAMS[@]}" \
@@ -36,7 +36,7 @@
# configure installer
echo "-------------------------------------------------------------------------"
-echo "Info: Configure installer"
+echo "Info : Configure installer"
echo "-------------------------------------------------------------------------"
cd "${ENGINE_PATH}"
ansible-playbook "${ENGINE_ANSIBLE_PARAMS[@]}" \
@@ -45,7 +45,7 @@
# bootstrap scenario
echo "-------------------------------------------------------------------------"
-echo "Info: Execute scenario pre deployment tasks"
+echo "Info : Execute scenario pre deployment tasks"
echo "-------------------------------------------------------------------------"
cd "${ENGINE_PATH}"
ansible-playbook "${ENGINE_ANSIBLE_PARAMS[@]}" \
@@ -54,7 +54,7 @@
# install scenario
echo "-------------------------------------------------------------------------"
-echo "Info: Install scenario ${DEPLOY_SCENARIO}"
+echo "Info : Install scenario ${DEPLOY_SCENARIO}"
echo "-------------------------------------------------------------------------"
cd "${ENGINE_CACHE}/repos/kubespray"
ansible-playbook "${ENGINE_ANSIBLE_PARAMS[@]}" \
@@ -65,7 +65,7 @@
# run post-deployment tasks
echo "-------------------------------------------------------------------------"
-echo "Info: Execute scenario and common post deployment tasks"
+echo "Info : Execute scenario and common post deployment tasks"
echo "-------------------------------------------------------------------------"
cd "${ENGINE_PATH}"
ansible-playbook "${ENGINE_ANSIBLE_PARAMS[@]}" \