uffizzi-cli 2.4.5 → 2.4.6

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: 1ef83eb18cf4f320ac6b596cc3b2d9ba72b6ed5a60e90e7dc54f61fa1e042630
4
- data.tar.gz: 0a93840aa290162c4dc58a8ff3614fac4d58d988bd5296da5614db69524d0b43
3
+ metadata.gz: 2f954b8f82aabbd435972f10d4070dc9463642d8d23702a80f6897e8bce74cfe
4
+ data.tar.gz: 53ec7b439ed075e8582ed208b5a1ab5a03cbfe4e8bc6e79b8e4abaaf76ae2ada
5
5
  SHA512:
6
- metadata.gz: 215e24c7486176be02a14265492195334b096c20458f3ab926cb4bc76a82955f3f05f5ead2f9d812ca622a07e28d8747b580e47a8ac7f50c7a017c4674addb21
7
- data.tar.gz: ad0e2178d3ad1d440d8b29cc2e1abc031b2ee5bdb5a6ac7119db36d287d69c7b8ae648ea817013c7fc1ad1d96dcd575ed0df956b6ed24f9da993acc41ccae577
6
+ metadata.gz: e60cab6e8a4b07c6c1871e31d15d9b27544bf800cc5c461515d69289cc579a96f3291b704a70347bb3d492bb64cb68eae761f0b31b70fc103d2eb4573441cd94
7
+ data.tar.gz: e9c0eb113223ff5aeda960f6f55f5e63a5057912ea663ee8cbb5b45e4ff99ff47603818d1d48c09b355bf3e43ea3780f255a370e5ef11e48683b81a075a9e1b9
@@ -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]
@@ -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, Uffizzi::ConfigHelper.account_config(current_account[:id], current_account[:name]))
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
- account_name = accounts.detect { |account| account[:id] == account_id }[:name]
135
+ selected_account = accounts.detect { |account| account[:id] == account_id }
135
136
 
136
- ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(account_id, account_name))
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
 
@@ -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
- return ConfigFile.write_option(:account, Uffizzi::ConfigHelper.account_config(account[:id], account[:name])) if account
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, name = nil)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uffizzi
4
- VERSION = '2.4.5'
4
+ VERSION = '2.4.6'
5
5
  end
@@ -1,52 +1,55 @@
1
- $ uffizzi -h
2
- uffizzi - manage Uffizzi resources
1
+ $ uffizzi install help
2
+ uffizzi-install - install the uffizzi platform
3
3
  ================================================================
4
4
 
5
5
  ## SYNOPSIS
6
- uffizzi GROUP | COMMAND
6
+ uffizzi install [HOSTNAME] --email=[EMAIL]
7
7
 
8
8
  ## DESCRIPTION
9
- The uffizzi CLI manages authentication, configuration, and
10
- interaction with Uffizzi APIs.
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 uffizzi CLI, see:
13
- https://docs.uffizzi.com/references/cli/
14
+ For more information on the Uffizzi installation process, see:
15
+ https://docs.uffizzi.com/install/platform
14
16
 
15
- ## GROUP
16
- GROUP is one of the following:
17
- cluster
18
- Manage virtual clusters
17
+ ## POSITIONAL ARGUMENTS
19
18
 
20
- config
21
- Configure the uffizzi CLI
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
- connect
24
- Grant a Uffizzi user account access to external services
27
+ EMAIL
28
+ A business email, required for letsencrypt certificate authority.
25
29
 
26
- compose
27
- Manage Uffizzi compose environments (previews) and view logs
30
+ ## FLAGS
28
31
 
29
- dev
30
- Creates a Uffizzi cluster preconfigured for development workflows
32
+ --email
33
+ A business email required for letsencrypt
31
34
 
32
- install
33
- Install the Uffizzi platform data plane on a host cluster.
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
- project
36
- Manage Uffizzi project resources including compose files for
37
- specifying compose environment (preview) configurations and secrets
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
- ## COMMAND
40
- COMMAND is one of the following:
43
+ --help
44
+ Display this help page and exit
41
45
 
42
- help
43
- Show uffizzi documentation
46
+ ## EXAMPLES
44
47
 
45
- login
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
- logout
49
- Log out of a Uffizzi user account
50
-
51
- version
52
- Print version information for uffizzi CLI
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
- dev
33
- Creates a Uffizzi cluster preconfigured for development workflows
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.5
4
+ version: 2.4.6
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-13 00:00:00.000000000 Z
12
+ date: 2024-02-20 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