HADOOP-6454. Create setup.py for EC2 cloud scripts.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@893262 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas White 2009-12-22 18:33:48 +00:00
parent d2bae8756c
commit 0ebcb62515
8 changed files with 37 additions and 6 deletions

View File

@ -76,6 +76,8 @@ Trunk (unreleased changes)
HADOOP-6444. Support additional security group option in hadoop-ec2 script.
(Paul Egan via tomwhite)
HADOOP-6454. Create setup.py for EC2 cloud scripts. (tomwhite)
OPTIMIZATIONS
BUG FIXES

View File

@ -1 +0,0 @@
0.22.0

0
src/contrib/cloud/src/py/hadoop-ec2 Normal file → Executable file
View File

View File

@ -11,4 +11,5 @@
# distributed under the License 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.
# limitations under the License.
VERSION="0.22.0"

View File

@ -16,6 +16,7 @@
from __future__ import with_statement
import ConfigParser
from hadoop.cloud import VERSION
from hadoop.cloud.cluster import get_cluster
from hadoop.cloud.service import InstanceTemplate
from hadoop.cloud.service import HadoopService
@ -32,9 +33,6 @@
import os
import sys
version_file = os.path.join(sys.path[0], "VERSION")
VERSION = open(version_file, "r").read().strip()
DEFAULT_CLOUD_PROVIDER = 'ec2'
DEFAULT_CONFIG_DIR_NAME = '.hadoop-cloud'

View File

@ -247,7 +247,8 @@ def _prompt(self, prompt):
def _get_default_user_data_file_template(self):
return os.path.join(sys.path[0], 'hadoop-%s-init-remote.sh' %
data_path = os.path.join(os.path.dirname(__file__), 'data')
return os.path.join(data_path, 'hadoop-%s-init-remote.sh' %
self.cluster.get_provider_code())
def _get_master(self):

View File

@ -0,0 +1,30 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License 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.
from distutils.core import setup
version = __import__('hadoop.cloud').cloud.VERSION
setup(name='hadoop-cloud',
version=version,
description='Scripts for running Hadoop on cloud providers',
license = 'Apache License (2.0)',
url = 'http://hadoop.apache.org/common/',
packages=['hadoop', 'hadoop.cloud','hadoop.cloud.providers'],
package_data={'hadoop.cloud': ['data/*.sh']},
scripts=['hadoop-ec2'],
author = 'Apache Hadoop Contributors',
author_email = 'common-dev@hadoop.apache.org',
)