Skip to content

Commit

Permalink
Add bootstarp for maven and update the configurations for EMR
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky-suman committed Sep 5, 2019
1 parent 975a797 commit 9d33163
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rudra/deployments/emr_scripts/maven_emr.py
Expand Up @@ -26,7 +26,7 @@ def run_job(self, input_dict):
bucket=self.bucket_name,
log_file=log_file_name)

logger.info("Logs are gonna store at {}".format(log_uri))
logger.info("Logs will be stored at {}".format(log_uri))

emr_config_obj = EMRConfig(name=name,
s3_bootstrap_uri=bootstrap_uri,
Expand All @@ -37,6 +37,8 @@ def run_job(self, input_dict):
hyper_params=self.hyper_params)

configs = emr_config_obj.get_config()
configs["Applications"] = []
logger.info("Configurations for Maven EMR are: {}".format(configs))
status = self.aws_emr.run_flow(configs)
logger.info("EMR job is running {}".format(status))
status_code = status.get('ResponseMetadata', {}).get('HTTPStatusCode')
Expand Down
26 changes: 26 additions & 0 deletions scripts/bootstrap_maven.sh
@@ -0,0 +1,26 @@
#!/bin/bash
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

set -e -x

# enable debugging & set strict error trap
sudo yum install -y zip gcc-c++ git python36-pip python36-requests httpd httpd-devel python36-devel wget git
sudo pip install --upgrade pip
sudo python3.6 -m pip install pandas
sudo python3.6 -m pip install Cython==0.29.1
sudo python3.6 -m pip install hpfrec==0.2.2.9
sudo python3.6 -m pip install git+https://github.com/fabric8-analytics/fabric8-analytics-rudra

# Now set the PYTHONPATH
export PYTHONPATH='/home/hadoop'

0 comments on commit 9d33163

Please sign in to comment.