cpflow 3.0.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.
Files changed (100) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/check_cpln_links.yml +19 -0
  3. data/.github/workflows/command_docs.yml +24 -0
  4. data/.github/workflows/rspec-shared.yml +56 -0
  5. data/.github/workflows/rspec.yml +28 -0
  6. data/.github/workflows/rubocop.yml +24 -0
  7. data/.gitignore +18 -0
  8. data/.overcommit.yml +16 -0
  9. data/.rubocop.yml +22 -0
  10. data/.simplecov_spawn.rb +10 -0
  11. data/CHANGELOG.md +259 -0
  12. data/CONTRIBUTING.md +73 -0
  13. data/Gemfile +7 -0
  14. data/Gemfile.lock +126 -0
  15. data/LICENSE +21 -0
  16. data/README.md +546 -0
  17. data/Rakefile +21 -0
  18. data/bin/cpflow +6 -0
  19. data/cpflow +6 -0
  20. data/cpflow.gemspec +41 -0
  21. data/docs/assets/grafana-alert.png +0 -0
  22. data/docs/assets/memcached.png +0 -0
  23. data/docs/assets/sidekiq-pre-stop-hook.png +0 -0
  24. data/docs/commands.md +454 -0
  25. data/docs/dns.md +15 -0
  26. data/docs/migrating.md +262 -0
  27. data/docs/postgres.md +436 -0
  28. data/docs/redis.md +128 -0
  29. data/docs/secrets-and-env-values.md +42 -0
  30. data/docs/tips.md +150 -0
  31. data/docs/troubleshooting.md +6 -0
  32. data/examples/circleci.yml +104 -0
  33. data/examples/controlplane.yml +159 -0
  34. data/lib/command/apply_template.rb +209 -0
  35. data/lib/command/base.rb +540 -0
  36. data/lib/command/build_image.rb +49 -0
  37. data/lib/command/cleanup_images.rb +136 -0
  38. data/lib/command/cleanup_stale_apps.rb +79 -0
  39. data/lib/command/config.rb +48 -0
  40. data/lib/command/copy_image_from_upstream.rb +108 -0
  41. data/lib/command/delete.rb +149 -0
  42. data/lib/command/deploy_image.rb +56 -0
  43. data/lib/command/doctor.rb +47 -0
  44. data/lib/command/env.rb +22 -0
  45. data/lib/command/exists.rb +23 -0
  46. data/lib/command/generate.rb +45 -0
  47. data/lib/command/info.rb +222 -0
  48. data/lib/command/latest_image.rb +19 -0
  49. data/lib/command/logs.rb +49 -0
  50. data/lib/command/maintenance.rb +42 -0
  51. data/lib/command/maintenance_off.rb +62 -0
  52. data/lib/command/maintenance_on.rb +62 -0
  53. data/lib/command/maintenance_set_page.rb +34 -0
  54. data/lib/command/no_command.rb +23 -0
  55. data/lib/command/open.rb +33 -0
  56. data/lib/command/open_console.rb +26 -0
  57. data/lib/command/promote_app_from_upstream.rb +38 -0
  58. data/lib/command/ps.rb +41 -0
  59. data/lib/command/ps_restart.rb +37 -0
  60. data/lib/command/ps_start.rb +51 -0
  61. data/lib/command/ps_stop.rb +82 -0
  62. data/lib/command/ps_wait.rb +40 -0
  63. data/lib/command/run.rb +573 -0
  64. data/lib/command/setup_app.rb +113 -0
  65. data/lib/command/test.rb +23 -0
  66. data/lib/command/version.rb +18 -0
  67. data/lib/constants/exit_code.rb +7 -0
  68. data/lib/core/config.rb +316 -0
  69. data/lib/core/controlplane.rb +552 -0
  70. data/lib/core/controlplane_api.rb +170 -0
  71. data/lib/core/controlplane_api_direct.rb +112 -0
  72. data/lib/core/doctor_service.rb +104 -0
  73. data/lib/core/helpers.rb +26 -0
  74. data/lib/core/shell.rb +100 -0
  75. data/lib/core/template_parser.rb +76 -0
  76. data/lib/cpflow/version.rb +6 -0
  77. data/lib/cpflow.rb +288 -0
  78. data/lib/deprecated_commands.json +9 -0
  79. data/lib/generator_templates/Dockerfile +27 -0
  80. data/lib/generator_templates/controlplane.yml +62 -0
  81. data/lib/generator_templates/entrypoint.sh +8 -0
  82. data/lib/generator_templates/templates/app.yml +21 -0
  83. data/lib/generator_templates/templates/postgres.yml +176 -0
  84. data/lib/generator_templates/templates/rails.yml +36 -0
  85. data/rakelib/create_release.rake +81 -0
  86. data/script/add_command +37 -0
  87. data/script/check_command_docs +3 -0
  88. data/script/check_cpln_links +45 -0
  89. data/script/rename_command +43 -0
  90. data/script/update_command_docs +62 -0
  91. data/templates/app.yml +13 -0
  92. data/templates/daily-task.yml +32 -0
  93. data/templates/maintenance.yml +25 -0
  94. data/templates/memcached.yml +24 -0
  95. data/templates/postgres.yml +32 -0
  96. data/templates/rails.yml +27 -0
  97. data/templates/redis.yml +21 -0
  98. data/templates/redis2.yml +37 -0
  99. data/templates/sidekiq.yml +38 -0
  100. metadata +341 -0
