Skip to content

Commit

Permalink
README.md updated
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufcanb committed Jun 12, 2023
1 parent 0755c3e commit f0fb08a
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 40 deletions.
89 changes: 53 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,71 @@
# kubot
# Kubot - Parallelizing Robot Scripts over Kubernetes Workloads

Parallel robot execution on Kubernetes workloads
Kubot is a command-line interface (CLI) program designed to parallelize and distribute the execution of Robot Framework
scripts over Kubernetes workloads. It enables efficient and scalable execution of robot scripts using the power of
Kubernetes.

## Table of Contents
## Features

- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)

## Introduction

This project provides a method for parallelizing the executions of robot scripts over Kubernetes workloads.

## Getting Started

To get started with this project, you will need to have access to a Kubernetes cluster as well as the following
prerequisites:

### Prerequisites

- kubectl
- **Parallel Execution**: Kubot utilizes Kubernetes workloads to parallelize the execution of Robot Framework scripts,
significantly reducing the overall execution time.
- **Flexible Workspace**: You can specify the workspace path where your robot scripts are located, allowing you to
easily manage and organize your test suites.
- **Batch Execution**: Define the batch size for parallel execution, controlling the number of scripts executed
concurrently.

## Installation

```
TODO implement here
To install Kubot, you need to have Go programming language and Docker installed on your machine. Then, run the following
command:

```bash
go get github.com/yusufcanb/kubot
```

## Usage

```bash
kubot exec --workspace=/path/to/scripts \
--name="Daily UI Scan" \
--batchsize=15 \
--namespace=kubot \
--image=docker.io/marketsquare/robotframework-browser:latest
```
kubot --workspace . \
--image docker.io/kubot:basic \
--namespace [your-namespace] \
--selector [robot-selector]
--output [output-directory]
```

## Configuration
Here are the environment variables you can configure the advanced Pod spec;

## Flags

- **--workspace (-w)**: Specifies the path to the workspace containing your robot scripts.
- **--name (-n)**: Sets the top-level suite name for logs and reports generated by the execution.
- **--batchsize (-b)**: Defines the execution batch size, controlling the number of scripts executed concurrently. The
- default value is 25.
- **--namespace**: Specifies the Kubernetes namespace where the workloads will be created.
- **--image (-i)**: Sets the Docker image to be used for the execution of robot scripts.
- **--selector (-s)**: Allows you to specify a script selector, such as tasks/*, to execute specific scripts or groups
of
scripts within your workspace.

## Workload Configuration

Here is the configuration parameters you can use;

| Name | Description | Default |
|---------------|----------------------|---------|
| POD_CPU_LIMIT | CPU limit per pod | 10 |
| POD_MEM_LIMIT | Memory limit per Pod | 128 Mb |
| Name | Description | Default |
|--------------------------|------------------------|---------|
| KUBOT_POD_CPU_REQUEST | CPU request per pod | 250m |
| KUBOT_POD_MEMORY_REQUEST | Memory request per Pod | 128Mi |
| KUBOT_POD_CPU_LIMIT | Memory limit per Pod | 250m |
| KUBOT_POD_MEMORY_LIMIT | Memory limit per Pod | 256Mi |

## Contributing

To contribute to this project, please fork the repository and submit a pull request. All contributions are welcome!
Contributions to Kubot are welcome! If you encounter any issues or have suggestions for improvements, please submit an
issue or a pull request to the GitHub repository.

Before contributing, please familiarize yourself with the general contribution guidelines.

## Acknowledgments

Kubot was inspired by the need for efficient execution of Robot Framework scripts in parallel over Kubernetes workloads.
I would like to thank the open-source community for their valuable contributions and the Robot Framework project for
providing a powerful automation framework.
11 changes: 7 additions & 4 deletions cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ var execCmd = &cobra.Command{
log.Fatal(err)
}

k.Run()
err = k.Run()
if err != nil {
log.Fatal(err)
}

defer k.Clean()
},
Expand All @@ -68,9 +71,9 @@ func init() {
}

execCmd.Flags().StringP("workspace", "w", filepath.Dir(ex), "workspace path")
execCmd.Flags().StringP("name", "n", "Kubot Results", "workspace path")
execCmd.Flags().StringP("namespace", "", "", "kubernetes namespace")
execCmd.Flags().StringP("image", "i", "", "docker image for execution")
execCmd.Flags().StringP("name", "n", "Kubot Results", "top level suite name for logs and reports")
execCmd.Flags().StringP("namespace", "", "", "kubernetes namespace to create workloads in it")
execCmd.Flags().StringP("image", "i", "", "docker image for execution for pods and jobs")
execCmd.Flags().IntP("batchsize", "b", 25, "execution batch size")
execCmd.Flags().StringP("selector", "s", "", "script selector. e.g. tasks/*")

Expand Down

0 comments on commit f0fb08a

Please sign in to comment.