Skip to content

Instantly share code, notes, and snippets.

@tbg
Created April 4, 2019 15:10
Show Gist options
  • Save tbg/5c03757d4efcc10289a4f00c484abafd to your computer and use it in GitHub Desktop.
Save tbg/5c03757d4efcc10289a4f00c484abafd to your computer and use it in GitHub Desktop.
#!/bin/bash
# Save this to, say, andy-rebalance-experiment.sh
# run `chmod +x andy-rebalance-experiment.sh` (once)
# To run, run `./andy-rebalance-experiment.sh`.
set -euxo pipefail
export CLUSTER=andy-rebalance
roachprod create $CLUSTER -n 4 --clouds=aws --aws-machine-type-ssd=c5d.4xlarge
roachprod run $CLUSTER -- "DEV=$(mount | grep /mnt/data1 | awk '{print $1}'); sudo umount /mnt/data1; sudo mount -o discard,defaults,nobarrier ${DEV} /mnt/data1/; mount | grep /mnt/data1"
roachprod stage $CLUSTER:1-4 cockroach
roachprod start $CLUSTER:1-3
roachprod adminurl --open $CLUSTER:1
roachprod run $CLUSTER:1 -- "./cockroach workload fixtures import tpcc --warehouses=1000 --db=tpcc"
roachprod stop $CLUSTER:3
sleep 600
roachprod start $CLUSTER:4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment