### Install Valkey Go Library Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/valkey/howto/connect-go.md Install the valkey-go library using the go get command. This is a prerequisite for using the library in your Go project. ```shell go get github.com/valkey-io/valkey-go ``` -------------------------------- ### Navigate to Example Directory Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/howto/kafka-streams-with-aiven-for-kafka.md Change into the cloned repository directory to access the example application files. ```shell cd kafka-streams-example ``` -------------------------------- ### Install Go pq library Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/postgresql/howto/connect-go.md Install the 'pq' library, which is required for connecting to PostgreSQL from Go. ```bash go get github.com/lib/pq ``` -------------------------------- ### Java MySQL Connection Example Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/mysql/howto/connect-with-java.md This Java code demonstrates how to create a MySQL client and connect to the database using provided credentials. It fetches and prints the MySQL version. Ensure you have the MySQL JDBC Driver installed and replace placeholder variables with your service's connection details. ```java import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class MySqlExample { public static void main(String[] args) { String url = String.format("jdbc:mysql://%s:%d/%s", System.getProperty("host"), Integer.parseInt(System.getProperty("port")), System.getProperty("database")); String user = System.getProperty("username"); String password = System.getProperty("password"); try (Connection conn = DriverManager.getConnection(url, user, password)) { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT VERSION()"); if (rs.next()) { System.out.println("Version: " + rs.getString(1)); } } catch (SQLException e) { e.printStackTrace(); } } } ``` -------------------------------- ### Install valkey-py library Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/valkey/howto/connect-python.md Install the valkey-py library, optionally with hiredis for performance enhancements. ```shell pip install valkey pip install "valkey[hiredis]" ``` -------------------------------- ### Install Dependencies Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/opensearch/howto/opensearch-search-and-python.md Clone the repository, navigate to the project directory, and install the required Python dependencies. ```bash git clone https://github.com/aiven/demo-opensearch-python cd demo-opensearch-python pip install -r requirements.txt ``` -------------------------------- ### Clone Kafka Streams Example Repository Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/howto/kafka-streams-with-aiven-for-kafka.md Clone the example application repository to get started with Kafka Streams. ```shell git clone https://github.com/Aiven-Labs/kafka-streams-example.git ``` -------------------------------- ### Install go-redis/redis Library Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/dragonfly/howto/connect-go.md Install the go-redis/redis library, which is officially supported with Dragonfly. This is a prerequisite for the connection example. ```bash go get github.com/go-redis/redis/v8 ``` -------------------------------- ### Example Valkey Server Info Output Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/valkey/howto/connect-valkey-cli.md This is an example of the output you can expect after running the INFO command, which displays server parameters. ```text # Server redis_version:7.2.4 server_name:valkey valkey_version:7.2.7 redis_git_sha1:c0b10003 redis_git_dirty:0 redis_build_id:e63142036e093656 redis_mode:standalone ... ``` -------------------------------- ### Install aiven-string-replacer-for-grafana Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/grafana/howto/replace-expression-string.md Build the tool from its source repository using Go. Ensure you have a Go environment installed. ```bash go install github.com/aiven/aiven-string-replacer-for-grafana ``` -------------------------------- ### Start Application with npm Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/apps/manifest-files/compose-files.md Defines the command to start the application using npm. ```yaml CMD ["npm", "start"] ``` -------------------------------- ### Install aiven_extras Extension Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/postgresql/howto/migrate-db-to-aiven-via-console.md If superuser permissions are not available, install the `aiven_extras` extension to enable continuous migration. ```sql CREATE EXTENSION `aiven_extras` CASCADE; ``` -------------------------------- ### Install Predis Library Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/valkey/howto/connect-php.md Install the predis library using Composer. This is a prerequisite for connecting to Valkey with PHP. ```shell composer require predis/predis ``` -------------------------------- ### Install a PostgreSQL extension Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/postgresql/howto/manage-extensions.md Use this command to install a new extension. The CASCADE option ensures that any dependent objects are also installed. ```sql CREATE EXTENSION EXTENSION_NAME CASCADE; ``` -------------------------------- ### Install Aiven Skills bundle Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/dev-tier/create-dev-tier-kafka-service.md Install the Skills bundle to enable command-line management of Aiven services. Ensure Node.js is installed to run npx commands. ```bash npx skills add Aiven-Open/aiven-skills-bundle ``` -------------------------------- ### Install kafka-python library Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/howto/connect-with-python.md Install the required Python library for Kafka interactions. ```bash pip install kafka-python ``` -------------------------------- ### Install mysql-connector-python Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/mysql/howto/connect-using-mysqlx-with-python.md Install the necessary Python library for connecting to MySQL using the X DevAPI. ```shell pip install mysql-connector-python ``` -------------------------------- ### Install OpenSearch Python Client Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/opensearch/howto/sample-dataset.md Install the opensearch-py library using pip. Ensure you are using a compatible version. ```shell pip install opensearch-py==1.0.0 ``` -------------------------------- ### Install Aiven CLI with Homebrew Source: https://github.com/aiven/aiven-docs/blob/main/docs/tools/cli.md Install the Aiven CLI using Homebrew. This is a convenient method for macOS and Linux users. ```bash brew install aiven-client ``` -------------------------------- ### Install ClickHouse Go Module Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/clickhouse/howto/connect-with-go.md Install the ClickHouse Go module using the go get command. If using an older Go version, install a specific older version of the module. ```go go get github.com/ClickHouse/clickhouse-go/v2 ``` ```go go get github.com/ClickHouse/clickhouse-go/v2@v2.2 ``` -------------------------------- ### Migration configuration file example Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/opensearch/howto/migrate-opendistro-security-config-aiven.md Create a JSON configuration file with connection details for both source (OpenDistro) and target (Aiven for OpenSearch) services. ```json { "source": { "host": "source-ip-or-fqdn", "port": source-port-number, "key": "path-to-admin-key.pem", "certificate": "path-to-admin-cert.pem" }, "target": { "host": "target-ip-or-fqdn", "port": target-port-number, "password": "os-sec-admin-user-password" } } ``` -------------------------------- ### Example: Replace elasticsearch_ with opensearch_ Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/grafana/howto/replace-expression-string.md An example command to replace all metric expressions starting with `elasticsearch_` with `opensearch_` in a specified Grafana dashboard. ```bash aiven-string-replacer-for-grafana \ -apikey GRAFANA_API_KEY \ -url YOUR_DASHBOARD_URL \ -from elasticsearch_ \ -to opensearch_ \ -uid YOUR_DASHBOARD_UID ``` -------------------------------- ### Debezium Oracle Source Connector Configuration Example Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/kafka-connect/howto/debezium-source-connector-oracle.md Example JSON configuration for the Debezium Oracle source connector. This setup streams ongoing changes from specified tables using Avro serialization and requires schema registry configuration. ```json { "name": "oracle-debezium-example", "connector.class": "io.debezium.connector.oracle.OracleConnector", "tasks.max": 1, "database.hostname": "${aws:oracle/secrets:database.hostname}", "database.port": "1521", "database.user": "admin", "database.password": "${aws:oracle/secrets:database.password}", "database.dbname": "ORCL", "topic.prefix": "oracle.cdc", "table.include.list": "SALES.ORDERS,SALES.CUSTOMERS", "snapshot.mode": "no_data", "include.schema.changes": "true", "key.converter": "io.confluent.connect.avro.AvroConverter", "value.converter": "io.confluent.connect.avro.AvroConverter", "key.converter.schema.registry.url": "", "value.converter.schema.registry.url": "", "schema.name.adjustment.mode": "avro" } ``` -------------------------------- ### Dockerfile for Web Application Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/apps/manifest-files/compose-files.md Example Dockerfile to build a Node.js web application. It installs dependencies and copies application code into the image. ```dockerfile FROM node:18-alpine WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm ci --only=production # Copy application code COPY . . # Expose port EXPOSE 3000 ``` -------------------------------- ### Copy Sample Configuration Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/howto/generate-sample-data-manually.md Copy the sample environment configuration file to create your own configuration. ```bash cp conf/env.conf.sample conf/env.conf ``` -------------------------------- ### Build Docs with Docker Source: https://github.com/aiven/aiven-docs/blob/main/README.md Use this command to start the development environment with Docker. The website will be available at http://localhost:3000/docs/ and will auto-refresh on file changes. ```bash docker compose up dev ``` -------------------------------- ### KCQL Transformation Example Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/kafka-connect/howto/cassandra-streamreactor-sink.md Use this format for KCQL statements to map Kafka topic fields to Cassandra table columns. Ensure the Cassandra keyspace and table exist before starting the connector. ```sql INSERT INTO CASSANDRA_TABLE SELECT LIST_OF_FIELDS FROM APACHE_KAFKA_TOPIC ``` -------------------------------- ### Prepare Entrypoint Scripts Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/apps/manifest-files/containerfiles.md Copies the entrypoint script and makes it executable. Also makes the authentication setup script executable. ```Dockerfile COPY run.sh ./ RUN chmod +x ./run.sh RUN chmod +x ./setup_auth.sh ``` -------------------------------- ### Multi-stage Build for Java App with Custom JRE Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/apps/manifest-files/containerfiles.md This multi-stage build compiles a Java application, identifies its module dependencies, and creates a custom, minimal JRE for the final image. It also includes setup scripts and installs necessary libraries. ```dockerfile # --- Set ARG values for use in the following build stages # This value specifies the app to build ARG APP_NAME="AnomalyDetectorApp" # --- First stage: Get the app, work out its dependencies, create a JRE FROM gradle:9.3.0-jdk25-noble AS builder WORKDIR /app # ARG values do not persist over FROM boundaries # Explicitly reference it again to make it available ARG APP_NAME ENV APP_NAME="AnomalyDetectorApp" # Copy the gradle build environment over RUN mkdir app COPY app ./app/ RUN mkdir gradle COPY gradle ./gradle/ COPY settings.gradle ./ # Copy the run scripts for stage 2 COPY run.sh ./ COPY setup_auth.sh ./ # Start by building the app as a fat (uber) JAR # This gives us a smaller executable in stage 2 RUN gradle clean ${APP_NAME}UberJar --no-daemon ENV FAT_JAR_NAME=${APP_NAME}-uber.jar RUN cp app/build/libs/$FAT_JAR_NAME ./ # Unpack the contents of the fat JAR RUN mkdir temp && cd temp && jar xf ../$FAT_JAR_NAME # Identify the dependencies to get from the external Java environment RUN jdeps --print-module-deps \ --ignore-missing-deps \ --recursive \ --multi-release 17 \ --class-path "./temp/BOOT-INF/lib/*" \ --module-path "./temp/BOOT-INF/lib/*" \ ./$FAT_JAR_NAME > modules.txt # Assemble custom JRE with only those things in it RUN $JAVA_HOME/bin/jlink \ --verbose \ --add-modules $(cat modules.txt) \ --strip-debug \ --no-man-pages \ --no-header-files \ --compress=zip-6 \ --output ./custom-jre # ---------------------------------------------------------------------------- # --- Second stage: Run the actual image # Use the smallest base image possible (alpine) FROM debian:bookworm-slim WORKDIR /app # Install openssl (for run.sh) and RocksDB library (for Kafka Streams) RUN apt-get update \ && apt-get install -y librocksdb7.8 RUN apt-get autoremove -y \ && apt-get clean -y \ && apt-get autoclean -y \ && rm -rf /var/lib/apt/lists/* # Get the ARG value to make it available in this stage ARG APP_NAME # Set an ENV value to that value ENV APP_NAME=$APP_NAME ``` -------------------------------- ### Start Development Server Source: https://github.com/aiven/aiven-docs/blob/main/README.md Builds and starts the documentation development server. Use this command for local development and previewing changes. For VS Code users, the build task 'Build the docs' can be used. ```bash yarn start ``` -------------------------------- ### Install Aiven CLI with pip Source: https://github.com/aiven/aiven-docs/blob/main/docs/tools/cli.md Install the Aiven CLI using pip. This is the standard method for Python package installations. ```bash pip install aiven-client ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/aiven/aiven-docs/blob/main/README.md Installs project dependencies using Yarn. Ensure Node.js version 23 or higher and Yarn 4 are installed. ```bash corepack enable yarn ``` -------------------------------- ### Initialize OpenTofu Source: https://github.com/aiven/aiven-docs/blob/main/docs/tools/terraform/howto/use-opentofu.md Initialize the OpenTofu working directory. This command downloads and installs the necessary Aiven Provider plugins. ```bash tofu init ``` -------------------------------- ### Example S3 Sink Connector Creation Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/kafka-connect/howto/s3-sink-connector-confluent.md This example demonstrates creating an S3 sink connector with specific topic, bucket, and flush size configurations. It also shows the Aiven CLI command to create the connector. ```json { "name": "my_s3_sink", "connector.class": "io.confluent.connect.s3.S3SinkConnector", "tasks.max": "1", "topics": "students", "key.converter": "org.apache.kafka.connect.converters.ByteArrayConverter", "value.converter": "org.apache.kafka.connect.converters.ByteArrayConverter", "format.class": "io.confluent.connect.s3.format.bytearray.ByteArrayFormat", "flush.size": "10", "s3.bucket.name": "my-test-bucket", "s3.region": "eu-central-1", "storage.class": "io.confluent.connect.s3.storage.S3Storage", "s3.credentials.provider.access_key_id": "AKIAXXXXXXXXXX", "s3.credentials.provider.secret_access_key": "hELuXXXXXXXXXXXXXXXXXXXXXXXXXX" } ``` ```bash avn service connector create demo-kafka @s3_sink_confluent.json ``` -------------------------------- ### Compile and Run Java Example Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/valkey/howto/connect-java.md Compile the Java code using javac and run it using java, ensuring the classpath includes the lib directory for dependencies. Replace SERVICE_URI with your actual service URI. ```shell javac -cp "lib/*:." ValkeyExample.java && java -cp "lib/*:." ValkeyExample SERVICE_URI ``` -------------------------------- ### Connect to Valkey with Java Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/valkey/howto/connect-java.md This code connects to Aiven for Valkey, sets a key named key with the value hello world (without expiration), then retrieves and prints the value of this key. Replace SERVICE_URI with your actual service URI. ```java import redis.clients.jedis.Jedis; public class ValkeyExample { public static void main(String[] args) { // Replace SERVICE_URI with your actual service URI String serviceUri = System.getenv("SERVICE_URI"); if (serviceUri == null) { System.err.println("SERVICE_URI environment variable not set."); System.exit(1); } try (Jedis jedis = new Jedis(serviceUri)) { // Set a key-value pair without expiration jedis.set("key", "hello world"); // Retrieve the value of the key String value = jedis.get("key"); // Print the retrieved value System.out.println("The value of key is: " + value); } catch (Exception e) { System.err.println("Error connecting to Valkey or performing operations: " + e.getMessage()); e.printStackTrace(); } } } ``` -------------------------------- ### Install cryptography Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/mysql/howto/connect-with-python.md Install the cryptography package using pip. This is a dependency for secure connections. ```bash pip install cryptography ``` -------------------------------- ### OpenSearch Search Results Example Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/opensearch/howto/opensearch-search-and-python.md Example output from a multi-match search query in OpenSearch. ```shell [ 'Garlic-Lemon Potatoes ', 'Lemon Garlic Mayonnaise ', 'Lemon Garlic Mayonnaise ', 'Garlic-Lemon Croutons ', 'Lemon-Garlic Vinaigrette ', 'Lemon-Garlic Lamb Chops ', 'Lemon Pepper Garlic Vinaigrette ', 'Lemon-Garlic Baked Shrimp ', 'Lemon-Herb Turkey with Lemon-Garlic Gravy ', 'Garlic, Oregano, and Lemon Vinaigrette ' ] ``` -------------------------------- ### Kafka Topic Messages Example Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/kafka-connect/howto/mqtt-sink-connector.md Example messages in a Kafka topic that will be sunk to MQTT. ```json {"device":"sensor-1", "temperature": 22.5} {"device":"sensor-2", "temperature": 19.0} {"device":"sensor-1", "temperature": 23.1} ``` -------------------------------- ### Connect to Aiven for MySQL with Python Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/mysql/howto/connect-with-python.md This code creates a MySQL client and connects to the database. It creates a table, inserts some values, fetches them and prints the output. Replace placeholders with your service's connection details. ```python import pymysql # Replace with your service connection details MYSQL_HOST = "your_mysql_host" MYSQL_PORT = 12345 MYSQL_USERNAME = "your_mysql_username" MYSQL_PASSWORD = "your_mysql_password" connection = pymysql.connect(host=MYSQL_HOST, port=MYSQL_PORT, user=MYSQL_USERNAME, password=MYSQL_PASSWORD, cursorclass=pymysql.cursors.DictCursor) try: with connection.cursor() as cursor: # Create a table sql = "CREATE TABLE IF NOT EXISTS `test_table` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) )" cursor.execute(sql) # Insert values sql = "INSERT INTO `test_table` (`name`) VALUES (%s)" cursor.execute(sql, ('test_name_1',)) cursor.execute(sql, ('test_name_2',)) connection.commit() # Fetch values sql = "SELECT `id` FROM `test_table` WHERE `name`=%s" cursor.execute(sql, ('test_name_1',)) result = cursor.fetchall() print(result) cursor.execute(sql, ('test_name_2',)) result = cursor.fetchall() print(result) finally: connection.close() ``` -------------------------------- ### Check Aiven CLI Installation Source: https://github.com/aiven/aiven-docs/blob/main/docs/tools/cli.md Verify that the Aiven CLI has been installed correctly by checking its version. ```bash avn --version ``` -------------------------------- ### Initialize OpenSearch Client with Service URI Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/opensearch/howto/connect-with-nodejs.md Create an instance of the OpenSearch client using the service URI from environment variables. The service URI includes necessary credentials for authentication. ```javascript const { Client } = require('@opensearch-project/opensearch') module.exports.client = new Client({ node: process.env.SERVICE_URI, }); ``` -------------------------------- ### Get aiven-db-migrate help Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/postgresql/howto/run-aiven-db-migrate-python.md Display the full list of parameters and their descriptions for the `aiven-db-migrate` PostgreSQL migration command. ```bash python3 -m aiven_db_migrate.migrate pg -h ``` -------------------------------- ### Install NodeJS pg Package Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/postgresql/howto/connect-node.md Install the 'pg' package, which is required for connecting to PostgreSQL from NodeJS. ```bash npm install pg --save ``` -------------------------------- ### Connect and Interact with Valkey in Go Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/valkey/howto/connect-go.md This code creates a key named 'key' with the value 'hello world' without an expiration. It then retrieves this key from the Valkey service and outputs its value. Replace SERVICE_URI with your actual Aiven for Valkey service URI. ```go package main import ( "fmt" "github.com/valkey-io/valkey-go" ) func main() { // Replace SERVICE_URI with your actual Aiven for Valkey service URI valkeyURI := "SERVICE_URI" // Create a new Valkey client client, err := valkey.NewClient(valkey.ClientOption{ URI: valkeyURI, }) if err != nil { panic(err) } // Set a key-value pair without expiration err = client.Do(ctx, "SET", "key", "hello world").Err() if err != nil { panic(err) } // Get the value of the key val, err := client.Do(ctx, "GET", "key").Str() if err != nil { panic(err) } // Output the value fmt.Printf("The value of key is: %s\n", val) } ``` -------------------------------- ### Plan Infrastructure Changes Source: https://github.com/aiven/aiven-docs/blob/main/docs/tools/terraform/howto/use-opentofu.md Create an execution plan to preview infrastructure changes. This command shows what resources OpenTofu will create, modify, or destroy. ```bash tofu plan ``` -------------------------------- ### Configure Migration with Aiven CLI Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/mysql/howto/migrate-from-external-mysql.md Set up migration details using the `avn service update` command. Specify your migration tool and source/destination details. Replace placeholders with your actual values. ```bash avn service update --project PROJECT_NAME \ -c migration.host=SRC_HOSTNAME \ -c migration.port=SRC_PORT \ -c migration.username=SRC_USERNAME \ -c migration.password=SRC_PASSWORD \ -c migration.ignore_dbs=SRC_IGNORE_DBS \ -c migration.ssl=SRC_SSL \ -c migration.dump_tool=mysqldump \ DEST_NAME ``` -------------------------------- ### Example PostgreSQL connection string Source: https://github.com/aiven/aiven-docs/blob/main/docs/tools/cli/service/connection-info.md This is an example output of the `avn service connection-info pg string` command, showing the connection parameters for an Aiven for PostgreSQL service. ```text host='demo-pg-dev-project.aivencloud.com' port='13039' user=avnadmin dbname='defaultdb' ``` -------------------------------- ### Create OpenSearch Service using CLI Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/opensearch/get-started.md Create an OpenSearch service using the Aiven CLI. Specify the service name, type, cloud region, and plan. ```bash avn service create \ --service-type opensearch \ --cloud \ --plan ``` -------------------------------- ### Create and connect to a new database Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/postgresql/get-started.md Create a new database named 'dellstore' and connect to it using psql. ```sql CREATE DATABASE dellstore; \c dellstore ``` -------------------------------- ### Example S3 Object Names (3 Partitions) Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/kafka/kafka-connect/howto/s3-sink-additional-parameters-confluent.md Shows example object names generated in an S3 bucket for a topic with 3 partitions, assuming default settings and binary file extension. ```text topics//partition=0/+0+0000000000.bin topics//partition=1/+1+0000000000.bin topics//partition=2/+2+0000000000.bin ``` -------------------------------- ### Install redis-py library Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/dragonfly/howto/connect-python.md Install the officially supported redis-py library for Python. This is a prerequisite for connecting to Dragonfly. ```bash pip install redis ``` -------------------------------- ### Install smi2/phpclickhouse Library Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/clickhouse/howto/connect-with-php.md Install the `smi2/phpclickhouse` library using Composer. This is a prerequisite for connecting to ClickHouse with PHP. ```bash composer require smi2/phpclickhouse ``` ```bash php composer.phar require smi2/phpclickhouse ``` -------------------------------- ### Example Snapshot Status Response Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/opensearch/howto/manage-snapshots.md This is an example of the JSON response you might receive when querying the status of snapshots. ```json { "snapshots": [ { "repository": "aws-repo", "snapshot": "second-snapshot", "state": "SUCCESS", "shards_stats": { "done": 1, "failed": 0, "total": 1 }, "uuid": "osmCbdF-RMyyUKpWD-4bJA" } ] } ``` -------------------------------- ### Example Switchover and Maintenance Window Configuration Source: https://github.com/aiven/aiven-docs/blob/main/docs/products/postgresql/howto/pg-controlled-switchover.md This JSON structure shows how to define both a maintenance window and multiple switchover windows. The system prioritizes the earliest available window for promotion. ```json { "maintenance": { "dow": "monday", "time": "08:00:00" }, "user_config": { "switchover_windows": [ { "dow": "monday", "start_time": "22:00:00", "end_time": "22:15:00" }, { "dow": "tuesday", "start_time": "23:30:00", "end_time": "23:59:59" }, { "dow": "wednesday", "start_time": "00:00:00", "end_time": "00:30:00" } ... ] } } ```