Skip to content

Commit

Permalink
docs: include building and installing the collection
Browse files Browse the repository at this point in the history
This commit includes information about how to build and
install the collection.

Closes: #495
  • Loading branch information
ccamacho committed Sep 29, 2021
1 parent 902f35b commit 1d7560e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/src/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
9 changes: 9 additions & 0 deletions kubeinit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 1d7560e

Please sign in to comment.