uffizzi-cli 2.4.5 → 2.4.7
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/lib/uffizzi/cli/account.rb +1 -1
- data/lib/uffizzi/cli/cluster.rb +3 -0
- data/lib/uffizzi/cli/login.rb +37 -4
- data/lib/uffizzi/cli/login_by_identity_token.rb +1 -1
- data/lib/uffizzi/cli/project.rb +3 -2
- data/lib/uffizzi/helpers/config_helper.rb +6 -2
- data/lib/uffizzi/version.rb +1 -1
- data/man/uffizzi-install.ronn +38 -35
- data/man/uffizzi-uninstall.ronn +23 -0
- data/man/uffizzi.ronn +9 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d5ba713ecb457d3cb8f344936b8192c76bed2951fc22036d4416e2267b00fd0
|
4
|
+
data.tar.gz: d1f0324a8b54de3282c2215ed9b68af1fc9c5d9fc54593647431bc7b57279c87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 966f0569cd79e933a4d1c62fe2c031b4856a92e36aa8804c62bc2f73d5faee9d0f325783921cda96c2bcf3b67504c39529c5baccfba2549c3762e13f6f517375
|
7
|
+
data.tar.gz: 616709d553d89ef6ac020360c41173a2756fed3582fa35e4c3eacca29cf919a29aaa68a8ef1ea912d63814a13890f6bbdc74cb7783a9e7e9e40f21979dbb0167
|
data/lib/uffizzi/cli/account.rb
CHANGED
@@ -76,7 +76,7 @@ module Uffizzi
|
|
76
76
|
account = response[:body][:account]
|
77
77
|
account_id = account[:id]
|
78
78
|
account_name = account[:name]
|
79
|
-
ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(account_id, account_name))
|
79
|
+
ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(id: account_id, name: account_name))
|
80
80
|
Uffizzi.ui.say("The account with name '#{account_name}' was set as default.")
|
81
81
|
|
82
82
|
projects = account[:projects]
|
data/lib/uffizzi/cli/cluster.rb
CHANGED
@@ -35,6 +35,7 @@ module Uffizzi
|
|
35
35
|
method_option :output, required: false, type: :string, aliases: '-o', enum: ['json', 'pretty-json']
|
36
36
|
method_option :'creation-source', required: false, type: :string
|
37
37
|
method_option :'k8s-version', required: false, type: :string
|
38
|
+
method_option :'node-selector', required: false, type: :string
|
38
39
|
def create(name = nil)
|
39
40
|
run('create', { name: name })
|
40
41
|
end
|
@@ -261,6 +262,7 @@ module Uffizzi
|
|
261
262
|
manifest_content = load_manifest_file(options[:manifest])
|
262
263
|
creation_source = options[:"creation-source"] || ClusterService::MANUAL_CREATION_SOURCE
|
263
264
|
k8s_version = options[:"k8s-version"]
|
265
|
+
node_selector = options[:"node-selector"]
|
264
266
|
|
265
267
|
{
|
266
268
|
cluster: {
|
@@ -268,6 +270,7 @@ module Uffizzi
|
|
268
270
|
manifest: manifest_content,
|
269
271
|
creation_source: creation_source,
|
270
272
|
k8s_version: k8s_version,
|
273
|
+
node_selector: node_selector,
|
271
274
|
},
|
272
275
|
token: oidc_token,
|
273
276
|
}
|
data/lib/uffizzi/cli/login.rb
CHANGED
@@ -71,6 +71,7 @@ module Uffizzi
|
|
71
71
|
Uffizzi.ui.say('Login successful')
|
72
72
|
|
73
73
|
set_current_account_and_project
|
74
|
+
Uffizzi.ui.say(installation_message)
|
74
75
|
end
|
75
76
|
|
76
77
|
def open_browser(url)
|
@@ -88,7 +89,7 @@ module Uffizzi
|
|
88
89
|
|
89
90
|
if ENV.fetch('CI_PIPELINE_RUN', false)
|
90
91
|
account = response[:body][:user][:default_account]
|
91
|
-
return ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(account[:id]))
|
92
|
+
return ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(id: account[:id]))
|
92
93
|
end
|
93
94
|
|
94
95
|
set_current_account_and_project
|
@@ -123,7 +124,7 @@ module Uffizzi
|
|
123
124
|
accounts = accounts_response[:body][:accounts]
|
124
125
|
if accounts.length == 1
|
125
126
|
current_account = accounts.first
|
126
|
-
ConfigFile.write_option(:account,
|
127
|
+
ConfigFile.write_option(:account, account_config(current_account))
|
127
128
|
return current_account[:id]
|
128
129
|
end
|
129
130
|
question = 'Select an account:'
|
@@ -131,9 +132,9 @@ module Uffizzi
|
|
131
132
|
{ name: account[:name], value: account[:id] }
|
132
133
|
end
|
133
134
|
account_id = Uffizzi.prompt.select(question, choices)
|
134
|
-
|
135
|
+
selected_account = accounts.detect { |account| account[:id] == account_id }
|
135
136
|
|
136
|
-
ConfigFile.write_option(:account,
|
137
|
+
ConfigFile.write_option(:account, account_config(selected_account))
|
137
138
|
|
138
139
|
account_id
|
139
140
|
end
|
@@ -211,5 +212,37 @@ module Uffizzi
|
|
211
212
|
|
212
213
|
Uffizzi.ui.say("Project #{project[:name]} was successfully created")
|
213
214
|
end
|
215
|
+
|
216
|
+
def installation_message
|
217
|
+
account_config = ConfigHelper.read_account_config
|
218
|
+
if account_config[:has_installation]
|
219
|
+
"\r\n\r\n"\
|
220
|
+
'####################################################################' \
|
221
|
+
"\r\n\r\n"\
|
222
|
+
"Your CLI is configured to use '#{account_config[:vclusters_controller_url]}'." \
|
223
|
+
"\r\n\r\n"\
|
224
|
+
'Run `uffizzi config -h` to see CLI configuration options.'\
|
225
|
+
"\r\n\r\n"
|
226
|
+
else
|
227
|
+
"\r\n\r\n"\
|
228
|
+
'####################################################################'\
|
229
|
+
"\r\n\r\n"\
|
230
|
+
'Your CLI is configured to use https://app.uffizzi.com (Uffizzi Cloud).'\
|
231
|
+
"\r\n\r\n"\
|
232
|
+
'Run `uffizzi config -h` to see CLI configuration options.'\
|
233
|
+
"\r\n"\
|
234
|
+
'Run `uffizzi install -h` to see self-hosted installation options.'\
|
235
|
+
"\r\n\r\n"
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
def account_config(account_data)
|
240
|
+
Uffizzi::ConfigHelper.account_config(
|
241
|
+
id: account_data[:id],
|
242
|
+
name: account_data[:name],
|
243
|
+
has_installation: account_data[:has_installation],
|
244
|
+
vclusters_controller_url: account_data[:vclusters_controller_url],
|
245
|
+
)
|
246
|
+
end
|
214
247
|
end
|
215
248
|
end
|
@@ -41,7 +41,7 @@ module Uffizzi
|
|
41
41
|
def handle_succeed_response(response, server, oidc_token)
|
42
42
|
ConfigFile.write_option(:server, server)
|
43
43
|
ConfigFile.write_option(:cookie, response[:headers])
|
44
|
-
ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(response[:body][:account_id]))
|
44
|
+
ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(id: response[:body][:account_id]))
|
45
45
|
ConfigFile.write_option(:project, response[:body][:project_slug])
|
46
46
|
ConfigFile.write_option(:oidc_token, oidc_token)
|
47
47
|
|
data/lib/uffizzi/cli/project.rb
CHANGED
@@ -171,10 +171,11 @@ module Uffizzi
|
|
171
171
|
def set_default_project(project)
|
172
172
|
ConfigFile.write_option(:project, project[:slug])
|
173
173
|
account = project[:account]
|
174
|
-
|
174
|
+
account_config = Uffizzi::ConfigHelper.account_config(id: account[:id], name: account[:name])
|
175
|
+
return ConfigFile.write_option(:account, account_config) if account
|
175
176
|
|
176
177
|
# For core versions < core_v2.2.3
|
177
|
-
ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(project[:account_id]))
|
178
|
+
ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(id: project[:account_id]))
|
178
179
|
end
|
179
180
|
end
|
180
181
|
end
|
@@ -17,8 +17,8 @@ module Uffizzi
|
|
17
17
|
ConfigFile.option_has_value?(option) ? ConfigFile.read_option(option) : nil
|
18
18
|
end
|
19
19
|
|
20
|
-
def account_config(id
|
21
|
-
{ id: id, name: name }
|
20
|
+
def account_config(id:, name: nil, has_installation: false, vclusters_controller_url: nil)
|
21
|
+
{ id: id, name: name, has_installation: has_installation, vclusters_controller_url: vclusters_controller_url }
|
22
22
|
end
|
23
23
|
|
24
24
|
def update_clusters_config_by_id(id, params)
|
@@ -60,6 +60,10 @@ module Uffizzi
|
|
60
60
|
read_option_from_config(:dev_environment) || {}
|
61
61
|
end
|
62
62
|
|
63
|
+
def read_account_config
|
64
|
+
read_option_from_config(:account)
|
65
|
+
end
|
66
|
+
|
63
67
|
private
|
64
68
|
|
65
69
|
def clusters
|
data/lib/uffizzi/version.rb
CHANGED
data/man/uffizzi-install.ronn
CHANGED
@@ -1,52 +1,55 @@
|
|
1
|
-
$ uffizzi
|
2
|
-
uffizzi -
|
1
|
+
$ uffizzi install help
|
2
|
+
uffizzi-install - install the uffizzi platform
|
3
3
|
================================================================
|
4
4
|
|
5
5
|
## SYNOPSIS
|
6
|
-
uffizzi
|
6
|
+
uffizzi install [HOSTNAME] --email=[EMAIL]
|
7
7
|
|
8
8
|
## DESCRIPTION
|
9
|
-
|
10
|
-
|
9
|
+
Install the Uffizzi platform data plane (controller and operator) on a host cluster.
|
10
|
+
|
11
|
+
If you want to self-host the Uffizzi platform data and control planes, you should
|
12
|
+
use Uffizzi Enterprise instead. Contact sales@uffizzi.com to get started.
|
11
13
|
|
12
|
-
For more information on the
|
13
|
-
https://docs.uffizzi.com/
|
14
|
+
For more information on the Uffizzi installation process, see:
|
15
|
+
https://docs.uffizzi.com/install/platform
|
14
16
|
|
15
|
-
##
|
16
|
-
GROUP is one of the following:
|
17
|
-
cluster
|
18
|
-
Manage virtual clusters
|
17
|
+
## POSITIONAL ARGUMENTS
|
19
18
|
|
20
|
-
|
21
|
-
|
19
|
+
HOSTNAME
|
20
|
+
The hostname where your installation will be publicly available. E.g. uffizzi.example.com
|
21
|
+
The output of the `install` command is an IP address or hostname where your instance
|
22
|
+
of the Uffizzi controller service is available. Uffizzi expects this service to be publicly
|
23
|
+
available at the specified HOSTNAME. Before you can create Uffizzi environments
|
24
|
+
on your installation, be sure to configure your DNS to point HOSTNAME to the IP
|
25
|
+
or hostname output by this command.
|
22
26
|
|
23
|
-
|
24
|
-
|
27
|
+
EMAIL
|
28
|
+
A business email, required for letsencrypt certificate authority.
|
25
29
|
|
26
|
-
|
27
|
-
Manage Uffizzi compose environments (previews) and view logs
|
30
|
+
## FLAGS
|
28
31
|
|
29
|
-
|
30
|
-
|
32
|
+
--email
|
33
|
+
A business email required for letsencrypt
|
31
34
|
|
32
|
-
|
33
|
-
|
35
|
+
--context
|
36
|
+
The name of the kubeconfig context to use. If no context is specified, your
|
37
|
+
kubeconfig current context is used.
|
34
38
|
|
35
|
-
|
36
|
-
|
37
|
-
|
39
|
+
--namespace
|
40
|
+
The namespace where Uffizzi platform will be installed. If no namespace is
|
41
|
+
specified, the 'default' namespace is used.
|
38
42
|
|
39
|
-
|
40
|
-
|
43
|
+
--help
|
44
|
+
Display this help page and exit
|
41
45
|
|
42
|
-
|
43
|
-
Show uffizzi documentation
|
46
|
+
## EXAMPLES
|
44
47
|
|
45
|
-
|
46
|
-
Log in to a Uffizzi user account
|
48
|
+
To install Uffizzi using the current context at hostname 'uffizzi.example.com', run:
|
47
49
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
$ uffizzi install uffizzi.example.com --email="jdoe@example.com"
|
51
|
+
|
52
|
+
To install Uffizzi using context 'foo' and namespace 'bar', run:
|
53
|
+
|
54
|
+
$ uffizzi install uffizzi.example.com --email="jdoe@example.com" \
|
55
|
+
--context='foo' --namespace='bar'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
$ uffizzi uninstall help
|
2
|
+
uffizzi-uninstall - uninstall the uffizzi platform
|
3
|
+
================================================================
|
4
|
+
|
5
|
+
## SYNOPSIS
|
6
|
+
uffizzi uninstall
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
Uninstall the Uffizzi platform data plane (controller and operator) from a host cluster.
|
10
|
+
|
11
|
+
For more information on the Uffizzi installation process, see:
|
12
|
+
https://docs.uffizzi.com/install/platform
|
13
|
+
|
14
|
+
## FLAGS
|
15
|
+
|
16
|
+
--help
|
17
|
+
Display this help page and exit
|
18
|
+
|
19
|
+
## EXAMPLES
|
20
|
+
|
21
|
+
To uninstall Uffizzi, run:
|
22
|
+
|
23
|
+
$ uffizzi uninstall
|
data/man/uffizzi.ronn
CHANGED
@@ -25,12 +25,19 @@ uffizzi - manage Uffizzi resources
|
|
25
25
|
compose
|
26
26
|
Manage Uffizzi compose environments (previews) and view logs
|
27
27
|
|
28
|
+
dev
|
29
|
+
Creates a Uffizzi cluster preconfigured for development workflows
|
30
|
+
|
31
|
+
install
|
32
|
+
Install the Uffizzi platform data plane on a host cluster.
|
33
|
+
|
28
34
|
project
|
29
35
|
Manage Uffizzi project resources including compose files for
|
30
36
|
specifying compose environment (preview) configurations and secrets
|
31
37
|
|
32
|
-
|
33
|
-
|
38
|
+
uninstall
|
39
|
+
Uninstall the Uffizzi platform data plane from a host cluster. Updates CLI
|
40
|
+
to use Uffizzi Cloud as the default API.
|
34
41
|
|
35
42
|
## COMMAND
|
36
43
|
COMMAND is one of the following:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uffizzi-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Thurman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-02
|
12
|
+
date: 2024-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -611,6 +611,7 @@ files:
|
|
611
611
|
- man/uffizzi-project-set-default.ronn
|
612
612
|
- man/uffizzi-project.html
|
613
613
|
- man/uffizzi-project.ronn
|
614
|
+
- man/uffizzi-uninstall.ronn
|
614
615
|
- man/uffizzi.html
|
615
616
|
- man/uffizzi.ronn
|
616
617
|
homepage: https://uffizzi.com
|