Repository: deis/deis

Issue:
Make EC2 AMIs for 0.5.1 release



Discussion:
We need to make the controller and node images separately now, then run the AMI distribution script twice. Here's the output just for documentation:

``` console
rhialto:deis matt$ export AWS_ACCESS_KEY=AXXXXXXXXXXXXXXXXXXQ
rhialto:deis matt$ export AWS_SECRET_KEY=nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxg
rhialto:deis matt$ ./contrib/ec2/distribute-amis.sh us-west-2 ami-f082eec0
+ src_region=us-west-2
+ src_ami=ami-f082eec0
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' ap-northeast-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f082eec0 --region ap-northeast-1
IMAGE   ami-ed7503ec
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' ap-southeast-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f082eec0 --region ap-southeast-1
IMAGE   ami-76673624
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' ap-southeast-2 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f082eec0 --region ap-southeast-2
IMAGE   ami-7dbb2247
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' eu-west-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f082eec0 --region eu-west-1
IMAGE   ami-bd31c3ca
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' sa-east-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f082eec0 --region sa-east-1
IMAGE   ami-2964c734
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' us-east-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f082eec0 --region us-east-1
IMAGE   ami-f9080a90
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' us-west-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f082eec0 --region us-west-1
IMAGE   ami-148bb751
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' us-west-2 = us-west-2 ']'
+ continue
rhialto:deis matt$
rhialto:deis matt$ ./contrib/ec2/distribute-amis.sh us-west-2 ami-f282eec2
+ src_region=us-west-2
+ src_ami=ami-f282eec2
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' ap-northeast-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f282eec2 --region ap-northeast-1
IMAGE   ami-f37503f2
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' ap-southeast-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f282eec2 --region ap-southeast-1
IMAGE   ami-7867362a
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' ap-southeast-2 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f282eec2 --region ap-southeast-2
IMAGE   ami-71bb224b
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' eu-west-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f282eec2 --region eu-west-1
IMAGE   ami-af31c3d8
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' sa-east-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f282eec2 --region sa-east-1
IMAGE   ami-2b64c736
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' us-east-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f282eec2 --region us-east-1
IMAGE   ami-c1080aa8
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' us-west-1 = us-west-2 ']'
+ ec2-copy-image -r us-west-2 -s ami-f282eec2 --region us-west-1
IMAGE   ami-1c8bb759
+ for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2
+ '[' us-west-2 = us-west-2 ']'
+ continue
```


Resolving patch:
diff --git a/provider/ec2.py b/provider/ec2.py
--- a/provider/ec2.py
+++ b/provider/ec2.py
@@ -17,14 +17,14 @@
 # Deis-optimized EC2 amis -- with 3.8 kernel, chef 11 deps,
 # and large docker images (e.g. buildstep) pre-installed
 IMAGE_MAP = {
-    'ap-northeast-1': 'ami-5d432d5c',
-    'ap-southeast-1': 'ami-b4c493e6',
-    'ap-southeast-2': 'ami-d59d03ef',
-    'eu-west-1': 'ami-ce30c5b9',
-    'sa-east-1': 'ami-61b1117c',
-    'us-east-1': 'ami-8df9c9e4',
-    'us-west-1': 'ami-62477527',
-    'us-west-2': 'ami-ea6001da',
+    'ap-northeast-1': 'ami-f37503f2',
+    'ap-southeast-1': 'ami-7867362a',
+    'ap-southeast-2': 'ami-71bb224b',
+    'eu-west-1': 'ami-af31c3d8',
+    'sa-east-1': 'ami-2b64c736',
+    'us-east-1': 'ami-c1080aa8',
+    'us-west-1': 'ami-1c8bb759',
+    'us-west-2': 'ami-f282eec2',
 }
 
 


Test patch: