Create install script and bootstrap role for ironic stack
Please note that this stack only does basic provisioning of the
nodes and more advanced configuration such as networking and so on
is excluded as that is very specific to what the provisioned nodes
will be used for. Another point to highlight is that once the work
to reduce the dependencies we package in is completed, it will mean
that users of this stack will need to fix that part themselves as
we can not possibly package all the different things users may need.
One final note is that since local services such as docker registry
or nginx are not necessary for the provisioning, that part is also
excluded. One reason for this is that how the users will configure
nodes depend on what they will do with the nodes and this configuration
is important for provisioning local services. Thus without knowing
that configuration, we can not install services on provisioned nodes
blindly. It is also outside of the scope of this stack.
Change-Id: Ia8e417d6c5397425acbc53aece327567e3e13173
diff --git a/install.sh b/install.sh
index 5c26402..2eb1df9 100755
--- a/install.sh
+++ b/install.sh
@@ -21,6 +21,28 @@
set -o nounset
set -o pipefail
-echo "Hello World!"
+#-------------------------------------------------------------------------------
+# Find and set where we are
+#-------------------------------------------------------------------------------
+STACK_ROOT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
+export STACK_ROOT_DIR
+
+#-------------------------------------------------------------------------------
+# Bootstrap stack software configuration
+#-------------------------------------------------------------------------------
+echo "Info : Bootstrap stack software configuration"
+echo "-------------------------------------------------------------------------"
+cd "${ENGINE_PATH}"
+ansible-playbook "${ENGINE_ANSIBLE_PARAMS[@]}" \
+ -i "${ENGINE_PATH}/engine/inventory/localhost.ini" \
+ "${STACK_ROOT_DIR}/playbooks/bootstrap-swconfig.yaml"
+echo "-------------------------------------------------------------------------"
+
+#-------------------------------------------------------------------------------
+# Provision nodes using the selected provisioning tool
+#-------------------------------------------------------------------------------
+# NOTE: shellcheck SC1090 is disabled since the script becomes available during runtime
+# shellcheck disable=SC1090
+source "${ENGINE_PATH}/engine/provisioner/provision.sh"
# vim: set ts=2 sw=2 expandtab: