Skip to content

Instantly share code, notes, and snippets.

@EastResident
EastResident / inside-locust-12
Created October 17, 2018 07:45
inside-locust-12
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
locust-master LoadBalancer 10.3.255.80 xx.xxx.xxx.x 8089:30975/TCP,5557:32731/TCP,5558:30566/TCP 16h
@EastResident
EastResident / inside-locust-11
Created October 17, 2018 07:44
inside-locust-11
kubectl get services locust-master
@EastResident
EastResident / inside-locust-10
Created October 17, 2018 07:44
inside-locust-10
kubectl apply -f service.yaml
@EastResident
EastResident / inside-locust-09
Created October 17, 2018 07:43
inside-locust-09
kubectl apply -f deployment-worker.yaml
@EastResident
EastResident / inside-locust-08.yaml
Created October 17, 2018 07:43
inside-locust-08
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: locust-worker
spec:
replicas: 80
@EastResident
EastResident / inside-locust-07
Created October 17, 2018 07:42
inside-locust-07
kubectl apply -f deployment-master.yaml
@EastResident
EastResident / inside-locust-06.yaml
Created October 17, 2018 07:42
inside-locust-06
env:
- name: LOCUST_MODE
value: master
- name: TARGET_HOST
value: https://hogehoge
@EastResident
EastResident / inside-locust-05.yaml
Created October 17, 2018 07:41
inside-locust-05
containers:
- name: locust
image: IMAGE_NAME # ここを編集 gcr.io/PROJECT-ID/locust-tasks:latest
@EastResident
EastResident / inside-locust-04
Created October 17, 2018 07:41
inside-locust-04
gcloud container builds submit --tag gcr.io/PROJECT-ID/locust-tasks:latest .
@EastResident
EastResident / inside-locust-03.py
Created October 17, 2018 07:40
inside-locust-03
from locust import HttpLocust, TaskSet
def login(l):
l.client.post("/login", {"username":"ellen_key", "password":"education"})
def logout(l):
l.client.post("/logout", {"username":"ellen_key", "password":"education"})
def index(l):
l.client.get("/")