Skip to content

Commit

Permalink
feat: Update README with additional information and instructions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Searge committed Apr 6, 2024
1 parent 539085b commit 4637573
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 <task-name>
```

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
```

0 comments on commit 4637573

Please sign in to comment.