Skip to content

Commit cccffe3

Browse files
authored
Merge pull request #65 from DefangLabs/managed-storage
Managed Storage Docs
2 parents 3284990 + f10558f commit cccffe3

File tree

6 files changed

+92
-8
lines changed

6 files changed

+92
-8
lines changed

docs/concepts/debug.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Debug
3+
description: Defang uses AI to help you debug your cloud applications.
4+
sidebar_position: 650
5+
---
6+
7+
# Debug
8+
9+
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.
10+
11+
:::warning
12+
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.
13+
:::

docs/concepts/ai.md renamed to docs/concepts/generate.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
---
2-
title: AI
3-
description: How Defang uses AI to help you build and deploy your cloud applications.
2+
title: Generate
3+
description: Defang uses AI to help you generate a starting point for your cloud applications.
44
sidebar_position: 100
55
---
66

7-
# AI
8-
7+
# Generate
98

109
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).
1110

1211
:::info
13-
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.
12+
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.
1413
:::
1514

1615
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
3837
```
3938
A simple api with a single route built on express
4039
```
40+
41+
**An example of a more complex prompt**
42+
43+
```
44+
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.
45+
```

docs/concepts/managed-storage.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Managed Storage
3+
description: Defang can help you provision managed storage services.
4+
sidebar_position: 450
5+
---
6+
7+
# Managed Storage
8+
9+
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[<sup>\*</sup>](#managed-postgres) , and object storage[<sup>\*</sup>](#managed-object-storage).
10+
11+
## Managed Redis
12+
13+
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:
14+
- [Playground](../providers/playground#managed-redis)
15+
- [AWS](../providers/aws#managed-redis)
16+
17+
### How to use Managed Redis
18+
19+
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:
20+
21+
```yaml
22+
redisx:
23+
image: redis:6.2
24+
x-defang-redis: true
25+
restart: unless-stopped
26+
ports:
27+
- mode: host
28+
target: 6379
29+
```
30+
31+
## Managed Postgres
32+
33+
:::info
34+
As of July 22, 2024, managed Postgres is in development.
35+
:::
36+
37+
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.
38+
39+
## Managed Object Storage
40+
41+
:::info
42+
As of July 22, 2024, managed object storage is planned for future development.
43+
:::

docs/intro.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Overview of Defang, a radically simpler way to build, deploy, and o
77

88
### What is Defang?
99

10-
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.
10+
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.
1111

1212
- 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.
1313
- Defang can automatically build and deploy your project with a single command.
@@ -21,7 +21,8 @@ Defang provides a streamlined experience to develop, deploy, observe, and update
2121

2222
- Support for [various types of applications](./use-cases/use-cases.md): Web services and APIs, mobile app backends, ML services, hosting LLMs, etc.
2323
- Support for your programming [language of choice](./samples.md): Node.js, Python, Golang, or anything else you can package in a Dockerfile.
24-
- Built-in [AI assistant](./concepts/ai.md) to go from natural language prompt to an outline project
24+
- Built-in AI assistant to go [from natural language prompt to an outline project](./concepts/generate.md)
25+
- Built-in AI assistant to help you [debug your cloud applications](./concepts/debug.md)
2526
- Automated [Dockerfile builds](./concepts/deployments.md)
2627
- Support for [pre-built Docker containers](./tutorials/deploy-container-using-the-cli.mdx), from public or private image registries
2728
- Ability to express your project configuration using a [Docker Compose YAML](./concepts/compose.md) file

docs/providers/aws.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: AWS
33
description: Defang allows you to easily create and manage full, scalable applications with AWS.
4-
sidebar_position: 000
4+
sidebar_position: 010
55
---
66

77
# AWS
@@ -43,3 +43,7 @@ To deploy your services, the Defang CLI packages your code and uploads it to an
4343
### Runtime
4444

4545
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.
46+
47+
### Managed Redis
48+
49+
When using [Managed Redis](../concepts/managed-storage.md#managed-redis), the Defang CLI provisions an ElastiCache Redis cluster in your account.

docs/providers/playground.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Playground
3+
description: The Defang Playground is a free tier that allows you to experiment with Defang.
4+
sidebar_position: 000
5+
---
6+
7+
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.
8+
9+
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.
10+
11+
## Overview
12+
13+
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).
14+
15+
## Managed Redis
16+
17+
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).
18+

0 commit comments

Comments
 (0)