souls 0.46.1 → 0.47.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e428858b943e1bb20a0a962152e5f0b911f4d46ae69e57af5c7e6a9198d627bf
|
4
|
+
data.tar.gz: dd32514e99610aa722641b8d865d21cbfff2e41f41a053cdc0334623500a1175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 100f7d95ea75750fc7695619ebe68b0451adc5b94aeede0a801648ffb3790eedfeaae90cfe88f5ddbbb414880193b04aec23074aa688b2aec1bc6208d1dd70cf
|
7
|
+
data.tar.gz: bfdbfc0dc519cf7c2318d051cb1c65fa3fba150b27851a29afad295746f47eaf144fb7bb0519d90b2de274803486525e73fe81ca2fe31ba5b17fe8e7f13d69aa
|
@@ -11,16 +11,39 @@ module Souls
|
|
11
11
|
)
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
14
|
+
def setup_private_ip(instance_name: "")
|
15
15
|
app_name = Souls.configuration.app
|
16
16
|
instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
|
17
17
|
project_id = Souls.configuration.project_id
|
18
|
+
create_ip_range
|
19
|
+
create_vpc_connector
|
20
|
+
system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --network=#{app_name}")
|
21
|
+
end
|
22
|
+
|
23
|
+
def create_ip_range
|
24
|
+
app_name = Souls.configuration.app
|
18
25
|
system(
|
19
26
|
"
|
20
|
-
gcloud
|
21
|
-
|
22
|
-
|
23
|
-
|
27
|
+
gcloud compute addresses create #{app_name}-ip-range \
|
28
|
+
--global \
|
29
|
+
--purpose=VPC_PEERING \
|
30
|
+
--prefix-length=16 \
|
31
|
+
--description='peering range for SOULs' \
|
32
|
+
--network=#{app_name} \
|
33
|
+
--project=#{app_name}"
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
def create_vpc_connector
|
38
|
+
app_name = Souls.configuration.app
|
39
|
+
system(
|
40
|
+
"
|
41
|
+
gcloud services vpc-peerings connect \
|
42
|
+
--service=servicenetworking.googleapis.com \
|
43
|
+
--ranges=#{app_name}-ip-range \
|
44
|
+
--network=#{app_name} \
|
45
|
+
--project=#{app_name}
|
46
|
+
"
|
24
47
|
)
|
25
48
|
end
|
26
49
|
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.26.0
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.26.0
|