aptible-cli 0.21.0 → 0.23.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b212760948b9bef6355281c713ae9077b7e424e21f5cdf4c5c88f60deb13b38d
4
- data.tar.gz: 5dbf4dab98017d0a0c2a6201b4c7715cda3f46cbb481d64ba9ce7b5bf1fad2fc
3
+ metadata.gz: 809d2d53a19fb2e5d1994590b45fc667fff94712030b79ad9d235a0fa8012f02
4
+ data.tar.gz: fae62dfb569ad369bda8d20f593bcd350e57eff1a2abc4fa6cafb6b9041f8e8f
5
5
  SHA512:
6
- metadata.gz: 42335afa7c7bc447a120cbfcd7244ce326476d001922cb8eafcecd3c278a65859cb06d61234fc8607ab4cf9b7d31bf15dd60348ca2bc7af926e62def427386fa
7
- data.tar.gz: 3e3dbe977c93e72a6cb621e3d6d529812ce9a2725ca6a309efce5f524acf93922259bb7814cd4958b63a168ce03e8184249e0fe8af061d3710e5fdb023e48299
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
@@ -1,9 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'pry',
4
- git: 'https://github.com/fancyremarker/pry.git',
5
- branch: 'aptible'
6
-
7
3
  gem 'activesupport', '~> 4.0'
8
4
  gem 'rack', '~> 1.0'
9
5
 
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.21.0)
4
+ aptible-cli (0.23.0)
15
5
  activesupport (>= 4.0, < 6.0)
16
- aptible-api (~> 1.5.3)
17
- aptible-auth (~> 1.2.4)
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
- term-ansicolor
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.3)
39
- aptible-auth (~> 1.0)
40
- aptible-resource (~> 1.0)
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.0)
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 (0.8.2)
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.0)
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 # 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:https:create [--app APP] SERVICE # Create an App HTTPS Endpoint
66
- aptible endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App HTTPS Endpoint
67
- aptible endpoints:list [--app APP | --database DATABASE] # List Endpoints for an App or Database
68
- aptible endpoints:renew [--app APP] ENDPOINT_HOSTNAME # Renew an App Managed TLS Endpoint
69
- aptible endpoints:tcp:create [--app APP] SERVICE # Create an App TCP Endpoint
70
- aptible endpoints:tcp:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TCP Endpoint
71
- aptible endpoints:tls:create [--app APP] SERVICE # Create an App TLS Endpoint
72
- aptible endpoints:tls:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TLS Endpoint
73
- aptible environment:ca_cert # Retrieve the CA certificate associated with the environment
74
- aptible environment:list # List all environments
75
- 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.
76
- aptible help [COMMAND] # Describe available commands or one specific command
77
- 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
78
- 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
79
- 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
80
- 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
81
- 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
82
- 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
83
- 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
84
- aptible log_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a log drain
85
- aptible log_drain:list # List all Log Drains
86
- aptible login # Log in to Aptible
87
- aptible logs [--app APP | --database DATABASE] # Follows logs from a running app or database
88
- 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
89
- aptible maintenance:apps # List Apps impacted by maintenance schedules where restarts are required
90
- aptible maintenance:dbs # List Databases impacted by maintenance schedules where restarts are required
91
- aptible metric_drain:create:datadog HANDLE --api_key DATADOG_API_KEY --site DATADOG_SITE --environment ENVIRONMENT # Create a Datadog Metric Drain
92
- aptible metric_drain:create:influxdb HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT # Create an InfluxDB Metric Drain
93
- 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
94
- 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
95
- aptible metric_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a Metric Drain
96
- aptible metric_drain:list # List all Metric Drains
97
- aptible operation:cancel OPERATION_ID # Cancel a running operation
98
- aptible operation:follow OPERATION_ID # Follow logs of a running operation
99
- aptible operation:logs OPERATION_ID # View logs for given operation
100
- aptible rebuild # Rebuild an app, and restart its services
101
- aptible restart # Restart all services associated with an app
102
- aptible services # List Services for an App
103
- aptible ssh [COMMAND] # Run a command against an app
104
- aptible version # Print Aptible CLI version
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 'aptible-resource', '~> 1.1'
24
- spec.add_dependency 'aptible-api', '~> 1.5.3'
25
- spec.add_dependency 'aptible-auth', '~> 1.2.4'
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 'thor', '~> 0.20.0'
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!