andy pavlo october 18, 2015october 18, 2015october 18, 2015 running on ec2

12
Andy Pavlo Andy Pavlo August 27, 2022 August 27, 2022 Running on Running on EC2 EC2

Upload: dina-johnson

Post on 01-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

Andy PavloAndy PavloApril 20, 2023April 20, 2023

Running Running on EC2on EC2

Page 2: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on 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

Page 3: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• Create a new EC2 keypair and store it in your .ssh directory

Automatic Deployment

Page 4: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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'

Page 5: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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

Page 6: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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

Page 7: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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

Page 8: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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

Page 9: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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

Page 10: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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

Page 11: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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

Page 12: Andy Pavlo October 18, 2015October 18, 2015October 18, 2015 Running on EC2

• 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