aptible-cli 0.24.8 → 0.24.10
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/lib/aptible/cli/helpers/vhost/option_set_builder.rb +18 -2
- data/lib/aptible/cli/resource_formatter.rb +1 -0
- data/lib/aptible/cli/subcommands/endpoints.rb +2 -0
- data/lib/aptible/cli/subcommands/log_drain.rb +27 -0
- data/lib/aptible/cli/version.rb +1 -1
- data/spec/aptible/cli/resource_formatter_spec.rb +3 -1
- data/spec/aptible/cli/subcommands/log_drain_spec.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80c331cf02d571ba6378906d589ee61ee5de3112fc14cb6d5eea602118b96b85
|
4
|
+
data.tar.gz: 5ae0d335891b60f9725896b8d5f2b2fa779c138d679185ce778494666f4d7105
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffb050d8dbc7528b9de5cc722d04040eb694d50a6df630043f5c5ef17ec511ed62a73d60cdb7d09fbc31fae6d6d97f4d68fcdd76b4be4dff36daf6c96fa9fe83
|
7
|
+
data.tar.gz: 703a92fcecac55a0bc136f89d35efc02f421a74121837db9cf00b1b496497240e4fed3feb6fd2539489b5c7b7524f13888d3fecf3a734073f2000b385692255f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -81,6 +81,7 @@ Commands:
|
|
81
81
|
aptible log_drain:create:https HANDLE --url URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a HTTPS Drain
|
82
82
|
aptible log_drain:create:logdna HANDLE --url LOGDNA_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a LogDNA/Mezmo Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
|
83
83
|
aptible log_drain:create:papertrail HANDLE --host PAPERTRAIL_HOST --port PAPERTRAIL_PORT --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Papertrail Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
|
84
|
+
aptible log_drain:create:solarwinds HANDLE --host SWO_HOSTNAME --token SWO_TOKEN --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a SolarWinds Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
|
84
85
|
aptible log_drain:create:sumologic HANDLE --url SUMOLOGIC_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Sumologic Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
|
85
86
|
aptible log_drain:create:syslog HANDLE --host SYSLOG_HOST --port SYSLOG_PORT [--token TOKEN] --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Syslog Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
|
86
87
|
aptible log_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a log drain
|
@@ -12,6 +12,7 @@ module Aptible
|
|
12
12
|
ports
|
13
13
|
port
|
14
14
|
alb
|
15
|
+
shared
|
15
16
|
).freeze
|
16
17
|
|
17
18
|
def initialize(&block)
|
@@ -57,8 +58,8 @@ module Aptible
|
|
57
58
|
option(
|
58
59
|
:load_balancing_algorithm_type,
|
59
60
|
type: :string,
|
60
|
-
desc: 'The load balancing algorithm for this Endpoint.' \
|
61
|
-
'
|
61
|
+
desc: 'The load balancing algorithm for this Endpoint. ' \
|
62
|
+
'Valid options are round_robin, ' \
|
62
63
|
'least_outstanding_requests, and ' \
|
63
64
|
'weighted_random'
|
64
65
|
)
|
@@ -122,6 +123,15 @@ module Aptible
|
|
122
123
|
'on this Endpoint'
|
123
124
|
)
|
124
125
|
end
|
126
|
+
|
127
|
+
if builder.shared?
|
128
|
+
option(
|
129
|
+
:shared,
|
130
|
+
type: :boolean,
|
131
|
+
desc: "Share this Endpoint's load balancer with other " \
|
132
|
+
'Endpoints'
|
133
|
+
)
|
134
|
+
end
|
125
135
|
end
|
126
136
|
end
|
127
137
|
|
@@ -192,6 +202,12 @@ module Aptible
|
|
192
202
|
end
|
193
203
|
params[:load_balancing_algorithm_type] = lba_type
|
194
204
|
end
|
205
|
+
|
206
|
+
if shared?
|
207
|
+
params[:shared] = options.delete(:shared) do
|
208
|
+
create? ? false : nil
|
209
|
+
end
|
210
|
+
end
|
195
211
|
end
|
196
212
|
|
197
213
|
options.delete(:environment)
|
@@ -160,6 +160,7 @@ module Aptible
|
|
160
160
|
port!
|
161
161
|
tls!
|
162
162
|
alb!
|
163
|
+
shared!
|
163
164
|
end
|
164
165
|
|
165
166
|
desc 'endpoints:https:create [--app APP] SERVICE',
|
@@ -179,6 +180,7 @@ module Aptible
|
|
179
180
|
port!
|
180
181
|
tls!
|
181
182
|
alb!
|
183
|
+
shared!
|
182
184
|
end
|
183
185
|
|
184
186
|
desc 'endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME',
|
@@ -152,6 +152,33 @@ module Aptible
|
|
152
152
|
create_syslog_based_log_drain(handle, options)
|
153
153
|
end
|
154
154
|
|
155
|
+
desc 'log_drain:create:solarwinds HANDLE ' \
|
156
|
+
'--host SWO_HOSTNAME --token SWO_TOKEN ' \
|
157
|
+
+ drain_flags,
|
158
|
+
'Create a SolarWinds Log Drain. By default, App, Database, ' \
|
159
|
+
+ 'Ephemeral Session, and Proxy logs will be sent ' \
|
160
|
+
+ 'to your chosen destination.'
|
161
|
+
option :host, type: :string
|
162
|
+
option :token, type: :string
|
163
|
+
drain_options
|
164
|
+
define_method 'log_drain:create:solarwinds' do |handle|
|
165
|
+
telemetry(__method__, options.merge(handle: handle))
|
166
|
+
|
167
|
+
account = ensure_environment(options)
|
168
|
+
|
169
|
+
opts = {
|
170
|
+
handle: handle,
|
171
|
+
drain_host: options[:host],
|
172
|
+
logging_token: options[:token],
|
173
|
+
drain_apps: options[:drain_apps],
|
174
|
+
drain_databases: options[:drain_databases],
|
175
|
+
drain_ephemeral_sessions: options[:drain_ephemeral_sessions],
|
176
|
+
drain_proxies: options[:drain_proxies],
|
177
|
+
drain_type: :solarwinds
|
178
|
+
}
|
179
|
+
create_log_drain(account, opts)
|
180
|
+
end
|
181
|
+
|
155
182
|
desc 'log_drain:create:syslog HANDLE ' \
|
156
183
|
'--host SYSLOG_HOST --port SYSLOG_PORT ' \
|
157
184
|
'[--token TOKEN] ' \
|
data/lib/aptible/cli/version.rb
CHANGED
@@ -21,7 +21,8 @@ describe Aptible::CLI::ResourceFormatter do
|
|
21
21
|
ip_whitelist: [],
|
22
22
|
default: false,
|
23
23
|
acme: false,
|
24
|
-
load_balancing_algorithm_type: 'least_outstanding_requests'
|
24
|
+
load_balancing_algorithm_type: 'least_outstanding_requests',
|
25
|
+
shared: false
|
25
26
|
)
|
26
27
|
|
27
28
|
expected = [
|
@@ -32,6 +33,7 @@ describe Aptible::CLI::ResourceFormatter do
|
|
32
33
|
'Type: https',
|
33
34
|
'Port: default',
|
34
35
|
'Load Balancing Algorithm Type: least_outstanding_requests',
|
36
|
+
'Shared: false',
|
35
37
|
'Internal: false',
|
36
38
|
'IP Whitelist: all traffic',
|
37
39
|
'Default Domain Enabled: false',
|
@@ -195,6 +195,30 @@ describe Aptible::CLI::Agent do
|
|
195
195
|
subject.send('log_drain:create:syslog', 'test-syslog')
|
196
196
|
end
|
197
197
|
end
|
198
|
+
|
199
|
+
describe 'solarwinds' do
|
200
|
+
it 'creates a new Solarwinds log drain' do
|
201
|
+
opts = {
|
202
|
+
handle: 'test-solarwinds',
|
203
|
+
drain_host: 'some-solarwinds.domain.com',
|
204
|
+
logging_token: 'test-token',
|
205
|
+
drain_apps: nil,
|
206
|
+
drain_databases: nil,
|
207
|
+
drain_ephemeral_sessions: nil,
|
208
|
+
drain_proxies: nil,
|
209
|
+
drain_type: :solarwinds
|
210
|
+
}
|
211
|
+
|
212
|
+
expect_provision_log_drain(opts)
|
213
|
+
|
214
|
+
subject.options = {
|
215
|
+
environment: account.handle,
|
216
|
+
host: 'some-solarwinds.domain.com',
|
217
|
+
token: 'test-token'
|
218
|
+
}
|
219
|
+
subject.send('log_drain:create:solarwinds', 'test-solarwinds')
|
220
|
+
end
|
221
|
+
end
|
198
222
|
end
|
199
223
|
|
200
224
|
describe '#log_drain:deprovision' do
|
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.24.
|
4
|
+
version: 0.24.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|