diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7b787aac55..b6176740fd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,13 @@ CHANGELOG ========= +0.0.10 +====== + +* updates:``ami``: Pulled latest CentOS errata +* updates:``ami``: Updated packages to match base RHEL AMI's +* feature:``cli``: Improved region handling and added support for AWS_DEFAULT_REGION + 0.0.9 ===== diff --git a/README.md b/README.md index 19e276b252..e7cb8f3129 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ cfncluster ========== -cfncluster is a sample code framework that deploys and maintains clusters on +cfncluster is a framework that deploys and maintains HPC clusters on AWS. It is reasonably agnostic to what the cluster is for and can easily be extended to support different frameworks. The the CLI is stateless, everything is done using CloudFormation or resources within AWS. ### Installation -The current working version is cfncluster-0.0.8. The CLI is written in python and uses BOTO for AWS actions. You can install the CLI with the following command: +The current working version is cfncluster-0.0.10. The CLI is written in python and uses BOTO for AWS actions. You can install the CLI with the following command: #### Linux/OSX @@ -27,8 +27,6 @@ Install the following packages: Python2.7 - https://www.python.org/download/ -pyCrypto - http://www.voidspace.org.uk/python/modules.shtml#pycrypto - setuptools - https://pypi.python.org/pypi/setuptools#windows-7-or-graphical-install Once installed, you should update the Environment Variables to have the Python install directory and Python Scripts directory in the PATH, for example: C:\Python27;C:\Python27\Scripts diff --git a/amis.txt b/amis.txt index 4a9d03ee40..a90340a260 100644 --- a/amis.txt +++ b/amis.txt @@ -1,8 +1,8 @@ -us-west-2 ami-750f7645 -eu-west-1 ami-7df5220a -sa-east-1 ami-7753fd6a -us-east-1 ami-0c458764 -ap-northeast-1 ami-4f38684e -us-west-1 ami-1b8c8c5e -ap-southeast-1 ami-da4e1788 -ap-southeast-2 ami-e5a9cedf +us-west-2 ami-ed5822dd +eu-west-1 ami-b04290c7 +sa-east-1 ami-fde54de0 +us-east-1 ami-208a5b48 +ap-northeast-1 ami-75411874 +us-west-1 ami-1b78755e +ap-southeast-1 ami-220e5570 +ap-southeast-2 ami-c181e7fb diff --git a/cli/cfncluster/cfncluster.py b/cli/cfncluster/cfncluster.py index 09c9207370..b6660c6a2c 100644 --- a/cli/cfncluster/cfncluster.py +++ b/cli/cfncluster/cfncluster.py @@ -32,6 +32,7 @@ def create(args): config.parameters.append(('ComputeWaitConditionCount', initial_queue_size)) except ValueError: pass + capabilities = ["CAPABILITY_IAM"] cfnconn = boto.cloudformation.connect_to_region(config.region,aws_access_key_id=config.aws_access_key_id, aws_secret_access_key=config.aws_secret_access_key) @@ -39,7 +40,7 @@ def create(args): logger.debug((config.template_url, config.parameters)) stack = cfnconn.create_stack(('cfncluster-' + args.cluster_name),template_url=config.template_url, parameters=config.parameters, capabilities=capabilities, - disable_rollback=args.norollback) + disable_rollback=args.norollback, tags=args.tags) status = cfnconn.describe_stacks(stack)[0].stack_status if not args.nowait: while status == 'CREATE_IN_PROGRESS': diff --git a/cli/cfncluster/cfnconfig.py b/cli/cfncluster/cfnconfig.py index 4d3cf8fe14..f869c34f6b 100644 --- a/cli/cfncluster/cfnconfig.py +++ b/cli/cfncluster/cfnconfig.py @@ -94,14 +94,17 @@ def __init__(self, args): raise Exception # Determine the EC2 region to used used or default to us-east-1 - # Order is 1) CLI arg 2) Config file 3) us-east-1 + # Order is 1) CLI arg 2) AWS_DEFAULT_REGION env 3) Config file 4) us-east-1 if args.region: self.region = args.region else: - try: - self.region = __config.get('aws', 'aws_region_name') - except ConfigParser.NoOptionError: - self.region = 'us-east-1' + if os.environ.get('AWS_DEFAULT_REGION'): + self.region = os.environ.get('AWS_DEFAULT_REGION') + else: + try: + self.region = __config.get('aws', 'aws_region_name') + except ConfigParser.NoOptionError: + self.region = 'us-east-1' # Check if credentials have been provided in config try: diff --git a/cli/cfncluster/cli.py b/cli/cfncluster/cli.py index 075f06d71f..9e5a08f87c 100644 --- a/cli/cfncluster/cli.py +++ b/cli/cfncluster/cli.py @@ -58,7 +58,7 @@ def main(): # add the handler to the root logger logging.getLogger('cfncluster.cli').addHandler(console) - parser = argparse.ArgumentParser(description='cfncluster is the a tool to launch and manage cluster.') + parser = argparse.ArgumentParser(description='cfncluster is a tool to launch and manage a cluster.') parser.add_argument("--config", "-c", dest="config_file", help='specify a alternative config file') parser.add_argument( "--region", "-r", dest="region", help='specify a specific region to connect to', default=None) diff --git a/cli/setup.py b/cli/setup.py index 43fbdef576..0d002d8133 100644 --- a/cli/setup.py +++ b/cli/setup.py @@ -9,7 +9,7 @@ # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and # limitations under the License. -import os +import os, sys from setuptools import setup, find_packages # Utility function to read the README file. @@ -20,7 +20,13 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() console_scripts = ['cfncluster = cfncluster.cli:main'] -version = "0.0.9" +version = "0.0.10" +requires = ['boto', 'botocore'] + +if sys.version_info[:2] == (2, 6): + # For python2.6 we have to require argparse since it + # was not in stdlib until 2.7. + requires.append('argparse>=1.1') setup( name = "cfncluster", @@ -31,7 +37,7 @@ def read(fname): url = ("https://github.com/awslabs/cfncluster"), license = "Amazon Software License", packages = find_packages(), - install_requires=['boto', 'argparse'], + install_requires = requires, entry_points=dict(console_scripts=console_scripts), include_package_data = True, zip_safe = False, diff --git a/cloudformation/cfncluster.cfn.json b/cloudformation/cfncluster.cfn.json index e1dc6e3dcd..5b4b006f23 100644 --- a/cloudformation/cfncluster.cfn.json +++ b/cloudformation/cfncluster.cfn.json @@ -588,28 +588,28 @@ }, "AWSRegionArch2AMI" : { "eu-west-1" : { - "64HVM" : "ami-7df5220a" + "64HVM" : "ami-b04290c7" }, "us-east-1" : { - "64HVM" : "ami-0c458764" + "64HVM" : "ami-208a5b48" }, "ap-northeast-1" : { - "64HVM" : "ami-4f38684e" + "64HVM" : "ami-75411874" }, "us-west-2" : { - "64HVM" : "ami-750f7645" + "64HVM" : "ami-ed5822dd" }, "sa-east-1" : { - "64HVM" : "ami-7753fd6a" + "64HVM" : "ami-fde54de0" }, "us-west-1" : { - "64HVM" : "ami-1b8c8c5e" + "64HVM" : "ami-1b78755e" }, "ap-southeast-1" : { - "64HVM" : "ami-da4e1788" + "64HVM" : "ami-220e5570" }, "ap-southeast-2" : { - "64HVM" : "ami-e5a9cedf" + "64HVM" : "ami-c181e7fb" } } },