README.md 1.0 KB

Example of calling modules to build an RE environment

Prerequisites

  • aws-cli
  • tfenv
  • ansible

Generate Key Pair

aws ec2 create-key-pair --profile redislabs --key-name maguec1 --region us-west-1 \
| jq .KeyMaterial |  awk '{gsub(/\\n/,"\n")}1' | \
sed -e s/\"//g >> ~/.ssh/maguec1.pem

chmod 0600 ~/.ssh/maguec1.pem

Create a tfvars file

cat > my.tfvars << EOF

region    = "us-west-1"
profile   = "redislabs"
open-nets = ["2.214.8.28/32"]
vpc-azs   = ["us-west-1a", "us-west-1c"]
vpc-cidr  = "10.161.0.0/16"
vpc-name  = "matchkeyname"
common-tags     = {
  "Owner"       = "yourname"
  "Project"     = "cp-redis"
  "Environment" = "test"
}
EOF

Run Terraform

terraform init
terraform apply -var-file=my.tfvars

Run the ansible and command line output specified by terraform for setup

To create a tmux session with shells on all nodes

./cloud-tmux

Test command to run on the tester node

 memtier_benchmark  --cluster-mode -s 10.161.2.19 -p 19903 -t 10 -c 5 -d 100 --test-time=120 --hide-histogram