rails-gke 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.rubocop.yml +191 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +34 -0
- data/LICENSE.txt +67 -0
- data/README.md +256 -0
- data/Rakefile +15 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/config/initializers/rails-gke.rb +9 -0
- data/deployment.yml +46 -0
- data/exe/create_yml +4 -0
- data/exe/rails_gke_init +60 -0
- data/exe/rails_gke_init_task +18 -0
- data/ingress.yml +17 -0
- data/lib/rails/gke.rb +284 -0
- data/lib/rails/gke/initialize.rb +8 -0
- data/lib/rails/gke/initialize/initialize.rb +604 -0
- data/lib/rails/gke/version.rb +5 -0
- data/rails-gke.gemspec +29 -0
- data/rails-gke.rb +11 -0
- data/secret.yml +10 -0
- data/service.yml +14 -0
- data/yank_all.rb +25 -0
- metadata +77 -0
data/rails-gke.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative "lib/rails/gke/version"
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "rails-gke"
|
5
|
+
spec.version = Rails::Gke::VERSION
|
6
|
+
spec.authors = ["Fumitake Kawasaki"]
|
7
|
+
spec.email = ["fumitake.kawasaki@el-soul.com"]
|
8
|
+
|
9
|
+
spec.summary = "Ruby on Rails GKE Deploy Kit"
|
10
|
+
spec.description = "This gem is migrated to `souls` gem. Please go to `souls` gem."
|
11
|
+
spec.homepage = "https://github.com/elsoul/rails-gke"
|
12
|
+
spec.license = "Apache-2.0"
|
13
|
+
spec.metadata = { "source_code_uri" => "https://github.com/elsoul/rails-gke" }
|
14
|
+
spec.required_ruby_version = ">= 2.7.0"
|
15
|
+
# spec.metadata["allowed_push_host"] = "https://hotel.el-soul.com"
|
16
|
+
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/elsoul/rails-gke"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/elsoul/rails-gke"
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
end
|
data/rails-gke.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
## Config Example
|
2
|
+
# It's better to use ENV to define values.
|
3
|
+
Rails::Gke.configure do |config|
|
4
|
+
config.project_id = "elsoul"
|
5
|
+
config.app = "elsoul-api"
|
6
|
+
config.network = "elsoul-blog"
|
7
|
+
config.machine_type = "custom-1-6656"
|
8
|
+
config.zone = "asia-northeast1"
|
9
|
+
config.domain = "rails-gke.el-soul.com"
|
10
|
+
config.google_application_credentials = "config/credentials.json"
|
11
|
+
end
|
data/secret.yml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
## This is example secret.yml generated by command
|
2
|
+
apiVersion: v1
|
3
|
+
kind: Secret
|
4
|
+
metadata:
|
5
|
+
name: rails-gke-secret
|
6
|
+
type: Opaque
|
7
|
+
data: # you need to encrypt value by base64. e.g. `echo -n "secret" | base64` in your terminal.
|
8
|
+
db_user: dXNlcg==
|
9
|
+
db_pw: cGFzc3dvcmQ=
|
10
|
+
db_host: bG9jYWxob3N0
|
data/service.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
## This is example service.yml generated by command
|
2
|
+
kind: Service
|
3
|
+
apiVersion: v1
|
4
|
+
metadata:
|
5
|
+
name: rails-gke-service
|
6
|
+
spec:
|
7
|
+
selector:
|
8
|
+
app: rails-gke
|
9
|
+
type: LoadBalancer
|
10
|
+
ports:
|
11
|
+
- name: http
|
12
|
+
protocol: TCP
|
13
|
+
port: 80
|
14
|
+
targetPort: 3000
|
data/yank_all.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
|
4
|
+
require'json'
|
5
|
+
def yank
|
6
|
+
gemname = (ARGV.index('-g') && ARGV[ARGV.index('-g') + 1]) || (puts('Please enter gem name:') || gets.strip)
|
7
|
+
data = JSON.parse `curl -s https://rubygems.org/api/v1/versions/#{gemname}.json`
|
8
|
+
versions = data.map {|v| v['number']} .reverse
|
9
|
+
puts "\n\n#{gemname} versions: #{versions.join ', '}"
|
10
|
+
puts "\nHow many versions to yank (starting at the first release) (none/ALL/number)?"
|
11
|
+
|
12
|
+
case (answer = gets.strip)
|
13
|
+
when /ALL/
|
14
|
+
puts "Yanking ALL versions!"
|
15
|
+
versions.each {|v| puts `gem yank #{gemname} -v #{v}`;sleep 30 }
|
16
|
+
when /^[\-\d]+$/
|
17
|
+
versions = versions[0...answer.to_i]
|
18
|
+
puts "Yanking versions: #{versions.join ', '}"
|
19
|
+
versions.each {|v| puts `gem yank #{gemname} -v #{v}` }
|
20
|
+
else
|
21
|
+
puts "No action was performed"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
yank
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails-gke
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.9
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Fumitake Kawasaki
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-12-26 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: This gem is migrated to `souls` gem. Please go to `souls` gem.
|
14
|
+
email:
|
15
|
+
- fumitake.kawasaki@el-soul.com
|
16
|
+
executables:
|
17
|
+
- create_yml
|
18
|
+
- rails_gke_init
|
19
|
+
- rails_gke_init_task
|
20
|
+
extensions: []
|
21
|
+
extra_rdoc_files: []
|
22
|
+
files:
|
23
|
+
- ".gitignore"
|
24
|
+
- ".rspec"
|
25
|
+
- ".rubocop.yml"
|
26
|
+
- ".ruby-version"
|
27
|
+
- ".travis.yml"
|
28
|
+
- CODE_OF_CONDUCT.md
|
29
|
+
- Gemfile
|
30
|
+
- Gemfile.lock
|
31
|
+
- LICENSE.txt
|
32
|
+
- README.md
|
33
|
+
- Rakefile
|
34
|
+
- bin/console
|
35
|
+
- bin/setup
|
36
|
+
- config/initializers/rails-gke.rb
|
37
|
+
- deployment.yml
|
38
|
+
- exe/create_yml
|
39
|
+
- exe/rails_gke_init
|
40
|
+
- exe/rails_gke_init_task
|
41
|
+
- ingress.yml
|
42
|
+
- lib/rails/gke.rb
|
43
|
+
- lib/rails/gke/initialize.rb
|
44
|
+
- lib/rails/gke/initialize/initialize.rb
|
45
|
+
- lib/rails/gke/version.rb
|
46
|
+
- rails-gke.gemspec
|
47
|
+
- rails-gke.rb
|
48
|
+
- secret.yml
|
49
|
+
- service.yml
|
50
|
+
- yank_all.rb
|
51
|
+
homepage: https://github.com/elsoul/rails-gke
|
52
|
+
licenses:
|
53
|
+
- Apache-2.0
|
54
|
+
metadata:
|
55
|
+
source_code_uri: https://github.com/elsoul/rails-gke
|
56
|
+
homepage_uri: https://github.com/elsoul/rails-gke
|
57
|
+
changelog_uri: https://github.com/elsoul/rails-gke
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options: []
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 2.7.0
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
requirements: []
|
73
|
+
rubygems_version: 3.1.4
|
74
|
+
signing_key:
|
75
|
+
specification_version: 4
|
76
|
+
summary: Ruby on Rails GKE Deploy Kit
|
77
|
+
test_files: []
|