data/Gemfile.lock ADDED
@@ -0,0 +1,126 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cpflow (3.0.0)
5
+ debug (~> 1.7.1)
6
+ dotenv (~> 2.8.1)
7
+ jwt (~> 2.8.1)
8
+ psych (~> 5.1.0)
9
+ thor (~> 1.2.1)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ addressable (2.8.6)
15
+ public_suffix (>= 2.0.2, < 6.0)
16
+ ast (2.4.2)
17
+ base64 (0.2.0)
18
+ bigdecimal (3.1.7)
19
+ childprocess (4.1.0)
20
+ crack (1.0.0)
21
+ bigdecimal
22
+ rexml
23
+ debug (1.7.2)
24
+ irb (>= 1.5.0)
25
+ reline (>= 0.3.1)
26
+ diff-lcs (1.5.1)
27
+ docile (1.4.0)
28
+ dotenv (2.8.1)
29
+ hashdiff (1.1.0)
30
+ iniparse (1.5.0)
31
+ io-console (0.7.2)
32
+ irb (1.13.2)
33
+ rdoc (>= 4.0.0)
34
+ reline (>= 0.4.2)
35
+ json (2.7.2)
36
+ jwt (2.8.2)
37
+ base64
38
+ overcommit (0.60.0)
39
+ childprocess (>= 0.6.3, < 5)
40
+ iniparse (~> 1.4)
41
+ rexml (~> 3.2)
42
+ parallel (1.24.0)
43
+ parser (3.3.0.5)
44
+ ast (~> 2.4.1)
45
+ racc
46
+ psych (5.1.2)
47
+ stringio
48
+ public_suffix (5.0.5)
49
+ racc (1.7.3)
50
+ rainbow (3.1.1)
51
+ rake (13.2.1)
52
+ rdoc (6.7.0)
53
+ psych (>= 4.0.0)
54
+ regexp_parser (2.9.0)
55
+ reline (0.5.9)
56
+ io-console (~> 0.5)
57
+ rexml (3.2.6)
58
+ rspec (3.12.0)
59
+ rspec-core (~> 3.12.0)
60
+ rspec-expectations (~> 3.12.0)
61
+ rspec-mocks (~> 3.12.0)
62
+ rspec-core (3.12.3)
63
+ rspec-support (~> 3.12.0)
64
+ rspec-expectations (3.12.4)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.12.0)
67
+ rspec-mocks (3.12.7)
68
+ diff-lcs (>= 1.2.0, < 2.0)
69
+ rspec-support (~> 3.12.0)
70
+ rspec-retry (0.6.2)
71
+ rspec-core (> 3.3)
72
+ rspec-support (3.12.2)
73
+ rubocop (1.45.1)
74
+ json (~> 2.3)
75
+ parallel (~> 1.10)
76
+ parser (>= 3.2.0.0)
77
+ rainbow (>= 2.2.2, < 4.0)
78
+ regexp_parser (>= 1.8, < 3.0)
79
+ rexml (>= 3.2.5, < 4.0)
80
+ rubocop-ast (>= 1.24.1, < 2.0)
81
+ ruby-progressbar (~> 1.7)
82
+ unicode-display_width (>= 2.4.0, < 3.0)
83
+ rubocop-ast (1.31.2)
84
+ parser (>= 3.3.0.4)
85
+ rubocop-capybara (2.20.0)
86
+ rubocop (~> 1.41)
87
+ rubocop-rake (0.6.0)
88
+ rubocop (~> 1.0)
89
+ rubocop-rspec (2.18.1)
90
+ rubocop (~> 1.33)
91
+ rubocop-capybara (~> 2.17)
92
+ ruby-progressbar (1.13.0)
93
+ simplecov (0.22.0)
94
+ docile (~> 1.1)
95
+ simplecov-html (~> 0.11)
96
+ simplecov_json_formatter (~> 0.1)
97
+ simplecov-html (0.12.3)
98
+ simplecov_json_formatter (0.1.4)
99
+ stringio (3.1.1)
100
+ thor (1.2.2)
101
+ timecop (0.9.8)
102
+ unicode-display_width (2.5.0)
103
+ webmock (3.18.1)
104
+ addressable (>= 2.8.0)
105
+ crack (>= 0.3.2)
106
+ hashdiff (>= 0.4.0, < 2.0.0)
107
+
108
+ PLATFORMS
109
+ ruby
110
+ x86_64-linux
111
+
112
+ DEPENDENCIES
113
+ cpflow!
114
+ overcommit (~> 0.60.0)
115
+ rake (~> 13.0)
116
+ rspec (~> 3.12.0)
117
+ rspec-retry (~> 0.6.2)
118
+ rubocop (~> 1.45.0)
119
+ rubocop-rake (~> 0.6.0)
120
+ rubocop-rspec (~> 2.18.1)
121
+ simplecov (~> 0.22.0)
122
+ timecop (~> 0.9.6)
123
+ webmock (~> 3.18.1)
124
+
125
+ BUNDLED WITH
126
+ 2.3.26
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 ShakaCode
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.