This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
1 parent
f77da1c
commit 2c8b74e
Showing
3 changed files
with
5,495 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.