Skip to content

Commit

Permalink
Release new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Milvus-doc-bot authored and Milvus-doc-bot committed Jan 2, 2024
1 parent 975fa1f commit af70c07
Show file tree
Hide file tree
Showing 17 changed files with 512 additions and 82 deletions.
14 changes: 7 additions & 7 deletions v2.3.x/Variables.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"milvus_release_version": "2.3.3",
"milvus_release_tag": "2.3.3",
"milvus_release_version": "2.3.4",
"milvus_release_tag": "2.3.4",
"milvus_deb_name": "milvus_2.2.0-1_amd64",
"milvus_rpm_name": "milvus-2.2.0-1.el7.x86_64",
"milvus_python_sdk_version": "2.3.x",
"milvus_python_sdk_real_version": "2.3.3",
"milvus_python_sdk_real_version": "2.3.4",
"milvus_node_sdk_version": "2.3.x",
"milvus_node_sdk_real_version": "2.3.3",
"milvus_node_sdk_real_version": "2.3.5",
"milvus_go_sdk_version": "2.3.x",
"milvus_go_sdk_real_version": "2.3.3",
"milvus_go_sdk_real_version": "2.3.4",
"milvus_java_sdk_version": "2.3.x",
"milvus_java_sdk_real_version": "2.3.3",
"milvus_csharp_sdk_version": "2.2.x",
"milvus_csharp_sdk_real_version": "2.2.14",
"milvus_restful_sdk_version": "2.3.x",
"milvus_restful_sdk_real_version": "2.3.3",
"milvus_restful_sdk_real_version": "2.3.4",
"milvus_operator_version": "0.8.4",
"milvus_helm_chart_version": "4.1.9",
"milvus_helm_chart_version": "4.1.11",
"milvus_image": "2.3.3",
"attu_release": "2.3.2",
"milvus_backup_release": "0.4.2",
Expand Down
8 changes: 4 additions & 4 deletions v2.3.x/site/en/adminGuide/configure-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ In current release, all parameters take effect only after Milvus restarts.

## Download a configuration file

