Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Add v1 dashboard (#141)
Browse files Browse the repository at this point in the history
* dashboard updates

* simple worload in default installation

* use namespace where needed

* fix the monitoring link

Co-authored-by: Andreas Neumann <[email protected]>
  • Loading branch information
zmalik and ANeumann82 authored Jun 8, 2020
1 parent f77da1c commit 2c8b74e
Show file tree
Hide file tree
Showing 3 changed files with 5,495 additions and 1 deletion.
62 changes: 62 additions & 0 deletions benchmarks/default/workload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: workload-local
namespace: default
spec:
selector:
matchLabels:
app: workload-local
serviceName: workload-local-svc
replicas: 10
podManagementPolicy: Parallel
template:
metadata:
labels:
app: workload-local
spec:
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999
containers:
- name: cassandra-stress
# TODO(mpereira): make this parameterizable.
image: mesosphere/cassandra:3.11.5-0.1.2
resources:
requests:
# TODO(mpereira): make this parameterizable.
cpu: 900m
memory: 2048Mi
limits:
# TODO(mpereira): make this parameterizable.
cpu: 1500m
memory: 3192Mi
securityContext:
capabilities:
add:
- IPC_LOCK
- SYS_RESOURCE
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
command:
- /bin/bash
- -c
args:
- set -x;
export POD_ID=`echo $POD_NAME | sed -n -e 's/workload-local-\([0-9]\{1,4\}\)$/\1/p'`;
echo "Pod ID $POD_ID";
export POP_STRING="${POD_ID}000001..$((POD_ID+1))000000";
echo "Population String $POP_STRING";
export KEYSPACE=`echo workload-local | tr -cd '[:alnum:]_' | cut -c 1-32`;
echo "Using Keyspace $KEYSPACE";
if [[ $POD_ID != "1" ]]; then
echo "Not the first instance, sleep for 30 seconds to allow schema creation to settle through cluster";
sleep 30;
fi;
cassandra-stress write duration=1h cl=LOCAL_ONE -pop seq=$POP_STRING -node cassandra-instance-svc.default.svc.cluster.local -schema keyspace="$KEYSPACE" "replication(strategy=SimpleStrategy, replication_factor=1)" -rate 'threads=250' -graph file=/tmp/workload-local.html title=workload-local -errors ignore;
sleep infinity
2 changes: 1 addition & 1 deletion docs/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Instance cassandra was updated.
### 2. Install the Grafana dashboard

A sample grafana dashboard is provided in
[the monitoring directory](../monitoring/grafana).
[the monitoring directory](https://github.com/mesosphere/kudo-cassandra-operator/tree/master/monitoring/grafana).

How you access the Grafana UI depends on how it was installed. Upon accessing
the `/dashboard/import` URI you will be able to upload or copy-paste the
Expand Down
Loading

0 comments on commit 2c8b74e

Please sign in to comment.