- Notifications
You must be signed in to change notification settings - Fork328
Data docs#1418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Data docs#1418
Changes fromall commits
eced51a
a5abec1
0c51475
f289956
cd61aaa
17a1072
941bed3
1cf3c81
1cc71ed
4ce5467
4d7f7c2
7f6e676
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.terraform | ||
*.lock.hcl | ||
*.tfstate | ||
*.tfstate.backup |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Terraform configuration for pgml-rds-proxy on EC2 | ||
This is a sample Terraform deployment for running pgml-rds-proxy on EC2. This will spin up an EC2 instance | ||
with a public IP and a working security group & install the community Docker runtime. | ||
Once the instance is running, you can connect to it using the root key and run the pgml-rds-proxy Docker container | ||
with the correct PostgresML `DATABASE_URL`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
terraform { | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 5.46" | ||
} | ||
} | ||
required_version = ">= 1.2.0" | ||
} | ||
provider "aws" { | ||
region = "us-west-2" | ||
} | ||
data "aws_ami" "ubuntu" { | ||
most_recent = true | ||
filter { | ||
name = "name" | ||
values = ["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"] | ||
} | ||
filter { | ||
name = "virtualization-type" | ||
values = ["hvm"] | ||
} | ||
owners = ["099720109477"] # Canonical | ||
} | ||
resource "aws_security_group" "pgml-rds-proxy" { | ||
egress { | ||
from_port = 0 | ||
to_port = 0 | ||
protocol = "-1" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
ipv6_cidr_blocks = ["::/0"] | ||
} | ||
ingress { | ||
from_port = 6432 | ||
to_port = 6432 | ||
protocol = "tcp" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
ipv6_cidr_blocks = ["::/0"] | ||
} | ||
ingress { | ||
from_port = 22 | ||
to_port = 22 | ||
protocol = "tcp" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
ipv6_cidr_blocks = ["::/0"] | ||
} | ||
} | ||
resource "aws_instance" "pgml-rds-proxy" { | ||
ami = data.aws_ami.ubuntu.id | ||
instance_type = "t3.micro" | ||
key_name = var.root_key | ||
root_block_device { | ||
volume_size = 30 | ||
delete_on_termination = true | ||
} | ||
vpc_security_group_ids = [ | ||
"${aws_security_group.pgml-rds-proxy.id}", | ||
] | ||
associate_public_ip_address = true | ||
user_data = file("${path.module}/user_data.sh") | ||
user_data_replace_on_change = false | ||
tags = { | ||
Name = "pgml-rds-proxy" | ||
} | ||
} | ||
variable "root_key" { | ||
type = string | ||
description = "The name of the SSH Root Key you'd like to assign to this EC2 instance. Make sure it's a key you have access to." | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# | ||
# Cloud init script to install Docker on an EC2 instance running Ubuntu 22.04. | ||
# | ||
sudo apt-get update | ||
sudo apt-get install ca-certificates curl | ||
sudo install -m 0755 -d /etc/apt/keyrings | ||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | ||
sudo chmod a+r /etc/apt/keyrings/docker.asc | ||
# Add the repository to Apt sources: | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt-get update | ||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | ||
sudo groupadd docker | ||
sudo usermod -aG docker ubuntu |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.md.bak |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -6,9 +6,11 @@ | ||||
* [Getting Started](introduction/getting-started/README.md) | ||||
* [Create your database](introduction/getting-started/create-your-database.md) | ||||
* [Connect your app](introduction/getting-started/connect-your-app.md) | ||||
* [Import your data](introduction/getting-started/import-your-data/README.md) | ||||
* [Logical replication](introduction/getting-started/import-your-data/logical-replication/README.md) | ||||
* [Foreign Data Wrappers](introduction/getting-started/import-your-data/foreign-data-wrappers.md) | ||||
* [Move data with COPY](introduction/getting-started/import-your-data/copy.md) | ||||
* [Migrate with pg_dump](introduction/getting-started/import-your-data/pg-dump.md) | ||||
## API | ||||
@@ -51,7 +53,7 @@ | ||||
## Product | ||||
* [Cloud Database](product/cloud-database/README.md) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This is Cloud as opposed to Vector section | ||||
* [Serverless](product/cloud-database/serverless.md) | ||||
* [Dedicated](product/cloud-database/dedicated.md) | ||||
* [Enterprise](product/cloud-database/plans.md) | ||||
* [Vector Database](product/vector-database.md) | ||||
@@ -79,7 +81,7 @@ | ||||
## Resources | ||||
* [FAQs](resources/faqs.md) | ||||
* [Data Storage & Retrieval](resources/data-storage-and-retrieval/tabular-data.md) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This is a dup? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Not a dup, README.md is currently empty. | ||||
* [Tabular data](resources/data-storage-and-retrieval/tabular-data.md) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
| ||||
* [Documents](resources/data-storage-and-retrieval/documents.md) | ||||
* [Partitioning](resources/data-storage-and-retrieval/partitioning.md) | ||||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# ClientSDK | ||
### Key Features | ||
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -4,16 +4,16 @@ description: PostgresML is compatible with all standard PostgreSQL clients | ||||||
# Connect your app | ||||||
You can connect to yourPostgresMLdatabase from anyPostgreSQL-compatible client. PostgresMLcanserve in the traditional role of an application database, along with it's extended role as an MLOps platform, to make it easy to build and maintain AI applications together with your application data. | ||||||
##Client SDK | ||||||
We provide a client SDK for JavaScript, Python and Rust. The SDK manages connections to the database, and makes it easy to construct efficient queries for AI use cases, like managing RAG document collections, or building chatbots. All of the ML & AI still happens inside the database, with centralized operations, hardware and dependency management. | ||||||
### Installation | ||||||
The SDK is available from npm and PyPI: | ||||||
{% tabs %} | ||||||
{% tab title="JavaScript" %} | ||||||
```bash | ||||||
@@ -28,8 +28,12 @@ pip install pgml | ||||||
{% endtab %} | ||||||
{% endtabs %} | ||||||
Our SDK comes with zero additional dependencies. The core of the SDK is written in Rust, and we provide language bindings and native packaging & distribution. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
| ||||||
### Test the connection | ||||||
Once you have installed our SDK into your environment, you can test connectivity to our cloud with just a few lines of code: | ||||||
{% tabs %} | ||||||
{% tab title="JavaScript" %} | ||||||
```javascript | ||||||
@@ -80,9 +84,9 @@ async def main(): | ||||||
{% endtab %} | ||||||
{% endtabs %} | ||||||
## NativePostgreSQL libraries | ||||||
Using the SDK is completely optional. If you're comfortable with writing SQL, you canconnect directly to the databaseusing your favoritePostgreSQL client library or ORM: | ||||||
* C++: [libpqxx](https://www.tutorialspoint.com/postgresql/postgresql\_c\_cpp.htm) | ||||||
* C#: [Npgsql](https://github.com/npgsql/npgsql),[Dapper](https://github.com/DapperLib/Dapper), or [Entity Framework Core](https://github.com/dotnet/efcore) | ||||||
@@ -101,9 +105,9 @@ You can also connect directly to the database with your favorite bindings or ORM | ||||||
* Rust: [postgres](https://crates.io/crates/postgres), [SQLx](https://github.com/launchbadge/sqlx) or [Diesel](https://github.com/diesel-rs/diesel) | ||||||
* Swift: [PostgresNIO](https://github.com/vapor/postgres-nio) or [PostgresClientKit](https://github.com/codewinsdotcom/PostgresClientKit) | ||||||
## SQLeditors | ||||||
If you need to write ad-hoc queries, you can useany of these popular tools to execute SQL queries directlyon your database: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
| ||||||
* [Apache Superset](https://superset.apache.org/) | ||||||
* [DBeaver](https://dbeaver.io/) | ||||||
Uh oh!
There was an error while loading.Please reload this page.