Skip to content

Commit

Permalink
Add HADOOP_HOME to envars
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquincasares committed Jul 17, 2012
1 parent 4305bb1 commit 180a216
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ds2_configure.py
Expand Up @@ -735,6 +735,26 @@ def additional_pre_configurations():

def additional_post_configurations():
logger.exe('sudo apt-get install s3cmd')

# Setup HADOOP_HOME for ubuntu
file_to_open = '/home/ubuntu/.profile'
exe('sudo chmod 777 ' + file_to_open)
with open(file_to_open, 'a') as f:
f.write("""
export HADOOP_HOME=/usr/share/dse/hadoop
""")
exe('sudo chmod 644 ' + file_to_open)

# Setup HADOOP_HOME for root
os.chdir('/root')
file_to_open = '.profile'
exe('sudo chmod 777 ' + file_to_open)
with open(file_to_open, 'w') as f:
f.write("""
export HADOOP_HOME=/usr/share/dse/hadoop
""")
exe('sudo chmod 644 ' + file_to_open)
os.chdir('/home/ubuntu')
pass


Expand Down

0 comments on commit 180a216

Please sign in to comment.