aptible-cli 0.21.0 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +50 -0
- data/Gemfile +0 -4
- data/Gemfile.lock +17 -22
- data/README.md +81 -76
- data/aptible-cli.gemspec +12 -9
- data/lib/aptible/cli/resource_formatter.rb +29 -0
- data/lib/aptible/cli/subcommands/endpoints.rb +30 -0
- data/lib/aptible/cli/subcommands/services.rb +171 -0
- data/lib/aptible/cli/version.rb +1 -1
- data/spec/aptible/cli/subcommands/endpoints_spec.rb +38 -0
- data/spec/aptible/cli/subcommands/services_spec.rb +143 -26
- data/spec/fabricators/service_sizing_policy_fabricator.rb +22 -0
- metadata +86 -42
- data/.travis.yml +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 809d2d53a19fb2e5d1994590b45fc667fff94712030b79ad9d235a0fa8012f02
|
4
|
+
data.tar.gz: fae62dfb569ad369bda8d20f593bcd350e57eff1a2abc4fa6cafb6b9041f8e8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a93f2032ad6c569056d5a8cdf21034cf35147d0d12031b6c907a0e2b6984a7c895db2c6f01135e36d8d1d24e3a838174851de367cb7f34ec9c34016c8c6525d
|
7
|
+
data.tar.gz: 8f67f7b07595457831aa438ff718470137496cd35244964bfb050adfda3ee093f8fc87cad364b2b0e3d42d6015eee2582bcdd8eeeca2707f3dc48e4f060e2c7a
|
@@ -0,0 +1,50 @@
|
|
1
|
+
on:
|
2
|
+
pull_request:
|
3
|
+
branches:
|
4
|
+
- main
|
5
|
+
- master
|
6
|
+
push:
|
7
|
+
branches:
|
8
|
+
- main
|
9
|
+
- master
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
name: Build and Publish
|
14
|
+
runs-on: ubuntu-20.04
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby-version: [2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7]
|
19
|
+
steps:
|
20
|
+
- name: Check out code
|
21
|
+
uses: actions/checkout@v4
|
22
|
+
|
23
|
+
- name: Setup ruby
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby-version }}
|
27
|
+
bundler: 1.17.3
|
28
|
+
bundler-cache: true
|
29
|
+
|
30
|
+
- name: Test
|
31
|
+
run: bundle exec rake
|
32
|
+
|
33
|
+
- name: Sync README
|
34
|
+
run: |
|
35
|
+
bundle exec script/sync-readme-usage
|
36
|
+
git diff --exit-code
|
37
|
+
|
38
|
+
results:
|
39
|
+
if: ${{ always() }}
|
40
|
+
runs-on: ubuntu-latest
|
41
|
+
name: Final Results
|
42
|
+
needs: [test]
|
43
|
+
steps:
|
44
|
+
- run: exit 1
|
45
|
+
# see https://stackoverflow.com/a/67532120/4907315
|
46
|
+
if: >-
|
47
|
+
${{
|
48
|
+
contains(needs.*.result, 'failure')
|
49
|
+
|| contains(needs.*.result, 'cancelled')
|
50
|
+
}}
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,28 +1,21 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/fancyremarker/pry.git
|
3
|
-
revision: be3823aa4ffc51260f2f3ce84f0984da3dc6dd10
|
4
|
-
branch: aptible
|
5
|
-
specs:
|
6
|
-
pry (0.10.0)
|
7
|
-
coderay (~> 1.1.0)
|
8
|
-
method_source (~> 0.8.1)
|
9
|
-
slop (~> 3.4)
|
10
|
-
|
11
1
|
PATH
|
12
2
|
remote: .
|
13
3
|
specs:
|
14
|
-
aptible-cli (0.
|
4
|
+
aptible-cli (0.23.0)
|
15
5
|
activesupport (>= 4.0, < 6.0)
|
16
|
-
aptible-api (~> 1.5
|
17
|
-
aptible-auth (~> 1.2.
|
6
|
+
aptible-api (~> 1.6.5)
|
7
|
+
aptible-auth (~> 1.2.5)
|
18
8
|
aptible-billing (~> 1.0)
|
19
9
|
aptible-resource (~> 1.1)
|
20
10
|
aws-sdk (~> 2.0)
|
21
11
|
bigdecimal (~> 1.3.5)
|
22
12
|
cbor
|
23
13
|
chronic_duration (~> 0.10.6)
|
14
|
+
concurrent-ruby (< 1.1.10)
|
24
15
|
git (< 1.10)
|
25
|
-
|
16
|
+
jwt (~> 2.3.0)
|
17
|
+
rack (~> 1.0)
|
18
|
+
term-ansicolor (~> 1.8.0)
|
26
19
|
thor (~> 0.20.0)
|
27
20
|
|
28
21
|
GEM
|
@@ -35,9 +28,9 @@ GEM
|
|
35
28
|
tzinfo (~> 1.1)
|
36
29
|
addressable (2.8.0)
|
37
30
|
public_suffix (>= 2.0.2, < 5.0)
|
38
|
-
aptible-api (1.5
|
39
|
-
aptible-auth
|
40
|
-
aptible-resource
|
31
|
+
aptible-api (1.6.5)
|
32
|
+
aptible-auth
|
33
|
+
aptible-resource
|
41
34
|
gem_config
|
42
35
|
multipart-post (< 2.2.0)
|
43
36
|
aptible-auth (1.2.5)
|
@@ -92,14 +85,14 @@ GEM
|
|
92
85
|
gem_config (0.3.2)
|
93
86
|
git (1.7.0)
|
94
87
|
rchardet (~> 1.8)
|
95
|
-
hashdiff (1.1.
|
88
|
+
hashdiff (1.1.1)
|
96
89
|
httpclient (2.8.3)
|
97
90
|
i18n (0.9.5)
|
98
91
|
concurrent-ruby (~> 1.0)
|
99
92
|
jmespath (1.6.2)
|
100
93
|
json (2.5.1)
|
101
94
|
jwt (2.3.0)
|
102
|
-
method_source (
|
95
|
+
method_source (1.1.0)
|
103
96
|
minitest (5.12.0)
|
104
97
|
multi_json (1.15.0)
|
105
98
|
multi_xml (0.6.0)
|
@@ -116,6 +109,9 @@ GEM
|
|
116
109
|
parser (2.7.2.0)
|
117
110
|
ast (~> 2.4.1)
|
118
111
|
powerpack (0.1.3)
|
112
|
+
pry (0.14.2)
|
113
|
+
coderay (~> 1.1)
|
114
|
+
method_source (~> 1.0)
|
119
115
|
public_suffix (3.1.1)
|
120
116
|
rack (1.6.13)
|
121
117
|
rainbow (2.2.2)
|
@@ -129,7 +125,7 @@ GEM
|
|
129
125
|
rspec-mocks (~> 3.13.0)
|
130
126
|
rspec-core (3.13.0)
|
131
127
|
rspec-support (~> 3.13.0)
|
132
|
-
rspec-expectations (3.13.
|
128
|
+
rspec-expectations (3.13.1)
|
133
129
|
diff-lcs (>= 1.2.0, < 2.0)
|
134
130
|
rspec-support (~> 3.13.0)
|
135
131
|
rspec-mocks (3.13.1)
|
@@ -143,7 +139,6 @@ GEM
|
|
143
139
|
ruby-progressbar (~> 1.7)
|
144
140
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
145
141
|
ruby-progressbar (1.13.0)
|
146
|
-
slop (3.6.0)
|
147
142
|
stripe (4.24.0)
|
148
143
|
faraday (~> 0.13)
|
149
144
|
net-http-persistent (~> 3.0)
|
@@ -174,7 +169,7 @@ DEPENDENCIES
|
|
174
169
|
bundler (~> 1.3)
|
175
170
|
climate_control (= 0.0.3)
|
176
171
|
fabrication (~> 2.15.2)
|
177
|
-
pry
|
172
|
+
pry
|
178
173
|
rack (~> 1.0)
|
179
174
|
rake
|
180
175
|
rspec (~> 3.2)
|
data/README.md
CHANGED
@@ -26,82 +26,87 @@ From `aptible help`:
|
|
26
26
|
<!-- BEGIN USAGE -->
|
27
27
|
```
|
28
28
|
Commands:
|
29
|
-
aptible apps
|
30
|
-
aptible apps:create HANDLE
|
31
|
-
aptible apps:deprovision
|
32
|
-
aptible apps:rename OLD_HANDLE NEW_HANDLE [--environment ENVIRONMENT_HANDLE]
|
33
|
-
aptible apps:scale SERVICE [--container-count COUNT] [--container-size SIZE_MB] [--container-profile PROFILE]
|
34
|
-
aptible backup:list DB_HANDLE
|
35
|
-
aptible backup:orphaned
|
36
|
-
aptible backup:purge BACKUP_ID
|
37
|
-
aptible backup:restore BACKUP_ID [--environment ENVIRONMENT_HANDLE] [--handle HANDLE] [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--key-arn KEY_ARN]
|
38
|
-
aptible backup_retention_policy [ENVIRONMENT_HANDLE]
|
39
|
-
aptible backup_retention_policy:set [ENVIRONMENT_HANDLE] [--daily DAILY_BACKUPS] [--monthly MONTHLY_BACKUPS] [--yearly YEARLY_BACKUPS] [--make-copy|--no-make-copy] [--keep-final|--no-keep-final] [--force]
|
40
|
-
aptible config
|
41
|
-
aptible config:add [VAR1=VAL1] [VAR2=VAL2] [...]
|
42
|
-
aptible config:get [VAR1]
|
43
|
-
aptible config:rm [VAR1] [VAR2] [...]
|
44
|
-
aptible config:set [VAR1=VAL1] [VAR2=VAL2] [...]
|
45
|
-
aptible config:unset [VAR1] [VAR2] [...]
|
46
|
-
aptible db:backup HANDLE
|
47
|
-
aptible db:clone SOURCE DEST
|
48
|
-
aptible db:create HANDLE [--type TYPE] [--version VERSION] [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--key-arn KEY_ARN]
|
49
|
-
aptible db:deprovision HANDLE
|
50
|
-
aptible db:dump HANDLE [pg_dump options]
|
51
|
-
aptible db:execute HANDLE SQL_FILE [--on-error-stop]
|
52
|
-
aptible db:list
|
53
|
-
aptible db:modify HANDLE [--iops IOPS] [--volume-type [gp2, gp3]]
|
54
|
-
aptible db:reload HANDLE
|
55
|
-
aptible db:rename OLD_HANDLE NEW_HANDLE [--environment ENVIRONMENT_HANDLE]
|
56
|
-
aptible db:replicate HANDLE REPLICA_HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--logical --version VERSION] [--key-arn KEY_ARN]
|
57
|
-
aptible db:restart HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--volume-type [gp2, gp3]]
|
58
|
-
aptible db:tunnel HANDLE
|
59
|
-
aptible db:url HANDLE
|
60
|
-
aptible db:versions
|
61
|
-
aptible deploy [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...]
|
62
|
-
aptible endpoints:database:create DATABASE
|
63
|
-
aptible endpoints:database:modify --database DATABASE ENDPOINT_HOSTNAME
|
64
|
-
aptible endpoints:deprovision [--app APP | --database DATABASE] ENDPOINT_HOSTNAME
|
65
|
-
aptible endpoints:
|
66
|
-
aptible endpoints:
|
67
|
-
aptible endpoints:
|
68
|
-
aptible endpoints:
|
69
|
-
aptible endpoints:
|
70
|
-
aptible endpoints:
|
71
|
-
aptible endpoints:
|
72
|
-
aptible endpoints:
|
73
|
-
aptible
|
74
|
-
aptible
|
75
|
-
aptible environment:
|
76
|
-
aptible
|
77
|
-
aptible
|
78
|
-
aptible
|
79
|
-
aptible log_drain:create:
|
80
|
-
aptible log_drain:create:
|
81
|
-
aptible log_drain:create:
|
82
|
-
aptible log_drain:create:
|
83
|
-
aptible log_drain:create:
|
84
|
-
aptible log_drain:
|
85
|
-
aptible log_drain:
|
86
|
-
aptible
|
87
|
-
aptible
|
88
|
-
aptible
|
89
|
-
aptible
|
90
|
-
aptible
|
91
|
-
aptible
|
92
|
-
aptible
|
93
|
-
aptible metric_drain:create:
|
94
|
-
aptible metric_drain:create:influxdb
|
95
|
-
aptible metric_drain:
|
96
|
-
aptible metric_drain:
|
97
|
-
aptible
|
98
|
-
aptible
|
99
|
-
aptible operation:
|
100
|
-
aptible
|
101
|
-
aptible
|
102
|
-
aptible
|
103
|
-
aptible
|
104
|
-
aptible
|
29
|
+
aptible apps # List all applications
|
30
|
+
aptible apps:create HANDLE # Create a new application
|
31
|
+
aptible apps:deprovision # Deprovision an app
|
32
|
+
aptible apps:rename OLD_HANDLE NEW_HANDLE [--environment ENVIRONMENT_HANDLE] # Rename an app handle. In order for the new app handle to appear in log drain and metric drain destinations, you must restart the app.
|
33
|
+
aptible apps:scale SERVICE [--container-count COUNT] [--container-size SIZE_MB] [--container-profile PROFILE] # Scale a service
|
34
|
+
aptible backup:list DB_HANDLE # List backups for a database
|
35
|
+
aptible backup:orphaned # List backups associated with deprovisioned databases
|
36
|
+
aptible backup:purge BACKUP_ID # Permanently delete a backup and any copies of it
|
37
|
+
aptible backup:restore BACKUP_ID [--environment ENVIRONMENT_HANDLE] [--handle HANDLE] [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--key-arn KEY_ARN] # Restore a backup
|
38
|
+
aptible backup_retention_policy [ENVIRONMENT_HANDLE] # Show the current backup retention policy for the environment
|
39
|
+
aptible backup_retention_policy:set [ENVIRONMENT_HANDLE] [--daily DAILY_BACKUPS] [--monthly MONTHLY_BACKUPS] [--yearly YEARLY_BACKUPS] [--make-copy|--no-make-copy] [--keep-final|--no-keep-final] [--force] # Change the environment's backup retention policy
|
40
|
+
aptible config # Print an app's current configuration
|
41
|
+
aptible config:add [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
|
42
|
+
aptible config:get [VAR1] # Print a specific key within an app's current configuration
|
43
|
+
aptible config:rm [VAR1] [VAR2] [...] # Remove an ENV variable from an app
|
44
|
+
aptible config:set [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
|
45
|
+
aptible config:unset [VAR1] [VAR2] [...] # Remove an ENV variable from an app
|
46
|
+
aptible db:backup HANDLE # Backup a database
|
47
|
+
aptible db:clone SOURCE DEST # Clone a database to create a new one
|
48
|
+
aptible db:create HANDLE [--type TYPE] [--version VERSION] [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--key-arn KEY_ARN] # Create a new database
|
49
|
+
aptible db:deprovision HANDLE # Deprovision a database
|
50
|
+
aptible db:dump HANDLE [pg_dump options] # Dump a remote database to file
|
51
|
+
aptible db:execute HANDLE SQL_FILE [--on-error-stop] # Executes sql against a database
|
52
|
+
aptible db:list # List all databases
|
53
|
+
aptible db:modify HANDLE [--iops IOPS] [--volume-type [gp2, gp3]] # Modify a database disk
|
54
|
+
aptible db:reload HANDLE # Reload a database
|
55
|
+
aptible db:rename OLD_HANDLE NEW_HANDLE [--environment ENVIRONMENT_HANDLE] # Rename a database handle. In order for the new database handle to appear in log drain and metric drain destinations, you must reload the database.
|
56
|
+
aptible db:replicate HANDLE REPLICA_HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--logical --version VERSION] [--key-arn KEY_ARN] # Create a replica/follower of a database
|
57
|
+
aptible db:restart HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--volume-type [gp2, gp3]] # Restart a database
|
58
|
+
aptible db:tunnel HANDLE # Create a local tunnel to a database
|
59
|
+
aptible db:url HANDLE # Display a database URL
|
60
|
+
aptible db:versions # List available database versions
|
61
|
+
aptible deploy [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...] # Deploy an app
|
62
|
+
aptible endpoints:database:create DATABASE # Create a Database Endpoint
|
63
|
+
aptible endpoints:database:modify --database DATABASE ENDPOINT_HOSTNAME # Modify a Database Endpoint
|
64
|
+
aptible endpoints:deprovision [--app APP | --database DATABASE] ENDPOINT_HOSTNAME # Deprovision an App or Database Endpoint
|
65
|
+
aptible endpoints:grpc:create [--app APP] SERVICE # Create an App gRPC Endpoint
|
66
|
+
aptible endpoints:grpc:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App gRPC Endpoint
|
67
|
+
aptible endpoints:https:create [--app APP] SERVICE # Create an App HTTPS Endpoint
|
68
|
+
aptible endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App HTTPS Endpoint
|
69
|
+
aptible endpoints:list [--app APP | --database DATABASE] # List Endpoints for an App or Database
|
70
|
+
aptible endpoints:renew [--app APP] ENDPOINT_HOSTNAME # Renew an App Managed TLS Endpoint
|
71
|
+
aptible endpoints:tcp:create [--app APP] SERVICE # Create an App TCP Endpoint
|
72
|
+
aptible endpoints:tcp:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TCP Endpoint
|
73
|
+
aptible endpoints:tls:create [--app APP] SERVICE # Create an App TLS Endpoint
|
74
|
+
aptible endpoints:tls:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TLS Endpoint
|
75
|
+
aptible environment:ca_cert # Retrieve the CA certificate associated with the environment
|
76
|
+
aptible environment:list # List all environments
|
77
|
+
aptible environment:rename OLD_HANDLE NEW_HANDLE # Rename an environment handle. In order for the new environment handle to appear in log drain/metric destinations, you must restart the apps/databases in this environment.
|
78
|
+
aptible help [COMMAND] # Describe available commands or one specific command
|
79
|
+
aptible log_drain:create:datadog HANDLE --url DATADOG_URL --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a Datadog Log Drain
|
80
|
+
aptible log_drain:create:elasticsearch HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create an Elasticsearch Log Drain
|
81
|
+
aptible log_drain:create:https HANDLE --url URL --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a HTTPS Drain
|
82
|
+
aptible log_drain:create:logdna HANDLE --url LOGDNA_URL --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a LogDNA Log Drain
|
83
|
+
aptible log_drain:create:papertrail HANDLE --host PAPERTRAIL_HOST --port PAPERTRAIL_PORT --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a Papertrail Log Drain
|
84
|
+
aptible log_drain:create:sumologic HANDLE --url SUMOLOGIC_URL --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a Sumologic Drain
|
85
|
+
aptible log_drain:create:syslog HANDLE --host SYSLOG_HOST --port SYSLOG_PORT [--token TOKEN] --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a Papertrail Log Drain
|
86
|
+
aptible log_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a log drain
|
87
|
+
aptible log_drain:list # List all Log Drains
|
88
|
+
aptible login # Log in to Aptible
|
89
|
+
aptible logs [--app APP | --database DATABASE] # Follows logs from a running app or database
|
90
|
+
aptible logs_from_archive --bucket NAME --region REGION --stack NAME [ --decryption-keys ONE [OR MORE] ] [ --download-location LOCATION ] [ [ --string-matches ONE [OR MORE] ] | [ --app-id ID | --database-id ID | --endpoint-id ID | --container-id ID ] [ --start-date YYYY-MM-DD --end-date YYYY-MM-DD ] ] --bucket=BUCKET --region=REGION --stack=STACK # Retrieves container logs from an S3 archive in your own AWS account. You must provide your AWS credentials via the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
|
91
|
+
aptible maintenance:apps # List Apps impacted by maintenance schedules where restarts are required
|
92
|
+
aptible maintenance:dbs # List Databases impacted by maintenance schedules where restarts are required
|
93
|
+
aptible metric_drain:create:datadog HANDLE --api_key DATADOG_API_KEY --site DATADOG_SITE --environment ENVIRONMENT # Create a Datadog Metric Drain
|
94
|
+
aptible metric_drain:create:influxdb HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT # Create an InfluxDB Metric Drain
|
95
|
+
aptible metric_drain:create:influxdb:custom HANDLE --username USERNAME --password PASSWORD --url URL_INCLUDING_PORT --db INFLUX_DATABASE_NAME --environment ENVIRONMENT # Create an InfluxDB Metric Drain
|
96
|
+
aptible metric_drain:create:influxdb:customv2 HANDLE --org ORGANIZATION --token INFLUX_TOKEN --url URL_INCLUDING_PORT --bucket INFLUX_BUCKET_NAME --environment ENVIRONMENT # Create an InfluxDB v2 Metric Drain
|
97
|
+
aptible metric_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a Metric Drain
|
98
|
+
aptible metric_drain:list # List all Metric Drains
|
99
|
+
aptible operation:cancel OPERATION_ID # Cancel a running operation
|
100
|
+
aptible operation:follow OPERATION_ID # Follow logs of a running operation
|
101
|
+
aptible operation:logs OPERATION_ID # View logs for given operation
|
102
|
+
aptible rebuild # Rebuild an app, and restart its services
|
103
|
+
aptible restart # Restart all services associated with an app
|
104
|
+
aptible services # List Services for an App
|
105
|
+
aptible services:settings SERVICE [--force-zero-downtime|--no-force-zero-downtime] [--simple-health-check|--no-simple-health-check] # Modifies the zero-downtime deploy setting for a service
|
106
|
+
aptible services:sizing_policy SERVICE # Returns the associated sizing policy, if any
|
107
|
+
aptible services:sizing_policy:set SERVICE --autoscaling-type (horizontal|vertical) [--metric-lookback-seconds SECONDS] [--percentile PERCENTILE] [--post-scale-up-cooldown-seconds SECONDS] [--post-scale-down-cooldown-seconds SECONDS] [--post-release-cooldown-seconds SECONDS] [--mem-cpu-ratio-r-threshold RATIO] [--mem-cpu-ratio-c-threshold RATIO] [--mem-scale-up-threshold THRESHOLD] [--mem-scale-down-threshold THRESHOLD] [--minimum-memory MEMORY] [--maximum-memory MEMORY] [--min-cpu-threshold THRESHOLD] [--max-cpu-threshold THRESHOLD] [--min-containers CONTAINERS] [--max-containers CONTAINERS] [--scale-up-step STEPS] [--scale-down-step STEPS] # Sets the sizing (autoscaling) policy for a service. This is not incremental, all arguments must be sent at once or they will be set to defaults.
|
108
|
+
aptible ssh [COMMAND] # Run a command against an app
|
109
|
+
aptible version # Print Aptible CLI version
|
105
110
|
```
|
106
111
|
<!-- END USAGE -->
|
107
112
|
|
data/aptible-cli.gemspec
CHANGED
@@ -20,23 +20,26 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.test_files = spec.files.grep(%r{spec/})
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_dependency '
|
24
|
-
spec.add_dependency 'aptible-api', '~> 1.5
|
25
|
-
spec.add_dependency 'aptible-auth', '~> 1.2.
|
23
|
+
spec.add_dependency 'activesupport', '>= 4.0', '< 6.0'
|
24
|
+
spec.add_dependency 'aptible-api', '~> 1.6.5'
|
25
|
+
spec.add_dependency 'aptible-auth', '~> 1.2.5'
|
26
26
|
spec.add_dependency 'aptible-billing', '~> 1.0'
|
27
|
-
spec.add_dependency '
|
28
|
-
spec.add_dependency 'git', '< 1.10'
|
29
|
-
spec.add_dependency 'term-ansicolor'
|
30
|
-
spec.add_dependency 'chronic_duration', '~> 0.10.6'
|
31
|
-
spec.add_dependency 'cbor'
|
27
|
+
spec.add_dependency 'aptible-resource', '~> 1.1'
|
32
28
|
spec.add_dependency 'aws-sdk', '~> 2.0'
|
33
29
|
spec.add_dependency 'bigdecimal', '~> 1.3.5' # https://github.com/ruby/bigdecimal#which-version-should-you-select
|
30
|
+
spec.add_dependency 'cbor'
|
31
|
+
spec.add_dependency 'chronic_duration', '~> 0.10.6'
|
32
|
+
spec.add_dependency 'concurrent-ruby', '< 1.1.10'
|
33
|
+
spec.add_dependency 'jwt', '~> 2.3.0'
|
34
|
+
spec.add_dependency 'git', '< 1.10'
|
35
|
+
spec.add_dependency 'rack', '~> 1.0'
|
36
|
+
spec.add_dependency 'term-ansicolor', '~> 1.8.0'
|
37
|
+
spec.add_dependency 'thor', '~> 0.20.0'
|
34
38
|
|
35
39
|
# Temporarily pin ffi until https://github.com/ffi/ffi/issues/868 is fixed
|
36
40
|
spec.add_dependency 'ffi', '<= 1.14.1' if Gem.win_platform?
|
37
41
|
spec.add_dependency 'win32-process' if Gem.win_platform?
|
38
42
|
|
39
|
-
spec.add_dependency 'activesupport', '>= 4.0', '< 6.0'
|
40
43
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
41
44
|
spec.add_development_dependency 'aptible-tasks', '~> 0.5.8'
|
42
45
|
spec.add_development_dependency 'rake'
|
@@ -270,6 +270,35 @@ module Aptible
|
|
270
270
|
attach_account(node, account)
|
271
271
|
end
|
272
272
|
|
273
|
+
def inject_service_sizing_policy(node, policy, service)
|
274
|
+
node.value('autoscaling_type', policy.autoscaling)
|
275
|
+
node.value('metric_lookback_seconds', policy.metric_lookback_seconds)
|
276
|
+
node.value('percentile', policy.percentile)
|
277
|
+
node.value('post_scale_up_cooldown_seconds',
|
278
|
+
policy.post_scale_up_cooldown_seconds)
|
279
|
+
node.value('post_scale_down_cooldown_seconds',
|
280
|
+
policy.post_scale_down_cooldown_seconds)
|
281
|
+
node.value('post_release_cooldown_seconds',
|
282
|
+
policy.post_release_cooldown_seconds)
|
283
|
+
node.value('mem_cpu_ratio_r_threshold',
|
284
|
+
policy.mem_cpu_ratio_r_threshold)
|
285
|
+
node.value('mem_cpu_ratio_c_threshold',
|
286
|
+
policy.mem_cpu_ratio_c_threshold)
|
287
|
+
node.value('mem_scale_up_threshold', policy.mem_scale_up_threshold)
|
288
|
+
node.value('mem_scale_down_threshold',
|
289
|
+
policy.mem_scale_down_threshold)
|
290
|
+
node.value('minimum_memory', policy.minimum_memory)
|
291
|
+
node.value('maximum_memory', policy.maximum_memory)
|
292
|
+
node.value('min_cpu_threshold', policy.min_cpu_threshold)
|
293
|
+
node.value('max_cpu_threshold', policy.max_cpu_threshold)
|
294
|
+
node.value('min_containers', policy.min_containers)
|
295
|
+
node.value('max_containers', policy.max_containers)
|
296
|
+
node.value('scale_up_step', policy.scale_up_step)
|
297
|
+
node.value('scale_down_step', policy.scale_down_step)
|
298
|
+
|
299
|
+
attach_service(node, service)
|
300
|
+
end
|
301
|
+
|
273
302
|
private
|
274
303
|
|
275
304
|
def attach_account(node, account)
|
@@ -107,6 +107,36 @@ module Aptible
|
|
107
107
|
modify_app_vhost(tls_modify_flags, options, hostname)
|
108
108
|
end
|
109
109
|
|
110
|
+
grpc_create_flags = Helpers::Vhost::OptionSetBuilder.new do
|
111
|
+
app!
|
112
|
+
create!
|
113
|
+
port!
|
114
|
+
tls!
|
115
|
+
end
|
116
|
+
|
117
|
+
desc 'endpoints:grpc:create [--app APP] SERVICE',
|
118
|
+
'Create an App gRPC Endpoint'
|
119
|
+
grpc_create_flags.declare_options(self)
|
120
|
+
define_method 'endpoints:grpc:create' do |type|
|
121
|
+
create_app_vhost(
|
122
|
+
grpc_create_flags, options, type,
|
123
|
+
type: 'grpc', platform: 'elb'
|
124
|
+
)
|
125
|
+
end
|
126
|
+
|
127
|
+
grpc_modify_flags = Helpers::Vhost::OptionSetBuilder.new do
|
128
|
+
app!
|
129
|
+
port!
|
130
|
+
tls!
|
131
|
+
end
|
132
|
+
|
133
|
+
desc 'endpoints:grpc:modify [--app APP] ENDPOINT_HOSTNAME',
|
134
|
+
'Modify an App gRPC Endpoint'
|
135
|
+
grpc_modify_flags.declare_options(self)
|
136
|
+
define_method 'endpoints:grpc:modify' do |hostname|
|
137
|
+
modify_app_vhost(grpc_modify_flags, options, hostname)
|
138
|
+
end
|
139
|
+
|
110
140
|
https_create_flags = Helpers::Vhost::OptionSetBuilder.new do
|
111
141
|
app!
|
112
142
|
create!
|