From ac4ad75717f3bd93021e4570e8dddac70065feb9 Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Fri, 30 Sep 2022 17:54:21 +0200 Subject: [PATCH 01/21] New article for using dsbulk with cassandra --- _toc.yml | 1 + docs/products/cassandra/howto/use-nosqlbench-with-cassandra.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/_toc.yml b/_toc.yml index c84b00254c..b8e21188a9 100644 --- a/_toc.yml +++ b/_toc.yml @@ -747,6 +747,7 @@ entries: - file: docs/products/cassandra/howto/connect-go - file: docs/products/cassandra/howto/connect-cqlsh-cli - file: docs/products/cassandra/howto/use-nosqlbench-with-cassandra + - file: docs/products/cassandra/howto/use-dsbulk-with-cassandra - file: docs/products/cassandra/reference title: Reference entries: diff --git a/docs/products/cassandra/howto/use-nosqlbench-with-cassandra.rst b/docs/products/cassandra/howto/use-nosqlbench-with-cassandra.rst index 71616b686d..49c0c10c4e 100644 --- a/docs/products/cassandra/howto/use-nosqlbench-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-nosqlbench-with-cassandra.rst @@ -9,6 +9,7 @@ Prerequisites To download the latest nosqlbench release, search for "latest" in `nosqlbench GitHub repository `_. Nosqlbench can be downloaded as a Linux binary executable called ``nb``. The ``nb`` executable is built with all java libraries and includes a number of sample scenarios ready to be run. + .. Tip:: You can read more about the nosqlbench core concepts and parameters in the `dedicated documentation `_ From ebac57bfb26b94d60a4b42ec0a0d4e85cddeb45b Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Tue, 4 Oct 2022 15:13:34 +0200 Subject: [PATCH 02/21] Adding new article about dsbulk --- .../howto/use-dsbulk-with-cassandra.rst | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst new file mode 100644 index 0000000000..3bae1a4a91 --- /dev/null +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -0,0 +1,128 @@ +Use DSBULK to load, unload and count data on Aiven service for Cassandra +======================================================================== + +`DSBulk `_ is a highly configurable tool used to load, unload and count data in Apache Cassandra®. +It has configurable consistency levels for loading and unloading and offers the most accurate way to count the records in Cassandra. + +Prerequisites +~~~~~~~~~~~~~ + +To install the latest release of DSBulk, download the latest `zip` or `tar.gz` file from `dsbulk GitHub repository `_. + + +.. Tip:: + + You can read more about the dsbulk different use cases and manual pages in the `dedicated documentation `_ + +Variables +~~~~~~~~~ + +These are the placeholders you will need to replace in the code sample: + +================== ============================================================= +Variable Description +================== ============================================================= +``PASSWORD`` Password of the ``avnadmin`` user +``HOST`` Host name for the connection +``PORT`` Port number to use for the Cassandra service +``SSL_CERTFILE`` Path of the `CA Certificate` for the Cassandra service +================== ============================================================= + +.. Tip:: + + All the above variables and the CA Certificate file can be found in the `Aiven Console `_, in the service detail page. + +Preparation of the environment +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In order for `dsbulk` to read the security certificate to connect to Aiven service for Cassandra, the certificate must be imported in a truststore. + +1- download the certificate from `Aiven Console> Services> cassandra-asdfasdf> Overview> CA Certificate`. Save the CA certificate +in a file called `cassandra-certificate.pem` in a directory on the linux system where `dsbulk`` runs. + +2- run this command line to create a truststore file and import the certificate in it: + +``keytool -import -v -trustcacerts -alias CARoot -file cassandra-certificate.pem -keystore client.truststore`` + +a truststore file called `client.truststore` is created in the directory where the keytool command has been launched. +The keytool command assumes the file `cassandra-certificate.pem` is in the same directory, otherwise provide a full path to `cassandra-certificate.pem`. +During creation of the truststore, you will be need to set a password that is required to access the truststore and retrieve the certificate. + +3- after having created a truststore and having imported the certificate, it's necessary to put all the connection information +into a configuration file, in this way the dsbulk command line will be more readable and will not show passwords in clear. If you don't create a config file, +every option must be explicitly provided on the command line, but this is going to create a command line that is difficult to read. + +4- create a file that contains the connection configuration:: + +cat conf.file +datastax-java-driver { + advanced { + ssl-engine-factory { + keystore-password = "cassandra" + keystore-path = "/home/user1/client.truststore" + class = DefaultSslEngineFactory + truststore-password = "cassandra" + truststore-path = "/home/user1/client.truststore" + } + auth-provider { + username = avnadmin + password = AVNS_JHMJgrFwIa-uPd7BwEB + } + } +} + +The config file can contain many different blocks for different configurations. In our case it only contains the datastax-java-driver block. +The careful reader will not have missed that the ssl-engine-factory block contains the path of the truststore and the password to read into the +truststore and access the certificate. +For a full reference and templates of the application configuration file see `here `_. +For a full reference of the driver configuration file, see `here `_. + + +Run a `dsbulk` command to count records in a Cassandra table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Now that we have created the configuration file, we can run the dsbulk command line. +Go to the `bin` directory of the downloaded `dsbulk` package and run the following command line:: + + ./dsbulk count \ + -f /full/path/to/conf.file \ + -k baselines \ + -t keyvalue \ + -h cassandra-asdfasdf-project1.aivencloud.com \ + -port 20341 \ + --log.verbosity 2 + +where `baselines` and `keyvalue` are the names of the sample keyspace and table in the Cassandra database. +`log.verbosity` controls the amount of logging that is sent at standard output when `dsbulk` runs. `verbosity=2` is used only to troubleshoot problems. +To reduce verbosity, reduce the number to 1 or remove the option altogether. + + +Run a `dsbulk` command to load data into a Cassandra table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A command line similar to the one above can be used to load data into a table:: + + ./dsbulk unload \ + -f ../conf.file \ + -k baselines \ + -t keyvalue \ + -h cassandra-asdfasdf-project1.aivencloud.com \ + -port 20341 + +this command will unload all records from the table in a CSV format. + +Load data into a Cassandra table from a CSV file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To load data into a Cassandra table, the command line is very similar to the previous command:: + + ./dsbulk load \ + -f ../conf.file \ + -k baselines \ + -t keyvalue \ + -h cassandra-asdfasdf-project1.aivencloud.com \ + -port 20341 \ + -url data.csv + +this command will load data from the file `data.csv` into the table `keyvalue` in the keyspace `baselines`. + From 62b5f4c1bd55908a6ec689f604125e0ae630a60e Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Tue, 4 Oct 2022 15:19:44 +0200 Subject: [PATCH 03/21] =?UTF-8?q?Added=20=C2=AE=20to=20cassandra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index 3bae1a4a91..35b3389222 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -1,5 +1,5 @@ -Use DSBULK to load, unload and count data on Aiven service for Cassandra -======================================================================== +Use DSBULK to load, unload and count data on Aiven service for Cassandra® +========================================================================= `DSBulk `_ is a highly configurable tool used to load, unload and count data in Apache Cassandra®. It has configurable consistency levels for loading and unloading and offers the most accurate way to count the records in Cassandra. From b83e54356ad3eb009321fba66fe49b2e0a958062 Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Tue, 4 Oct 2022 15:37:07 +0200 Subject: [PATCH 04/21] Corrected few typos and added bullet points at the end of each command line --- .../howto/use-dsbulk-with-cassandra.rst | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index 35b3389222..bb853c0eaa 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -2,12 +2,12 @@ Use DSBULK to load, unload and count data on Aiven service for Cassandra® ========================================================================= `DSBulk `_ is a highly configurable tool used to load, unload and count data in Apache Cassandra®. -It has configurable consistency levels for loading and unloading and offers the most accurate way to count the records in Cassandra. +It has configurable consistency levels for loading and unloading and offers the most accurate way to count records in Cassandra. Prerequisites ~~~~~~~~~~~~~ -To install the latest release of DSBulk, download the latest `zip` or `tar.gz` file from `dsbulk GitHub repository `_. +To install the latest release of DSBulk, download the `zip` or `tar.gz` file from `dsbulk GitHub repository `_. .. Tip:: @@ -38,21 +38,22 @@ Preparation of the environment In order for `dsbulk` to read the security certificate to connect to Aiven service for Cassandra, the certificate must be imported in a truststore. 1- download the certificate from `Aiven Console> Services> cassandra-asdfasdf> Overview> CA Certificate`. Save the CA certificate -in a file called `cassandra-certificate.pem` in a directory on the linux system where `dsbulk`` runs. +in a file called `cassandra-certificate.pem` in a directory on the linux system where `dsbulk` runs. 2- run this command line to create a truststore file and import the certificate in it: ``keytool -import -v -trustcacerts -alias CARoot -file cassandra-certificate.pem -keystore client.truststore`` a truststore file called `client.truststore` is created in the directory where the keytool command has been launched. -The keytool command assumes the file `cassandra-certificate.pem` is in the same directory, otherwise provide a full path to `cassandra-certificate.pem`. +The keytool command assumes the file `cassandra-certificate.pem` is in the same directory where you run `keytool`. If that is not the case, provide a full path +to `cassandra-certificate.pem`. During creation of the truststore, you will be need to set a password that is required to access the truststore and retrieve the certificate. -3- after having created a truststore and having imported the certificate, it's necessary to put all the connection information -into a configuration file, in this way the dsbulk command line will be more readable and will not show passwords in clear. If you don't create a config file, -every option must be explicitly provided on the command line, but this is going to create a command line that is difficult to read. +3- next step is to create a configuration file with the connection information. +In this way the `dsbulk`` command line will be more readable and will not show passwords in clear. If you don't create a config file, +every option must be explicitly provided on the command line. -4- create a file that contains the connection configuration:: +4- create a file that contains the connection configuration like this:: cat conf.file datastax-java-driver { @@ -72,7 +73,7 @@ datastax-java-driver { } The config file can contain many different blocks for different configurations. In our case it only contains the datastax-java-driver block. -The careful reader will not have missed that the ssl-engine-factory block contains the path of the truststore and the password to read into the +The careful reader has not missed that the ssl-engine-factory block contains the path of the truststore and the password to read into the truststore and access the certificate. For a full reference and templates of the application configuration file see `here `_. For a full reference of the driver configuration file, see `here `_. @@ -92,9 +93,11 @@ Go to the `bin` directory of the downloaded `dsbulk` package and run the followi -port 20341 \ --log.verbosity 2 -where `baselines` and `keyvalue` are the names of the sample keyspace and table in the Cassandra database. -`log.verbosity` controls the amount of logging that is sent at standard output when `dsbulk` runs. `verbosity=2` is used only to troubleshoot problems. -To reduce verbosity, reduce the number to 1 or remove the option altogether. +where: +- `baselines` and `keyvalue` are the names of the sample keyspace and table in the Cassandra database. +- `log.verbosity` controls the amount of logging that is sent at standard output when `dsbulk` runs. `verbosity=2` is used only to troubleshoot problems. To reduce verbosity, reduce the number to 1 or remove the option altogether. +- -f specifies the path to the configuration file +- -h and -p are the hostname and port number to connect to Cassandra db. Run a `dsbulk` command to load data into a Cassandra table @@ -109,7 +112,7 @@ A command line similar to the one above can be used to load data into a table:: -h cassandra-asdfasdf-project1.aivencloud.com \ -port 20341 -this command will unload all records from the table in a CSV format. +this command will unload all records from the table in a CSV format. In order to download the data in a file, the output can be redirected to a file. Load data into a Cassandra table from a CSV file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -124,5 +127,6 @@ To load data into a Cassandra table, the command line is very similar to the pre -port 20341 \ -url data.csv -this command will load data from the file `data.csv` into the table `keyvalue` in the keyspace `baselines`. +where: +- the file `data.csv` is the file that contains the data to load into Cassandra. From 54c86cb1a60382e8ff4060e8a533bc58a60c0a1e Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Tue, 4 Oct 2022 15:39:35 +0200 Subject: [PATCH 05/21] missing space --- docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index bb853c0eaa..c65b4e33d5 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -55,7 +55,8 @@ every option must be explicitly provided on the command line. 4- create a file that contains the connection configuration like this:: -cat conf.file +cat conf.file: + datastax-java-driver { advanced { ssl-engine-factory { From b7b94091d661aa16832fc0895e8b856ea9b506fd Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Tue, 4 Oct 2022 16:05:26 +0200 Subject: [PATCH 06/21] typO --- docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index c65b4e33d5..1e9e1ce190 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -57,7 +57,8 @@ every option must be explicitly provided on the command line. cat conf.file: -datastax-java-driver { + datastax-java-driver { + advanced { ssl-engine-factory { keystore-password = "cassandra" @@ -71,7 +72,7 @@ datastax-java-driver { password = AVNS_JHMJgrFwIa-uPd7BwEB } } -} + } The config file can contain many different blocks for different configurations. In our case it only contains the datastax-java-driver block. The careful reader has not missed that the ssl-engine-factory block contains the path of the truststore and the password to read into the From ec0d3cfabef77d34a8d5718bd049dae68a2618bb Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Tue, 4 Oct 2022 16:29:10 +0200 Subject: [PATCH 07/21] added backtick to cassandra name --- docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index 1e9e1ce190..05e67ce48e 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -45,8 +45,8 @@ in a file called `cassandra-certificate.pem` in a directory on the linux system ``keytool -import -v -trustcacerts -alias CARoot -file cassandra-certificate.pem -keystore client.truststore`` a truststore file called `client.truststore` is created in the directory where the keytool command has been launched. -The keytool command assumes the file `cassandra-certificate.pem` is in the same directory where you run `keytool`. If that is not the case, provide a full path -to `cassandra-certificate.pem`. +The keytool command assumes the file ``cassandra-certificate.pem`` is in the same directory where you run ``keytool``. If that is not the case, provide a full path +to ``cassandra-certificate.pem``. During creation of the truststore, you will be need to set a password that is required to access the truststore and retrieve the certificate. 3- next step is to create a configuration file with the connection information. From 69a16380a4e56cade1fb345a597fd741803b10a1 Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Tue, 4 Oct 2022 16:34:00 +0200 Subject: [PATCH 08/21] trying to make the code block more readable --- .../howto/use-dsbulk-with-cassandra.rst | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index 05e67ce48e..b2f3f32520 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -50,29 +50,28 @@ to ``cassandra-certificate.pem``. During creation of the truststore, you will be need to set a password that is required to access the truststore and retrieve the certificate. 3- next step is to create a configuration file with the connection information. -In this way the `dsbulk`` command line will be more readable and will not show passwords in clear. If you don't create a config file, +In this way the `dsbulk` command line will be more readable and will not show passwords in clear. If you don't create a config file, every option must be explicitly provided on the command line. 4- create a file that contains the connection configuration like this:: cat conf.file: - datastax-java-driver { - - advanced { - ssl-engine-factory { - keystore-password = "cassandra" - keystore-path = "/home/user1/client.truststore" - class = DefaultSslEngineFactory - truststore-password = "cassandra" - truststore-path = "/home/user1/client.truststore" - } - auth-provider { - username = avnadmin - password = AVNS_JHMJgrFwIa-uPd7BwEB - } - } - } + | datastax-java-driver { + | advanced { + | ssl-engine-factory { + | keystore-password = "cassandra" + | keystore-path = "/home/user1/client.truststore" + | class = DefaultSslEngineFactory + | truststore-password = "cassandra" + | truststore-path = "/home/user1/client.truststore" + | } + | auth-provider { + | username = avnadmin + | password = AVNS_JHMJgrFwIa-uPd7BwEB + | } + |} + |} The config file can contain many different blocks for different configurations. In our case it only contains the datastax-java-driver block. The careful reader has not missed that the ssl-engine-factory block contains the path of the truststore and the password to read into the From 96bb40ed9f7e69a4cc4629d645bc0a85ea2ea428 Mon Sep 17 00:00:00 2001 From: "francesco.animali" Date: Tue, 4 Oct 2022 16:37:29 +0200 Subject: [PATCH 09/21] indentation --- .../howto/use-dsbulk-with-cassandra.rst | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index b2f3f32520..c319fab6a0 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -55,23 +55,21 @@ every option must be explicitly provided on the command line. 4- create a file that contains the connection configuration like this:: -cat conf.file: - - | datastax-java-driver { - | advanced { - | ssl-engine-factory { - | keystore-password = "cassandra" - | keystore-path = "/home/user1/client.truststore" - | class = DefaultSslEngineFactory - | truststore-password = "cassandra" - | truststore-path = "/home/user1/client.truststore" - | } - | auth-provider { - | username = avnadmin - | password = AVNS_JHMJgrFwIa-uPd7BwEB - | } - |} - |} + datastax-java-driver { + advanced { + ssl-engine-factory { + keystore-password = "cassandra" + keystore-path = "/home/user1/client.truststore" + class = DefaultSslEngineFactory + truststore-password = "cassandra" + truststore-path = "/home/user1/client.truststore" + } + auth-provider { + username = avnadmin + password = AVNS_JHMJgrFwIa-uPd7BwEB + } + } + } The config file can contain many different blocks for different configurations. In our case it only contains the datastax-java-driver block. The careful reader has not missed that the ssl-engine-factory block contains the path of the truststore and the password to read into the From 64d9b27c3e9d8a416efc44a5741465c92ccd7688 Mon Sep 17 00:00:00 2001 From: Lorna Mitchell Date: Wed, 12 Oct 2022 15:44:10 +0100 Subject: [PATCH 10/21] Formatting and spelling/dictionary fixes --- .github/vale/dicts/aiven.dic | 1 + .../howto/use-dsbulk-with-cassandra.rst | 60 +++++++++---------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/vale/dicts/aiven.dic b/.github/vale/dicts/aiven.dic index 6149bcc54c..34bad930d1 100644 --- a/.github/vale/dicts/aiven.dic +++ b/.github/vale/dicts/aiven.dic @@ -46,6 +46,7 @@ Docker dockerized downsampled downsampling +DSBulk Elasticsearch Epicurious etcd diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index c319fab6a0..9689934b2e 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -1,21 +1,21 @@ Use DSBULK to load, unload and count data on Aiven service for Cassandra® -========================================================================= +######################################################################### `DSBulk `_ is a highly configurable tool used to load, unload and count data in Apache Cassandra®. It has configurable consistency levels for loading and unloading and offers the most accurate way to count records in Cassandra. Prerequisites -~~~~~~~~~~~~~ +------------- -To install the latest release of DSBulk, download the `zip` or `tar.gz` file from `dsbulk GitHub repository `_. +To install the latest release of DSBulk, download the ``.zip`` or ``.tar.gz`` file from the `DSBulk GitHub repository `_. .. Tip:: - You can read more about the dsbulk different use cases and manual pages in the `dedicated documentation `_ + You can read more about the DSBulk different use cases and manual pages in the `dedicated documentation `_ Variables -~~~~~~~~~ +--------- These are the placeholders you will need to replace in the code sample: @@ -33,27 +33,27 @@ Variable Description All the above variables and the CA Certificate file can be found in the `Aiven Console `_, in the service detail page. Preparation of the environment -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------ -In order for `dsbulk` to read the security certificate to connect to Aiven service for Cassandra, the certificate must be imported in a truststore. +In order for ``dsbulk`` to read the security certificate to connect to Aiven service for Cassandra, the certificate must be imported in a truststore. -1- download the certificate from `Aiven Console> Services> cassandra-asdfasdf> Overview> CA Certificate`. Save the CA certificate -in a file called `cassandra-certificate.pem` in a directory on the linux system where `dsbulk` runs. +1. Download the certificate from the service overview page of your Aiven for Apache Cassandra service. Save the CA certificate +in a file called ``cassandra-certificate.pem`` in a directory on the linux system where ``dsbulk`` runs. -2- run this command line to create a truststore file and import the certificate in it: +2. Run this command line to create a truststore file and import the certificate in it: ``keytool -import -v -trustcacerts -alias CARoot -file cassandra-certificate.pem -keystore client.truststore`` -a truststore file called `client.truststore` is created in the directory where the keytool command has been launched. -The keytool command assumes the file ``cassandra-certificate.pem`` is in the same directory where you run ``keytool``. If that is not the case, provide a full path +A truststore file called ``client.truststore`` is created in the directory where the ``keytool`` command has been launched. +The ``keytool`` command assumes the file ``cassandra-certificate.pem`` is in the same directory where you run ``keytool``. If that is not the case, provide a full path to ``cassandra-certificate.pem``. During creation of the truststore, you will be need to set a password that is required to access the truststore and retrieve the certificate. -3- next step is to create a configuration file with the connection information. -In this way the `dsbulk` command line will be more readable and will not show passwords in clear. If you don't create a config file, +3. The next step is to create a configuration file with the connection information. +In this way the ``dsbulk`` command line will be more readable and will not show passwords in clear. If you don't create a configuration file, every option must be explicitly provided on the command line. -4- create a file that contains the connection configuration like this:: +4. create a file that contains the connection configuration like this:: datastax-java-driver { advanced { @@ -71,18 +71,18 @@ every option must be explicitly provided on the command line. } } -The config file can contain many different blocks for different configurations. In our case it only contains the datastax-java-driver block. +The configuration file can contain many different blocks for different configurations. In our case it only contains the datastax-java-driver block. The careful reader has not missed that the ssl-engine-factory block contains the path of the truststore and the password to read into the truststore and access the certificate. -For a full reference and templates of the application configuration file see `here `_. -For a full reference of the driver configuration file, see `here `_. +The documentation has both `full reference and templates of the application configuration file `_ +and a `full reference of the driver configuration file `_. -Run a `dsbulk` command to count records in a Cassandra table -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Run a ``dsbulk`` command to count records in a Cassandra table +-------------------------------------------------------------- -Now that we have created the configuration file, we can run the dsbulk command line. -Go to the `bin` directory of the downloaded `dsbulk` package and run the following command line:: +Now that we have created the configuration file, we can run the ``dsbulk`` command line. +Go to the `bin` directory of the downloaded ``dsbulk`` package and run the following command line:: ./dsbulk count \ -f /full/path/to/conf.file \ @@ -93,14 +93,14 @@ Go to the `bin` directory of the downloaded `dsbulk` package and run the followi --log.verbosity 2 where: -- `baselines` and `keyvalue` are the names of the sample keyspace and table in the Cassandra database. -- `log.verbosity` controls the amount of logging that is sent at standard output when `dsbulk` runs. `verbosity=2` is used only to troubleshoot problems. To reduce verbosity, reduce the number to 1 or remove the option altogether. -- -f specifies the path to the configuration file -- -h and -p are the hostname and port number to connect to Cassandra db. +- ``baselines`` and ``keyvalue`` are the names of the sample keyspace and table in the Cassandra database. +- ``log.verbosity`` controls the amount of logging that is sent at standard output when ``dsbulk`` runs. ``verbosity=2`` is used only to troubleshoot problems. To reduce verbosity, reduce the number to 1 or remove the option altogether. +- ``-f`` specifies the path to the configuration file +- ``-h`` and ``-p`` are the hostname and port number to connect to Cassandra. -Run a `dsbulk` command to load data into a Cassandra table -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Run a ``dsbulk`` command to load data into a Cassandra table +------------------------------------------------------------ A command line similar to the one above can be used to load data into a table:: @@ -111,10 +111,10 @@ A command line similar to the one above can be used to load data into a table:: -h cassandra-asdfasdf-project1.aivencloud.com \ -port 20341 -this command will unload all records from the table in a CSV format. In order to download the data in a file, the output can be redirected to a file. +This command will unload all records from the table in a CSV format. In order to download the data in a file, the output can be redirected to a file. Load data into a Cassandra table from a CSV file -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------------------------ To load data into a Cassandra table, the command line is very similar to the previous command:: From b414bc94203796029043eacd29a6f8bf1de1a7f7 Mon Sep 17 00:00:00 2001 From: Francesco Date: Tue, 18 Oct 2022 13:28:39 +0200 Subject: [PATCH 11/21] fixed commands --- .../howto/use-dsbulk-with-cassandra.rst | 138 ++++++++++-------- 1 file changed, 75 insertions(+), 63 deletions(-) diff --git a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst index 9689934b2e..039063f530 100644 --- a/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst +++ b/docs/products/cassandra/howto/use-dsbulk-with-cassandra.rst @@ -40,92 +40,104 @@ In order for ``dsbulk`` to read the security certificate to connect to Aiven ser 1. Download the certificate from the service overview page of your Aiven for Apache Cassandra service. Save the CA certificate in a file called ``cassandra-certificate.pem`` in a directory on the linux system where ``dsbulk`` runs. -2. Run this command line to create a truststore file and import the certificate in it: +2. Run this command line to create a truststore file and import the certificate in it:: -``keytool -import -v -trustcacerts -alias CARoot -file cassandra-certificate.pem -keystore client.truststore`` + keytool -import -v \ + -trustcacerts \ + -alias CARoot \ + -file cassandra-certificate.pem \ + -keystore client.truststore -A truststore file called ``client.truststore`` is created in the directory where the ``keytool`` command has been launched. -The ``keytool`` command assumes the file ``cassandra-certificate.pem`` is in the same directory where you run ``keytool``. If that is not the case, provide a full path -to ``cassandra-certificate.pem``. -During creation of the truststore, you will be need to set a password that is required to access the truststore and retrieve the certificate. + A truststore file called ``client.truststore`` is created in the directory where the ``keytool`` command has been launched. + + The ``keytool`` command assumes the file ``cassandra-certificate.pem`` is in the same directory where you run ``keytool``. If that is not the case, provide a full path to ``cassandra-certificate.pem``. + + During creation of the truststore, you need to set a password that is required to access the truststore and retrieve the certificate. 3. The next step is to create a configuration file with the connection information. -In this way the ``dsbulk`` command line will be more readable and will not show passwords in clear. If you don't create a configuration file, -every option must be explicitly provided on the command line. - -4. create a file that contains the connection configuration like this:: - - datastax-java-driver { - advanced { - ssl-engine-factory { - keystore-password = "cassandra" - keystore-path = "/home/user1/client.truststore" - class = DefaultSslEngineFactory - truststore-password = "cassandra" - truststore-path = "/home/user1/client.truststore" + + By creating a configuration file, the ``dsbulk`` command line is more readable and it doesn't show passwords in clear text. If you don't create a configuration file, every option must be explicitly provided on the command line. + +4. Create a file that contains the connection configuration like the following:: + + datastax-java-driver { + advanced { + ssl-engine-factory { + keystore-password = "cassandra" + keystore-path = "/home/user1/client.truststore" + class = DefaultSslEngineFactory + truststore-password = "cassandra" + truststore-path = "/home/user1/client.truststore" + } + auth-provider { + username = avnadmin + password = AVNS_JHMJgrFwIa-uPd7BwEB + } + } } - auth-provider { - username = avnadmin - password = AVNS_JHMJgrFwIa-uPd7BwEB - } - } - } -The configuration file can contain many different blocks for different configurations. In our case it only contains the datastax-java-driver block. -The careful reader has not missed that the ssl-engine-factory block contains the path of the truststore and the password to read into the -truststore and access the certificate. -The documentation has both `full reference and templates of the application configuration file `_ -and a `full reference of the driver configuration file `_. + The DSBulk configuration file can contain many different blocks for different configurations. In the above example, it only the ``datastax-java-driver`` block is filled. + The ``ssl-engine-factory`` block contains the path of the truststore and the related password. + + .. Tip:: + + The Cassandra documentation has both `full reference and templates of the application configuration file `_ and a `full reference of the driver configuration file `_. Run a ``dsbulk`` command to count records in a Cassandra table -------------------------------------------------------------- -Now that we have created the configuration file, we can run the ``dsbulk`` command line. -Go to the `bin` directory of the downloaded ``dsbulk`` package and run the following command line:: +Once the configuration file is created, you can run the ``dsbulk``. + +1. Navigate to the `bin` subdirectory of the downloaded ``dsbulk`` package + +2. Run the following command:: + + ./dsbulk count \ + -f /full/path/to/conf.file \ + -k baselines \ + -t keyvalue \ + -h HOST \ + -port PORT \ + --log.verbosity 2 - ./dsbulk count \ - -f /full/path/to/conf.file \ - -k baselines \ - -t keyvalue \ - -h cassandra-asdfasdf-project1.aivencloud.com \ - -port 20341 \ - --log.verbosity 2 + where: -where: -- ``baselines`` and ``keyvalue`` are the names of the sample keyspace and table in the Cassandra database. -- ``log.verbosity`` controls the amount of logging that is sent at standard output when ``dsbulk`` runs. ``verbosity=2`` is used only to troubleshoot problems. To reduce verbosity, reduce the number to 1 or remove the option altogether. -- ``-f`` specifies the path to the configuration file -- ``-h`` and ``-p`` are the hostname and port number to connect to Cassandra. + * ``baselines`` and ``keyvalue`` are the names of the example keyspace and table in the Cassandra database. + * ``log.verbosity`` controls the amount of logging that is sent at standard output when ``dsbulk`` runs. ``verbosity=2`` is used only to troubleshoot problems. To reduce verbosity, reduce the number to 1 or remove the option altogether. + * ``-f`` specifies the path to the configuration file + * ``-h`` and ``-p`` are the hostname and port number to connect to Cassandra. -Run a ``dsbulk`` command to load data into a Cassandra table +Extract data from a Cassandra table in CSV format ------------------------------------------------------------ -A command line similar to the one above can be used to load data into a table:: +To extract the data from a table, you can use the following command:: - ./dsbulk unload \ - -f ../conf.file \ - -k baselines \ - -t keyvalue \ - -h cassandra-asdfasdf-project1.aivencloud.com \ - -port 20341 + ./dsbulk unload \ + -f ../conf.file \ + -k baselines \ + -t keyvalue \ + -h HOST \ + -port PORT -This command will unload all records from the table in a CSV format. In order to download the data in a file, the output can be redirected to a file. +This command will extract all records from the table and output in a CSV format. + +.. Tip:: + + In order to download the data in a file, the output can be redirected to a file. Load data into a Cassandra table from a CSV file ------------------------------------------------ To load data into a Cassandra table, the command line is very similar to the previous command:: - ./dsbulk load \ - -f ../conf.file \ - -k baselines \ - -t keyvalue \ - -h cassandra-asdfasdf-project1.aivencloud.com \ - -port 20341 \ - -url data.csv - -where: -- the file `data.csv` is the file that contains the data to load into Cassandra. + ./dsbulk load \ + -f ../conf.file \ + -k baselines \ + -t keyvalue \ + -h HOST \ + -port PORT \ + -url data.csv +where the file ``data.csv`` is the file that contains the data to load into Cassandra. \ No newline at end of file From f0e2ff31c1e8cba80f1deff934a0021f43f992bb Mon Sep 17 00:00:00 2001 From: Stacey Salamon Date: Fri, 14 Oct 2022 16:13:51 +0200 Subject: [PATCH 12/21] Create support center article Migrate content to how to article with instructions on creating and adding followers to support tickets --- _toc.yml | 3 +- .../platform/howto/project-support-center.rst | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 docs/platform/howto/project-support-center.rst diff --git a/_toc.yml b/_toc.yml index 4942e2bf95..14014747da 100644 --- a/_toc.yml +++ b/_toc.yml @@ -106,7 +106,8 @@ entries: - file: docs/platform/howto/saml/setup-saml-okta title: Setting up SAML with Okta - file: docs/platform/howto/saml/setup-saml-auth0 - title: Setting up SAML with Auth0 + title: Setting up SAML with Auth0 + - file: docs/platform/howto/project-support-center - file: docs/platform/reference title: Reference entries: diff --git a/docs/platform/howto/project-support-center.rst b/docs/platform/howto/project-support-center.rst new file mode 100644 index 0000000000..e92f6305b7 --- /dev/null +++ b/docs/platform/howto/project-support-center.rst @@ -0,0 +1,35 @@ +Get Support in the Aiven Console +==================================== + +Aiven is committed to providing excellent and responsive support to all of our customers. We are constantly monitoring our services 24/7 and rapidly addressing any anomalies. + +In addition to our standard support, we offer three additional tiers that include faster response times and phone support. For more information about support plans, please see `Aiven support details page `_ or contact sales@aiven.io to discuss premium support. + + +You can create and track support tickets in the Project Support Center in the Aiven Console. + +Create a support ticket +~~~~~~~~~~~~~~~~~~~~~~~~ + +To create support tickets in the Aiven Console: + +#. Click **Support** to open the Project Support Center. +#. Click **Open support ticket**. +#. Enter a title and detailed description of the issue that you're experiencing. +#. Select the affected service and a severity level. +#. Click **Create ticket**. + +Your new ticket is sent to our support team for review and you also receive an confirmation email. You can reply to this email to update your ticket with new information. Replies from the Aiven support team will be sent directly to your email. + +You can also track the status of your tickets and review them from the project support center. + +Add followers to an open ticket +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If other users want to track and manage a ticket, the owner can add them to an open ticket by the owner of the ticket: + +#. Click **Support** to open the Project Support Center. +#. Find the ticket you want to add users to in the list and click **Add follower**. +#. Select the user's email and click **Add follower**. + +You can also add users to a ticket by CCing them into the support ticket email. \ No newline at end of file From f3b31bec94e9485d9fe1bae2e589e50d5fde5cf9 Mon Sep 17 00:00:00 2001 From: Stacey Salamon <111294980+staceysalamon-aiven@users.noreply.github.com> Date: Fri, 14 Oct 2022 17:40:24 +0200 Subject: [PATCH 13/21] Update docs/platform/howto/project-support-center.rst Co-authored-by: laysa uchoa --- docs/platform/howto/project-support-center.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platform/howto/project-support-center.rst b/docs/platform/howto/project-support-center.rst index e92f6305b7..e3d8a8b896 100644 --- a/docs/platform/howto/project-support-center.rst +++ b/docs/platform/howto/project-support-center.rst @@ -3,7 +3,7 @@ Get Support in the Aiven Console Aiven is committed to providing excellent and responsive support to all of our customers. We are constantly monitoring our services 24/7 and rapidly addressing any anomalies. -In addition to our standard support, we offer three additional tiers that include faster response times and phone support. For more information about support plans, please see `Aiven support details page `_ or contact sales@aiven.io to discuss premium support. +In addition to our standard support, we offer three additional tiers that include faster response times and phone support. For more information about support plans, please see `Aiven support details page `_ or contact ``sales@aiven.io`` to discuss premium support. You can create and track support tickets in the Project Support Center in the Aiven Console. From 17ab1d4c560f32f08dc4cc34589e16d6369d81ab Mon Sep 17 00:00:00 2001 From: Stacey Salamon Date: Mon, 17 Oct 2022 10:54:42 +0200 Subject: [PATCH 14/21] Change wording as requested --- docs/platform/howto/project-support-center.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platform/howto/project-support-center.rst b/docs/platform/howto/project-support-center.rst index e3d8a8b896..4f0af1f0d9 100644 --- a/docs/platform/howto/project-support-center.rst +++ b/docs/platform/howto/project-support-center.rst @@ -32,4 +32,4 @@ If other users want to track and manage a ticket, the owner can add them to an o #. Find the ticket you want to add users to in the list and click **Add follower**. #. Select the user's email and click **Add follower**. -You can also add users to a ticket by CCing them into the support ticket email. \ No newline at end of file +You can also add users to a ticket by copying them into the support ticket email. \ No newline at end of file From ce773a4f509feda06c9feb7f9b887b4c5d79f49a Mon Sep 17 00:00:00 2001 From: Stacey Salamon Date: Fri, 14 Oct 2022 16:13:51 +0200 Subject: [PATCH 15/21] Create support center article Migrate content to how to article with instructions on creating and adding followers to support tickets --- docs/platform/howto/project-support-center.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platform/howto/project-support-center.rst b/docs/platform/howto/project-support-center.rst index 4f0af1f0d9..61c6609d11 100644 --- a/docs/platform/howto/project-support-center.rst +++ b/docs/platform/howto/project-support-center.rst @@ -32,4 +32,4 @@ If other users want to track and manage a ticket, the owner can add them to an o #. Find the ticket you want to add users to in the list and click **Add follower**. #. Select the user's email and click **Add follower**. -You can also add users to a ticket by copying them into the support ticket email. \ No newline at end of file +You can also add users to a ticket by copying them into the support ticket email. From 31a503653426f138f10551614b7fc9044aecebe0 Mon Sep 17 00:00:00 2001 From: Stacey Salamon <111294980+staceysalamon-aiven@users.noreply.github.com> Date: Fri, 14 Oct 2022 17:40:24 +0200 Subject: [PATCH 16/21] Update docs/platform/howto/project-support-center.rst Co-authored-by: laysa uchoa From 31d7d5fdb382c094b3e84e6d6e5c2e5aeea8bc74 Mon Sep 17 00:00:00 2001 From: Stacey Salamon <111294980+staceysalamon-aiven@users.noreply.github.com> Date: Mon, 17 Oct 2022 10:53:04 +0200 Subject: [PATCH 17/21] Update docs/platform/howto/project-support-center.rst Co-authored-by: laysa uchoa --- docs/platform/howto/project-support-center.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platform/howto/project-support-center.rst b/docs/platform/howto/project-support-center.rst index 61c6609d11..9e119fe142 100644 --- a/docs/platform/howto/project-support-center.rst +++ b/docs/platform/howto/project-support-center.rst @@ -1,4 +1,4 @@ -Get Support in the Aiven Console +Get support in the Aiven console ==================================== Aiven is committed to providing excellent and responsive support to all of our customers. We are constantly monitoring our services 24/7 and rapidly addressing any anomalies. From 3d87d1f0c6f451f0a79ca8f989418788213cc9dc Mon Sep 17 00:00:00 2001 From: Stacey Salamon Date: Mon, 17 Oct 2022 15:15:29 +0200 Subject: [PATCH 18/21] Update support center article --- docs/platform/howto/project-support-center.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platform/howto/project-support-center.rst b/docs/platform/howto/project-support-center.rst index 9e119fe142..a966a74fe1 100644 --- a/docs/platform/howto/project-support-center.rst +++ b/docs/platform/howto/project-support-center.rst @@ -24,7 +24,7 @@ Your new ticket is sent to our support team for review and you also receive an c You can also track the status of your tickets and review them from the project support center. Add followers to an open ticket -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If other users want to track and manage a ticket, the owner can add them to an open ticket by the owner of the ticket: From b2485886492fd9c6944e9aa539a6a226197c7239 Mon Sep 17 00:00:00 2001 From: Stacey Salamon Date: Mon, 17 Oct 2022 15:32:29 +0200 Subject: [PATCH 19/21] Update support center article --- docs/platform/howto/project-support-center.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platform/howto/project-support-center.rst b/docs/platform/howto/project-support-center.rst index a966a74fe1..b173ddb906 100644 --- a/docs/platform/howto/project-support-center.rst +++ b/docs/platform/howto/project-support-center.rst @@ -1,5 +1,5 @@ Get support in the Aiven console -==================================== +================================= Aiven is committed to providing excellent and responsive support to all of our customers. We are constantly monitoring our services 24/7 and rapidly addressing any anomalies. From 59a2d7e9b0a89310086475195e3443c833ea3ec0 Mon Sep 17 00:00:00 2001 From: Stacey Salamon Date: Thu, 20 Oct 2022 09:39:13 +0200 Subject: [PATCH 20/21] Fix: update only relevant files --- docs/platform/howto/project-support-center.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/platform/howto/project-support-center.rst b/docs/platform/howto/project-support-center.rst index b173ddb906..6fc56accb3 100644 --- a/docs/platform/howto/project-support-center.rst +++ b/docs/platform/howto/project-support-center.rst @@ -3,15 +3,15 @@ Get support in the Aiven console Aiven is committed to providing excellent and responsive support to all of our customers. We are constantly monitoring our services 24/7 and rapidly addressing any anomalies. -In addition to our standard support, we offer three additional tiers that include faster response times and phone support. For more information about support plans, please see `Aiven support details page `_ or contact ``sales@aiven.io`` to discuss premium support. +In addition to our standard support, we offer three additional tiers that include faster response times and phone support. For more information about support plans, please see `Aiven support details page `_ or contact sales@Aiven.io to discuss premium support. -You can create and track support tickets in the Project Support Center in the Aiven Console. +You can create and track support tickets in the Project Support Center in the `Aiven Console `_. Create a support ticket ~~~~~~~~~~~~~~~~~~~~~~~~ -To create support tickets in the Aiven Console: +To create support tickets in the `Aiven Console `_: #. Click **Support** to open the Project Support Center. #. Click **Open support ticket**. @@ -32,4 +32,4 @@ If other users want to track and manage a ticket, the owner can add them to an o #. Find the ticket you want to add users to in the list and click **Add follower**. #. Select the user's email and click **Add follower**. -You can also add users to a ticket by copying them into the support ticket email. +You can also add users to a ticket by copying them into the support ticket email. \ No newline at end of file From 32ce156820eaa653f2ffbf872b1a4bdd325fd0df Mon Sep 17 00:00:00 2001 From: Francesco Date: Thu, 20 Oct 2022 08:48:01 +0200 Subject: [PATCH 21/21] Fixed a couple links and email reference