|
@@ -16,38 +16,43 @@ sed -e s/\"//g >> ~/.ssh/maguec1.pem
|
|
|
chmod 0600 ~/.ssh/maguec1.pem
|
|
|
```
|
|
|
|
|
|
-# After ansible
|
|
|
+## Create a tfvars file
|
|
|
|
|
|
```
|
|
|
-# download roles
|
|
|
-cd ansible && rm -rf roles/* && ansible-galaxy install --roles-path roles -r requirements.yml
|
|
|
+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
|
|
|
|
|
|
```
|
|
|
-ansible-playbook ansible/cp_nodes.yml --private-key ~/.ssh/maguec1.pem -i inventories/maguec1_all_nodes.ini
|
|
|
-```
|
|
|
+terraform init
|
|
|
+terraform apply -var-file=my.tfvars
|
|
|
|
|
|
```
|
|
|
-ansible-playbook ansible/test_nodes.yml --private-key ~/.ssh/maguec1.pem -i inventories/tester.ini
|
|
|
-```
|
|
|
-
|
|
|
-## Resetting
|
|
|
|
|
|
-On each node run:
|
|
|
-
|
|
|
-```
|
|
|
-for i in 1990{1..9} 1991{0..2}; do sudo systemctl daemon-reload; sudo systemctl stop redis-${i}; sudo rm -rf /redis/persistant/cpredis/199*.*; sudo truncate -s 0 /var/log/cpredis/*.log; sudo systemctl start redis-${i}; done
|
|
|
-```
|
|
|
+## Run the ansible and command line output specified by terraform for setup
|
|
|
|
|
|
-On node1 run:
|
|
|
+## To create a tmux session with shells on all nodes
|
|
|
|
|
|
```
|
|
|
-~/raft_group_setup_3 or _5 dependin on the size
|
|
|
+./cloud-tmux
|
|
|
```
|
|
|
|
|
|
-On the tester node to reset the twemproxy:
|
|
|
+## Test command to run on the tester node
|
|
|
|
|
|
```
|
|
|
- sudo systemctl stop twemproxy-template.service && sudo systemctl stop twemproxy && sudo rm -rf /etc/nutcracker.yml && sudo systemctl start twemproxy-template.service
|
|
|
+ memtier_benchmark --cluster-mode -s 10.161.2.19 -p 19903 -t 10 -c 5 -d 100 --test-time=120 --hide-histogram
|
|
|
```
|