From 263738a3d97124ecd7546a2610c9e0d694f9da5c Mon Sep 17 00:00:00 2001 From: Saif Ali Shaik Date: Wed, 10 Apr 2024 14:12:51 +0530 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20docs=20for=20inst?= =?UTF-8?q?allation=20deployments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/installation-deployments.md | 108 ++++++++++++++++++++----------- 1 file changed, 72 insertions(+), 36 deletions(-) diff --git a/docs/installation-deployments.md b/docs/installation-deployments.md index fc0c93a82..930ba0ed8 100644 --- a/docs/installation-deployments.md +++ b/docs/installation-deployments.md @@ -1,78 +1,114 @@ -# Run locally via NPX +# Install, Run & Deploy AI Gateway + +## Locally + +Ensure [NodeJS is installed](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs). + +To quick-run the AI gateway locally: + +**Node** + +```sh +$ npx @portkey-ai/gateway +Your AI Gateway is now running on http://localhost:8787 🚀 ``` -npx @portkey-ai/gateway + +**Bun** + +```sh +$ bunx @portkey-ai/gateway +Your AI Gateway is now running on http://localhost:8787 🚀 ``` -# Managed Deployment -[Portkey.ai](https://portkey.ai) hosts the AI gateway for easy usage. You can [create an account](https://app.portkey.ai) on Portkey and try the gateway. Here are the [docs to get started](https://portkey.ai/docs/welcome/make-your-first-request). +## Cloudflare Workers -# Deploy to Cloudflare Workers +Clone the Repository -1. Clone the repo -``` +```sh git clone https://github.com/portkey-ai/gateway ``` -2. Install NPM dependencies -``` + +Install the NPM dependencies + +```sh cd gateway -npm i -``` -3. Deploy using wrangler +npm install ``` + +Deploy (uses [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/)) + +```sh npm run deploy ``` -# Run a Node.js server -1. Clone the repo -``` +## NodeJS Service + +Clone the Repository and install NPM dependencies + +```sh git clone https://github.com/portkey-ai/gateway -``` -2. Install NPM dependencies -``` cd gateway npm i npm run build ``` -3. Run the node server -``` + +Run the server + +```sh node build/start-server.js ``` -# Deploy using Docker -Run using Docker directly: -``` +## Docker + +To run using Docker + +```sh docker run -d -p 8787:8787 portkeyai/gateway:latest ``` -For more information on the Docker image, check [here](https://hub.docker.com/r/portkeyai/gateway) -# Deploy using Docker Compose -1. Download compose file from the repo: -``` +## Docker Compose + +Download compose file + +```sh wget "https://raw.githubusercontent.com/Portkey-AI/gateway/main/docker-compose.yaml" ``` -2. Run: -``` + +Run + +```sh docker compose up -d +# running and listening on port 8787 ``` -3. The service is now running and listening on port 8787 -# Deploy to Zeabur +## Replit + +Replit is cloud based IDE. You can deploy the AI gateway for your apps. + +[![Deploy on Replit](https://replit.com/badge?caption=Deploy%20on%20Replit)](https://replit.com/@portkey/AI-Gateway?v=1) + +## Deploy to Zeabur Click on the button below to deploy. [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/RU38E3) -# Deploy to Vercel +## Deploy to Vercel + Docs to be written, please help! -# Deploy to Fastly +## Deploy to Fastly + Docs to be written, please help! -# Deploy to AWS Lambda +## Deploy to AWS Lambda + Docs to be written, please help! -# Deploy to Lambda@edge +## Deploy to Lambda@edge + Docs to be written, please help! -# Deploy to Supabase functions +## Deploy to Supabase functions + Docs to be written, please help! From ef9eba2813d7d8c4b84654df878ec8bc084b8324 Mon Sep 17 00:00:00 2001 From: vrushankportkey <134934501+vrushankportkey@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:49:56 +0530 Subject: [PATCH 2/2] Update installation-deployments.md --- docs/installation-deployments.md | 119 +++++++++++++++++++++++-------- 1 file changed, 89 insertions(+), 30 deletions(-) diff --git a/docs/installation-deployments.md b/docs/installation-deployments.md index 930ba0ed8..ff24c1527 100644 --- a/docs/installation-deployments.md +++ b/docs/installation-deployments.md @@ -1,114 +1,173 @@ -# Install, Run & Deploy AI Gateway +# How to Deploy the Gateway? -## Locally +1. [Managed Deployment by Portkey](#managed-deployment) for quick setup without infrastructure concerns +2. [Local Deployment](#local-deployment) for complete control & customization +3. [Enterprise Deployment](#enterprise-deployment) for advanced features and dedicated support -Ensure [NodeJS is installed](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs). +## Managed Deployment -To quick-run the AI gateway locally: +Portkey runs this same Gateway on our API and processes **billions of tokens** daily. Portkey's API is in production with companies like Postman, Haptik, Turing, MultiOn, SiteGPT, and more. -**Node** +Sign up for the free developer plan (10K request/month) [here](https://app.portkey.ai/) or [discuss here](https://calendly.com/rohit-portkey/noam) for enterprise deployments. + +Check out the [API docs](https://portkey.ai/docs/welcome/make-your-first-request) here. + +## Local Deployment + +1. Do [NPM](#node) or [Bun](#bun) Install +2. Run a [Node.js Server](https://github.com/Portkey-AI/gateway/blob/main/docs/installation-deployments.md#run-a-nodejs-server) +3. Deploy on [Cloudflare Workers](https://github.com/Portkey-AI/gateway/blob/main/docs/installation-deployments.md#deploy-to-cloudflare-workers) +4. Deploy using [Docker](https://github.com/Portkey-AI/gateway/blob/main/docs/installation-deployments.md#deploy-using-docker) +5. Deploy using [Docker Compose](https://github.com/Portkey-AI/gateway/blob/main/docs/installation-deployments.md#deploy-using-docker-compose) +6. Deploy on [Replit](#replit) +7. Deploy on [Zeabur](https://github.com/Portkey-AI/gateway/blob/main/docs/installation-deployments.md#deploy-to-zeabur) + +### Node ```sh $ npx @portkey-ai/gateway -Your AI Gateway is now running on http://localhost:8787 🚀 ``` -**Bun** +
+ +### Bun ```sh $ bunx @portkey-ai/gateway -Your AI Gateway is now running on http://localhost:8787 🚀 ``` -## Cloudflare Workers +
+ +### Cloudflare Workers -Clone the Repository +1. Clone the Repository ```sh git clone https://github.com/portkey-ai/gateway ``` -Install the NPM dependencies +2. Install the NPM Dependencies ```sh cd gateway npm install ``` -Deploy (uses [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/)) +3. Deploy (using [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/)) ```sh npm run deploy ``` -## NodeJS Service +
+ +### NodeJS Server -Clone the Repository and install NPM dependencies +1. Clone the Repository ```sh git clone https://github.com/portkey-ai/gateway +``` + +2. Install the NPM Dependencies + +```sh cd gateway npm i npm run build ``` -Run the server +
+ +3. Run the Server ```sh node build/start-server.js ``` -## Docker +
+ +### Docker -To run using Docker +**Run using Docker directly:** ```sh docker run -d -p 8787:8787 portkeyai/gateway:latest ``` -## Docker Compose +For more information on the Docker image, check [here](https://hub.docker.com/r/portkeyai/gateway) -Download compose file +
+ +### Docker Compose + +1. Download Compose File from the Repository: ```sh wget "https://raw.githubusercontent.com/Portkey-AI/gateway/main/docker-compose.yaml" ``` -Run +2. Run: ```sh docker compose up -d -# running and listening on port 8787 ``` +> The service is now running and listening on port 8787 -## Replit +
-Replit is cloud based IDE. You can deploy the AI gateway for your apps. +### Replit [![Deploy on Replit](https://replit.com/badge?caption=Deploy%20on%20Replit)](https://replit.com/@portkey/AI-Gateway?v=1) -## Deploy to Zeabur +
-Click on the button below to deploy. +### Zeabur [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/RU38E3) -## Deploy to Vercel +
+ +### Vercel Docs to be written, please help! -## Deploy to Fastly +
+ +### Fastly Docs to be written, please help! -## Deploy to AWS Lambda +
+ +### AWS Lambda Docs to be written, please help! -## Deploy to Lambda@edge +
+ +### Lambda@edge Docs to be written, please help! -## Deploy to Supabase functions +
+ +### Supabase Functions Docs to be written, please help! + +
+ +## Enterprise Deployment +Make your AI app more reliable and forward compatible, while ensuring complete data security and privacy. + +✅  Secure Key Management - for role-based access control and tracking
+✅  Simple & Semantic Caching - to serve repeat queries faster & save costs
+✅  Access Control & Inbound Rules - to control which IPs and Geos can connect to your deployments
+✅  PII Redaction - to automatically remove sensitive data from your requests to prevent indavertent exposure
+✅  SOC2, ISO, HIPAA, GDPR Compliances - for best security practices
+✅  Professional Support - along with feature prioritization
+ +[Schedule a call to discuss enterprise deployments](https://calendly.com/rohit-portkey/noam) + +