From 1d7560e05f70c3dfc53632959d2c6370aa69dfa6 Mon Sep 17 00:00:00 2001 From: Carlos Camacho Date: Wed, 29 Sep 2021 09:38:52 +0200 Subject: [PATCH] docs: include building and installing the collection This commit includes information about how to build and install the collection. Closes: #495 --- docs/src/usage.rst | 10 ++++++++++ kubeinit/README.md | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/docs/src/usage.rst b/docs/src/usage.rst index 3bb1a7513..d3eb41999 100644 --- a/docs/src/usage.rst +++ b/docs/src/usage.rst @@ -38,6 +38,16 @@ An example of a possible dependency issue is the following: By default the KubeInit's container image installs these requirements, this should only affect those executing directly the collection from the source code. +There is also needed to build and install the collection if its used directly from the +repository. + +.. code-block:: console + + # From the root directory in the repository, execute: + rm -rf ~/.ansible/collections/ansible_collections/kubeinit/kubeinit + ansible-galaxy collection build -v --force --output-path releases/ + ansible-galaxy collection install --force --force-with-deps releases/kubeinit-kubeinit-`cat galaxy.yml | shyaml get-value version`.tar.gz + Directly executing the deployment playbook ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kubeinit/README.md b/kubeinit/README.md index d8f979b44..ccc874a11 100644 --- a/kubeinit/README.md +++ b/kubeinit/README.md @@ -108,6 +108,11 @@ cd kubeinit # Install the Ansible collection requirements ansible-galaxy collection install --force -r kubeinit/requirements.yml +# Build and install the collection +rm -rf ~/.ansible/collections/ansible_collections/kubeinit/kubeinit +ansible-galaxy collection build -v --force --output-path releases/ +ansible-galaxy collection install --force --force-with-deps releases/kubeinit-kubeinit-`cat galaxy.yml | shyaml get-value version`.tar.gz + # Run the playbook ansible-playbook \ --user root \ @@ -127,6 +132,10 @@ The following commands build a container image with the project inside of it, an launches the container executing the ansible-playbook command with all the standard ansible-playbook parameters. +Kubeinit is built and installed when deploying from a container as those steps +are included in the Dockerfile, there is no need to build and install +the collection locally if its used through a container. + Note: When running the deployment from a container, `nyctea` can not be 127.0.0.1, it needs to be the hypervisor's IP address. Also when running the