souls 0.34.1 → 0.35.2
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/lib/souls/cli/gcloud/compute/index.rb +77 -0
- data/lib/souls/cli/gcloud/iam/index.rb +4 -2
- data/lib/souls/cli/gcloud/index.rb +1 -0
- data/lib/souls/cli/sync/model.rb +4 -3
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- data/lib/souls/worker/generate/index.rb +1 -1
- metadata +6 -6
- data/lib/souls/worker/generate.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dacb9b58643bb6a26a4cb2a994296c6c1ed81a761ff5244141d28fdf1343958a
|
4
|
+
data.tar.gz: ed557b37c4e6c39471795b1b7fc08e1f75fae7521179099738a2becb3b630eb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a61f4d5a83f359dfe38e787e99584e00a0f245d810058468185843c7f13559cc9a4323bcd718f5130973c14cf9bd09bccbc606ebc793ae0183fbf14b5406070
|
7
|
+
data.tar.gz: 208239db7f27943c5cd0b4ac2cb13fec2e3af7c7a76bce43cdc044d51ba66ea235b4549cb4e0d5ef94930a1ebf613aa15218033c1151b2ec31a53fb81706ba70
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module Souls
|
2
|
+
module Gcloud
|
3
|
+
module Compute
|
4
|
+
class << self
|
5
|
+
def setup_vpc_nat(app_name: "", region: "asia-northeast1", range: "10.124.0.0/28")
|
6
|
+
create_network(app_name: app_name)
|
7
|
+
create_firewall_tcp(app_name: app_name, range: range)
|
8
|
+
create_firewall_ssh(app_name: app_name, range: range)
|
9
|
+
create_subnet(app_name: app_name, region: region, range: range)
|
10
|
+
create_connector(app_name: app_name, region: region)
|
11
|
+
create_external_ip(app_name: app_name, region: region)
|
12
|
+
create_nat(app_name: app_name, region: region)
|
13
|
+
end
|
14
|
+
|
15
|
+
def create_network(app_name: "")
|
16
|
+
app_name = Souls.configuration.app if app_name.blank?
|
17
|
+
system("gcloud compute networks create #{app_name}")
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_firewall_tcp(app_name: "", range: "10.124.0.0/28")
|
21
|
+
app_name = Souls.configuration.app if app_name.blank?
|
22
|
+
system(
|
23
|
+
"gcloud compute firewall-rules create #{app_name} \
|
24
|
+
--network #{app_name} --allow tcp,udp,icmp --source-ranges #{range}"
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_firewall_ssh(app_name: "")
|
29
|
+
app_name = Souls.configuration.app if app_name.blank?
|
30
|
+
system(
|
31
|
+
"gcloud compute firewall-rules create #{app_name}-ssh --network #{app_name} \
|
32
|
+
--allow tcp:22,tcp:3389,icmp"
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_subnet(app_name: "", region: "asia-northeast1", range: "10.124.0.0/28")
|
37
|
+
app_name = Souls.configuration.app if app_name.blank?
|
38
|
+
system(
|
39
|
+
"gcloud compute networks subnets create #{app_name}-subnet \
|
40
|
+
--range=#{range} --network=#{app_name} --region=#{region}"
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
44
|
+
def create_connector(app_name: "", region: "asia-northeast1")
|
45
|
+
app_name = Souls.configuration.app if app_name.blank?
|
46
|
+
project_id = Souls.configuration.app if project_id.blank?
|
47
|
+
system(
|
48
|
+
"gcloud compute networks vpc-access connectors create #{app_name}-connector \
|
49
|
+
--region=#{region} \
|
50
|
+
--subnet-project=#{project_id} \
|
51
|
+
--subnet=#{app_name}-subnet"
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
def create_external_ip(app_name: "", region: "asia-northeast1")
|
56
|
+
app_name = Souls.configuration.app if app_name.blank?
|
57
|
+
system("gcloud compute addresses create #{app_name}-worker-ip --region=#{region}")
|
58
|
+
end
|
59
|
+
|
60
|
+
def create_nat(app_name: "", region: "asia-northeast1")
|
61
|
+
app_name = Souls.configuration.app if app_name.blank?
|
62
|
+
system(
|
63
|
+
"gcloud compute routers nats create #{app_name}-worker-nat \
|
64
|
+
--router=#{app_name}-router \
|
65
|
+
--region=#{region} \
|
66
|
+
--nat-custom-subnet-ip-ranges=#{app_name}-subnet \
|
67
|
+
--nat-external-ip-pool=#{app_name}-worker-ip"
|
68
|
+
)
|
69
|
+
end
|
70
|
+
|
71
|
+
def network_list
|
72
|
+
system("gcloud compute network list")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -28,7 +28,7 @@ module Souls
|
|
28
28
|
end
|
29
29
|
key = text.join(",").gsub(/^,/, "").chomp!
|
30
30
|
github_repo = `git remote show origin -n | grep 'Fetch URL:' | awk '{print $3}'`.strip
|
31
|
-
github_repo = "https://github.com/#{github_repo.match(
|
31
|
+
github_repo = "https://github.com/#{github_repo.match(/:(.+).git/)[1]}" if github_repo.include?("git@github")
|
32
32
|
puts(Paint[key, :white])
|
33
33
|
puts(Paint["======= above(ここまで)=======", :cyan])
|
34
34
|
github_secret_url = "#{github_repo}/settings/secrets/actions"
|
@@ -53,7 +53,9 @@ module Souls
|
|
53
53
|
FileUtils.rm(file_path)
|
54
54
|
end
|
55
55
|
|
56
|
-
def add_service_account_role(
|
56
|
+
def add_service_account_role(
|
57
|
+
service_account: "souls-app", project_id: "souls-app", role: "roles/firebase.admin"
|
58
|
+
)
|
57
59
|
system(
|
58
60
|
"gcloud projects add-iam-policy-binding #{project_id} \
|
59
61
|
--member='serviceAccount:#{service_account}@#{project_id}.iam.gserviceaccount.com' \
|
data/lib/souls/cli/sync/model.rb
CHANGED
@@ -42,9 +42,10 @@ module Souls
|
|
42
42
|
else
|
43
43
|
api_file_data = file_diff(Dir["#{api_dir}/*.rb"])
|
44
44
|
worker_file_data = file_diff(Dir["#{worker_dir}/*.rb"])
|
45
|
-
|
46
|
-
api_latest_date =
|
47
|
-
worker_latest_date =
|
45
|
+
# rubocop:disable Style/DateTime
|
46
|
+
api_latest_date = DateTime.parse(api_file_data.max)
|
47
|
+
worker_latest_date = DateTime.parse(worker_file_data.max)
|
48
|
+
# rubocop:enable Style/DateTime
|
48
49
|
end
|
49
50
|
|
50
51
|
if api_latest_date < worker_latest_date
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.14.2
|
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.14.2
|
@@ -1,2 +1,2 @@
|
|
1
1
|
require_relative "./mailer"
|
2
|
-
require_relative "./mutation"
|
2
|
+
require_relative "./mutation"
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: souls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.35.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
8
8
|
- KishiTheMechanic
|
9
9
|
- James Neve
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-08-
|
13
|
+
date: 2021-08-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- lib/souls/api/update/rspec_resolver.rb
|
127
127
|
- lib/souls/api/update/type.rb
|
128
128
|
- lib/souls/cli/docker/index.rb
|
129
|
+
- lib/souls/cli/gcloud/compute/index.rb
|
129
130
|
- lib/souls/cli/gcloud/iam/index.rb
|
130
131
|
- lib/souls/cli/gcloud/index.rb
|
131
132
|
- lib/souls/cli/gcloud/pubsub/index.rb
|
@@ -145,7 +146,6 @@ files:
|
|
145
146
|
- lib/souls/version.rb
|
146
147
|
- lib/souls/versions/.souls_api_version
|
147
148
|
- lib/souls/versions/.souls_worker_version
|
148
|
-
- lib/souls/worker/generate.rb
|
149
149
|
- lib/souls/worker/generate/index.rb
|
150
150
|
- lib/souls/worker/generate/mailer.rb
|
151
151
|
- lib/souls/worker/generate/mutation.rb
|
@@ -157,7 +157,7 @@ metadata:
|
|
157
157
|
homepage_uri: https://souls.elsoul.nl
|
158
158
|
source_code_uri: https://github.com/elsoul/souls
|
159
159
|
changelog_uri: https://github.com/elsoul/souls
|
160
|
-
post_install_message:
|
160
|
+
post_install_message:
|
161
161
|
rdoc_options: []
|
162
162
|
require_paths:
|
163
163
|
- lib
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
175
|
rubygems_version: 3.2.22
|
176
|
-
signing_key:
|
176
|
+
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: SOULs はサーバーレスフルスタックフレームワークです。柔軟な Ruby GraphQL API と Worker はルーティングの必要がありません。
|
179
179
|
クラウド環境への自動デプロイ、CI/CD ワークフローを標準装備。開発者がビジネスロジックに集中し、楽しくコードが書けるような環境を目指しています。
|
File without changes
|