From 4637573537bad4265b1e5190f9f4a15de5fae6f1 Mon Sep 17 00:00:00 2001 From: Searge Date: Sat, 6 Apr 2024 09:22:46 +0300 Subject: [PATCH] feat: Update README with additional information and instructions This commit enhances the README.md file with the following changes: - Added information about the inspiration behind the project, referencing two repositories. - Included prerequisites for tools required to work with the project. - Provided instructions for working with Taskfile, including listing tasks and describing them. - Added instructions for working with uv, including installing Python dependencies and running the playbook. - Clarified the usage of venv inside the script for running ansible commands. These updates aim to improve the clarity and usability of the project documentation. --- README.md | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8321642..69a0034 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,47 @@ # Provisioning of Kubernetes the hard way with Ansible This repository contains an Ansible playbook to provision a Kubernetes cluster the hard way. -The hard way is a manual way to provision a Kubernetes cluster, as described by Kelsey Hightower in his repository [kelseyhightower/kubernetes-the-hard-way](https://github.com/kelseyhightower/kubernetes-the-hard-way). +And based on these two repositories: + +- [kelseyhightower/kubernetes-the-hard-way](https://github.com/kelseyhightower/kubernetes-the-hard-way) +- [mmumshad/kubernetes-the-hard-way](https://github.com/mmumshad/kubernetes-the-hard-way) + +But for a better understanding of the material, I decided to redo everything in my own way. ## Prerequisites -### Working with `uv` +### Tools + +- [Vagrant](https://www.vagrantup.com) +- [Taskfile](https://taskfile.dev) +- [uv](https://astral.sh/blog/uv) +- [pyenv](https://github.com/pyenv/pyenv/wiki#suggested-build-environment) or compatible Python version >= 3.10 + +#### Working with Taskfile + +```bash +# List all tasks +task --list + +# Describe a task +task --summary +``` + +All tasks have a short description of what they do. +And long summaries are available with the `--summary` flag. + +#### Working with uv ```bash -uv venv -p $(cat .python-version) # Create a virtual environment -source .venv/bin/activate # Activate the virtual environment -uv pip install -r requirements.txt # Install the requirements +# Install all python dependencies +task install + +# To run the playbook you can use the following command +task play -- ansible/connection.yml +# It's using venv inside the script, so you don't need to activate it + +# To run another ansible command you need to activate the venv and run the command +source .venv/bin/activate +# For example +ansible-inventory --list all | bat -l json ```