openstudio-aws 0.5.0.rc7 → 0.5.0.rc8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openstudio/aws/aws.rb +2 -2
- data/lib/openstudio/aws/version.rb +1 -1
- data/lib/openstudio/lib/openstudio_aws_wrapper.rb +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a141ce8d56b1e2d45276a4f1a8829d2c25affea
|
4
|
+
data.tar.gz: 9bc56fd172f5af82eaa08d06fdccb834313b2471
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 192d50ba829700d1aa038a81d8d7f7b06996a18d44b4e75f753f9056c291efb4f1785a64f93683e9c8061ded1f23363ec6ec167feb2a40bf22210b604652adba
|
7
|
+
data.tar.gz: 70d3f029c8765796434dfb0ed5808a7e65240d5050c8a5a5b178d051e2108f980256963a4b63615c4ab8457bca357376e6d4e92369580772dcf9d9c18d3b5dac
|
data/lib/openstudio/aws/aws.rb
CHANGED
@@ -162,8 +162,8 @@ module OpenStudio
|
|
162
162
|
end
|
163
163
|
|
164
164
|
if options[:security_groups].empty?
|
165
|
-
# if the user has not specified any security groups, then create one called: 'openstudio-server-sg-
|
166
|
-
@os_aws.create_or_retrieve_default_security_group(tmp_name = 'openstudio-server-sg-v2.
|
165
|
+
# if the user has not specified any security groups, then create one called: 'openstudio-server-sg-v2'
|
166
|
+
@os_aws.create_or_retrieve_default_security_group(tmp_name = 'openstudio-server-sg-v2.2',
|
167
167
|
vpc_id=options[:vpc_id])
|
168
168
|
else
|
169
169
|
@os_aws.security_groups = options[:security_groups]
|
@@ -81,7 +81,7 @@ class OpenStudioAwsWrapper
|
|
81
81
|
@aws = Aws::EC2::Client.new(options[:credentials])
|
82
82
|
end
|
83
83
|
|
84
|
-
def create_or_retrieve_default_security_group(tmp_name = 'openstudio-server-sg-v2.
|
84
|
+
def create_or_retrieve_default_security_group(tmp_name = 'openstudio-server-sg-v2.2', vpc_id = nil)
|
85
85
|
group = @aws.describe_security_groups(filters: [{ name: 'group-name', values: [tmp_name] }])
|
86
86
|
logger.info "Length of the security group is: #{group.data.security_groups.length}"
|
87
87
|
if group.data.security_groups.length == 0
|
@@ -94,7 +94,6 @@ class OpenStudioAwsWrapper
|
|
94
94
|
end
|
95
95
|
group_id = r[:group_id]
|
96
96
|
@aws.authorize_security_group_ingress(
|
97
|
-
group_name: tmp_name,
|
98
97
|
group_id: group_id,
|
99
98
|
ip_permissions: [
|
100
99
|
{ ip_protocol: 'tcp', from_port: 22, to_port: 22, ip_ranges: [cidr_ip: '0.0.0.0/0'] }, # Eventually make this only the user's IP address seen by the internet
|