Skip to content

Commit bbdf1b6

Browse files
committed
Merge pull request #10 from awslabs/develop
Pull from develop for v0.0.10 release
2 parents 998ac18 + 1cdb12b commit bbdf1b6

File tree

8 files changed

+45
-30
lines changed

8 files changed

+45
-30
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
CHANGELOG
33
=========
44

5+
0.0.10
6+
======
7+
8+
* updates:``ami``: Pulled latest CentOS errata
9+
* updates:``ami``: Updated packages to match base RHEL AMI's
10+
* feature:``cli``: Improved region handling and added support for AWS_DEFAULT_REGION
11+
512
0.0.9
613
=====
714

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
cfncluster
22
==========
33

4-
cfncluster is a sample code framework that deploys and maintains clusters on
4+
cfncluster is a framework that deploys and maintains HPC clusters on
55
AWS. It is reasonably agnostic to what the cluster is for and can easily be
66
extended to support different frameworks. The the CLI is stateless,
77
everything is done using CloudFormation or resources within AWS.
88

99
### Installation
1010

11-
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:
11+
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:
1212

1313
#### Linux/OSX
1414

@@ -27,8 +27,6 @@ Install the following packages:
2727

2828
Python2.7 - https://www.python.org/download/
2929

30-
pyCrypto - http://www.voidspace.org.uk/python/modules.shtml#pycrypto
31-
3230
setuptools - https://pypi.python.org/pypi/setuptools#windows-7-or-graphical-install
3331

3432
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

amis.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
us-west-2 ami-750f7645
2-
eu-west-1 ami-7df5220a
3-
sa-east-1 ami-7753fd6a
4-
us-east-1 ami-0c458764
5-
ap-northeast-1 ami-4f38684e
6-
us-west-1 ami-1b8c8c5e
7-
ap-southeast-1 ami-da4e1788
8-
ap-southeast-2 ami-e5a9cedf
1+
us-west-2 ami-ed5822dd
2+
eu-west-1 ami-b04290c7
3+
sa-east-1 ami-fde54de0
4+
us-east-1 ami-208a5b48
5+
ap-northeast-1 ami-75411874
6+
us-west-1 ami-1b78755e
7+
ap-southeast-1 ami-220e5570
8+
ap-southeast-2 ami-c181e7fb

cli/cfncluster/cfncluster.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ def create(args):
3232
config.parameters.append(('ComputeWaitConditionCount', initial_queue_size))
3333
except ValueError:
3434
pass
35+
3536
capabilities = ["CAPABILITY_IAM"]
3637
cfnconn = boto.cloudformation.connect_to_region(config.region,aws_access_key_id=config.aws_access_key_id,
3738
aws_secret_access_key=config.aws_secret_access_key)
3839
try:
3940
logger.debug((config.template_url, config.parameters))
4041
stack = cfnconn.create_stack(('cfncluster-' + args.cluster_name),template_url=config.template_url,
4142
parameters=config.parameters, capabilities=capabilities,
42-
disable_rollback=args.norollback)
43+
disable_rollback=args.norollback, tags=args.tags)
4344
status = cfnconn.describe_stacks(stack)[0].stack_status
4445
if not args.nowait:
4546
while status == 'CREATE_IN_PROGRESS':

cli/cfncluster/cfnconfig.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,17 @@ def __init__(self, args):
9494
raise Exception
9595

9696
# Determine the EC2 region to used used or default to us-east-1
97-
# Order is 1) CLI arg 2) Config file 3) us-east-1
97+
# Order is 1) CLI arg 2) AWS_DEFAULT_REGION env 3) Config file 4) us-east-1
9898
if args.region:
9999
self.region = args.region
100100
else:
101-
try:
102-
self.region = __config.get('aws', 'aws_region_name')
103-
except ConfigParser.NoOptionError:
104-
self.region = 'us-east-1'
101+
if os.environ.get('AWS_DEFAULT_REGION'):
102+
self.region = os.environ.get('AWS_DEFAULT_REGION')
103+
else:
104+
try:
105+
self.region = __config.get('aws', 'aws_region_name')
106+
except ConfigParser.NoOptionError:
107+
self.region = 'us-east-1'
105108

106109
# Check if credentials have been provided in config
107110
try:

cli/cfncluster/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def main():
5858
# add the handler to the root logger
5959
logging.getLogger('cfncluster.cli').addHandler(console)
6060

61-
parser = argparse.ArgumentParser(description='cfncluster is the a tool to launch and manage cluster.')
61+
parser = argparse.ArgumentParser(description='cfncluster is a tool to launch and manage a cluster.')
6262
parser.add_argument("--config", "-c", dest="config_file", help='specify a alternative config file')
6363
parser.add_argument( "--region", "-r", dest="region", help='specify a specific region to connect to',
6464
default=None)

cli/setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
import os
12+
import os, sys
1313
from setuptools import setup, find_packages
1414

1515
# Utility function to read the README file.
@@ -20,7 +20,13 @@ def read(fname):
2020
return open(os.path.join(os.path.dirname(__file__), fname)).read()
2121

2222
console_scripts = ['cfncluster = cfncluster.cli:main']
23-
version = "0.0.9"
23+
version = "0.0.10"
24+
requires = ['boto', 'botocore']
25+
26+
if sys.version_info[:2] == (2, 6):
27+
# For python2.6 we have to require argparse since it
28+
# was not in stdlib until 2.7.
29+
requires.append('argparse>=1.1')
2430

2531
setup(
2632
name = "cfncluster",
@@ -31,7 +37,7 @@ def read(fname):
3137
url = ("https://github.com/awslabs/cfncluster"),
3238
license = "Amazon Software License",
3339
packages = find_packages(),
34-
install_requires=['boto', 'argparse'],
40+
install_requires = requires,
3541
entry_points=dict(console_scripts=console_scripts),
3642
include_package_data = True,
3743
zip_safe = False,

cloudformation/cfncluster.cfn.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,28 +588,28 @@
588588
},
589589
"AWSRegionArch2AMI" : {
590590
"eu-west-1" : {
591-
"64HVM" : "ami-7df5220a"
591+
"64HVM" : "ami-b04290c7"
592592
},
593593
"us-east-1" : {
594-
"64HVM" : "ami-0c458764"
594+
"64HVM" : "ami-208a5b48"
595595
},
596596
"ap-northeast-1" : {
597-
"64HVM" : "ami-4f38684e"
597+
"64HVM" : "ami-75411874"
598598
},
599599
"us-west-2" : {
600-
"64HVM" : "ami-750f7645"
600+
"64HVM" : "ami-ed5822dd"
601601
},
602602
"sa-east-1" : {
603-
"64HVM" : "ami-7753fd6a"
603+
"64HVM" : "ami-fde54de0"
604604
},
605605
"us-west-1" : {
606-
"64HVM" : "ami-1b8c8c5e"
606+
"64HVM" : "ami-1b78755e"
607607
},
608608
"ap-southeast-1" : {
609-
"64HVM" : "ami-da4e1788"
609+
"64HVM" : "ami-220e5570"
610610
},
611611
"ap-southeast-2" : {
612-
"64HVM" : "ami-e5a9cedf"
612+
"64HVM" : "ami-c181e7fb"
613613
}
614614
}
615615
},

0 commit comments

Comments
 (0)