From b2a20d3bbdfe87c081a304eb5a8195fd13808d38 Mon Sep 17 00:00:00 2001 From: Raphael Titsworth-Morin Date: Mon, 22 Jul 2024 13:29:48 -0700 Subject: [PATCH 1/4] add managed redis --- docs/concepts/managed-storage.md | 43 ++++++++++++++++++++++++++++++++ docs/providers/aws.md | 6 ++++- docs/providers/playground.md | 18 +++++++++++++ 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 docs/concepts/managed-storage.md create mode 100644 docs/providers/playground.md diff --git a/docs/concepts/managed-storage.md b/docs/concepts/managed-storage.md new file mode 100644 index 000000000..b522a6855 --- /dev/null +++ b/docs/concepts/managed-storage.md @@ -0,0 +1,43 @@ +--- +title: Managed Storage +description: Defang can help you provision managed storage services. +sidebar_position: 450 +--- + +# Managed Storage + +Defang helps you provision the infrastructure you need to run your services. That infrastructure is designed to scale in and out without persistent storage, so you can build highly scalable services. But Defang can also help you provision managed services to store and persist your data, like [caches](#managed-redis), databases[\*](#managed-postgres) , and object storage[\*](#managed-object-storage). + +## Managed Redis + +Redis is an in-memory data structure store widely used for caching, real-time analytics, and session management due to its high performance, low latency, and support for various data types. Defang can help you provision a managed Redis instance. To read more about the specifics of how this works for each provider, see the following: + - [Playground](../providers/playground#managed-redis) + - [AWS](../providers/aws#managed-redis) + +### How to use Managed Redis + +To use managed Redis, in your `compose.yaml` file, use the `x-defang-redis` extension to define your Redis service. Adding the annotation will tell Defang to provision a managed instance, rather than running Redis as a service. Here's an example: + +```yaml + redisx: + image: redis:6.2 + x-defang-redis: true + restart: unless-stopped + ports: + - mode: host + target: 6379 +``` + +## Managed Postgres + +:::info +As of July 22, 2024, managed Postgres is in development. +::: + +Postgres, or PostgreSQL, is an advanced open-source relational database system known for its robustness, extensibility, and compliance with SQL standards, making it a popular choice for complex applications requiring reliable data integrity and sophisticated querying capabilities. + +## Managed Object Storage + +:::info +As of July 22, 2024, managed object storage is planned for future development. +::: diff --git a/docs/providers/aws.md b/docs/providers/aws.md index 8049c21ff..c661084e4 100644 --- a/docs/providers/aws.md +++ b/docs/providers/aws.md @@ -1,7 +1,7 @@ --- title: AWS description: Defang allows you to easily create and manage full, scalable applications with AWS. -sidebar_position: 000 +sidebar_position: 010 --- # AWS @@ -43,3 +43,7 @@ To deploy your services, the Defang CLI packages your code and uploads it to an ### Runtime The provider runs your workloads using ECS using Fargate. It provisions a VPC with public and private subnets, and deploys your services to the private subnets. It then provisions an Application Load Balancer (ALB) and routes traffic to your services. + +### Managed Redis + +When using [Managed Redis](../concepts/managed-storage.md#managed-redis), the Defang CLI provisions an ElastiCache Redis cluster in your account. \ No newline at end of file diff --git a/docs/providers/playground.md b/docs/providers/playground.md new file mode 100644 index 000000000..1a666813b --- /dev/null +++ b/docs/providers/playground.md @@ -0,0 +1,18 @@ +--- +title: Playground +description: The Defang Playground is a free tier that allows you to experiment with Defang. +sidebar_position: 000 +--- + +The Defang Playground is a free tier that allows you to experiment with Defang. The Playground is a shared that cannot be used to run production workloads. The Playground is a great way to get started with Defang and to experiment with the Defang CLI. + +This page highlights architectural considerations when deploying to the playground and any differences you might encounter when deploying to the playground versus deploying to your own cloud account. + +## Overview + +Overall, the Defang Playground is very similar to deploying to your own cloud account. The Playground runs on a Defang-managed AWS account, so you can expect it to work similarly to deploying to [AWS](./aws.md). + +## Managed Redis + +The playground supports [Managed Redis](../concepts/managed-storage.md#managed-redis). Fundamentally, this works the same as it does in [AWS](./aws.md#managed-redis). + From 4c9398cea07bb33e285136ffc89ab548915d4f90 Mon Sep 17 00:00:00 2001 From: Raphael Titsworth-Morin Date: Thu, 25 Jul 2024 13:15:15 -0700 Subject: [PATCH 2/4] switch intro wording --- docs/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/intro.md b/docs/intro.md index 694ce1b56..3a2225070 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -7,7 +7,7 @@ description: Overview of Defang, a radically simpler way to build, deploy, and o ### What is Defang? -Defang is a radically simpler way for developers to build, deploy their apps to the cloud. Defang enables you to easily author cloud application in any language, build and deploy to the cloud with a single command, and iterate quickly. +Defang is a radically simpler way for developers to develop, deploy, and debug their cloud applications. Defang enables you to easily author cloud application in any language, build and deploy to the cloud with a single command, and iterate quickly with AI-assisted tooling. - The [Defang CLI](./getting-started/installing.md) includes an AI-driven assistant that translates natural language prompts to an outline for your project that you can then refine. - Defang can automatically build and deploy your project with a single command. From 3c759180c4506bd3c008c12ecd89fb029d8d6da7 Mon Sep 17 00:00:00 2001 From: Raphael Titsworth-Morin Date: Thu, 25 Jul 2024 13:25:05 -0700 Subject: [PATCH 3/4] add a section about debugging --- docs/concepts/debug.md | 13 +++++++++++++ docs/concepts/{ai.md => generate.md} | 15 ++++++++++----- docs/intro.md | 3 ++- 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 docs/concepts/debug.md rename docs/concepts/{ai.md => generate.md} (60%) diff --git a/docs/concepts/debug.md b/docs/concepts/debug.md new file mode 100644 index 000000000..c6b715800 --- /dev/null +++ b/docs/concepts/debug.md @@ -0,0 +1,13 @@ +--- +title: Debug +description: Defang uses AI to help you debug your cloud applications. +sidebar_position: 650 +--- + +# Debug + +Defang includes an AI-driven tool to help you debug your cloud applications. The AI assistant will use your service logs as well as the files in your project to help you identify and resolve issues. + +:::warning +The AI debugging assistant is currently in beta and is currently limited in its capabilities. We plan to expand the capabilities of the AI assistant in the future. +::: \ No newline at end of file diff --git a/docs/concepts/ai.md b/docs/concepts/generate.md similarity index 60% rename from docs/concepts/ai.md rename to docs/concepts/generate.md index 925177f7c..abb28ce72 100644 --- a/docs/concepts/ai.md +++ b/docs/concepts/generate.md @@ -1,16 +1,15 @@ --- -title: AI -description: How Defang uses AI to help you build and deploy your cloud applications. +title: Generate +description: Defang uses AI to help you generate a starting point for your cloud applications. sidebar_position: 100 --- -# AI - +# Generate Defang includes an AI-driven assistant that translates natural language prompts to an outline for your project that you can then refine. The AI assistant is available through the [Defang CLI](../getting-started/installing.md). :::info -The AI assistant is currently in beta and only supports a limited set of prompts. We plan to expand the capabilities of the AI assistant in the future. +The AI assistant is currently in beta and only supports a limited set of prompts, varying in complexity. We plan to expand the capabilities of the AI assistant in the future. ::: We are working on expanding the range of supported prompts and improving the accuracy of the AI assistant. If you have any feedback or suggestions, please let us know by [opening an issue](https://github.com/DefangLabs/defang/issues/new). @@ -38,3 +37,9 @@ A simple next.js app that serves a static page ``` A simple api with a single route built on express ``` + +**An example of a more complex prompt** + +``` +A service that uses bullmq and redis. The compose file should also include a redis service. The code should setup a queue. It should also expose three endpoints with express: one to add a job to the queue, another to check how many tasks are in the queue, and a last one that runs on / which is just a healthcheck. The code should also include a worker that processes the queue by logging what's in each task. Use environment variables to configure the redis connection. No password. +``` diff --git a/docs/intro.md b/docs/intro.md index 3a2225070..95e3d1976 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -21,7 +21,8 @@ Defang provides a streamlined experience to develop, deploy, observe, and update - Support for [various types of applications](./use-cases/use-cases.md): Web services and APIs, mobile app backends, ML services, hosting LLMs, etc. - Support for your programming [language of choice](./samples.md): Node.js, Python, Golang, or anything else you can package in a Dockerfile. -- Built-in [AI assistant](./concepts/ai.md) to go from natural language prompt to an outline project +- Built-in AI assistant to go [from natural language prompt to an outline project](./concepts/generate.md) +- Built-in AI assistant to help you [debug your cloud applications](./concepts/debug.md) - Automated [Dockerfile builds](./concepts/deployments.md) - Support for [pre-built Docker containers](./tutorials/deploy-container-using-the-cli.mdx), from public or private image registries - Ability to express your project configuration using a [Docker Compose YAML](./concepts/compose.md) file From f10558f8c466ac98e8dd9759efb7a5ad3c82e177 Mon Sep 17 00:00:00 2001 From: Raphael Titsworth-Morin Date: Thu, 25 Jul 2024 13:55:09 -0700 Subject: [PATCH 4/4] switch beta to preview --- docs/concepts/debug.md | 2 +- docs/concepts/generate.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/concepts/debug.md b/docs/concepts/debug.md index c6b715800..193e6f2ca 100644 --- a/docs/concepts/debug.md +++ b/docs/concepts/debug.md @@ -9,5 +9,5 @@ sidebar_position: 650 Defang includes an AI-driven tool to help you debug your cloud applications. The AI assistant will use your service logs as well as the files in your project to help you identify and resolve issues. :::warning -The AI debugging assistant is currently in beta and is currently limited in its capabilities. We plan to expand the capabilities of the AI assistant in the future. +The AI debugging assistant is currently in preview and is currently limited in its capabilities. We plan to expand the capabilities of the AI assistant in the future. ::: \ No newline at end of file diff --git a/docs/concepts/generate.md b/docs/concepts/generate.md index abb28ce72..8ab4d776c 100644 --- a/docs/concepts/generate.md +++ b/docs/concepts/generate.md @@ -9,7 +9,7 @@ sidebar_position: 100 Defang includes an AI-driven assistant that translates natural language prompts to an outline for your project that you can then refine. The AI assistant is available through the [Defang CLI](../getting-started/installing.md). :::info -The AI assistant is currently in beta and only supports a limited set of prompts, varying in complexity. We plan to expand the capabilities of the AI assistant in the future. +The AI assistant is currently in preview and only supports a limited set of prompts, varying in complexity. We plan to expand the capabilities of the AI assistant in the future. ::: We are working on expanding the range of supported prompts and improving the accuracy of the AI assistant. If you have any feedback or suggestions, please let us know by [opening an issue](https://github.com/DefangLabs/defang/issues/new).