Skip to content

Commit

Permalink
use draft
Browse files Browse the repository at this point in the history
  • Loading branch information
luizbafilho committed Nov 14, 2020
1 parent f7352a1 commit f5b44ad
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@

# Dependency directories (remove the comment below to include it)
# vendor/

__pycache__
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# lokust

Locust.io Kubernetes Operator

## Initializing lokust on the Kubernetes cluster

This deploys all necessary k8s CRDs used to manage the tests

```sh
lokustctl init
```

## Creating a new load test

**Creates the test loadtests namespace using a single file**

```sh
lokustctl create --namespace loadtests --name app-test --replicas 8 -f locustfile.py
```

**Creates the the test in the current namespace passing the directory as execution module**

> requires the locustfile.py file to be in the root directory
```sh
lokustctl create --name app-test --replicas 8 -f ./load-test
```

**Lists all current tests**

```sh
lokustctl ls
```

**Delete a test**

```sh
lokustctl delete --name app-test-a8djvhi
```
10 changes: 10 additions & 0 deletions locustfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from locust import HttpUser, between, task


class WebsiteUser(HttpUser):
host = "https://google.com"
wait_time = between(5, 15)

@task
def index(self):
self.client.get("/")

0 comments on commit f5b44ad

Please # to comment.