cpl 0.7.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/command_docs.yml +24 -0
- data/.github/workflows/rspec.yml +8 -5
- data/.github/workflows/rubocop.yml +5 -2
- data/.gitignore +1 -0
- data/.overcommit.yml +3 -0
- data/Gemfile.lock +4 -4
- data/README.md +152 -125
- data/Rakefile +7 -2
- data/docs/assets/grafana-alert.png +0 -0
- data/docs/assets/memcached.png +0 -0
- data/docs/assets/sidekiq-pre-stop-hook.png +0 -0
- data/docs/commands.md +2 -2
- data/docs/tips.md +177 -0
- data/examples/circleci.yml +8 -9
- data/examples/controlplane.yml +16 -14
- data/lib/command/base.rb +8 -14
- data/lib/command/cleanup_stale_apps.rb +1 -0
- data/lib/command/run.rb +8 -6
- data/lib/command/run_detached.rb +12 -8
- data/lib/core/scripts.rb +2 -2
- data/lib/cpl/version.rb +2 -1
- data/lib/cpl.rb +42 -1
- data/script/check_command_docs +3 -0
- data/script/{generate_commands_docs → update_command_docs} +2 -2
- data/templates/daily-task.yml +5 -4
- data/templates/maintenance.yml +4 -3
- data/templates/memcached.yml +3 -2
- data/templates/postgres.yml +3 -2
- data/templates/rails.yml +3 -2
- data/templates/redis.yml +2 -1
- data/templates/sidekiq.yml +13 -4
- metadata +9 -3
data/templates/postgres.yml
CHANGED
@@ -13,17 +13,18 @@ spec:
|
|
13
13
|
value: password123
|
14
14
|
- name: POSTGRES_USER
|
15
15
|
value: postgres
|
16
|
-
image:
|
16
|
+
image: "postgres:13.8-alpine"
|
17
17
|
ports:
|
18
18
|
- number: 5432
|
19
19
|
protocol: tcp
|
20
20
|
volumes:
|
21
21
|
- path: /var/lib/postgresql/data
|
22
22
|
recoveryPolicy: retain
|
23
|
-
uri:
|
23
|
+
uri: "scratch://postgres-vol"
|
24
24
|
defaultOptions:
|
25
25
|
autoscaling:
|
26
26
|
metric: latency
|
27
|
+
minScale: 1
|
27
28
|
maxScale: 1
|
28
29
|
capacityAI: false
|
29
30
|
firewallConfig:
|
data/templates/rails.yml
CHANGED
@@ -5,14 +5,15 @@ spec:
|
|
5
5
|
containers:
|
6
6
|
- name: rails
|
7
7
|
cpu: 512m
|
8
|
-
inheritEnv: true
|
9
|
-
image: '/org/APP_ORG/image/APP_IMAGE'
|
10
8
|
memory: 1Gi
|
9
|
+
inheritEnv: true
|
10
|
+
image: "/org/APP_ORG/image/APP_IMAGE"
|
11
11
|
ports:
|
12
12
|
- number: 3000
|
13
13
|
protocol: http
|
14
14
|
defaultOptions:
|
15
15
|
autoscaling:
|
16
|
+
minScale: 1
|
16
17
|
maxScale: 1
|
17
18
|
capacityAI: false
|
18
19
|
timeoutSeconds: 60
|
data/templates/redis.yml
CHANGED
@@ -6,13 +6,14 @@ spec:
|
|
6
6
|
- name: redis
|
7
7
|
cpu: 3m
|
8
8
|
memory: 20Mi
|
9
|
-
image:
|
9
|
+
image: "redis:latest"
|
10
10
|
ports:
|
11
11
|
- number: 6379
|
12
12
|
protocol: tcp
|
13
13
|
defaultOptions:
|
14
14
|
autoscaling:
|
15
15
|
metric: latency
|
16
|
+
minScale: 1
|
16
17
|
maxScale: 1
|
17
18
|
capacityAI: false
|
18
19
|
firewallConfig:
|
data/templates/sidekiq.yml
CHANGED
@@ -4,21 +4,30 @@ spec:
|
|
4
4
|
type: standard
|
5
5
|
containers:
|
6
6
|
- name: sidekiq
|
7
|
+
cpu: 50m
|
8
|
+
memory: 256Mi
|
7
9
|
args:
|
8
10
|
- bundle
|
9
11
|
- exec
|
10
12
|
- sidekiq
|
11
|
-
-
|
13
|
+
- "-C"
|
12
14
|
- config/sidekiq.yml
|
13
|
-
cpu: 50m
|
14
15
|
inheritEnv: true
|
15
|
-
image:
|
16
|
-
memory: 256Mi
|
16
|
+
image: "/org/APP_ORG/image/APP_IMAGE"
|
17
17
|
ports:
|
18
18
|
- number: 7433
|
19
19
|
protocol: http
|
20
|
+
lifecycle:
|
21
|
+
preStop:
|
22
|
+
exec:
|
23
|
+
command:
|
24
|
+
- pkill
|
25
|
+
- "-TSTP"
|
26
|
+
- "-f"
|
27
|
+
- ^sidekiq\s
|
20
28
|
defaultOptions:
|
21
29
|
autoscaling:
|
30
|
+
minScale: 1
|
22
31
|
maxScale: 1
|
23
32
|
capacityAI: false
|
24
33
|
firewallConfig:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: debug
|
@@ -202,6 +202,7 @@ executables:
|
|
202
202
|
extensions: []
|
203
203
|
extra_rdoc_files: []
|
204
204
|
files:
|
205
|
+
- ".github/workflows/command_docs.yml"
|
205
206
|
- ".github/workflows/rspec.yml"
|
206
207
|
- ".github/workflows/rubocop.yml"
|
207
208
|
- ".gitignore"
|
@@ -218,9 +219,13 @@ files:
|
|
218
219
|
- bin/cpl
|
219
220
|
- cpl
|
220
221
|
- cpl.gemspec
|
222
|
+
- docs/assets/grafana-alert.png
|
223
|
+
- docs/assets/memcached.png
|
224
|
+
- docs/assets/sidekiq-pre-stop-hook.png
|
221
225
|
- docs/commands.md
|
222
226
|
- docs/postgres.md
|
223
227
|
- docs/redis.md
|
228
|
+
- docs/tips.md
|
224
229
|
- docs/troubleshooting.md
|
225
230
|
- examples/circleci.yml
|
226
231
|
- examples/controlplane.yml
|
@@ -269,8 +274,9 @@ files:
|
|
269
274
|
- lib/main.rb
|
270
275
|
- rakelib/create_release.rake
|
271
276
|
- script/add_command
|
272
|
-
- script/
|
277
|
+
- script/check_command_docs
|
273
278
|
- script/rename_command
|
279
|
+
- script/update_command_docs
|
274
280
|
- templates/daily-task.yml
|
275
281
|
- templates/gvc.yml
|
276
282
|
- templates/identity.yml
|