aptible-cli 0.23.0 → 0.24.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +81 -81
- data/lib/aptible/cli/helpers/app.rb +1 -1
- data/lib/aptible/cli/helpers/environment.rb +11 -5
- data/lib/aptible/cli/helpers/vhost/option_set_builder.rb +1 -1
- data/lib/aptible/cli/resource_formatter.rb +1 -0
- data/lib/aptible/cli/subcommands/apps.rb +8 -6
- data/lib/aptible/cli/subcommands/backup.rb +6 -5
- data/lib/aptible/cli/subcommands/config.rb +1 -1
- data/lib/aptible/cli/subcommands/db.rb +14 -14
- data/lib/aptible/cli/subcommands/environment.rb +2 -2
- data/lib/aptible/cli/subcommands/log_drain.rb +3 -3
- data/lib/aptible/cli/subcommands/maintenance.rb +2 -2
- data/lib/aptible/cli/subcommands/metric_drain.rb +6 -6
- data/lib/aptible/cli/subcommands/services.rb +19 -4
- data/lib/aptible/cli/version.rb +1 -1
- data/spec/aptible/cli/subcommands/apps_spec.rb +6 -2
- data/spec/aptible/cli/subcommands/config_spec.rb +11 -0
- data/spec/aptible/cli/subcommands/services_spec.rb +34 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57fd2762ecb6e2608548c08837ffa4c9cc3b233b4c4c12aae197001acd6c090a
|
4
|
+
data.tar.gz: a9612cf83e1fbd680b6b0cc41daab09a7028f581b3f52bb6663b176e77b9a321
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b044b0ead595595831ec2608c48cfe0782de00272f424b21c5e2c4c8f384d2d3778d5f1aa331ff3e55e77e3670582f49d13245ca10b77a6986efc4d360fb847e
|
7
|
+
data.tar.gz: 0a8a57cfd54a701edd13355b3048d570d0ba6a8f4d64199c95ec24130c34e1baf7a08afc79142df48f6d3cc37099a75bb452a7ae22c32c3dac53a753b9ce17f6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -26,87 +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:grpc:create [--app APP] SERVICE
|
66
|
-
aptible endpoints:grpc:modify [--app APP] ENDPOINT_HOSTNAME
|
67
|
-
aptible endpoints:https:create [--app APP] SERVICE
|
68
|
-
aptible endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME
|
69
|
-
aptible endpoints:list [--app APP | --database DATABASE]
|
70
|
-
aptible endpoints:renew [--app APP] ENDPOINT_HOSTNAME
|
71
|
-
aptible endpoints:tcp:create [--app APP] SERVICE
|
72
|
-
aptible endpoints:tcp:modify [--app APP] ENDPOINT_HOSTNAME
|
73
|
-
aptible endpoints:tls:create [--app APP] SERVICE
|
74
|
-
aptible endpoints:tls:modify [--app APP] ENDPOINT_HOSTNAME
|
75
|
-
aptible environment:ca_cert
|
76
|
-
aptible environment:list
|
77
|
-
aptible environment:rename OLD_HANDLE NEW_HANDLE
|
78
|
-
aptible help [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]
|
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]
|
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]
|
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]
|
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]
|
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]
|
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]
|
86
|
-
aptible log_drain:deprovision HANDLE --environment ENVIRONMENT
|
87
|
-
aptible log_drain:list
|
88
|
-
aptible login
|
89
|
-
aptible logs [--app APP | --database 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
|
91
|
-
aptible maintenance:apps
|
92
|
-
aptible maintenance:dbs
|
93
|
-
aptible metric_drain:create:datadog HANDLE --api_key DATADOG_API_KEY --site DATADOG_SITE --environment ENVIRONMENT
|
94
|
-
aptible metric_drain:create:influxdb HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT
|
95
|
-
aptible metric_drain:create:influxdb:custom HANDLE --username USERNAME --password PASSWORD --url URL_INCLUDING_PORT --db INFLUX_DATABASE_NAME --environment ENVIRONMENT
|
96
|
-
aptible metric_drain:create:influxdb:customv2 HANDLE --org ORGANIZATION --token INFLUX_TOKEN --url URL_INCLUDING_PORT --bucket INFLUX_BUCKET_NAME --environment ENVIRONMENT
|
97
|
-
aptible metric_drain:deprovision HANDLE --environment ENVIRONMENT
|
98
|
-
aptible metric_drain:list
|
99
|
-
aptible operation:cancel OPERATION_ID
|
100
|
-
aptible operation:follow OPERATION_ID
|
101
|
-
aptible operation:logs OPERATION_ID
|
102
|
-
aptible rebuild
|
103
|
-
aptible restart
|
104
|
-
aptible services
|
105
|
-
aptible services:
|
106
|
-
aptible services:
|
107
|
-
aptible services:
|
108
|
-
aptible ssh [COMMAND]
|
109
|
-
aptible 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
|
|
@@ -37,11 +37,17 @@ module Aptible
|
|
37
37
|
|
38
38
|
def ensure_default_environment
|
39
39
|
environments = Aptible::Api::Account.all(token: fetch_token)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
case environments.count
|
41
|
+
when 0
|
42
|
+
e = 'No environments. Go to https://app.aptible.com/ to proceed'
|
43
|
+
raise Thor::Error, e
|
44
|
+
when 1
|
45
|
+
return environments.first
|
46
|
+
else
|
47
|
+
raise Thor::Error, <<-ERR.gsub(/\s+/, ' ').strip
|
48
|
+
Multiple environments available, please specify with --environment or --env
|
49
|
+
ERR
|
50
|
+
end
|
45
51
|
end
|
46
52
|
end
|
47
53
|
end
|
@@ -157,6 +157,7 @@ module Aptible
|
|
157
157
|
node.value('command', service.command || 'CMD')
|
158
158
|
node.value('container_count', service.container_count)
|
159
159
|
node.value('container_size', service.container_memory_limit_mb)
|
160
|
+
node.value('container_profile', service.instance_class.to_s[/[a-z]/])
|
160
161
|
|
161
162
|
attach_app(node, app)
|
162
163
|
end
|
@@ -9,7 +9,7 @@ module Aptible
|
|
9
9
|
include Helpers::Token
|
10
10
|
|
11
11
|
desc 'apps', 'List all applications'
|
12
|
-
option :environment
|
12
|
+
option :environment, aliases: '--env'
|
13
13
|
def apps
|
14
14
|
Formatter.render(Renderer.current) do |root|
|
15
15
|
root.grouped_keyed_list(
|
@@ -28,7 +28,7 @@ module Aptible
|
|
28
28
|
end
|
29
29
|
|
30
30
|
desc 'apps:create HANDLE', 'Create a new application'
|
31
|
-
option :environment
|
31
|
+
option :environment, aliases: '--env'
|
32
32
|
define_method 'apps:create' do |handle|
|
33
33
|
environment = ensure_environment(options)
|
34
34
|
app = environment.create_app(handle: handle)
|
@@ -69,9 +69,11 @@ module Aptible
|
|
69
69
|
raise Thor::Error, m
|
70
70
|
end
|
71
71
|
|
72
|
-
if container_count.nil? && container_size.nil?
|
73
|
-
|
74
|
-
|
72
|
+
if container_count.nil? && container_size.nil? &&
|
73
|
+
container_profile.nil?
|
74
|
+
m = 'Provide at least --container-count, --container-size, ' \
|
75
|
+
'or --container-profile'
|
76
|
+
raise Thor::Error, m
|
75
77
|
end
|
76
78
|
|
77
79
|
# We don't validate any parameters here: API will do that for us.
|
@@ -104,7 +106,7 @@ module Aptible
|
|
104
106
|
' ENVIRONMENT_HANDLE]', 'Rename an app handle. In order'\
|
105
107
|
' for the new app handle to appear in log drain and metric'\
|
106
108
|
' drain destinations, you must restart the app.'
|
107
|
-
option :environment
|
109
|
+
option :environment, aliases: '--env'
|
108
110
|
define_method 'apps:rename' do |old_handle, new_handle|
|
109
111
|
env = ensure_environment(options)
|
110
112
|
app = ensure_app(options.merge(app: old_handle))
|
@@ -14,7 +14,8 @@ module Aptible
|
|
14
14
|
'[--key-arn KEY_ARN]',
|
15
15
|
'Restore a backup'
|
16
16
|
option :handle, desc: 'a name to use for the new database'
|
17
|
-
option :environment,
|
17
|
+
option :environment, aliases: '--env',
|
18
|
+
desc: 'a different environment to restore to'
|
18
19
|
option :container_size, type: :numeric
|
19
20
|
option :size, type: :numeric
|
20
21
|
option :disk_size, type: :numeric
|
@@ -68,9 +69,9 @@ module Aptible
|
|
68
69
|
end
|
69
70
|
|
70
71
|
desc 'backup:list DB_HANDLE', 'List backups for a database'
|
71
|
-
option :environment
|
72
|
+
option :environment, aliases: '--env'
|
72
73
|
option :max_age,
|
73
|
-
default: '
|
74
|
+
default: '99y',
|
74
75
|
desc: 'Limit backups returned (example usage: 1w, 1y, etc.)'
|
75
76
|
define_method 'backup:list' do |handle|
|
76
77
|
age = ChronicDuration.parse(options[:max_age])
|
@@ -95,8 +96,8 @@ module Aptible
|
|
95
96
|
|
96
97
|
desc 'backup:orphaned', 'List backups associated with ' \
|
97
98
|
'deprovisioned databases'
|
98
|
-
option :environment
|
99
|
-
option :max_age, default: '
|
99
|
+
option :environment, aliases: '--env'
|
100
|
+
option :max_age, default: '99y',
|
100
101
|
desc: 'Limit backups returned '\
|
101
102
|
'(example usage: 1w, 1y, etc.)'
|
102
103
|
define_method 'backup:orphaned' do
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'shellwords'
|
2
|
-
|
3
2
|
module Aptible
|
4
3
|
module CLI
|
5
4
|
module Subcommands
|
@@ -72,6 +71,7 @@ module Aptible
|
|
72
71
|
# FIXME: define_method - ?! Seriously, WTF Thor.
|
73
72
|
app = ensure_app(options)
|
74
73
|
env = Hash[args.map do |arg|
|
74
|
+
arg = arg.split('=')[0]
|
75
75
|
validate_env_key!(arg)
|
76
76
|
[arg, '']
|
77
77
|
end]
|
@@ -14,7 +14,7 @@ module Aptible
|
|
14
14
|
include Term::ANSIColor
|
15
15
|
|
16
16
|
desc 'db:list', 'List all databases'
|
17
|
-
option :environment
|
17
|
+
option :environment, aliases: '--env'
|
18
18
|
define_method 'db:list' do
|
19
19
|
Formatter.render(Renderer.current) do |root|
|
20
20
|
root.grouped_keyed_list(
|
@@ -63,7 +63,7 @@ module Aptible
|
|
63
63
|
option :disk_size, default: 10, type: :numeric
|
64
64
|
option :size, type: :numeric
|
65
65
|
option :key_arn, type: :string
|
66
|
-
option :environment
|
66
|
+
option :environment, aliases: '--env'
|
67
67
|
option :container_profile, type: :string,
|
68
68
|
desc: 'Examples: m c r'
|
69
69
|
option :iops, type: :numeric
|
@@ -126,7 +126,7 @@ module Aptible
|
|
126
126
|
end
|
127
127
|
|
128
128
|
desc 'db:clone SOURCE DEST', 'Clone a database to create a new one'
|
129
|
-
option :environment
|
129
|
+
option :environment, aliases: '--env'
|
130
130
|
define_method 'db:clone' do |source_handle, dest_handle|
|
131
131
|
# TODO: Deprecate + recommend backup
|
132
132
|
source = ensure_database(options.merge(db: source_handle))
|
@@ -139,7 +139,7 @@ module Aptible
|
|
139
139
|
'[--container-profile PROFILE] [--iops IOPS] ' \
|
140
140
|
'[--logical --version VERSION] [--key-arn KEY_ARN]',
|
141
141
|
'Create a replica/follower of a database'
|
142
|
-
option :environment
|
142
|
+
option :environment, aliases: '--env'
|
143
143
|
option :container_size, type: :numeric
|
144
144
|
option :size, type: :numeric
|
145
145
|
option :disk_size, type: :numeric
|
@@ -191,7 +191,7 @@ module Aptible
|
|
191
191
|
|
192
192
|
desc 'db:dump HANDLE [pg_dump options]',
|
193
193
|
'Dump a remote database to file'
|
194
|
-
option :environment
|
194
|
+
option :environment, aliases: '--env'
|
195
195
|
define_method 'db:dump' do |handle, *dump_options|
|
196
196
|
database = ensure_database(options.merge(db: handle))
|
197
197
|
with_postgres_tunnel(database) do |url|
|
@@ -204,7 +204,7 @@ module Aptible
|
|
204
204
|
|
205
205
|
desc 'db:execute HANDLE SQL_FILE [--on-error-stop]',
|
206
206
|
'Executes sql against a database'
|
207
|
-
option :environment
|
207
|
+
option :environment, aliases: '--env'
|
208
208
|
option :on_error_stop, type: :boolean
|
209
209
|
define_method 'db:execute' do |handle, sql_path|
|
210
210
|
database = ensure_database(options.merge(db: handle))
|
@@ -217,7 +217,7 @@ module Aptible
|
|
217
217
|
end
|
218
218
|
|
219
219
|
desc 'db:tunnel HANDLE', 'Create a local tunnel to a database'
|
220
|
-
option :environment
|
220
|
+
option :environment, aliases: '--env'
|
221
221
|
option :port, type: :numeric
|
222
222
|
option :type, type: :string
|
223
223
|
define_method 'db:tunnel' do |handle|
|
@@ -262,7 +262,7 @@ module Aptible
|
|
262
262
|
end
|
263
263
|
|
264
264
|
desc 'db:deprovision HANDLE', 'Deprovision a database'
|
265
|
-
option :environment
|
265
|
+
option :environment, aliases: '--env'
|
266
266
|
define_method 'db:deprovision' do |handle|
|
267
267
|
database = ensure_database(options.merge(db: handle))
|
268
268
|
CLI.logger.info "Deprovisioning #{database.handle}..."
|
@@ -278,7 +278,7 @@ module Aptible
|
|
278
278
|
end
|
279
279
|
|
280
280
|
desc 'db:backup HANDLE', 'Backup a database'
|
281
|
-
option :environment
|
281
|
+
option :environment, aliases: '--env'
|
282
282
|
define_method 'db:backup' do |handle|
|
283
283
|
database = ensure_database(options.merge(db: handle))
|
284
284
|
CLI.logger.info "Backing up #{database.handle}..."
|
@@ -287,7 +287,7 @@ module Aptible
|
|
287
287
|
end
|
288
288
|
|
289
289
|
desc 'db:reload HANDLE', 'Reload a database'
|
290
|
-
option :environment
|
290
|
+
option :environment, aliases: '--env'
|
291
291
|
define_method 'db:reload' do |handle|
|
292
292
|
database = ensure_database(options.merge(db: handle))
|
293
293
|
CLI.logger.info "Reloading #{database.handle}..."
|
@@ -300,7 +300,7 @@ module Aptible
|
|
300
300
|
'[--container-profile PROFILE] [--iops IOPS] ' \
|
301
301
|
'[--volume-type [gp2, gp3]]',
|
302
302
|
'Restart a database'
|
303
|
-
option :environment
|
303
|
+
option :environment, aliases: '--env'
|
304
304
|
option :container_size, type: :numeric
|
305
305
|
option :container_profile, type: :string,
|
306
306
|
desc: 'Examples: m c r'
|
@@ -335,7 +335,7 @@ module Aptible
|
|
335
335
|
desc 'db:modify HANDLE ' \
|
336
336
|
'[--iops IOPS] [--volume-type [gp2, gp3]]',
|
337
337
|
'Modify a database disk'
|
338
|
-
option :environment
|
338
|
+
option :environment, aliases: '--env'
|
339
339
|
option :iops, type: :numeric
|
340
340
|
option :volume_type
|
341
341
|
define_method 'db:modify' do |handle|
|
@@ -354,7 +354,7 @@ module Aptible
|
|
354
354
|
end
|
355
355
|
|
356
356
|
desc 'db:url HANDLE', 'Display a database URL'
|
357
|
-
option :environment
|
357
|
+
option :environment, aliases: '--env'
|
358
358
|
option :type, type: :string
|
359
359
|
define_method 'db:url' do |handle|
|
360
360
|
database = ensure_database(options.merge(db: handle))
|
@@ -371,7 +371,7 @@ module Aptible
|
|
371
371
|
' ENVIRONMENT_HANDLE]', 'Rename a database handle. In order'\
|
372
372
|
' for the new database handle to appear in log drain and'\
|
373
373
|
' metric drain destinations, you must reload the database.'
|
374
|
-
option :environment
|
374
|
+
option :environment, aliases: '--env'
|
375
375
|
define_method 'db:rename' do |old_handle, new_handle|
|
376
376
|
env = ensure_environment(options)
|
377
377
|
db = ensure_database(options.merge(db: old_handle))
|
@@ -8,7 +8,7 @@ module Aptible
|
|
8
8
|
include Helpers::Token
|
9
9
|
|
10
10
|
desc 'environment:list', 'List all environments'
|
11
|
-
option :environment
|
11
|
+
option :environment, aliases: '--env'
|
12
12
|
define_method 'environment:list' do
|
13
13
|
Formatter.render(Renderer.current) do |root|
|
14
14
|
root.keyed_list(
|
@@ -25,7 +25,7 @@ module Aptible
|
|
25
25
|
|
26
26
|
desc 'environment:ca_cert',
|
27
27
|
'Retrieve the CA certificate associated with the environment'
|
28
|
-
option :environment
|
28
|
+
option :environment, aliases: '--env'
|
29
29
|
define_method 'environment:ca_cert' do
|
30
30
|
Formatter.render(Renderer.current) do |root|
|
31
31
|
root.grouped_keyed_list(
|
@@ -19,11 +19,11 @@ module Aptible
|
|
19
19
|
option :drain_databases, default: true, type: :boolean
|
20
20
|
option :drain_ephemeral_sessions, default: true, type: :boolean
|
21
21
|
option :drain_proxies, default: true, type: :boolean
|
22
|
-
option :environment
|
22
|
+
option :environment, aliases: '--env'
|
23
23
|
end
|
24
24
|
|
25
25
|
desc 'log_drain:list', 'List all Log Drains'
|
26
|
-
option :environment
|
26
|
+
option :environment, aliases: '--env'
|
27
27
|
define_method 'log_drain:list' do
|
28
28
|
Formatter.render(Renderer.current) do |root|
|
29
29
|
root.grouped_keyed_list(
|
@@ -137,7 +137,7 @@ module Aptible
|
|
137
137
|
|
138
138
|
desc 'log_drain:deprovision HANDLE --environment ENVIRONMENT',
|
139
139
|
'Deprovisions a log drain'
|
140
|
-
option :environment
|
140
|
+
option :environment, aliases: '--env'
|
141
141
|
define_method 'log_drain:deprovision' do |handle|
|
142
142
|
account = ensure_environment(options)
|
143
143
|
drain = ensure_log_drain(account, handle)
|
@@ -11,7 +11,7 @@ module Aptible
|
|
11
11
|
desc 'maintenance:apps',
|
12
12
|
'List Apps impacted by maintenance schedules where '\
|
13
13
|
'restarts are required'
|
14
|
-
option :environment
|
14
|
+
option :environment, aliases: '--env'
|
15
15
|
define_method 'maintenance:apps' do
|
16
16
|
found_maintenance = false
|
17
17
|
m = maintenance_apps
|
@@ -46,7 +46,7 @@ module Aptible
|
|
46
46
|
desc 'maintenance:dbs',
|
47
47
|
'List Databases impacted by maintenance schedules where '\
|
48
48
|
'restarts are required'
|
49
|
-
option :environment
|
49
|
+
option :environment, aliases: '--env'
|
50
50
|
define_method 'maintenance:dbs' do
|
51
51
|
found_maintenance = false
|
52
52
|
m = maintenance_databases
|
@@ -18,7 +18,7 @@ module Aptible
|
|
18
18
|
include Helpers::MetricDrain
|
19
19
|
|
20
20
|
desc 'metric_drain:list', 'List all Metric Drains'
|
21
|
-
option :environment
|
21
|
+
option :environment, aliases: '--env'
|
22
22
|
define_method 'metric_drain:list' do
|
23
23
|
Formatter.render(Renderer.current) do |root|
|
24
24
|
root.grouped_keyed_list(
|
@@ -40,7 +40,7 @@ module Aptible
|
|
40
40
|
'--db DATABASE_HANDLE --environment ENVIRONMENT',
|
41
41
|
'Create an InfluxDB Metric Drain'
|
42
42
|
option :db, type: :string
|
43
|
-
option :environment
|
43
|
+
option :environment, aliases: '--env'
|
44
44
|
|
45
45
|
define_method 'metric_drain:create:influxdb' do |handle|
|
46
46
|
account = ensure_environment(options)
|
@@ -66,7 +66,7 @@ module Aptible
|
|
66
66
|
option :password, type: :string
|
67
67
|
option :url, type: :string
|
68
68
|
option :db, type: :string
|
69
|
-
option :environment
|
69
|
+
option :environment, aliases: '--env'
|
70
70
|
define_method 'metric_drain:create:influxdb:custom' do |handle|
|
71
71
|
account = ensure_environment(options)
|
72
72
|
|
@@ -95,7 +95,7 @@ module Aptible
|
|
95
95
|
option :org, type: :string
|
96
96
|
option :token, type: :string
|
97
97
|
option :url, type: :string
|
98
|
-
option :environment
|
98
|
+
option :environment, aliases: '--env'
|
99
99
|
define_method 'metric_drain:create:influxdb:customv2' do |handle|
|
100
100
|
account = ensure_environment(options)
|
101
101
|
|
@@ -121,7 +121,7 @@ module Aptible
|
|
121
121
|
'Create a Datadog Metric Drain'
|
122
122
|
option :api_key, type: :string
|
123
123
|
option :site, type: :string
|
124
|
-
option :environment
|
124
|
+
option :environment, aliases: '--env'
|
125
125
|
define_method 'metric_drain:create:datadog' do |handle|
|
126
126
|
account = ensure_environment(options)
|
127
127
|
|
@@ -150,7 +150,7 @@ module Aptible
|
|
150
150
|
|
151
151
|
desc 'metric_drain:deprovision HANDLE --environment ENVIRONMENT',
|
152
152
|
'Deprovisions a Metric Drain'
|
153
|
-
option :environment
|
153
|
+
option :environment, aliases: '--env'
|
154
154
|
define_method 'metric_drain:deprovision' do |handle|
|
155
155
|
account = ensure_environment(options)
|
156
156
|
drain = ensure_metric_drain(account, handle)
|
@@ -45,10 +45,10 @@ module Aptible
|
|
45
45
|
service.update!(**updates) if updates.any?
|
46
46
|
end
|
47
47
|
|
48
|
-
desc 'services:
|
48
|
+
desc 'services:autoscaling_policy SERVICE',
|
49
49
|
'Returns the associated sizing policy, if any'
|
50
50
|
app_options
|
51
|
-
define_method 'services:
|
51
|
+
define_method 'services:autoscaling_policy' do |service|
|
52
52
|
service = ensure_service(options, service)
|
53
53
|
policy = service.service_sizing_policy
|
54
54
|
|
@@ -66,7 +66,14 @@ module Aptible
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
|
69
|
+
no_commands do
|
70
|
+
alias_method 'services:sizing_policy',
|
71
|
+
'services:autoscaling_policy'
|
72
|
+
end
|
73
|
+
|
74
|
+
map 'services:sizing_policy' => 'services:autoscaling_policy'
|
75
|
+
|
76
|
+
desc 'services:autoscaling_policy:set SERVICE '\
|
70
77
|
'--autoscaling-type (horizontal|vertical) '\
|
71
78
|
'[--metric-lookback-seconds SECONDS] '\
|
72
79
|
'[--percentile PERCENTILE] '\
|
@@ -179,7 +186,7 @@ module Aptible
|
|
179
186
|
'the amount of containers to remove when autoscaling (ex:'\
|
180
187
|
' a value of 2 will go from 4->2->1). Container count '\
|
181
188
|
'will never exceed the configured minimum.'
|
182
|
-
define_method 'services:
|
189
|
+
define_method 'services:autoscaling_policy:set' do |service|
|
183
190
|
service = ensure_service(options, service)
|
184
191
|
ignored_attrs = %i(autoscaling_type app environment remote)
|
185
192
|
args = options.except(*ignored_attrs)
|
@@ -192,6 +199,14 @@ module Aptible
|
|
192
199
|
service.create_service_sizing_policy!(**args)
|
193
200
|
end
|
194
201
|
end
|
202
|
+
|
203
|
+
no_commands do
|
204
|
+
alias_method 'services:sizing_policy:set',
|
205
|
+
'services:autoscaling_policy:set'
|
206
|
+
end
|
207
|
+
|
208
|
+
map 'services:sizing_policy:set' =>
|
209
|
+
'services:autoscaling_policy:set'
|
195
210
|
end
|
196
211
|
end
|
197
212
|
end
|
data/lib/aptible/cli/version.rb
CHANGED
@@ -93,11 +93,13 @@ describe Aptible::CLI::Agent do
|
|
93
93
|
|
94
94
|
s1 = Fabricate(
|
95
95
|
:service,
|
96
|
-
app: app, process_type: 's1', command: 'true', container_count: 2
|
96
|
+
app: app, process_type: 's1', command: 'true', container_count: 2,
|
97
|
+
instance_class: 'm5'
|
97
98
|
)
|
98
99
|
s2 = Fabricate(
|
99
100
|
:service,
|
100
|
-
app: app, process_type: 's2', container_memory_limit_mb: 2048
|
101
|
+
app: app, process_type: 's2', container_memory_limit_mb: 2048,
|
102
|
+
instance_class: 'r5'
|
101
103
|
)
|
102
104
|
|
103
105
|
expected_json = [
|
@@ -118,6 +120,7 @@ describe Aptible::CLI::Agent do
|
|
118
120
|
'id' => s1.id,
|
119
121
|
'command' => s1.command,
|
120
122
|
'container_count' => s1.container_count,
|
123
|
+
'container_profile' => 'm',
|
121
124
|
'container_size' => s1.container_memory_limit_mb,
|
122
125
|
'created_at' => fmt_time(s1.created_at)
|
123
126
|
},
|
@@ -126,6 +129,7 @@ describe Aptible::CLI::Agent do
|
|
126
129
|
'id' => s2.id,
|
127
130
|
'command' => 'CMD',
|
128
131
|
'container_count' => s2.container_count,
|
132
|
+
'container_profile' => 'r',
|
129
133
|
'container_size' => s2.container_memory_limit_mb,
|
130
134
|
'created_at' => fmt_time(s2.created_at)
|
131
135
|
}
|
@@ -109,6 +109,17 @@ describe Aptible::CLI::Agent do
|
|
109
109
|
subject.send('config:unset', 'FOO')
|
110
110
|
end
|
111
111
|
|
112
|
+
it 'unsets environment variables even if the user passes a value' do
|
113
|
+
expect(app).to receive(:create_operation!)
|
114
|
+
.with(type: 'configure', env: { 'FOO' => '' })
|
115
|
+
.and_return(operation)
|
116
|
+
|
117
|
+
expect(subject).to receive(:attach_to_operation_logs)
|
118
|
+
.with(operation)
|
119
|
+
|
120
|
+
subject.send('config:unset', 'FOO=whoops')
|
121
|
+
end
|
122
|
+
|
112
123
|
it 'rejects environment variables that start with -' do
|
113
124
|
expect { subject.send('config:rm', '-foo') }
|
114
125
|
.to raise_error(/invalid argument/im)
|
@@ -46,6 +46,14 @@ describe Aptible::CLI::Agent do
|
|
46
46
|
expect(captured_output_text.split("\n")).to include('Container Count: 3')
|
47
47
|
end
|
48
48
|
|
49
|
+
it 'lists container profile' do
|
50
|
+
Fabricate(:service, app: app, instance_class: 'u7')
|
51
|
+
subject.send('services')
|
52
|
+
|
53
|
+
expect(captured_output_text.split("\n"))
|
54
|
+
.to include('Container Profile: u')
|
55
|
+
end
|
56
|
+
|
49
57
|
it 'lists multiple services' do
|
50
58
|
Fabricate(:service, app: app, process_type: 'foo')
|
51
59
|
Fabricate(:service, app: app, process_type: 'bar')
|
@@ -119,6 +127,19 @@ describe Aptible::CLI::Agent do
|
|
119
127
|
expect { subject.send('services:sizing_policy', 'foo') }
|
120
128
|
.to raise_error(/does not have a service sizing policy set/)
|
121
129
|
end
|
130
|
+
|
131
|
+
it 'is aliased to autoscaling_policy' do
|
132
|
+
stub_options
|
133
|
+
service = Fabricate(:service, app: app, process_type: 'foo')
|
134
|
+
sizing_policy = Fabricate(:service_sizing_policy)
|
135
|
+
expect(service).to receive(:service_sizing_policy)
|
136
|
+
.and_return(sizing_policy)
|
137
|
+
|
138
|
+
subject.send('services:autoscaling_policy', 'foo')
|
139
|
+
|
140
|
+
out = captured_output_text
|
141
|
+
expect(out).to match(/Autoscaling Type: vertical/i)
|
142
|
+
end
|
122
143
|
end
|
123
144
|
|
124
145
|
describe '#services:sizing_policy:set' do
|
@@ -161,6 +182,19 @@ describe Aptible::CLI::Agent do
|
|
161
182
|
|
162
183
|
subject.send('services:sizing_policy:set', 'foo')
|
163
184
|
end
|
185
|
+
|
186
|
+
it 'is aliased to autoscaling_policy:set' do
|
187
|
+
stub_options(**args)
|
188
|
+
service = Fabricate(:service, app: app, process_type: 'foo')
|
189
|
+
|
190
|
+
api_args = args.except(:autoscaling_type)
|
191
|
+
api_args[:autoscaling] = args[:autoscaling_type]
|
192
|
+
|
193
|
+
expect(service).to receive(:create_service_sizing_policy!)
|
194
|
+
.with(**api_args)
|
195
|
+
|
196
|
+
subject.send('services:autoscaling_policy:set', 'foo')
|
197
|
+
end
|
164
198
|
end
|
165
199
|
|
166
200
|
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.
|
4
|
+
version: 0.24.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -472,7 +472,7 @@ homepage: https://github.com/aptible/aptible-cli
|
|
472
472
|
licenses:
|
473
473
|
- MIT
|
474
474
|
metadata: {}
|
475
|
-
post_install_message:
|
475
|
+
post_install_message:
|
476
476
|
rdoc_options: []
|
477
477
|
require_paths:
|
478
478
|
- lib
|
@@ -487,8 +487,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
487
487
|
- !ruby/object:Gem::Version
|
488
488
|
version: '0'
|
489
489
|
requirements: []
|
490
|
-
rubygems_version: 3.1
|
491
|
-
signing_key:
|
490
|
+
rubygems_version: 3.0.3.1
|
491
|
+
signing_key:
|
492
492
|
specification_version: 4
|
493
493
|
summary: Command-line interface for Aptible services
|
494
494
|
test_files:
|