cyoi 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +23 -22
- data/lib/cyoi/cli/provider_image/image_cli_aws.rb +19 -12
- data/lib/cyoi/cli/providers/provider_cli_aws.rb +1 -0
- data/lib/cyoi/providers/clients/aws_provider_client.rb +18 -12
- data/lib/cyoi/version.rb +1 -1
- data/spec/integration/cli/image/image_aws_spec.rb +1 -1
- data/spec/unit/cli/image_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f40ad034c190187459af10b580876f6fa0d79fed
|
4
|
+
data.tar.gz: 1d7dbe001b4f2178d0637cbe14b0161e67c9032d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0970dc12135136b9b493b883536573851af110f58ea9582ca7820ad04f12d8abaec10b27e6923a9fe2091f4de175bb17c54f0fa0e32a8e864d1e0d3d00a721f7
|
7
|
+
data.tar.gz: 53cbe081b9d407fb26b9987a9a0d6a533da3736fb45c43b7668133cf78e2a35368854dfd72d75b39864b605a7a57733829b766c793a249426ab73a62c02d09a3
|
data/ChangeLog.md
CHANGED
@@ -5,67 +5,68 @@ Cyoi (choose-your-own-infrastructure) is a library to ask an end-user to choose
|
|
5
5
|
|
6
6
|
v0.11
|
7
7
|
|
8
|
-
-
|
8
|
+
- AWS VPC support - choose a VPC, choose a subnet, an IP is selected.
|
9
|
+
- AWS - Trusty AMIs if looking for an AMI [v0.11.1]
|
9
10
|
|
10
11
|
v0.10
|
11
12
|
-----
|
12
13
|
|
13
|
-
-
|
14
|
-
-
|
14
|
+
- `blobstores` - create a bucket/container on AWS/OpenStack
|
15
|
+
- `blobstores` - AWS bucket is made publicly readable via bucket policy [v0.10.1]
|
15
16
|
|
16
17
|
v0.9
|
17
18
|
----
|
18
19
|
|
19
|
-
-
|
20
|
-
-
|
20
|
+
- openstack - prompt for type of image format (qcow2 v raw) and store as provider.options.boot_from_volume
|
21
|
+
- openstack - provides required parent_group_id field when authorizing security group ports [v0.9.2]
|
21
22
|
|
22
23
|
v0.8
|
23
24
|
----
|
24
25
|
|
25
|
-
-
|
26
|
-
-
|
27
|
-
-
|
28
|
-
-
|
29
|
-
-
|
30
|
-
-
|
26
|
+
- openstack - detection of nova vs neutron networking
|
27
|
+
- openstack nova - continues to provision a floating IP
|
28
|
+
- openstack neutron - asks to select a subnet and then an available IP
|
29
|
+
- create_security_group can take a list of ports to open [v0.8.1]
|
30
|
+
- allow for legacy API usage of create_security_group [v0.8.2]
|
31
|
+
- fixed create_security_group support for OpenStack & AWS [v0.8.3]
|
31
32
|
|
32
33
|
v0.7
|
33
34
|
----
|
34
35
|
|
35
|
-
-
|
36
|
+
- vsphere provising
|
36
37
|
|
37
38
|
v0.6
|
38
39
|
----
|
39
40
|
|
40
|
-
-
|
41
|
-
-
|
41
|
+
- added `cyoi image` - AWS: public AMI for Ubuntu 13.04; OpenStack: choose an Image from menu
|
42
|
+
- openstack region doesn't repeatably prompt if set to nothing [v0.6.1]
|
42
43
|
|
43
44
|
v0.5
|
44
45
|
----
|
45
46
|
|
46
|
-
-
|
47
|
-
-
|
47
|
+
- OpenStack implementation completed by Ferdy!
|
48
|
+
- More status/progress on actions (v0.5.1)
|
48
49
|
|
49
50
|
v0.4
|
50
51
|
----
|
51
52
|
|
52
|
-
-
|
53
|
-
-
|
53
|
+
- switch to using readwritesettings instead of fork of settingslogic
|
54
|
+
- clean all highline values before setting (v0.4.1 & v0.4.2)
|
54
55
|
|
55
56
|
v0.3
|
56
57
|
----
|
57
58
|
|
58
|
-
-
|
59
|
+
- added `cyoi keypair` & `cyoi key_pair`
|
59
60
|
|
60
61
|
v0.2
|
61
62
|
----
|
62
63
|
|
63
|
-
-
|
64
|
-
-
|
64
|
+
- executable `cyoi` became `cyoi provider`
|
65
|
+
- added `cyoi address` to prompt or provision an IP address (AWS only at moment)
|
65
66
|
|
66
67
|
v0.1
|
67
68
|
----
|
68
69
|
|
69
70
|
Initial release
|
70
71
|
|
71
|
-
-
|
72
|
+
- executable `cyoi [settings.yml]` - asks for provider information and stores in settings.yml (AWS & OpenStack)
|
@@ -2,33 +2,40 @@ require "cyoi/cli/provider_image/image_cli_base"
|
|
2
2
|
class Cyoi::Cli::Image::ImageCliAws < Cyoi::Cli::Image::ImageCliBase
|
3
3
|
|
4
4
|
def image_id
|
5
|
-
|
5
|
+
trusty_image_id
|
6
6
|
end
|
7
7
|
|
8
|
-
# Ubuntu
|
9
|
-
def
|
8
|
+
# Ubuntu 14.04
|
9
|
+
def trusty_image_id(region=nil)
|
10
10
|
region = provider_client.attributes.region
|
11
11
|
# http://cloud-images.ubuntu.com/locator/ec2/
|
12
|
+
# version: 14.04 LTS
|
13
|
+
# arch: amd64
|
14
|
+
# instance type: ebs-ssd (not hvm)
|
15
|
+
# Using release 20140927
|
12
16
|
image_id = case region.to_s
|
13
17
|
when "ap-northeast-1"
|
14
|
-
"ami-
|
18
|
+
"ami-df4b60de"
|
15
19
|
when "ap-southeast-1"
|
16
|
-
"ami-
|
20
|
+
"ami-2ce7c07e"
|
17
21
|
when "eu-west-1"
|
18
|
-
"ami-
|
22
|
+
"ami-f6b11181"
|
19
23
|
when "sa-east-1"
|
20
|
-
"ami-
|
24
|
+
"ami-71d2676c"
|
21
25
|
when "us-east-1"
|
22
|
-
"ami-
|
26
|
+
"ami-98aa1cf0"
|
23
27
|
when "us-west-1"
|
24
|
-
"ami-
|
28
|
+
"ami-736e6536"
|
29
|
+
when "cn-north-1"
|
30
|
+
"ami-e642d0df"
|
25
31
|
when "ap-southeast-2"
|
26
|
-
"ami-
|
32
|
+
"ami-1f117325"
|
27
33
|
when "us-west-2"
|
28
|
-
"ami-
|
34
|
+
"ami-37501207"
|
29
35
|
end
|
30
|
-
image_id || raise("Please add Ubuntu
|
36
|
+
image_id || raise("Please add Ubuntu 14.04 64bit (EBS SSD) AMI image id to aws.rb#trusty_image_id method for region '#{region}'")
|
31
37
|
end
|
38
|
+
|
32
39
|
end
|
33
40
|
|
34
41
|
Cyoi::Cli::Image.register_image_cli("aws", Cyoi::Cli::Image::ImageCliAws)
|
@@ -61,6 +61,7 @@ class Cyoi::Cli::Providers::ProviderCliAws < Cyoi::Cli::Providers::ProviderCli
|
|
61
61
|
{ label: "Asia Pacific (Sydney) Region", code: "ap-southeast-2" },
|
62
62
|
{ label: "Asia Pacific (Tokyo) Region", code: "ap-northeast-1" },
|
63
63
|
{ label: "South America (Sao Paulo) Region", code: "sa-east-1" },
|
64
|
+
{ label: "China (Beijing) Region", code: "cn-north-1" },
|
64
65
|
]
|
65
66
|
end
|
66
67
|
|
@@ -165,33 +165,39 @@ class Cyoi::Providers::Clients::AwsProviderClient < Cyoi::Providers::Clients::Fo
|
|
165
165
|
volume.server = server
|
166
166
|
end
|
167
167
|
|
168
|
-
# Ubuntu
|
169
|
-
def
|
168
|
+
# Ubuntu 14.04
|
169
|
+
def trusty_image_id(region=nil)
|
170
170
|
region = fog_compute.region
|
171
171
|
# http://cloud-images.ubuntu.com/locator/ec2/
|
172
|
+
# version: 14.04 LTS
|
173
|
+
# arch: amd64
|
174
|
+
# instance type: ebs-ssd (not hvm)
|
175
|
+
# Using release 20140927
|
172
176
|
image_id = case region.to_s
|
173
177
|
when "ap-northeast-1"
|
174
|
-
"ami-
|
178
|
+
"ami-df4b60de"
|
175
179
|
when "ap-southeast-1"
|
176
|
-
"ami-
|
180
|
+
"ami-2ce7c07e"
|
177
181
|
when "eu-west-1"
|
178
|
-
"ami-
|
182
|
+
"ami-f6b11181"
|
179
183
|
when "sa-east-1"
|
180
|
-
"ami-
|
184
|
+
"ami-71d2676c"
|
181
185
|
when "us-east-1"
|
182
|
-
"ami-
|
186
|
+
"ami-98aa1cf0"
|
183
187
|
when "us-west-1"
|
184
|
-
"ami-
|
188
|
+
"ami-736e6536"
|
189
|
+
when "cn-north-1"
|
190
|
+
"ami-e642d0df"
|
185
191
|
when "ap-southeast-2"
|
186
|
-
"ami-
|
192
|
+
"ami-1f117325"
|
187
193
|
when "us-west-2"
|
188
|
-
"ami-
|
194
|
+
"ami-37501207"
|
189
195
|
end
|
190
|
-
image_id || raise("Please add Ubuntu
|
196
|
+
image_id || raise("Please add Ubuntu 14.04 64bit (EBS SSD) AMI image id to aws.rb#trusty_image_id method for region '#{region}'")
|
191
197
|
end
|
192
198
|
|
193
199
|
def bootstrap(new_attributes = {})
|
194
|
-
new_attributes[:image_id] ||=
|
200
|
+
new_attributes[:image_id] ||= trusty_image_id(fog_compute.region)
|
195
201
|
vpc = new_attributes[:subnet_id]
|
196
202
|
|
197
203
|
server = fog_compute.servers.new(new_attributes)
|
data/lib/cyoi/version.rb
CHANGED
@@ -10,6 +10,6 @@ describe "cyoi image aws" do
|
|
10
10
|
setting "provider.credentials.aws_secret_access_key", "aws_secret_access_key"
|
11
11
|
setting "provider.region", "us-west-2"
|
12
12
|
run_interactive(unescape("cyoi image #{settings_dir}"))
|
13
|
-
assert_passing_with("Confirming: Using image ami-
|
13
|
+
assert_passing_with("Confirming: Using image ami-37501207")
|
14
14
|
end
|
15
15
|
end
|
data/spec/unit/cli/image_spec.rb
CHANGED
@@ -28,10 +28,10 @@ describe "cyoi" do
|
|
28
28
|
settings.image.image_id.should == "ami-123456"
|
29
29
|
end
|
30
30
|
|
31
|
-
it "auto-selects Ubuntu
|
31
|
+
it "auto-selects Ubuntu 14.04 image in region" do
|
32
32
|
capture_stdout { subject.execute! }
|
33
33
|
reload_settings!
|
34
|
-
settings.image.image_id.should == "ami-
|
34
|
+
settings.image.image_id.should == "ami-37501207"
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -63,4 +63,4 @@ describe "cyoi" do
|
|
63
63
|
settings.image.image_id.should == "chosen-image-id"
|
64
64
|
end
|
65
65
|
end
|
66
|
-
end
|
66
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyoi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|