Skip to content

Commit

Permalink
feat: add cloud doc layout (#78)
Browse files Browse the repository at this point in the history
* feat: add function alter_vector_index (#73)

Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* fix idx_options in monitoring part (#75)

Signed-off-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Signed-off-by: xieydd <xieydd@gmail.com>

* Add transparent background logo

Signed-off-by: xieydd <xieydd@gmail.com>

* add full logo

Signed-off-by: xieydd <xieydd@gmail.com>

* fix: align the col name for embedding (#76)

* fix: align the col name for embedding

Signed-off-by: Keming <yangkeming@tensorchord.ai>

* fix typos lint

Signed-off-by: Keming <yangkeming@tensorchord.ai>

---------

Signed-off-by: Keming <yangkeming@tensorchord.ai>
Co-authored-by: Keming <yangkeming@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* feat: add cloud doc layout

Signed-off-by: xieydd <xieydd@gmail.com>

* feat: add cloud sign up, quick start and connect page

Signed-off-by: xieydd <xieydd@gmail.com>

* feat: add cloud manage, pricing, monitoring, limit page

Signed-off-by: xieydd <xieydd@gmail.com>

* fix spell check

Signed-off-by: xieydd <xieydd@gmail.com>

* fmt

Signed-off-by: xieydd <xieydd@gmail.com>

* delete server resource type

Signed-off-by: xieydd <xieydd@gmail.com>

* feat: add billing page

Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* fix PGVecto.rs Cloud noun

Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* move cloud to cloud guides

Signed-off-by: xieydd <xieydd@gmail.com>

* Update .vitepress/config.mts

Co-authored-by: Ce Gao <gaocegege@hotmail.com>
Signed-off-by: xieydd <xieydd@gmail.com>

* Update .vitepress/config.mts

Co-authored-by: Ce Gao <gaocegege@hotmail.com>
Signed-off-by: xieydd <xieydd@gmail.com>

* Update .vitepress/config.mts

Co-authored-by: Ce Gao <gaocegege@hotmail.com>
Signed-off-by: xieydd <xieydd@gmail.com>

* Update .vitepress/config.mts

Co-authored-by: Ce Gao <gaocegege@hotmail.com>
Signed-off-by: xieydd <xieydd@gmail.com>

* update create cluster image

Signed-off-by: xieydd <xieydd@gmail.com>

* fix some comments

Signed-off-by: xieydd <xieydd@gmail.com>

* Update src/cloud/connect/connect-with-psql.md

Co-authored-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* Update src/cloud/getting-started/quick-start.md

Co-authored-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* Update src/cloud/limit/cloud-limit.md

Co-authored-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* Update src/cloud/manage/project.md

Co-authored-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* Update src/cloud/monitoring/monitoring.md

Co-authored-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>

* fix monitoring image and description error

Signed-off-by: xieydd <xieydd@gmail.com>

---------

Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>
Signed-off-by: xieydd <xieydd@gmail.com>
Signed-off-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Signed-off-by: Keming <yangkeming@tensorchord.ai>
Co-authored-by: cutecutecat <junyuchen@tensorchord.ai>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: Keming <kemingyang@tensorchord.ai>
Co-authored-by: Keming <yangkeming@tensorchord.ai>
Co-authored-by: Ce Gao <gaocegege@hotmail.com>
  • Loading branch information
6 people authored May 28, 2024
1 parent 6198383 commit 2a41f5c
Show file tree
Hide file tree
Showing 37 changed files with 413 additions and 3 deletions.
53 changes: 51 additions & 2 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default defineConfig({
nav: [
{ text: 'Home', link: '/' },
{ text: 'Docs', link: '/getting-started/overview' },
{ text: 'Cloud', link: '/cloud/' },
{ text: 'Reference', link: '/reference/' },
{ text: 'Blog', link: 'https://blog.pgvecto.rs' },
],
Expand All @@ -68,7 +69,6 @@ export default defineConfig({
{ text: '8-Bit Integer Vector', link: '/reference/vector-types/veci8' },
{ text: 'Sparse Vector', link: '/reference/vector-types/svector' },
{ text: 'Binary Vector', link: '/reference/vector-types/bvector' },

]
},
],
Expand Down Expand Up @@ -151,7 +151,56 @@ export default defineConfig({
],
},
],

'/cloud/':
[
{
text: 'Getting Started',
collapsed: false,
items: [
{ text: 'Sign Up', link: '/cloud/getting-started/sign-up' },
{ text: 'Quick Start', link: '/cloud/getting-started/quick-start' },
],
},
{
text: 'Connecting to the cluster',
collapsed: false,
items: [
{ text: 'Connecting with psql', link: '/cloud/connect/connect-with-psql' },
],
},
{
text: 'Monitoring',
collapsed: true,
items: [
{ text: 'Monitoring', link: '/cloud/monitoring/monitoring' },
],
},
{
text: 'Management',
collapsed: true,
items: [
{ text: 'Overview', link: '/cloud/manage/overview' },
{ text: 'Projects', link: '/cloud/manage/project' },
{ text: 'Clusters', link: '/cloud/manage/cluster' },
],
},
{
text: 'Pricing & Billing',
collapsed: true,
items: [
{ text: 'Cloud Pricing', link: '/cloud/pricing/price-plan' },
{ text: 'Credit Card', link: '/cloud/payment/credit-card' },
{ text: 'Invoice', link: '/cloud/payment/invoice' },
],
},
{
text: 'Limits & Restrictions',
collapsed: true,
items: [
{ text: 'Cloud Limits', link: '/cloud/limit/cloud-limit' },
],
},
],
},

socialLinks: [
Expand Down
25 changes: 25 additions & 0 deletions src/cloud/connect/connect-with-psql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Connecting with psql

The following instructions require a working installation of [psql](https://www.postgresql.org/download/). The psql client is the native command-line client for Postgres. It provides an interactive session for sending commands to Postgres and running ad-hoc queries. For more information about psql, refer to the [psql reference](https://www.postgresql.org/docs/15/app-psql.html), in the PostgreSQL Documentation.

::: warning
Cluster instance runs Postgres, which means that any Postgres application or standard utility such as psql is compatible with PGVecto.rs Cloud. You can also use Postgres client libraries and drivers to connect. However, please be aware that some older client libraries and drivers, including older psql executables, are built without [Server Name Indication (SNI)](https://en.wikipedia.org/wiki/Server_Name_Indication) support and require a workaround.
:::

The easiest way to connect to PGVecto.rs Cloud using psql is to use a connection endpoint. You can obtain a connection endpoint from the **cluster details** on the dashboard.

![](../images/two_types_connections.png)

We provide two types of connection endpoints:
- Super User Endpoint: This connection string is used to connect to the cluster as a superuser(postgres). You can use this connection string to create databases, users, and manage the cluster.
- Vector User Endpoint: This connection string is used to connect to the cluster as a vector user. You can use this connection string to store and query vector data.

From your terminal or command prompt, run the psql client with the connection endpoint copied from the **Dashboard**.

```shell
$ psql postgres://[user]:[password]@[hostname]/[dbname]
```

::: warning
PGVecto.rs Cloud requires that all connections use SSL/TLS encryption, but you can increase the level of protection by appending an sslmode parameter setting to your connection string.
:::
87 changes: 87 additions & 0 deletions src/cloud/getting-started/quick-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Quick Start

This guide will help you get started with PGVecto.rs Cloud. First, you need to sign up for a PGVecto.rs Cloud account. If you haven't done so already, you can sign up for a free account [here](../getting-started/sign-up.md).

## Create a cluster

::: tip
You can only create Enterprise plan after you bind a [credit card](../payment/credit-card.md).
:::

To create a new cluster, navigate to the PGVecto.rs Cloud Console and click on the "Create Cluster" button.

![](../images/after_login_in.png)

You need to specify the following information:
- **Cluster Name**: A unique name for your cluster.
- **Plan**: The plan you want to use for your cluster, for information about Cloud's paid plan options, see [Cloud plans](../pricing/price-plan).
- **Cloud Provider**: The cloud provider where your cluster will be deployed.
- **Region**: The region where your cluster will be deployed.
- **Database Name**: The name of the database that you will store vector data in.

![](../images/create_cluster.png)

## Cluster Info

After creating a cluster, you will be directed to the cluster info page. Here you can find the details of your cluster, such as the connection string, the status of the cluster, and resource usage of the cluster.

![](../images/cluster_info.png)

We provide two types of connection endpoints, `Super User Endpoint` and `Vector User Endpoint` respectively. For more information about the two types of connections, see [Connecting with psql](../connect/connect-with-psql.md).

![](../images/two_types_connections.png)

## Connect to the cluster

To connect to the cluster, you can use the provided connection strings. You can connect to the cluster using the `psql` command-line tool. For detailed instructions on how to connect to the cluster, see [Connect to PGVecto.rs Cloud with psql](../connect/connect-with-psql.md). After connecting to the cluster, we can execute the following SQL query `\dx` to validate you have successfully installed the vectors extension.

```shell
$ psql 'postgres://test_user:3UBmPZWty34m@test-tdndsdi9nn8xhc55.us-east-1.aws.pgvecto.rs:5432/test?sslmode=require'
psql (15.3, server 16.2 (Debian 16.2-1.pgdg110+2))
WARNING: psql major version 15, server major version 16.
Some psql features might not work.
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.

vector=> \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+----------------------------------------------------------------------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
vectors | 0.2.1 | vectors | vectors: Vector database plugin for Postgres, written in Rust, specifically designed for LLM
(2 rows)
```
## Create Index
In quick start, we will create a simple index. If you want to create a more advanced index, see [Reference](../../reference/). We provide rich user cases, see [Use Cases](../../use-case/).
```sql

vector=> CREATE TABLE test (id integer PRIMARY KEY, embedding vector(3) NOT NULL);
CREATE TABLE
vector=> INSERT INTO test SELECT i, ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 100) i;
INSERT 0 100
vector=> CREATE INDEX ON test USING vectors (embedding vector_l2_ops) WITH (options = "[indexing.hnsw]");
CREATE INDEX
vector=> SELECT * FROM test ORDER BY embedding <-> '[0.40671515, 0.24202824, 0.37059402]' LIMIT 10;
id | embedding
----+--------------------------------------
22 | [0.4550096, 0.15745035, 0.26764277]
19 | [0.45290792, 0.3833989, 0.3400999]
20 | [0.28304976, 0.37050676, 0.2509808]
63 | [0.3650842, 0.2542893, 0.5892761]
38 | [0.52051926, 0.09817826, 0.17111313]
17 | [0.39168102, 0.45760015, 0.19123259]
60 | [0.12486037, 0.22900634, 0.40918347]
18 | [0.14194076, 0.17346346, 0.2288747]
66 | [0.5948386, 0.36225688, 0.13597152]
44 | [0.7209442, 0.27641752, 0.49930736]
(10 rows)
```
## Monitoring
You can view the cpu and memory usage of your cluster in the cluster info page, and you can also view the index info for example the number of vectors in the index, the dimension of the vectors etc. For detailed information about monitoring, see [Monitoring](../monitoring/monitoring.md).
![](../images/monitoring.png)
20 changes: 20 additions & 0 deletions src/cloud/getting-started/sign-up.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Sign up for a cloud account

Sign up for PGVecto.rs Cloud in just a few seconds and start for free.

For information about what's included with the Cloud Free Tier, see [Cloud Free Tier](../pricing/price-plan#free-tier). For information about Cloud's paid plan options, see [Cloud plans](../pricing/price-plan).

## Sign up

Signing up for PGVecto.rs Cloud is easy. Simply navigate to https://cloud.pgvecto.rs/signup and sign up with your Github account.

![](../images/signup.png)

After signing up, you are directed to the PGVecto.rs Cloud Console. We will create a default project.

![](../images/after_login_in.png)

## Next steps

- [Quick Start](quick-start.md)
- [Connect to PGVecto.rs Cloud with psql](../connect/connect-with-psql.md)
Binary file added src/cloud/images/after_login_in.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/billing_add_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/billing_invoice_detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/billing_invoice_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/billing_invoice_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/billing_manual_pay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/billing_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/cloud_object_hierarchy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/cluster_info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/cpu_usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/cpu_utilization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/create_cluster.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/delete_cluster.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/enterprise_server_resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/freetier_server_resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/indexes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/memory_usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/monitoring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/project_billing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/project_info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/signup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cloud/images/two_types_connections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/cloud/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Cloud
## Getting Started

- [Sign Up](/cloud/getting-started/sign-up)
- [Quick Start](/cloud/getting-started/quick-start)

## Connect

- [Connect with psql](/cloud/connect/connect-with-psql)

## Monitoring

- [Monitoring](/cloud/monitoring/monitoring)

## Manage

- [Overview](/cloud/manage/overview)
- [Projects](link: /cloud/manage/project)
- [Cluster](/cloud/manage/cluster)

## Payment & Billing

- [Credit Card](/cloud/payment/credit-card)
- [Invoice](/cloud/payment/invoice)


## Limits & Restrictions

- [Cloud Limits](/cloud/limit/cloud-limit)
6 changes: 6 additions & 0 deletions src/cloud/limit/cloud-limit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Cloud Limits

Learn about the limits and restrictions you should know about your operations on PGVecto.rs Cloud:
- [Free Tier](../pricing/price-plan.md#free-tier): One account can create only **one** free tier cluster.
- [Project](../manage/project.md): One account can belong to maximum **five** projects.
- Does not support HA (High Availability) mode yet.
30 changes: 30 additions & 0 deletions src/cloud/manage/cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Clusters

One or more clusters can be created in a project. A cluster is a collection of nodes that run a `Postgres` cluster.

## Create a cluster

To create a new cluster, navigate to the PGVecto.rs Cloud Console and click on the "Create Cluster" button.

![](../images/after_login_in.png)

You need to specify the following information:
- **Cluster Name**: A unique name for your cluster.
- **Plan**: The plan you want to use for your cluster, for information about Cloud's paid plan options, see [Cloud plans](../pricing/price-plan).
- **Cloud Provider**: The cloud provider where your cluster will be deployed.
- **Region**: The region where your cluster will be deployed.
- **Database Name**: The name of the database that you will store vector data in.

![](../images/create_cluster.png)

## Delete a cluster

If you want to delete a cluster, navigate to the PGVecto.rs Cloud Console and click on the "Delete" button.

![](../images/delete_cluster.png)

## Cluster Monitoring

You can view the cpu and memory usage of your cluster in the cluster info page, and you can also view the index info for example the number of vectors in the index, the dimension of the vectors etc. For detailed information about monitoring, see [Monitoring](../monitoring/monitoring.md).

![](../images/monitoring.png)
24 changes: 24 additions & 0 deletions src/cloud/manage/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Overview of the cloud object hierarchy

Managing your PGVecto.rs Cloud project requires an understanding of the object hierarchy. The following diagram shows how objects in cloud are related. See below for a description of each object.
![](../images/cloud_object_hierarchy.png)

## PGVecto.rs Cloud Account

This is the account you used to sign up with PGVecto.rs Cloud. Now supports signing up with an GitHub account.

## Projects

A project is the top-level object in the hierarchy. It is a container for all clusters in the project and billing information. For more information, see [Projects](project.md).

## Clusters

A project can contain one or more clusters. A cluster is a collection of nodes that run one `Postgres` cluster. For more information, see [Clusters](cluster.md).

## Compute Instances

A cluster can contain one or more compute instances. A compute instance is a virtual machine that runs a `Postgres` instance.

## Databases

Every cluster contains two default databases: `postgres` and a database what you named when you created the cluster. You can create additional databases in a cluster with [psql](../connect/connect-with-psql.md) after the cluster is ready.
21 changes: 21 additions & 0 deletions src/cloud/manage/project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Projects

With PGVecto.rs Cloud, everything starts with the project. It is the top-level object in the hierarchy. A project can hold as many `Postgres` clusters as needed. The maximum number of projects you can create and join is 5.

Learn more about projects and how to manage them in these sections:
- [Project Setting](#project-setting)
- [Project Billing](#project-billing)


## Project Setting

In project setting, you can view and edit the project information. You can switch to another project by clicking the project name in the bottom left corner of the page. The default project is the first project we created for you when you signed up. In below diagram, you can change the name, invite members to the project, and leave the project.

![](../images/project_info.png)


## Project Billing

Every project has a billing page where you can view the billing information. In the billing page, you can add a payment method, view the billing invoices.

![](../images/project_billing.png)
29 changes: 29 additions & 0 deletions src/cloud/monitoring/monitoring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Monitoring

The PGVecto.rs Cloud provides several graphs for monitoring system and database metrics. You can access the **Monitoring** dashboard from the cluster details in the PGVecto.rs Cloud Console. Observable metrics include:
- [RAM](#ram)
- [CPU](#cpu)
- [Index](#vector)

## RAM

This graph shows the average memory usage of the Postgres instance, the unit is in MB.

![](../images/memory_usage.png)

## CPU

This graph shows the average CPU utilization percentage of the Postgres instance in past 5 minutes.

![](../images/cpu_utilization.png)

## Vector

This graph shows the details of the vector index, including following metrics:
- Index Name: The name of the index.
- Index Dimension: The dimension of the vectors in the index.
- Index Vector Count: The number of vectors in the index.
- Index Options: Details of the index options can be found in the [Index Options](../../reference/indexing_options.md)
- Indexing: If `True`, it means the index is in the process of indexing the data.

![](../images/indexes.png)
17 changes: 17 additions & 0 deletions src/cloud/payment/credit-card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Subscribe by Adding Credit Card

::: tip
Billing is for the project, not the user. There are separate invoices for each project, and you must add the payment method separately.
:::

PGVecto.rs Cloud supports credit card payments. You can add multiple credit cards or remove some of them by clicking `Delete`. Already added credit cards will be displayed on the billing page.

![](../images/billing_page.png)

The `Add Payment Method` button will take you to Stripe's `Add Credit Card page` where we will initiate a credit card pre-authorization request. There is no charge for this request. Once the add request is complete, the new credit card will be available and displayed on the `Billing` page.

![](../images/billing_add_card.png)

::: warning
The last credit card for each project cannot be deleted.
:::
Loading

0 comments on commit 2a41f5c

Please sign in to comment.