[Download](https://raw.githubusercontent.com/milvus-io/milvus/v2.3.3/configs/milvus.yaml) `milvus.yaml` directly or with the following command.
[Download](https://raw.githubusercontent.com/milvus-io/milvus/v2.3.4/configs/milvus.yaml) `milvus.yaml` directly or with the following command.

```
$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.3.3/configs/milvus.yaml
$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.3.4/configs/milvus.yaml
```

## Modify the configuration file
Expand Down Expand Up @@ -171,13 +171,13 @@ Sorted by:

## Download an installation file

Download the installation file for Milvus [standalone](https://github.com/milvus-io/milvus/releases/download/v2.3.3/milvus-standalone-docker-compose.yml), and save it as `docker-compose.yml`.
Download the installation file for Milvus [standalone](https://github.com/milvus-io/milvus/releases/download/v2.3.4/milvus-standalone-docker-compose.yml), and save it as `docker-compose.yml`.

You can also simply run the following command.

```
# For Milvus standalone
$ wget https://github.com/milvus-io/milvus/releases/download/v2.3.3/milvus-standalone-docker-compose.yml -O docker-compose.yml
$ wget https://github.com/milvus-io/milvus/releases/download/v2.3.4/milvus-standalone-docker-compose.yml -O docker-compose.yml
```

## Modify the installation file
Expand Down
137 changes: 137 additions & 0 deletions v2.3.x/site/en/adminGuide/configure_access_logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
id: configure_access_logs.md
title: Configure Access Logs
---

# Configure Access Logs

The access log feature in Milvus allows server managers to record and analyze user access behavior, assisting in understanding aspects like query success rates and failure reasons.

This guide provides detailed instructions on configuring access logs in Milvus.

Configuration of access logs depends on the installation method of Milvus:

- **Helm Installation**: Configure in `values.yaml`. For more information, see [Configure Milvus with Helm Charts](configure-helm.md).
- **Docker Installation**: Configure in `milvus.yaml`. For more information, see [Configure Milvus with Docker Compose](configure-docker.md).
- **Operator Installation**: Modify `spec.components` in the configuration file. For more information, see [Configure Milvus with Milvus Operator](configure_operator.md).

## Configuration options

Choose among three configuration options based on your needs:

- **Base config**: For general purposes.
- **Config for local access log files**: For storing logs locally.
- **Config for uploading local access logs to MinIO**: For cloud storage and backup.

### Base config

Basic configuration involves enabling access logs and defining the log filename or using stdout.

```yaml
proxy:
accessLog:
enable: true
# If `filename` is emtpy, logs will be printed to stdout.
filename: ""
# Additional formatter configurations...
```

- `proxy.accessLog.enable`: Whether to enable the access log feature. Defaults to **false**.
- `proxy.accessLog.filename`: The name of the access log file. If you leave this parameter empty, access logs will be printed to stdout.

### Config for local access log files

Configure local storage for access log files with parameters including the local file path, file size, and rotation interval:

```yaml
proxy:
accessLog:
enable: true
filename: "access_log.txt" # Name of the access log file
localPath: "/var/logs/milvus" # Local file path where the access log file is stored
maxSize: 500 # Max size for each single access log file. Unit: MB
rotatedTime: 24 # Time interval for log rotation. Unit: seconds
maxBackups: 7 # Max number of sealed access log files that can be retained
# Additional formatter configurations...
```

These parameters are specified when `filename` is not empty.

- `proxy.accessLog.localPath`: The local file path where the access log file is stored.
- `proxy.accessLog.maxSize`: The maximum size in MB allowed for a single access log file. If the log file size reaches this limit, a rotation process will be triggered. This process seals the current access log file, creates a new log file, and clears the contents of the original log file.
- `proxy.accessLog.rotatedTime`: The maximum time interval in seconds allowed for rotating a single access log file. Upon reaching the specified time interval, a rotation process is triggered, resulting in the creation of a new access log file and sealing of the previous one.
- `proxy.accessLog.maxBackups`: The maximum number of sealed access log files that can be retained. If the number of sealed access log files exceeds this limit, the oldest one will be deleted.

### Config for uploading local access log files to MinIO

Enable and configure settings to upload local access log files to MinIO:

```yaml
proxy:
accessLog:
enable: true
filename: "access_log.txt"
localPath: "/var/logs/milvus"
maxSize: 500
rotatedTime: 24
maxBackups: 7
minioEnable: true
remotePath: "/milvus/logs/access_logs"
remoteMaxTime: 0
# Additional formatter configurations...
```

When configuring MinIO parameters, ensure that you have set either `maxSize` or `rotatedTime`. Failure to do so may result in unsuccessful uploads of local access log files to MinIO.

- `proxy.accessLog.minioEnable`: Whether to upload local access log files to MinIO. Defaults to **false**.
- `proxy.accessLog.remotePath`: The path of the object storage for uploading access log files.
- `proxy.accessLog.remoteMaxTime`: The time interval allowed for uploading access log files. If the upload time of a log file exceeds this interval, the file will be deleted. Setting the value to 0 disables this feature.

## Formatter config

The default log format used for all methods is the `base` format, which does not require specific method associations. However, if you wish to customize the log output for specific methods, you can define a custom log format and apply it to the associated methods.

```yaml
proxy:
accessLog:
enable: true
filename: "access_log.txt"
localPath: "/var/logs/milvus"
# Define custom formatters for access logs with format and applicable methods
formatters:
# The `base` formatter applies to all methods by default
# The `base` formatter does not require specific method association
base:
# Format string; an empty string means no log output
format: "[$time_now] [ACCESS] <$user_name: $user_addr> $method_name-$method_status-$error_code [traceID: $trace_id] [timeCost: $time_cost]"
# Custom formatter for specific methods (e.g., Query, Search)
query:
format: "[$time_now] [ACCESS] <$user_name: $user_addr> $method_status-$method_name [traceID: $trace_id] [timeCost: $time_cost] [database: $database_name] [collection: $collection_name] [partitions: $partition_name] [expr: $method_expr]"
# Specify the methods to which this custom formatter applies
methods: ["Query", "Search"]
```
- `proxy.accessLog.<formatter_name>.format`: Defines the log format with dynamic metrics. For more information, see [Supported metrics](#reference-supported-metrics).
- `proxy.accessLog.<formatter_name>.methods`: Lists Milvus operations using this formatter. To obtain method names, see **MilvusService** in [Milvus methods](https://github.com/milvus-io/milvus-proto/blob/master/proto/milvus.proto).

## Reference: Supported metrics

| Metric Name | Description |
|--------------------|-----------------------------------------------------------------------------|
| `$method_name` | Name of the method |
| `$method_status` | Status of access: **OK** or **Fail** |
| `$method_expr` | Expression used for query, search, or delete operations |
| `$trace_id` | TraceID associated with the access |
| `$user_addr` | IP address of the user |
| `$user_name` | Name of the user |
| `$response_size` | Size of the response data |
| `$error_code` | Error code specific to Milvus |
| `$error_msg` | Detailed error message |
| `$database_name` | Name of the target Milvus database |
| `$collection_name` | Name of the target Milvus collection |
| `$partition_name` | Name or names of the target Milvus partition(s) |
| `$time_cost` | Time taken for completing the access |
| `$time_now` | Time at which the access log is printed (usually equivalent to `$time_end`) |
| `$time_start` | Time at which the access starts |
| `$time_end` | Time at which the access ends |
| `$sdk_version` | Version of the Milvus SDK used by the user |
2 changes: 1 addition & 1 deletion v2.3.x/site/en/adminGuide/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Milvus cluster depends on components including object storage, etcd, and Pulsar.

This topic assumes that you have deployed Milvus Operator.

<div class="alert note">See <a href="https://milvus.io/docs/v2.3.3/install_cluster-milvusoperator.md">Deploy Milvus Operator</a> for more information. </div>
<div class="alert note">See <a href="https://milvus.io/docs/v2.3.4/install_cluster-milvusoperator.md">Deploy Milvus Operator</a> for more information. </div>

You need to specify a configuration file for using Milvus Operator to start a Milvus cluster.

Expand Down
2 changes: 1 addition & 1 deletion v2.3.x/site/en/adminGuide/resource_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Note that a Milvus instance maintains a default resource group to hold all the q

<div class="alert note">

All code samples on this page are in PyMilvus 2.3.3. Upgrade your PyMilvus installation before running them.
All code samples on this page are in PyMilvus 2.3.4. Upgrade your PyMilvus installation before running them.

</div>

Expand Down
20 changes: 10 additions & 10 deletions v2.3.x/site/en/adminGuide/upgrade_milvus_cluster-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ summary: Learn how to upgrade Milvus cluster with Docker Compose.

This topic describes how to upgrade your Milvus using Docker Compose.

In normal cases, you can [upgrade Milvus by changing its image](#Upgrade-Milvus-by-changing-its-image). However, you need to [migrate the metadata](#Migrate-the-metadata) before any upgrade from v2.1.x to v2.3.3.
In normal cases, you can [upgrade Milvus by changing its image](#Upgrade-Milvus-by-changing-its-image). However, you need to [migrate the metadata](#Migrate-the-metadata) before any upgrade from v2.1.x to v2.3.4.

## Upgrade Milvus by changing its image

Expand All @@ -23,35 +23,35 @@ In normal cases, you can upgrade Milvus as follows:
...
rootcoord:
container_name: milvus-rootcoord
image: milvusdb/milvus:v2.3.3
image: milvusdb/milvus:v2.3.4
...
proxy:
container_name: milvus-proxy
image: milvusdb/milvus:v2.3.3
image: milvusdb/milvus:v2.3.4
...
querycoord:
container_name: milvus-querycoord
image: milvusdb/milvus:v2.3.3
image: milvusdb/milvus:v2.3.4
...
querynode:
container_name: milvus-querynode
image: milvusdb/milvus:v2.3.3
image: milvusdb/milvus:v2.3.4
...
indexcoord:
container_name: milvus-indexcoord
image: milvusdb/milvus:v2.3.3
image: milvusdb/milvus:v2.3.4
...
indexnode:
container_name: milvus-indexnode
image: milvusdb/milvus:v2.3.3
image: milvusdb/milvus:v2.3.4
...
datacoord:
container_name: milvus-datacoord
image: milvusdb/milvus:v2.3.3
image: milvusdb/milvus:v2.3.4
...
datanode:
container_name: milvus-datanode
image: milvusdb/milvus:v2.3.3
image: milvusdb/milvus:v2.3.4
```
2. Run the following commands to perform the upgrade.
Expand Down Expand Up @@ -79,7 +79,7 @@ In normal cases, you can upgrade Milvus as follows:
runWithBackup: true
config:
sourceVersion: 2.1.4 # Specify your milvus version
targetVersion: 2.3.3
targetVersion: 2.3.4
backupFilePath: /tmp/migration.bak
metastore:
type: etcd
Expand Down
32 changes: 17 additions & 15 deletions v2.3.x/site/en/adminGuide/upgrade_milvus_cluster-helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ The archived repo is still available for the charts up to 4.0.31. For later rele

```
NAME CHART VERSION APP VERSION DESCRIPTION
zilliztech/milvus 4.1.11 2.3.4 Milvus is an open-source vector database built ...
zilliztech/milvus 4.1.10 2.3.3 Milvus is an open-source vector database built ...
zilliztech/milvus 4.1.9 2.3.3 Milvus is an open-source vector database built ...
zilliztech/milvus 4.1.8 2.3.2 Milvus is an open-source vector database built ...
zilliztech/milvus 4.1.7 2.3.2 Milvus is an open-source vector database built ...
Expand All @@ -53,9 +55,9 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope

You can choose the upgrade path for your Milvus as follows:

- [Conduct a rolling upgrade](#Conduct-a-rolling-upgrade) from Milvus v2.2.3 and later releases to v2.3.3.
- [Upgrade Milvus using Helm](#Upgrade-Milvus-using-Helm) for an upgrade from a minor release before v2.2.3 to v2.3.3.
- [Migrate the metadata](#Migrate-the-metadata) before the upgrade from Milvus v2.1.x to v2.3.3.
- [Conduct a rolling upgrade](#Conduct-a-rolling-upgrade) from Milvus v2.2.3 and later releases to v2.3.4.
- [Upgrade Milvus using Helm](#Upgrade-Milvus-using-Helm) for an upgrade from a minor release before v2.2.3 to v2.3.4.
- [Migrate the metadata](#Migrate-the-metadata) before the upgrade from Milvus v2.1.x to v2.3.4.

<div style="display: none;">

Expand All @@ -77,10 +79,10 @@ The script applies only to the upgrade of Milvus installed with Helm. The follow
| `w` | New Milvus image tag | `milvusdb/milvus:v2.2.3` | True |
| `o` | Operation | `update` | False |

Once you have ensured that all deployments in your Milvus instance are in their normal status. You can run the following command to upgrade the Milvus instance to 2.3.3.
Once you have ensured that all deployments in your Milvus instance are in their normal status. You can run the following command to upgrade the Milvus instance to 2.3.4.

```shell
sh rollingUpdate.sh -n default -i my-release -o update -t 2.3.3 -w 'milvusdb/milvus:v2.3.3'
sh rollingUpdate.sh -n default -i my-release -o update -t 2.3.4 -w 'milvusdb/milvus:v2.3.4'
```

<div class="alert note">
Expand All @@ -99,7 +101,7 @@ To upgrade Milvus from a minor release before v2.2.3 to the latest, run the foll

```shell
helm repo update
helm upgrade my-release zilliztech/milvus --reuse-values --version=4.1.9 # use the helm chart version here
helm upgrade my-release zilliztech/milvus --reuse-values --version=4.1.11 # use the helm chart version here
```

Use the Helm chart version in the preceding command. For details on how to obtain the Helm chart version, refer to [Check the Milvus version](#Check-the-Milvus-version).
Expand Down Expand Up @@ -190,43 +192,43 @@ The following table lists the operations you can do for meta migration.
4. Migrate the Milvus metadata.
5. Start Milvus components with a new image.

#### 2. Upgrade Milvus from v2.1.x to 2.3.3
#### 2. Upgrade Milvus from v2.1.x to 2.3.4

The following commands assume that you upgrade Milvus from v2.1.4 to 2.3.3. Change them to the versions that fit your needs.
The following commands assume that you upgrade Milvus from v2.1.4 to 2.3.4. Change them to the versions that fit your needs.

1. Specify Milvus instance name, source Milvus version, and target Milvus version.

```
./migrate.sh -i my-release -s 2.1.4 -t 2.3.3
./migrate.sh -i my-release -s 2.1.4 -t 2.3.4
```
2. Specify the namespace with `-n` if your Milvus is not installed in the default K8s namespace.
```
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.3
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.4
```
3. Specify the root path with `-r` if your Milvus is installed with the custom `rootpath`.
```
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.3 -r by-dev
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.4 -r by-dev
```
4. Specify the image tag with `-w` if your Milvus is installed with a custom `image`.
```
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.3 -r by-dev -w milvusdb/milvus:v2.3.3
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.4 -r by-dev -w milvusdb/milvus:v2.3.4
```
5. Set `-d true` if you want to automatically remove the migration pod after the migration is completed.
```
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.3 -w milvusdb/milvus:v2.3.3 -d true
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.4 -w milvusdb/milvus:v2.3.4 -d true
```
6. Rollback and migrate again if the migration fails.
```
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.3 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.3 -r by-dev -o migrate -w milvusdb/milvus:v2.3.3
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.4 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.3.4 -r by-dev -o migrate -w milvusdb/milvus:v2.3.4
```
Loading

0 comments on commit af70c07

Please sign in to comment.