Remove intermediate offline files and folders
[infra/stack/kubernetes.git] / install.sh
index 9d8a8b8ecc10fd960bc4c392ca21c54875c97c0d..e8614145bcc4b40657b67fe05b323ff5bbc61d68 100755 (executable)
@@ -32,4 +32,33 @@ ansible-playbook "${ENGINE_ANSIBLE_PARAMS[@]}" \
     engine/stack/kubernetes/playbooks/bootstrap-swconfig.yaml
 echo "-------------------------------------------------------------------------"
 
+#-------------------------------------------------------------------------------
+# Provision nodes using the selected provisioning tool
+#-------------------------------------------------------------------------------
+# NOTE: shellcheck SC1090 is disabled since provisioner becomes available during runtime
+# shellcheck disable=SC1090
+source "${ENGINE_PATH}/engine/provisioner/provision.sh"
+
+#-------------------------------------------------------------------------------
+# Provision local apt repo, docker registry, and ntp server services
+#-------------------------------------------------------------------------------
+# shellcheck source=engine/library/engine-services.sh
+source "${ENGINE_PATH}/engine/library/engine-services.sh"
+
+#-------------------------------------------------------------------------------
+# Prepare artifacts for offline deployment
+#-------------------------------------------------------------------------------
+cd "${ENGINE_PATH}"
+ansible-playbook "${ENGINE_ANSIBLE_PARAMS[@]}" \
+    -i "${ENGINE_PATH}/engine/inventory/inventory.ini" \
+    engine/stack/kubernetes/playbooks/prepare-artifacts.yaml
+echo "-------------------------------------------------------------------------"
+
+#-------------------------------------------------------------------------------
+# Install the stack using the selected installer
+#-------------------------------------------------------------------------------
+# NOTE: shellcheck SC1090 is disabled since installer becomes available during runtime
+# shellcheck disable=SC1090
+source "${ENGINE_PATH}/engine/installer/install.sh"
+
 # vim: set ts=2 sw=2 expandtab: