Sunday, April 28, 2019

Multiple h2o on aws

Running H2O on AWS cluster

Prerequisites:
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • Key pair .pem
  • Network security profile
Click on my Security credentials
Click Access keys then create access keys
Create key pair, by going to ec2 dashboard then Network and security then create key pairs. Give it a name and save the key file .pem
Create a security group from ec2 dashboard then network&security then security groups
Create security group, save its name and add rule…All traffic

Working procedure:
First change the permissions rights of the key using
chmod 600 /path/to/key/key_name.pem
On the linux machine, open ‘h2o-cluster-launch-instances.py’ and change the following
  • Access key ID, access key, and path to the key file created
    os.environ['AWS_ACCESS_KEY_ID'] = 'AKIAJHHVRLCYUDSB2EQQ'
os.environ['AWS_SECRET_ACCESS_KEY'] = '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'
os.environ['AWS_SSH_PRIVATE_KEY_FILE'] = '/home/mohamed/Desktop/aws/created_key.pem'
  • Name of the key and security group name
    keyName = 'created_key'
    securityGroupName = 'SecurityDisabled'
  • Name and number of the instances
    numInstancesToLaunch = 2
instanceType = 't2.micro'
instanceNameRoot = 'h2o-instance'
  • Might need to check if the amiId is still the same as in the console, make sure it is the same region
  • Open ‘h2o-cluster-test-ssh.sh’,  ‘h2o-cluster-distribute-flatfile.sh’,  ‘h2o-cluster-download-h2o.sh’, ‘h2o-cluster-start-h2o.sh’ and add the path to the key file
    AWS_SSH_PRIVATE_KEY_FILE="/home/mohamed/Desktop/aws/created_key.pem"
  • Open ‘h2o-cluster-distribute-aws-credentials.sh’ and add credentials and path to key
    AWS_ACCESS_KEY_ID="AKIAJHHVRLCYUDSB2EQQ"
AWS_SECRET_ACCESS_KEY="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"
AWS_SSH_PRIVATE_KEY_FILE="/home/mohamed/Desktop/aws/created_key.pem"



Now all files are ready. Either run the command

./run-all.sh

Or run one by one for debugging
./h2o-cluster-launch-instances.py
./h2o-cluster-download-h2o.sh
./h2o-cluster-distribute-aws-credentials.sh
./h2o-cluster-start-h2o.sh

Now open the browser on any of the public IPs of the clusters on port 54321
111.222.333.444:54321

Open Admin→Cluster status and make sure the number of nodes are there

No comments:

Post a Comment

Loud fan of desktop

 Upon restart the fan of the desktop got loud again. I cleaned the desktop from the dust but it was still loud (Lower than the first sound) ...