From e2236891f27d34ffa574bbcb77747882dd70c7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Tokg=C3=B6z?= <56408993+mehmettokgoz@users.noreply.github.com> Date: Fri, 31 Mar 2023 16:01:14 +0300 Subject: [PATCH] Add documentation for configuration wizard (#202) --- docs/modules/ROOT/nav.adoc | 1 + docs/modules/ROOT/pages/config-wizard.adoc | 102 ++++++++++++++++++ docs/modules/ROOT/pages/configuration.adoc | 3 + .../installer/hazelcast-clc-installer.iss | 2 +- 4 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 docs/modules/ROOT/pages/config-wizard.adoc diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 5666a5b1..ee062be5 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -7,6 +7,7 @@ * xref:configuration.adoc[Configure] ** xref:connect-to-viridian.adoc[Connect to Viridian] ** xref:connect-to-platform.adoc[Connect to Platform] +** xref:config-wizard.adoc[CLC Configuration Wizard ] * xref:upgrade-clc.adoc[Upgrade] .Reference diff --git a/docs/modules/ROOT/pages/config-wizard.adoc b/docs/modules/ROOT/pages/config-wizard.adoc new file mode 100644 index 00000000..63bdd7dc --- /dev/null +++ b/docs/modules/ROOT/pages/config-wizard.adoc @@ -0,0 +1,102 @@ +== CLC Configuration Wizard + +:description: Hazelcast CLC provides a wizard functionlity in the interactice mode to manage multiple configuration easily. It runs when a client connection need and asks for a configuration choice. + +:page-product: cloud + +{description} + +If you don't have any configuration yet, it will show a prompt screen to enter a configuration source with target name. If you have configurations +in the Hazelcast CLC home directory, it will list them and ask for you to select one to create client connection. + +TIP: If you have a configuration named `default`, a configuration YAML exists next to executable or in the current working directory, +CLC directly uses it instead of running configuration wizard. + +== Before you Begin + +You need the following: + +- Hazelcast CLC +- A {hazelcast-cloud} cluster + +== Connecting to {hazelcast-cloud} + +. Start the Hazelcast CLC in interactive mode. ++ +```bash +$ clc +``` ++ + +. Execute an operation that requires a client connection to cluster. ++ +```bash +CLC> SHOW MAPPINGS; +``` ++ + +. CLC will scan the configurations and list them if there is any. If there is no configuration found, it will prompt an +input screen for you to import a new configuration. ++ +```bash +There is no configuration detected. You can register a new configuration to conn +You can connect to Viridian cluster using curl request from `Dashboard -> Connec +Paste the link to source field below and it will download the config and TLS fil + +Configuration Name: default +Source: + +[ Submit ] +``` ++ + +. Specify the name of the configuration by chancing the configuration name field. The default value is `default` +If there is any default configuration, CLC will use it automatically. ++ +```bash +Configuration Name: default +``` ++ + +. Copy the Go Client sample url from {hazelcast-cloud} console. + +. Paste the Go client sample CURL request link to `Source: ` in this screen. ++ +```bash +Source: curl https://api.viridian.hazelcast.com/client_samples/download/... +``` ++ +. Press `[ Submit ]` and it will automatically connect to your Viridian cluster. Notice that if you didn't specify the +configuration name or leave it as default, it will automatically connect to this client unless you specify it with `--config` flag. + +== Multiple Configurations + +If you have multiple configurations in the CLC home directory, the configuration wizard will prompt you the list of +configuration to select. You can select by using your arrow keys. + +. Start the Hazelcast CLC in interactive mode. ++ +```bash +$ clc +``` ++ + +. Execute an operation that requires a client connection to cluster. ++ +```bash +CLC> SHOW MAPPINGS; +``` ++ + +. CLC will scan the configurations and list them if there is any. ++ +```bash +1. viridian-prod-config +2. viridian-dev-config +3. remote-cluster-config +``` ++ + +. Move using arrow keys and press Enter for the configuration you want to use. + +NOTE: The Hazelcast CLC connects to the cluster on demand, that is when you issue a command that requires the connection, such as running a SQL query. \ No newline at end of file diff --git a/docs/modules/ROOT/pages/configuration.adoc b/docs/modules/ROOT/pages/configuration.adoc index 293c175e..41c8cbbf 100644 --- a/docs/modules/ROOT/pages/configuration.adoc +++ b/docs/modules/ROOT/pages/configuration.adoc @@ -10,6 +10,9 @@ This file can exist anywhere in the file system, and can be used with the `--con clc -c test/config.yaml ---- +TIP: If you don't add any configuration before and try to run an operation that requires client connection, CLC will prompt a configuration wizard to import Viridian config easily. For details, see xref:config-wizard.adoc[CLC Configuration Wizard ]. + + If there is a `config.yaml` in the same directory with the CLC binary and the configuration was not explicitly set, CLC tries to load that configuration file: [source, bash] ---- diff --git a/extras/windows/installer/hazelcast-clc-installer.iss b/extras/windows/installer/hazelcast-clc-installer.iss index e4ff2fcf..d641d2e3 100644 --- a/extras/windows/installer/hazelcast-clc-installer.iss +++ b/extras/windows/installer/hazelcast-clc-installer.iss @@ -1,5 +1,5 @@ #define MyAppName "Hazelcast CLC" -#define MyAppVersion "v5.2.0-beta3" +#define MyAppVersion "v5.2.0" #define MyAppPublisher "Hazelcast, Inc." #define MyAppURL "https://www.hazelcast.com/" #define MyAppExeName "clc.exe"