aptible-cli 0.23.0 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 809d2d53a19fb2e5d1994590b45fc667fff94712030b79ad9d235a0fa8012f02
4
- data.tar.gz: fae62dfb569ad369bda8d20f593bcd350e57eff1a2abc4fa6cafb6b9041f8e8f
3
+ metadata.gz: a4a13b0f26d5c480053eb37bcee8287e8f15fa7f48f17a2d2b435ec3c6adf694
4
+ data.tar.gz: f0f4d6fc308ab9bde7ebf4c76cf804e1990e35dd13fdbf03e0407128df6a6d1c
5
5
  SHA512:
6
- metadata.gz: 9a93f2032ad6c569056d5a8cdf21034cf35147d0d12031b6c907a0e2b6984a7c895db2c6f01135e36d8d1d24e3a838174851de367cb7f34ec9c34016c8c6525d
7
- data.tar.gz: 8f67f7b07595457831aa438ff718470137496cd35244964bfb050adfda3ee093f8fc87cad364b2b0e3d42d6015eee2582bcdd8eeeca2707f3dc48e4f060e2c7a
6
+ metadata.gz: 702b8966a0f5d6c67a0d5bd0c2496cbc90b0fa17c5c4214cbb74c59854ea8810a75723dfe68a6562528ca5955e47657b876b39d23221d6ddde5ecd6e0f7b314f
7
+ data.tar.gz: 50e7d05a0119c694fff4f7924fad1517fd3a4bc94ecbb9d35c27f3aa6af9166070201c6c4241846208dd6adeb447de366af83dd47f76c5835301972717b240db
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aptible-cli (0.23.0)
4
+ aptible-cli (0.24.0)
5
5
  activesupport (>= 4.0, < 6.0)
6
6
  aptible-api (~> 1.6.5)
7
7
  aptible-auth (~> 1.2.5)
data/README.md CHANGED
@@ -26,87 +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: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
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:autoscaling_policy SERVICE # Returns the associated sizing policy, if any
106
+ aptible services:autoscaling_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.
107
+ 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
108
+ aptible ssh [COMMAND] # Run a command against an app
109
+ aptible version # Print Aptible CLI version
110
110
  ```
111
111
  <!-- END USAGE -->
112
112
 
@@ -45,10 +45,10 @@ module Aptible
45
45
  service.update!(**updates) if updates.any?
46
46
  end
47
47
 
48
- desc 'services:sizing_policy SERVICE',
48
+ desc 'services:autoscaling_policy SERVICE',
49
49
  'Returns the associated sizing policy, if any'
50
50
  app_options
51
- define_method 'services:sizing_policy' do |service|
51
+ define_method 'services:autoscaling_policy' do |service|
52
52
  service = ensure_service(options, service)
53
53
  policy = service.service_sizing_policy
54
54
 
@@ -65,8 +65,12 @@ module Aptible
65
65
  end
66
66
  end
67
67
  end
68
+ no_commands do
69
+ alias_method 'services:sizing_policy',
70
+ 'services:autoscaling_policy'
71
+ end
68
72
 
69
- desc 'services:sizing_policy:set SERVICE '\
73
+ desc 'services:autoscaling_policy:set SERVICE '\
70
74
  '--autoscaling-type (horizontal|vertical) '\
71
75
  '[--metric-lookback-seconds SECONDS] '\
72
76
  '[--percentile PERCENTILE] '\
@@ -179,7 +183,7 @@ module Aptible
179
183
  'the amount of containers to remove when autoscaling (ex:'\
180
184
  ' a value of 2 will go from 4->2->1). Container count '\
181
185
  'will never exceed the configured minimum.'
182
- define_method 'services:sizing_policy:set' do |service|
186
+ define_method 'services:autoscaling_policy:set' do |service|
183
187
  service = ensure_service(options, service)
184
188
  ignored_attrs = %i(autoscaling_type app environment remote)
185
189
  args = options.except(*ignored_attrs)
@@ -192,6 +196,10 @@ module Aptible
192
196
  service.create_service_sizing_policy!(**args)
193
197
  end
194
198
  end
199
+ no_commands do
200
+ alias_method 'services:sizing_policy:set',
201
+ 'services:autoscaling_policy:set'
202
+ end
195
203
  end
196
204
  end
197
205
  end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.23.0'.freeze
3
+ VERSION = '0.24.0'.freeze
4
4
  end
5
5
  end
@@ -119,6 +119,19 @@ describe Aptible::CLI::Agent do
119
119
  expect { subject.send('services:sizing_policy', 'foo') }
120
120
  .to raise_error(/does not have a service sizing policy set/)
121
121
  end
122
+
123
+ it 'is aliased to autoscaling_policy' do
124
+ stub_options
125
+ service = Fabricate(:service, app: app, process_type: 'foo')
126
+ sizing_policy = Fabricate(:service_sizing_policy)
127
+ expect(service).to receive(:service_sizing_policy)
128
+ .and_return(sizing_policy)
129
+
130
+ subject.send('services:autoscaling_policy', 'foo')
131
+
132
+ out = captured_output_text
133
+ expect(out).to match(/Autoscaling Type: vertical/i)
134
+ end
122
135
  end
123
136
 
124
137
  describe '#services:sizing_policy:set' do
@@ -161,6 +174,19 @@ describe Aptible::CLI::Agent do
161
174
 
162
175
  subject.send('services:sizing_policy:set', 'foo')
163
176
  end
177
+
178
+ it 'is aliased to autoscaling_policy:set' do
179
+ stub_options(**args)
180
+ service = Fabricate(:service, app: app, process_type: 'foo')
181
+
182
+ api_args = args.except(:autoscaling_type)
183
+ api_args[:autoscaling] = args[:autoscaling_type]
184
+
185
+ expect(service).to receive(:create_service_sizing_policy!)
186
+ .with(**api_args)
187
+
188
+ subject.send('services:autoscaling_policy:set', 'foo')
189
+ end
164
190
  end
165
191
 
166
192
  def stub_options(**opts)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-02 00:00:00.000000000 Z
11
+ date: 2024-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport