andy pavlo october 18, 2015october 18, 2015october 18, 2015 running on ec2
TRANSCRIPT
Andy PavloAndy PavloApril 20, 2023April 20, 2023
Running Running on EC2on EC2
• All of the hard work is done for you.• Automatically deploy a fully configured
cluster with shared file system.• All dependencies are either in H-Store
repository or on dept machines.
Running on EC2
http://bit.ly/o1YBl6
• Create a new EC2 keypair and store it in your .ssh directory
Automatic Deployment
• Add alias to Fabric executable:
• Add EC2 access keys to environment:
Environment Configuration
alias fab='$HSTORE_HOME/tools/fab'
alias fab='$HSTORE_HOME/tools/fab'
export AWS_ACCESS_KEY_ID='XXXXXXXXXXXXX'export AWS_SECRET_ACCESS_KEY='XXXXXXXXXXXX'
export AWS_ACCESS_KEY_ID='XXXXXXXXXXXXX'export AWS_SECRET_ACCESS_KEY='XXXXXXXXXXXX'
• Config file defines the H-Store cluster configuration on Amazon.
• Can also uses any H-Store configuration parameters.
Cluster Configuration
ec2.site_type = c1.xlargesite.count = 4site.partitions_per_site = 8
ec2.site_type = c1.xlargesite.count = 4site.partitions_per_site = 8
• Be sure to use your Github repository and/or branch:
• Note: This is a read-only clone.
Cluster Configuration
hstore.git = git://github.com/apavlo/h-store.githstore.git_branch = strangelove
hstore.git = git://github.com/apavlo/h-store.githstore.git_branch = strangelove
• One command to bring up cluster:
• Must be executed in ‘scripts’ directory.• First tries to reuse stopped instances
and then make new ones.
Start Cluster
$ fab -c hstore.fabric start_cluster$ fab -c hstore.fabric start_cluster
http://bit.ly/Jv5Suq
• Update ~/.ssh/config
Access EC2 Nodes
Host *.amazonaws.com IdentityFile /home/pavlo/.ssh/hstore.pem User ubuntu UserKnownHostsFile /dev/null StrictHostKeyChecking no Compression yes
Host *.amazonaws.com IdentityFile /home/pavlo/.ssh/hstore.pem User ubuntu UserKnownHostsFile /dev/null StrictHostKeyChecking no Compression yes
• Use public address from EC2 info page.
• Use predefined commands to quickly jump to H-Store directories.
Access EC2 Nodes
$ ssh ec2-184-72-64-32.compute-1.amazonaws.com
$ ssh ec2-184-72-64-32.compute-1.amazonaws.com
$ hh # H-Store Home Directory$ hl # H-Store Logs Directory$ hh # H-Store Home Directory$ hl # H-Store Logs Directory
• One command to execute workload:
• See source code for additional options.• Can also login and manually invoke
‘hstore-benchmark’
Execute Benchmark
$ fab -c hstore.fabric exec_benchmark:tpcc$ fab -c hstore.fabric exec_benchmark:tpcc
• One command to take it all down:
• You can also terminate instances:
Stop Cluster
$ fab -c hstore.fabric stop_cluster$ fab -c hstore.fabric stop_cluster
$ fab -c hstore.fabric stop_cluster:True$ fab -c hstore.fabric stop_cluster:True
• Fabric can be called directly from within a Python script.• You are strongly encouraged to write
repeatable experiment scripts.
Experiment Scripting
http://bit.ly/IjKVkp