souls 0.44.3 → 0.44.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be13f14b9929dab4467ff30fa68d574e509a43d56ca7486d07251a7ed75196d6
|
4
|
+
data.tar.gz: 034f53df3ed7cdd2e91c31379a9fc7c3e2a0bda36af040bbe2c58d77f1ef3a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 930e61d7785ab9aba113ef70053d4f1aed3209d51906e6c6fe01c7e8744d740a4a43474801f50006dc2080c4fbf9a163353a6301d8352c8632050e5941df642d
|
7
|
+
data.tar.gz: 2cf7a62aebff5624790624cd2353ed227e3d35e8f321fb4fd01e61aad4a0b74e772e16d2f058e31c9642f19d749249518a96694fb3a689f64c257275145a9883
|
@@ -4,9 +4,11 @@ module Souls
|
|
4
4
|
class << self
|
5
5
|
def create_instance(instance_name: "", root_pass: "Postgre123!", zone: "asia-northeast1-b")
|
6
6
|
instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
|
7
|
+
current_ip = `curl inet-ip.info`
|
7
8
|
system(
|
8
9
|
"gcloud sql instances create #{instance_name} \
|
9
10
|
--database-version=POSTGRES_13 --cpu=2 --memory=7680MB --zone=#{zone} \
|
11
|
+
--assign-ip=#{current_ip} \
|
10
12
|
--root-password='#{root_pass}' --database-flags cloudsql.iam_authentication=on"
|
11
13
|
)
|
12
14
|
end
|
@@ -15,12 +17,13 @@ module Souls
|
|
15
17
|
app_name = Souls.configuration.app
|
16
18
|
instance_name = "#{Souls.configuration.app}-db" if instance_name.blank?
|
17
19
|
project_id = Souls.configuration.project_id
|
18
|
-
system(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --network=#{app_name}")
|
21
|
+
end
|
22
|
+
|
23
|
+
def assign_ip
|
24
|
+
current_ip = `curl inet-ip.info`
|
25
|
+
project_id = Souls.configuration.project_id
|
26
|
+
system("gcloud beta sql instances patch #{instance_name} --project=#{project_id} --assign-ip=#{current_ip}")
|
24
27
|
end
|
25
28
|
end
|
26
29
|
end
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.23.
|
1
|
+
0.23.4
|
@@ -1 +1 @@
|
|
1
|
-
0.23.
|
1
|
+
0.23.4
|